Re: [O] Exzessive newlines in org-element item interpreter?
Hello, Thorsten Jolitz tjol...@gmail.com writes: Hi List, evaluating this #+BEGIN_SRC emacs-lisp (org-element-interpret-data '(item (:bullet 1 :tag hello :checkbox trans :counter 2) (section nil world))) #+END_SRC #+results: : 1. [@2] hello :: :world the content is always placed on a newline, which looks strange in my eyes. Is that intended? It is. You include a `section' in an `item', which is syntactically wrong. Only headlines can contain sections. PS and checkbox is ignored, no matter if I give 'on, 'off and 'trans as symbols or strings. You should not provide 'on, 'off or 'trans, and even less strings, but on, off or trans since your expression is already quoted. Regards, -- Nicolas Goaziou
Re: [O] Text above first headline is being exported, despite :export: tag being used.
Hello, Charles C. Berry ccbe...@ucsd.edu writes: I confirm that the ECM *fails* in maint. But it *succeeds* in master. Since modifying maint is not an option until Emacs' new release, and given than master will become maint thereafter, I think the situation is as fine as possible. Regards, -- Nicolas Goaziou
Re: [O] Exzessive newlines in org-element item interpreter?
Nicolas Goaziou m...@nicolasgoaziou.fr writes: Hello, Thorsten Jolitz tjol...@gmail.com writes: Hi List, evaluating this #+BEGIN_SRC emacs-lisp (org-element-interpret-data '(item (:bullet 1 :tag hello :checkbox trans :counter 2) (section nil world))) #+END_SRC #+results: : 1. [@2] hello :: :world the content is always placed on a newline, which looks strange in my eyes. Is that intended? It is. You include a `section' in an `item', which is syntactically wrong. Only headlines can contain sections. I see. So when creating an element with interpreted content (that is given as plain string), I use - headlines :: (section nil foo) - others :: (paragraph nil foo) or should it rather be - headlines :: (section nil (paragraph nil foo)) ? PS and checkbox is ignored, no matter if I give 'on, 'off and 'trans as symbols or strings. You should not provide 'on, 'off or 'trans, and even less strings, but on, off or trans since your expression is already quoted. ups ... of course. One more question: the :tag property of items is parsed as list (of sec. string(s)) - is it sufficient for interpreting to give it a plain string: tag: foo instead of tag: (foo)? It seems to work ... -- cheers, Thorsten
Re: [O] New key binding C-Tab -- how to not use it
Justin Gordon justin.gor...@gmail.com writes: I just updated emacs org-mode and when visiting org files, this binding takes effect: C-TAB (org-force-cycle-archived) Cycle a tree even if it is tagged with ARCHIVE. What's the best way to disable this binding? I use C-Tab for moving between windows. Try , | (org-defkey org-mode-map \C-TAB 'undefined) ` not sure if the TAB is correct here, maybe try TAB, tab, etc if it does not work. -- cheers, Thorsten
Re: [O] Exzessive newlines in org-element item interpreter?
Thorsten Jolitz tjol...@gmail.com writes: Nicolas Goaziou m...@nicolasgoaziou.fr writes: [...] You should not provide 'on, 'off or 'trans, and even less strings, but on, off or trans since your expression is already quoted. One more question: bullet strings are parsed 'as-is', but the interpreter seems to have its own logic that is a bit difficult to grok (or are there syntax errors too?): #+BEGIN_SRC emacs-lisp (org-element-interpret-data '(item (:bullet - :tag hello :checkbox trans :counter 2) (paragraph nil world))) #+END_SRC #+results: : - [@2] [-] hello :: world #+BEGIN_SRC emacs-lisp (org-element-interpret-data '(item (:bullet + :tag hello :checkbox trans :counter 2) (paragraph nil world))) #+END_SRC #+results: : - [@2] [-] hello :: world #+BEGIN_SRC emacs-lisp (setq org-list-allow-alphabetical t) (when (featurep 'org-element) (load org-element t t)) (org-element-interpret-data '(item (:bullet a :tag hello :checkbox trans :counter 2) (paragraph nil world))) #+END_SRC #+results: : 1. [@2] [-] hello :: world -- cheers, Thorsten
Re: [O] Exzessive newlines in org-element item interpreter?
Hello, Thorsten Jolitz tjol...@gmail.com writes: One more question: bullet strings are parsed 'as-is', but the interpreter seems to have its own logic that is a bit difficult to grok (or are there syntax errors too?): This is simple: ordered lists bullets are always X., where X is a number and unordered lists are always -. Regards, -- Nicolas Goaziou
Re: [O] Exzessive newlines in org-element item interpreter?
Thorsten Jolitz tjol...@gmail.com writes: So when creating an element with interpreted content (that is given as plain string), I use - headlines :: (section nil foo) - others :: (paragraph nil foo) If contents are already interpreted, - anything :: foo is sufficient, I think. However, when anything is either item or footnote-definition, and contents start with a paragraph, - anything :: (paragraph nil foo) is better due to special handling of the first line. One more question: the :tag property of items is parsed as list (of sec. string(s)) - is it sufficient for interpreting to give it a plain string: tag: foo instead of tag: (foo)? It seems to work ... (foo) is equivalent to foo. (foo) allows to insert objects, e.g. (foo (bold nil bar)) Regards,
Re: [O] stuck project definition bug?
(setq org-stuck-projects '(PROJECT (NEXT) nil nil)) This means that everything with a tag :PROJECT: without NEXT subtask is a stuck project. I’d like this stuck project to be shown in the stuck project list: * TODO my stuck project :PROJECT: ** TODO subtask But it is not shown there. I cannot reproduce it on latest Org, i.e., both tasks appear in the stuck projects list. Hi, Nicolas. I found the cause. (setq org-enforce-todo-dependencies t) (setq org-agenda-dim-blocked-tasks ‘invisible) This hides my stuck project from the list because it depends on a subtask. I set it to dim, not to hide, that’s enough for now. Thanks.
Re: [O] Exzessive newlines in org-element item interpreter?
Nicolas Goaziou m...@nicolasgoaziou.fr writes: Hello, Thorsten Jolitz tjol...@gmail.com writes: One more question: bullet strings are parsed 'as-is', but the interpreter seems to have its own logic that is a bit difficult to grok (or are there syntax errors too?): This is simple: ordered lists bullets are always X., where X is a number and unordered lists are always -. Thx for you answers (to my other post too). Just to get it straight: The conclusion of your answer above is that the item-interpreter cannot produce the complete org-mode syntax for plain-lists that is recognized by the parser and described in the manual? -- cheers, Thorsten
[O] Link to named block
Hi, I've made a small function to link to a named block in org files. #+BEGIN_SRC emacs-lisp (defun dmd--org-link-to-named-block () Create an org-link to the named block at point. Blocks are named with #+NAME. (when (eq major-mode 'org-mode) (let* ((el (org-element-at-point)) (name (org-element-property :name el))) (when name (org-store-link-props :link name) #+END_SRC Do you think it should be added to org? I find it useful to add a link to a figure when I'm exporting to latex. I tried to add it to `org-store-link` but it's a big function and I wonder why it's not splitted in smaller functions. (e.g. org-help-store-link, org-w3-store-link, org-image-store-link, ...). If you agree, I could split it. WDYT? Best, -- Daimrod/Greg signature.asc Description: PGP signature
[O] Exponents / subscripts
Hi, A minor issue and I haven't check if it has already been raised in the past. Currently something like \(a^nb^n\) is the org-mode buffer as \(a^{nbn}\). IE it starts exponent mode and stops it at the next space. Could it be made to behave more like LaTeX, i.e. only the next char except if braces ? Or is it something beyond the Org parser / syntax ? Regards, -- Fabrice Popineau
Re: [O] Exponents / subscripts
Hello, Fabrice Popineau fabrice.popin...@supelec.fr writes: A minor issue and I haven't check if it has already been raised in the past. Currently something like \(a^nb^n\) is the org-mode buffer as \(a^{nbn}\). IE it starts exponent mode and stops it at the next space. Could it be made to behave more like LaTeX, i.e. only the next char except if braces ? Or is it something beyond the Org parser / syntax ? This is not beyond anything. It is (historically) meant to be that way. Regards, -- Nicolas Goaziou
Re: [O] Exzessive newlines in org-element item interpreter?
Thorsten Jolitz tjol...@gmail.com writes: The conclusion of your answer above is that the item-interpreter cannot produce the complete org-mode syntax for plain-lists that is recognized by the parser and described in the manual? This question is too tricky (and closed) for me to answer. Regards,
Re: [O] Exzessive newlines in org-element item interpreter?
Nicolas Goaziou m...@nicolasgoaziou.fr writes: Thorsten Jolitz tjol...@gmail.com writes: The conclusion of your answer above is that the item-interpreter cannot produce the complete org-mode syntax for plain-lists that is recognized by the parser and described in the manual? This question is too tricky (and closed) for me to answer. ,[ C-h f yes-or-no-p RET ] | yes-or-no-p is an alias for `y-or-n-p'. | | (yes-or-no-p PROMPT) | | Ask user a y or n question. ` -- cheers, Thorsten
Re: [O] Exponents / subscripts
2014-10-19 19:08 GMT+02:00 Nicolas Goaziou m...@nicolasgoaziou.fr: Hello, Fabrice Popineau fabrice.popin...@supelec.fr writes: A minor issue and I haven't check if it has already been raised in the past. Currently something like \(a^nb^n\) is the org-mode buffer as \(a^{nbn}\). IE it starts exponent mode and stops it at the next space. Could it be made to behave more like LaTeX, i.e. only the next char except if braces ? Or is it something beyond the Org parser / syntax ? This is not beyond anything. It is (historically) meant to be that way. Given that it is only a matter of presentation, does that mean it could be changed ? If yes, I can try to give it a shot. Fabrice
Re: [O] [PATH] Speedups to org-table-recalculate
Hi Nathaniel On Sat, Oct 18, 2014 at 7:11 AM, Nathaniel Flath flat0...@gmail.com wrote: Patches are attached. I am not an expert for all the following comments, please correct me or contradict where necessary. The patches do not apply on current master, so I did not try them out yet. You might want to add a def-edebug-spec like there is one for many other defmacro in Org. Limit lines to max. 80 chars. It will make it easier for the maintainer Bastien to apply the patches when you format them with git including a changelog etc. as described here http://orgmode.org/worg/org-contribute.html + (if (not all) (message Re-applying formula to field: %s (car eq)) +(org-table-execute-once-per-second log-last-time (message Re-applying formula to field: %s (car eq Good idea to still log always when only one table row is recalculated. The doubling of the message makes it more complicated to maintain its string. I suggest to change the macro to allow (org-table-execute-once-per-second (when all log-last-time) ; Log just always when `all' is nil. (message Re-applying formula to field: %s (car eq))) Why not test `all' also for the other message with to field? + ,@body + ))) Parentheses not alone on an own line. +(and all (org-table-execute-once-per-second log-last-time (message Re-applying formulas to %d lines...done cnt Shouldn't this use `log-first-time'? Michael
Re: [O] New key binding C-Tab -- how to not use it
Thorsten Jolitz tjol...@gmail.com writes: , | (org-defkey org-mode-map \C-TAB 'undefined) ` not sure if the TAB is correct here, maybe try TAB, tab, etc if it does not work. I think this should be one of these: (org-defkey org-mode-map \C-\t 'undefined) (org-defkey org-mode-map [(control tab)] 'undefined) (org-defkey org-mode-map (kbd C-TAB) 'undefined) You may also want to check `local-unset-key' that you can use within `org-mode-hook'. -- Bastien
Re: [O] org-export-format-source-code-or-example: End of Buffer
Nicolas Goaziou m...@nicolasgoaziou.fr writes: Mishal Awadah a.mam...@gmail.com writes: According to Andreas, this is an org-mode issue: https://answers.launchpad.net/python-mode/+question/248031 The function `org-export-format-source-code-or-example' doesn't exist anymore, so I think this bug should be closed. +1 Also, Mishal, please update and report any bug. -- Bastien
Re: [O] New key binding C-Tab -- how to not use it
Bastien b...@gnu.org writes: Thorsten Jolitz tjol...@gmail.com writes: , | (org-defkey org-mode-map \C-TAB 'undefined) ` not sure if the TAB is correct here, maybe try TAB, tab, etc if it does not work. I think this should be one of these: (org-defkey org-mode-map \C-\t 'undefined) (org-defkey org-mode-map [(control tab)] 'undefined) (org-defkey org-mode-map (kbd C-TAB) 'undefined) You may also want to check `local-unset-key' that you can use within `org-mode-hook'. Sometimes I use `C-h k', describe-key, which gives me C-Tab as another candidate. This can help as it can vary between OS', for instance Ctl+Scroll-up does vary here. (My strategy propogates from Xah Lee's blog.) -- Brady
Re: [O] How to change a link?
On 2014-10-15, at 12:19, Nicolas Goaziou wrote: Hello, Marcin Borkowski mb...@wmi.amu.edu.pl writes: assume that I have a link object (e.g., I'm in the ellipsis part of this: (org-element-map (org-element-parse-buffer 'object) 'link (lambda (elt) ... )) What I want to do is this: 1. check whether it is an internal link, and (member (org-element-property :type elt) '(custom-id fuzzy)) 2. if it is, change it so that it points to the analogous place in another file. (org-element-put-property elt :raw-link (concat file:path/to/other-file.org:: (org-element-property :path elt))) OK, it works, but: if the link description is empty, after this change it's still empty, so that it becomes the result of concatenation. I'd like the link description to stay the same, no matter whether it's empty or not. How do I set the /contents/ of a link object (as opposed to a property)? Regards, Best, -- Marcin Borkowski http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski Adam Mickiewicz University
[O] [PATCH] Fix typo in org.texi
The patch below fixes (what i think) is a minor typo in the info documentation. Thanks for your great work on org-mode, Best, Rafael From 65d995992fdcb5a04c413f83fe5c68edf4508835 Mon Sep 17 00:00:00 2001 From: Rafael Laboissiere raf...@laboissiere.net Date: Sun, 19 Oct 2014 22:37:39 +0200 Subject: [PATCH] org.texi: Remove extraneous backslash in key sequence * doc/org.texi (ASCII bar plots): Remove the backslash character in the key binding sequence for orgtbl-ascii-plot command. I think that this backslash is not needed, since previously in the same section, at subheading Graphical plots using Gnuplot, there is a similar key sequence without backslash @kbd{C-c g}. TINYCHANGE --- doc/org.texi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/org.texi b/doc/org.texi index 767fa1a..8e18d34 100644 --- a/doc/org.texi +++ b/doc/org.texi @@ -3345,7 +3345,7 @@ the data file. @subheading ASCII bar plots -While the cursor is on a column, typing @kbd{C-c \ a} or +While the cursor is on a column, typing @kbd{C-c a} or @kbd{M-x orgtbl-ascii-plot @key{RET}} create a new column containing an ASCII-art bars plot. The plot is implemented through a regular column formula. When the source column changes, the bar plot may be updated by -- 2.1.1
Re: [O] [PATH] Speedups to org-table-recalculate
Hi Michael, Thanks for the review! Updated patches attached. I believe I've fixed everything you mentioned - let me know if I missed something. On Sun, Oct 19, 2014 at 3:57 PM, Michael Brand michael.ch.br...@gmail.com wrote: Hi Nathaniel On Sat, Oct 18, 2014 at 7:11 AM, Nathaniel Flath flat0...@gmail.com wrote: Patches are attached. I am not an expert for all the following comments, please correct me or contradict where necessary. The patches do not apply on current master, so I did not try them out yet. You might want to add a def-edebug-spec like there is one for many other defmacro in Org. Limit lines to max. 80 chars. It will make it easier for the maintainer Bastien to apply the patches when you format them with git including a changelog etc. as described here http://orgmode.org/worg/org-contribute.html + (if (not all) (message Re-applying formula to field: %s (car eq)) +(org-table-execute-once-per-second log-last-time (message Re-applying formula to field: %s (car eq Good idea to still log always when only one table row is recalculated. The doubling of the message makes it more complicated to maintain its string. I suggest to change the macro to allow (org-table-execute-once-per-second (when all log-last-time) ; Log just always when `all' is nil. (message Re-applying formula to field: %s (car eq))) Why not test `all' also for the other message with to field? + ,@body + ))) +(and all (org-table-execute-once-per-second log-last-time (message Re-applying formulas to %d lines...done cnt Shouldn't this use `log-first-time'? Michael 0001-org-table.el-Add-early-return-check-to-org-table-rec.patch Description: Binary data 0002-org-table.el-Print-far-fewer-messages-when-recalcula.patch Description: Binary data
Re: [O] No mention of :results graphics in docs on code blocks
On Oct 19, 2014 11:08 PM, William Denton w...@pobox.com wrote: I just noticed there's no mention of the :results graphics header argument in the Org manual. I said the same in 2012: - http://comments.gmane.org/gmane.emacs.orgmode/57643 This worg documentation about source code blocks and R does mention it: http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-R.html This was the reply then, too. Basically, the org header arguments manual page mentions that language-specific arguments are on the appropriate page in worg babel. If you click that link, then the link to the lust of supported languages, that gets you to a table and to ob-doc-R. Maybe not ideal, but I think the intent is not to clutter the manual with every specific arg possible. Sorry it was confusing. If the value is :results graphics then 'base' graphics output is captured on disk, and a link to the graphics file is inserted into the Org Mode buffer (as is also the case with the graphics-only languages such as gnuplot, ditaa, dot, and asymptote.) (It goes on to say :results output graphics is necessary with ggplot2 images, but that's no longer true.) I'm afraid I don't know enough about this header argument or its use elsewhere to offer a documentation patch, so I'm just pointing it out. For changes, there's good info on worg about editing and pushing to worg, which is on git. The manual requires patching, but that's documented as well. - http://orgmode.org/worg/org-contribute.html Hope that helps, John Working with R code blocks in Org is great. Bill -- William Denton ↔ Toronto, Canada ↔ https://www.miskatonic.org/
Re: [O] No mention of :results graphics in docs on code blocks
Aloha Bill, William Denton w...@pobox.com writes: I just noticed there's no mention of the :results graphics header argument in the Org manual. This worg documentation about source code blocks and R does mention it: http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-R.html If the value is :results graphics then 'base' graphics output is captured on disk, and a link to the graphics file is inserted into the Org Mode buffer (as is also the case with the graphics-only languages such as gnuplot, ditaa, dot, and asymptote.) (It goes on to say :results output graphics is necessary with ggplot2 images, but that's no longer true.) I'm afraid I don't know enough about this header argument or its use elsewhere to offer a documentation patch, so I'm just pointing it out. When I grep graphics in the Org mode lisp directory I see that :results graphics is recognized by ob-core.el, but that the only language that uses it is R. I think this might be the reason :results graphics is described with the R documentation and not in the main manual. Working with R code blocks in Org is great. +1 All the best, Tom -- Thomas S. Dye http://www.tsdye.com
[O] No mention of :results graphics in docs on code blocks
I just noticed there's no mention of the :results graphics header argument in the Org manual. This worg documentation about source code blocks and R does mention it: http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-R.html If the value is :results graphics then 'base' graphics output is captured on disk, and a link to the graphics file is inserted into the Org Mode buffer (as is also the case with the graphics-only languages such as gnuplot, ditaa, dot, and asymptote.) (It goes on to say :results output graphics is necessary with ggplot2 images, but that's no longer true.) I'm afraid I don't know enough about this header argument or its use elsewhere to offer a documentation patch, so I'm just pointing it out. Working with R code blocks in Org is great. Bill -- William Denton ↔ Toronto, Canada ↔ https://www.miskatonic.org/