Re: Bug: alphabetical lists will not show up as such in LaTeX export [9.3.6 (9.3.6-71-g7684b5-elpaplus @ /home/qqwy/.emacs.d/elpa/org-plus-contrib-20200518/)]
Hi, Qqwy/Wiebe-Marten writes: > However, the LaTeX that is exported will still create normal `enumerize` > lists that do /not/ show up as alphabetical but rather still use `1.`, > `2.`, `3.` for numbering. > > I think this current behaviour is at the very least surprising, and > possibly unintended. I use the enumitem package (http://mirrors.ctan.org/macros/latex/contrib/enumitem/enumitem.pdf) for lists in LaTeX. For an alphabetical list, for example: #+begin_src org ,#+LaTeX_Header: \usepackage{enumitem} ,#+ATTR_LaTeX: :options [label=\alph*.,widest=a] a. Lorem b. ipsum c. dolor #+end_src And to export to LaTeX and HTML, you can define a macro like this: #+begin_src org ,#+MACRO: alphalist (eval (if (org-export-derived-backend-p org-export-current-backend 'latex) "#+ATTR_LaTeX: :options [label=\\alph*.,widest=a]" "#+ATTR_HTML: :type a")) {{{alphalist}}} a. Lorem b. ipsum c. dolor' #+end_src Best regards, Juan Manuel
Re: Org mode links: Open a PDF file at a given page and highlight a given string
On 03/03/2021 23:11, Juan Manuel Macías wrote: Maxim Nikulin writes: Please, do not forget to pass stings coming from user input through shell-quote-argument. So, maybe it would look better like this (`start-process' instead of `start-process-shell-command')?: My intention was just to warn you against of opening a door to shell injections. Personally, as a workaround I would add an org-file-apps entry with a single argument combining page and search string and would write a tiny script that splits such argument and invokes the viewer. I consider it as a better option in the sense of forward compatibility since it allows to avoid custom link types. I expect that the bug will be fixed soon. I still suppose that it is serious limitation that such link format does not support named link targets inside PDF files. Maybe the part before second "::" could be considered as a named target if it does not look like a number. I am unsure concerning search strings containing "::", they may require more accurate regexp or using e.g. percent encoding as in URLs. #+begin_src emacs-lisp (org-link-set-parameters "pdf-pag" :follow (lambda (path) (let ((pag (if (string-match "::\\([1-9]+\\):*:*\\(.*\\)" path) (format "--page=%s" (match-string 1 path)) (error "no pages"))) (clean-path (expand-file-name (replace-regexp-in-string "::.+" "" path))) (str (when (string-match "::\\([1-9]+\\)::\\(.+\\)" path) (format "--find=%s" (match-string 2 path) (if str (start-process "zathura" nil "/usr/bin/zathura" clean-path pag str) (start-process "zathura" nil "/usr/bin/zathura" clean-path pag) #+end_src If your are asking my opinion on your function, I think that the variant with start-process is a better one. There is a low level alternative make-process but it requires more code, so it is less convenient. As to the style of lisp code, I am not a proper person to make suggestions. I suspect that your function has a problem with page numbers like 10. I do not like repetition of the regexp and tend to think that minor variations are unintended. On the other hand a variant I could offer is not shorter despite just one regexp and just one call of a match function. #+begin_src elisp (defun wa-pdf-destination-zathura-args (target) (let ((suffix (string-match "::\\(?:\\([0-9]+\\)?\\(?:::\\(.+\\)\\)?\\|\\(.*\\)\\)$" target))) (if (not suffix) (list (expand-file-name target)) (let* ((invalid (match-string 3 target)) (file (cond ((zerop suffix) (error "No file path in '%s'" target)) (invalid (error "Invalid destination within file: '%s'" invalid)) (t (substring target 0 suffix (page (match-string 1 target)) (search (match-string 2 target))) (seq-remove #'null (list (and page "--page") page (and search "--find") search (expand-file-name file))) (defun wa-launch-pdf-viewer (target) (let ((viewer "zathura") (command (wa-pdf-destination-zathura-args target)) ;; Do not allocate a pty. Really required only if the application ;; spawns background children and exits (xdg-open, gio open, ;; kde-open5), see Emacs Bug #44824. (process-connection-type nil)) (apply #'start-process viewer "*Messages*" viewer command))) #+end_src #+begin_src elisp :results value list (mapcar #'wa-pdf-destination-zathura-args '( "~/Download/grub.pdf::95::do" "file.pdf::95" "file.pdfdo" "file.pdf" ;; "::" ;; "::95" ;; "file.pdf::a" ;; "file.pdf::95:do" )) #+end_src
Re: Culling org files (notion of Types, many small vs few big files)
On 2021-03-04 16:11, Samuel Wales wrote: tim> naming convention ... to determine what is included this is also what i do. org-agenda-files is just set at startup according to basename pattern. I find it very interesting that all three of us seem to have independently arrived at some of same conclusions. Originally I did not want to go off on this tangent, but now I wonder how close what I am doing is to what you guys are doing. In my case, I came up with some notion of "Types." Each Org file MAY use one of a list of defined Types at the beginning of the file name (which is also the first top level headline in the file, starting at position 0), followed by a delimiter (currently ": ").[0] I keep experimenting with my list of Types (I probably have too many), but there are a few that definitely seem useful so far. For example: - Project: Pretty self-explanitory. - Area: A concept lifted straight from PARA Method ("a sphere of activity with a standard to be maintained over time").[1] - Equipment: A special type of Area: that pertains to a single major piece of equipment (like a vehicle) or some group of related equipment (e.g. "small shop equipment" or "home appliances", etc.). - HowTo: Literally "how to do x" which is great for remembering those obscure command line invocations (or whatever) that you only use 2x per year. Combined with headline level completing-read search (see below) this becomes very powerful/handy. So then, by default, any of Org files starting with either Area:, Equipment:, or Project: are the only ones that are considered "active" for purposes of agenda and scanned for TODOs (implemented as a simple `directory-files' function and a regexp). I use my system as a combination of TODO and PIM[2], so this makes a nice logical split where all those PIM "random notes" do not impact the agenda performance whatsoever. I have some other custom agenda functions as well, for things like periodic reviews (in the GTD sense) and others. Org's Agenda really is essentially just like a database query engine when you get right down to it (except storing in plain text of course). trs> [smaller files] My agenda is not cluttered. it is not clear to me why more smaller files and shallower trees in the outline would improve the agenda. sounds good though. I somewhat addressed this above with Types (which improve performance), but as to your specific point (clutter)... OK, so maybe not /directly/. But rather the whole system have improved my engagement, by way of no longer feeling lost/overwhelmed as I did with very deep trees in only a few files. I think it is just easier to reason about some small subset of the whole at one time, as represented in a single file. In theory, I guess you could accomplish the same by narrowing subtrees or other methods, but for whatever reason separate files seem to appeal more to me than those other ways (probably because they are also faster to navigate, among other benefits). However, to each their own here, I suppose. I think I was also responding to some specific comment you made about time stamps (re: "cluttered"). There is also this whole "inter linking" / "atomicity" thing. I came to Orgmode from TiddlyWiki, and that was the only thing I missed, this notion of many small "atomic" nodes, which could then be put back together in many different ways (links, tags, etc.) as opposed to a (usually single, large) tree which (at least somewhat) imposes a particular structure and implicit categorization. Nowadays the Zettelkasten stuff have become quite popular, but it is exactly the same notion. Tree knowledge structures are great when many people must share the same info, for example law codes. Or reference manuals. But in our own PIM, we should be more free to link information together in whatever way suits our own brains. And be able to link it back together in multiple, sometimes differing, ways. I seem to also recall some discussion of research even supporting the idea that our brains actually function more like an "interconnected web" than a "tree" structure (can you tell I am a bit of a PIM geek and have been interested in this subject for some years now?). :D Thinking further, I guess my usage has also become possible by some of the search and other tools I have built /around/ my directory full of small files, which obviate some of the reasons for keeping things in "one or a few big files." One example is my custom headline search function (which uses grep under the hood)[3]. It has been very helpful in being able to locate things. Now I have a completing-read search over all headlines in all my files (which will jump to that location upon selection). I have found that by carefully constructing headlines that this works "well enough" for almost all my search needs so far.[4] On 3/4/21, Tim Cross wrote: My use pattern also constantly evolves as my requirements and priorities change. It is and probab
Re: Culling org files (notion of Types, many small vs few big files)
TRS-80 writes: > On 2021-03-04 16:11, Samuel Wales wrote: > I have some other custom agenda functions as well, for things like > periodic reviews (in the GTD sense) and others. Org's Agenda really > is essentially just like a database query engine when you get right > down to it (except storing in plain text of course). > I thinink I would agree with this. The agenda is a lotmore than just an 'agenda'. I tend to view it as a 'query result', which just displays my query in different ways. sometimes it is similar to what most people would think of as an agenda, but often it is 'something' completely different. -- Tim Cross
Re: Culling org files (notion of Types, many small vs few big files)
the closest thing i have to types is merely this - some files go in org-agenda-files, by basename pattern - some to text search extra files, pattern, don't need the tses - some to neither, no pattern [blog.org] - some get put manually in refile targets which has no real connection to either ontology [like hvac], or types/purposes/statuses [like your project type] as you have. it is merely what things i need in ts agenda vs. search agenda view. to me the outline is a forest with the tree problem [i.e. the fact that we want graphs not trees] kludged using id links and searching. files are major categories. too many and i get confused what is where. tree structure is by ontology, not types. i think my agenda views therefore wouldn't be any less cluttered or confusing if i had more files or shallower trees. [assuming i set category property which i do.] so that is why i was confused by your comment. i find that the more complex a system i develop, the more i regret it later because i can't just reverse it, i can't do maintenance at anything close to a sufficient rate, and i get confused. the ts comment i made is merely that i do like "* LOG [2021-03-05 Fri 13:44] hi" usefully. not sure if relevant. On 3/5/21, TRS-80 wrote: > On 2021-03-04 16:11, Samuel Wales wrote: >>> tim> naming convention ... to determine what is included >> >> this is also what i do. org-agenda-files is just set at startup >> according to basename pattern. > > I find it very interesting that all three of us seem to have > independently arrived at some of same conclusions. > > Originally I did not want to go off on this tangent, but now I wonder > how close what I am doing is to what you guys are doing. > > In my case, I came up with some notion of "Types." Each Org file MAY > use one of a list of defined Types at the beginning of the file name > (which is also the first top level headline in the file, starting at > position 0), followed by a delimiter (currently ": ").[0] > > I keep experimenting with my list of Types (I probably have too many), > but there are a few that definitely seem useful so far. For example: > > - Project: Pretty self-explanitory. > > - Area: A concept lifted straight from PARA Method ("a sphere of >activity with a standard to be maintained over time").[1] > >- Equipment: A special type of Area: that pertains to a single major > piece of equipment (like a vehicle) or some group of related > equipment (e.g. "small shop equipment" or "home appliances", > etc.). > > - HowTo: Literally "how to do x" which is great for remembering those >obscure command line invocations (or whatever) that you only use 2x >per year. Combined with headline level completing-read search (see >below) this becomes very powerful/handy. > > So then, by default, any of Org files starting with either Area:, > Equipment:, or Project: are the only ones that are considered "active" > for purposes of agenda and scanned for TODOs (implemented as a simple > `directory-files' function and a regexp). I use my system as a > combination of TODO and PIM[2], so this makes a nice logical split > where all those PIM "random notes" do not impact the agenda > performance whatsoever. > > I have some other custom agenda functions as well, for things like > periodic reviews (in the GTD sense) and others. Org's Agenda really > is essentially just like a database query engine when you get right > down to it (except storing in plain text of course). > >>> trs> [smaller files] My agenda is not cluttered. >> >> it is not clear to me why more smaller files and shallower trees in >> the outline would improve the agenda. sounds good though. > > I somewhat addressed this above with Types (which improve > performance), but as to your specific point (clutter)... > > OK, so maybe not /directly/. But rather the whole system have > improved my engagement, by way of no longer feeling lost/overwhelmed > as I did with very deep trees in only a few files. I think it is just > easier to reason about some small subset of the whole at one time, as > represented in a single file. In theory, I guess you could accomplish > the same by narrowing subtrees or other methods, but for whatever > reason separate files seem to appeal more to me than those other ways > (probably because they are also faster to navigate, among other > benefits). However, to each their own here, I suppose. > > I think I was also responding to some specific comment you made about > time stamps (re: "cluttered"). > > There is also this whole "inter linking" / "atomicity" thing. I came > to Orgmode from TiddlyWiki, and that was the only thing I missed, this > notion of many small "atomic" nodes, which could then be put back > together in many different ways (links, tags, etc.) as opposed to a > (usually single, large) tree which (at least somewhat) imposes a > particular structure and implicit categorization. Nowadays the > Zettelkasten stuff have become
Re: Culling org files (notion of Types, many small vs few big files)
i should maybe point out that my focus in op is merely, literally something like "possibilities for code for helping the user archive or delete stuff in existing bloated org files". but i am also ok with tangents like other ideas for speed and less clutter and organizational tricks and so on. this mailing list in the old days used to talk about such things. like, what's a project, what does next mean, "is gtd for me", "at some point you have to actually /do/ a task", and will the org system get bloated and slow for users in the future. On 3/5/21, Samuel Wales wrote: > the closest thing i have to types is merely this > > - some files go in org-agenda-files, by basename pattern > - some to text search extra files, pattern, don't need the tses > - some to neither, no pattern [blog.org] > - some get put manually in refile targets > > which has no real connection to either ontology [like hvac], or > types/purposes/statuses [like your project type] as you have. > > it is merely what things i need in ts agenda vs. search agenda view. > > to me the outline is a forest with the tree problem [i.e. the fact > that we want graphs not trees] kludged using id links and searching. > files are major categories. too many and i get confused what is > where. tree structure is by ontology, not types. > > i think my agenda views therefore wouldn't be any less cluttered or > confusing if i had more files or shallower trees. [assuming i set > category property which i do.] so that is why i was confused by your > comment. > > i find that the more complex a system i develop, the more i regret it > later because i can't just reverse it, i can't do maintenance at > anything close to a sufficient rate, and i get confused. > > the ts comment i made is merely that i do like "* LOG [2021-03-05 > Fri 13:44] hi" usefully. not sure if relevant. > > > On 3/5/21, TRS-80 wrote: >> On 2021-03-04 16:11, Samuel Wales wrote: tim> naming convention ... to determine what is included >>> >>> this is also what i do. org-agenda-files is just set at startup >>> according to basename pattern. >> >> I find it very interesting that all three of us seem to have >> independently arrived at some of same conclusions. >> >> Originally I did not want to go off on this tangent, but now I wonder >> how close what I am doing is to what you guys are doing. >> >> In my case, I came up with some notion of "Types." Each Org file MAY >> use one of a list of defined Types at the beginning of the file name >> (which is also the first top level headline in the file, starting at >> position 0), followed by a delimiter (currently ": ").[0] >> >> I keep experimenting with my list of Types (I probably have too many), >> but there are a few that definitely seem useful so far. For example: >> >> - Project: Pretty self-explanitory. >> >> - Area: A concept lifted straight from PARA Method ("a sphere of >>activity with a standard to be maintained over time").[1] >> >>- Equipment: A special type of Area: that pertains to a single major >> piece of equipment (like a vehicle) or some group of related >> equipment (e.g. "small shop equipment" or "home appliances", >> etc.). >> >> - HowTo: Literally "how to do x" which is great for remembering those >>obscure command line invocations (or whatever) that you only use 2x >>per year. Combined with headline level completing-read search (see >>below) this becomes very powerful/handy. >> >> So then, by default, any of Org files starting with either Area:, >> Equipment:, or Project: are the only ones that are considered "active" >> for purposes of agenda and scanned for TODOs (implemented as a simple >> `directory-files' function and a regexp). I use my system as a >> combination of TODO and PIM[2], so this makes a nice logical split >> where all those PIM "random notes" do not impact the agenda >> performance whatsoever. >> >> I have some other custom agenda functions as well, for things like >> periodic reviews (in the GTD sense) and others. Org's Agenda really >> is essentially just like a database query engine when you get right >> down to it (except storing in plain text of course). >> trs> [smaller files] My agenda is not cluttered. >>> >>> it is not clear to me why more smaller files and shallower trees in >>> the outline would improve the agenda. sounds good though. >> >> I somewhat addressed this above with Types (which improve >> performance), but as to your specific point (clutter)... >> >> OK, so maybe not /directly/. But rather the whole system have >> improved my engagement, by way of no longer feeling lost/overwhelmed >> as I did with very deep trees in only a few files. I think it is just >> easier to reason about some small subset of the whole at one time, as >> represented in a single file. In theory, I guess you could accomplish >> the same by narrowing subtrees or other methods, but for whatever >> reason separate files seem to appeal more to me than tho
Outdated instructions for Org-babel-abc
The babel-languages setup instructions for ABC list the outdated "sh t" where they should have "shell t".
Re: Outdated instructions for Org-babel-abc
Done. Thanks. All the best, Tom Wade McReynolds writes: The babel-languages setup instructions for ABC list the outdated "sh t" where they should have "shell t". -- Thomas S. Dye https://tsdye.online/tsdye