Re: [O] [PATCH] * lisp/org.el (org-set-font-lock-defaults): include link targets
Hello, Aaron Ecay aarone...@gmail.com writes: The org-target face is created in org-faces.el, but never used for font-locking. This patch fixes that. Applied. Thank you. Regards, -- Nicolas Goaziou
Re: [O] [RFC] Org version of the Org manual
Yagnesh Raghava Yakkala writes: IIUC, Achim means, Thanks for spelling that out for me. :-) Given texi generation is very slow, I wonder which format of manual will be included in Emacs trunk.? Well, there obviously needs to be improvement on that front. I've profiled the export already, but haven't had time yet to make sense of the results. Attached is the output from elp. I also have profiler results, but these are lisp data and I first need to figure out how to load them in Emacs again. org-entry-get 350676 469.21990999 0.0013380439 org-babel-exp-process-buffer1 317.362436 317.362436 org-babel-exp-src-block 138 308.52577799 2.2356940434 org-babel-get-src-block-info3834305.86685299 0.0797774786 org-babel-parse-src-block-match 3834301.70857400 0.0786928988 org-babel-exp-do-export 138 299.98738899 2.1738216594 org-babel-exp-code 138 299.34870600 2.1691935217 org-babel-expand-noweb-references 24 299.114988 12.4631245 org-babel-params-from-properties3834297.16263699 0.0775072083 org-entry-get-with-inheritance 95850 290.83956400 0.0030343199 org-macro-replace-all 2 222.371024 111.185512 org-element-context 8587210.50228799 0.0245140663 org-element-at-point8998198.89139700 0.0221039561 org-element--current-element237338 185.80111699 0.0007828544 org-get-property-block 314005 142.07183900 0.0004524508 org-up-heading-safe 254825 98.096140999 0.0003849549 org-element--parse-elements 311978.158617 0.0250588704 org-element-headline-parser 59179 62.23787 0.0010516884 org-back-to-heading 1177194 54.685840999 4.645...e-05 org-list-struct 811850.615231000 0.0062349385 org-element-map 215941.052958000 0.0190148022 org-before-first-heading-p 263824 36.090307000 0.0001367969 org-element--get-next-object-candidates 43922 26.156263000 0.0005955162 org-outline-level 472987 23.837515999 5.039...e-05 org-end-of-subtree 59187 22.566596999 0.0003812762 org-get-indentation 529429 17.841042000 3.369...e-05 org-entry-properties59179 15.035857000 0.0002540741 org-element-parse-buffer1 14.286519 14.286519 org-element--parse-objects 630710.982457 0.0017413123 org-element-paragraph-parser71441 9.579536 0.0001340901 org-element-item-parser 25674 7.365962 0.0002869035 org-heading-components 59179 6.773489 0.0001144576 org-element-normalize-string10028 6.397367 0.0006379504 org-at-heading-p359654 5.746897 1.597...e-05 org-element-plain-list-parser 92105.520187 0.0005993689 org-element-latex-or-entity-successor 14616 5.080199 0.0003475779 org-list-context81184.921819 0.0006062846 org-babel-exp-non-block-elements139 4.803086 0.0345545755 org-element-footnote-definition-parser 32897 4.108309 0.0001248840 org-babel-merge-params 87093.520586 0.0004042469 org-element--collect-affiliated-keywords13 3.339473 2.311...e-05 org-element-property-drawer-parser 21129 2.903859 0.0001374348 org-get-limited-outline-regexp 241703 2.806866 1.161...e-05 org-element-link-successor 33549 2.740077 8.167...e-05 org-list-get-list-end 92102.202256 0.0002391157 org-invisible-p2110997 1.874626 1.688...e-05 org-list-get-last-item 92101.807033 0.0001962034 org-element-parse-secondary-string 15481.777086 0.0011479890 org-at-table-p 80490 1.751657
Re: [O] [RFC] Org version of the Org manual
Hi Achim, thanks for doing the profiling. Achim Gratz strom...@nexgo.de writes: org-macro-replace-all2222.371024111.185512 This one looks suspicious: if the function does what it says, why does it run twice? If we can spare 111 secs here, that's already an improvement. I'll have a look at some point but feel free to beat me on this! -- Bastien
Re: [O] More decoration for babel output
Hi Ken, Ken Williams ken.willi...@windlogics.com writes: Would this be helpful to include by default? Patch attached. I committed something deeply inspired by your patch, but slightly different. Please have a look (from master) and let me know if you think this is okay. Thanks for this idea! -- Bastien
Re: [O] [PATCH] * lisp/org.el (org-set-font-lock-defaults): include link targets
Aaron Ecay writes: The org-target face is created in org-faces.el, but never used for font-locking. This patch fixes that. Thanks. It is easier for the maintainers to deal with your patches if you produce them with git format-patch HEAD~n where n is the number of commits your patch comprises, or git format-patch master if your patch is based on master and developed in a feature branch that has no unrelated commits. That branch should be rebased to current master before submission. Also please read[1] (and maybe add yourself as a contributor with FSF copyright assignment while you're at it), especially how the commit messages need to be formatted so that a proper Changelog for Emacs can be extracted. [1] http://orgmode.org/worg/org-contribute.html Regards, Achim. -- +[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]+ Factory and User Sound Singles for Waldorf Q+, Q and microQ: http://Synth.Stromeko.net/Downloads.html#WaldorfSounds
Re: [O] [PATCH] ox-latex: provide width and height options for images
Hello, aarone...@gmail.com writes: This should now be handled. The new patch will follow this email. In related news, I have completed the FSF copyright assignment process, so the patch can be merged whenever it is deemed ready. Your patch looks good. I have pushed it with minor stylistic changes. Also, could you send the confirmation of your assignment process from FSF to Bastien? Thank you for your work. Regards, -- Nicolas Goaziou
Re: [O] [RFC] Org version of the Org manual
Hello, Bastien b...@altern.org writes: Hi Achim, thanks for doing the profiling. Achim Gratz strom...@nexgo.de writes: org-macro-replace-all2222.371024111.185512 This one looks suspicious: if the function does what it says, why does it run twice? If we can spare 111 secs here, that's already an improvement. I'll have a look at some point but feel free to beat me on this! It has to be run twice. See comments in `org-export-as': Expand export-specific set of macros: {{{author}}}, {{{date}}}, {{{email}}} and {{{title}}}. It must be done once regular macros have been expanded, since document keywords may contain one of them. IOW it handles macros in #+TITLE and other document keywords. I don't think the second run is as long as the first one, though. Regards, -- Nicolas Goaziou
Re: [O] [RFC] Org version of the Org manual
Bastien writes: org-macro-replace-all2222.371024111.185512 This one looks suspicious: if the function does what it says, why does it run twice? If we can spare 111 secs here, that's already an improvement. I'll have a look at some point but feel free to beat me on this! That interpretation makes assumptions that may not be valid. I'm not even sure that you can rely on the number of calls (elp may miss some at least), but especially not that each call takes the same time. So it is perfectly possible that the first call took 222 seconds and the second one just 0.371024… The top entry for profiler btw is called-interactively. How helpful. Regards, Achim. -- +[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]+ Factory and User Sound Singles for Waldorf rackAttack: http://Synth.Stromeko.net/Downloads.html#WaldorfSounds
Re: [O] [patch] ox-koma-letter
Michael Strey writes: Here is a draft proposal for a user interface using Nicola's suggestion: I like this. About the :BODY: tag, do we really need it if it's optional? Also, do we enfore the order: what if there is a section after we start on the ENCL or PS tags? Alan
Re: [O] [patch] ox-koma-letter
Hello, Alan Schmitt alan.schm...@polytechnique.org writes: Michael Strey writes: Here is a draft proposal for a user interface using Nicola's suggestion: I like this. About the :BODY: tag, do we really need it if it's optional? Also, do we enfore the order: what if there is a section after we start on the ENCL or PS tags? FWIW, there's no need to enforce a specific for headlines if you use the deferred headline export technique. Though, a defcustom can specify an order in the letter, assuming it's not standard. E.g. '(body encl cc ps) Regards, -- Nicolas Goaziou
Re: [O] Bug: #+STARTUP: overview and org-startup-folded have no effect [7.9.3e (7.9.3e-1032-g791a8d @ /home/horn/Repos/el/org-mode/lisp/)]
Hi Tassilo, Tassilo Horn t...@gnu.org writes: Bastien b...@altern.org writes: I have seven agenda files, all not too big (~10K on average), and I use an averagely performant computer (5 years old dual core laptop). For me, the difference between `org-agenda-inhibit-startup' set to t or nil is not noticable at all. In both cases, it's less than a second, and that's a time I can easily live with. It really depends on what your agenda views are. The real test is this: create a 50K file with folded one headline and many second level TODO entries. Ok, the testfile looks like * The folded top-level headline ** TODO Some test todo headline 0 - also some contents ** TODO Some test todo headline 1 - also some contents and has 2000 such subheadlines. File size is 127K. `org-startup-folded' is t. That's not a very good test file, because you just need to unfold the main headline to get all headlines visible. I tested with a test.org file using this structure: * Test ** TODO Test *** Test repeated 10k times. Then run emacs -Q -l ~/test.el with the attached test.el file, I get sensible results here. I don't think it varies depending on the Emacs 23 vs 24 version, but I believe we are using the same. PS: I will revert `org-agenda-inhibit-startup' to nil as a default and will explain why in another mail. test.el Description: application/emacs-lisp -- Bastien
[O] asynchronous exporter and babel confirmation
Hello, Is the asynchronous exporter supposed to work when a request to evaluate a code block needs to be answered? I was wondering why the exporter was getting stuck, and found a buffer where the question was asked but I had no way to answer it. Thanks, Alan
Re: [O] [new exporter] is #+bind supported?
Achim Gratz strom...@nexgo.de writes: [...] No, nothing complete yet. Here's what I have so far, some autoload definitions might still be there, but will error out due to the fact that their target files are not in load-path anymore. Thanks for this. I've incorporated it into my emacs startup. It should help! -- : Eric S Fraga, GnuPG: 0xC89193D8FFFCF67D : in Emacs 24.3.50.1 and Org release_7.9.3f-1199-g3a0e55
Re: [O] [new exporter] ignoring a headline on export to PDF via latex
Nicolas Goaziou n.goaz...@gmail.com writes: [...] Indeed, this won't work anymore: `org-latex-translate-alist' has been removed. The equivalent would just be to use a defadvice: #+begin_src emacs-lisp (defadvice org-latex-headline (around my-latex-skip-headlines (headline contents info) activate) (if (member ignoreheading (org-element-property :tags headline)) (setq ad-return-value contents) ad-do-it)) #+end_src Another approach is, as mentioned by Charles Berry, to remove the first line of transcoded headline when it contains ignoreheading. #+begin_src emacs-lisp (defun org-latex-ignore-heading-filter-headline (headline backend info) Strip headline from HEADLINE. Ignore BACKEND and INFO. (when (and (org-export-derived-backend-p backend 'latex) (string-match \\`.*ignoreheading.*\n headline)) (replace-match nil nil headline))) (add-to-list 'org-export-filter-headline-functions 'org-latex-ignore-heading-filter-headline) #+end_src Nicolas, this is exactly what I was looking for. It works perfectly. Many thanks! eric -- : Eric S Fraga, GnuPG: 0xC89193D8FFFCF67D : in Emacs 24.3.50.1 and Org release_7.9.3f-1199-g3a0e55
Re: [O] [new exporter] ignoring a headline on export to PDF via latex
Charles Berry ccbe...@ucsd.edu writes: [...] If you just want the latex to have \section{} you can do this [...] Chuck, thanks for this. It makes sense and I will give it a try. This approach still does require creating a new backend. The implications of this are not clear to me but I will play with this to see. Thanks again, eric -- : Eric S Fraga, GnuPG: 0xC89193D8FFFCF67D : in Emacs 24.3.50.1 and Org release_7.9.3f-1199-g3a0e55
Re: [O] [new exporter] is #+bind supported?
Nicolas Goaziou n.goaz...@gmail.com writes: [...] Bind keywords are supported. Unfortunately, `org-latex-pdf-process' is not bind-able. BIND variables are set as buffer-local variables in the buffer where the transcoding takes place. So, they affect the way the current buffer is changed into LaTeX code. However, `org-latex-pdf-process' is used during post-processing, i.e. after transcoding is over. At this time, the buffer where local variables were set has disappeared already. Okay, I see how this works. Thanks for the explanation. Would it not be possible to set the bound variables for the latex buffer as well? Or does that open up a can of worms? Just curious. If you need to change the value of `org-latex-pdf-process', use a file local variable in the current buffer instead. Yes, that works. I prefer bind as it doesn't clutter up my emacs customisation with listings of safe local variables but so be it. Thanks, eric -- : Eric S Fraga, GnuPG: 0xC89193D8FFFCF67D : in Emacs 24.3.50.1 and Org release_7.9.3f-1199-g3a0e55
[O] Agenda optimization (new worg page and new defaults)
Hi all, I wrote a worg page with some advice on how to speed up agenda commands: http://orgmode.org/worg/agenda-optimization.html I also reverted the change for two variables: org-agenda-inhibit-startup org-agenda-dim-blocked-tasks Those used to be respectively nil and t, and while working on agenda speedup, I changed them to t and nil. But the reasoning behind this was weak. Users who need to speed up their agenda commands are most probably long-time users and they will be able to stumble on the variables and/or on the worg page. New users expect the agenda to keep agenda files folded when running an agenda command, and to dim blocked tasks by default. So -- this is now the case: http://orgmode.org/cgit.cgi/org-mode.git/commit/?id=c00a43 (Note that it's by the same reasoning that `org-agenda-use-tag-inheritance' is set to (todo search timeline agenda) instead of nil, which would speed up most agendas.) Sorry for the instability here in master. I also set `org-time-clocksum-use-effort-durations' to nil by default, because it would surprise many users if they suddenly see new values in their clocktables. Thanks to Tassilo Horn and John Wiegley who let me rethink about all these defaults! -- Bastien
Re: [O] Frustrated user of orgmode
I have migrated the migration instructions and tips here: http://orgmode.org/worg/org-8.0.html I have managed to get the new exporter working. Thank you everyone for helping. In case any one else is struggling with the same, following links helped me in getting it to work: http://orgmode.org/worg/org-8.0.html http://article.gmane.org/gmane.emacs.orgmode/65574 http://orgmode.org/worg/exporters/beamer/ox-beamer.html I had to clone the git repository, move to the master branch and then make. Once again, thanks everyone, Vikas
Re: [O] [new exporter] [html] Tables of Contents
Hello Jambunathan, Jambunathan K kjambunat...@gmail.com writes: Torrey One small problem, though: I see that if there is a TOC at the top and then one included later using #+TOC, the exporter gives them both the same id (div id=table-of-contents). Duplicate ID's makes the XML invalid. What do you suggest instead? id=table-of-contents-1 for the first #+TOC: keyword and so on? Why do you need two table of contents? I don't, though some might. As was explained earlier in this thread, if toc: options are set in the OPTIONS line, and a #+TOC is specified later, two tables of contents are generated, and they have the same ID. It is a feature of the new exporter, but duplicate ID's are not valid in XML. It is common for technical manuals to have a top-level table of contents at the front of the manual and a detailed table of contents later on. For instance, the GNU project Info manuals have that structure. This gives a significant advantage in that authors can link to the various instances just by knowing their own usage. For instance, if they provided a top-level toc at the beginning of their book, and a deeper-level toc later on, they could link to each separately by id by knowing this plan. This seems like a valid use-case. I would recommend that you just specify just the use-case and leave out the hows of implementation. Put your user hat and set aside the developer's hat. What a strange, semi-insulting thing to say. And misguided, too, as I was suggesting a design, not its implementation. As someone with all my own documents in Org and extensive experience developing XSLT and lisp to process the XHTML output of Org, I appreciate when the design of the HTML output is logical and useful. I would rather see a good design implemented in hacks than a poor design implemented in beautiful code. Regards, Terry -- T.F. Torrey
[O] [new exporter] Captions for tables made by source blocks
There has been some change in the behaviour of #+CAPTION in case of tables made by source blocks. In the old exporter, #+CAPTION just before #+BEGIN_SRC was sufficient to place the caption before the table when the file was exported. The new exporter does not produce captions the same way. When I looked through the list archives, I found some discussion ( http://list-archives.org/2012/08/20/emacs-orgmode-gnu-org/o-new-exporter-and-latex-attributes/f/2837855005, and http://www.mail-archive.com/emacs-orgmode@gnu.org/msg57188.html ) It is, however, not clear if the problem was finally resolved and what is the recommended practice. Could somebody explain? Vikas
Re: [O] Agenda optimization (new worg page and new defaults)
Hi Bastien, I think this is the right decision, thanks. And thanks for the nice documentation! Tis might deserve a spot in the manual, in the final chapter. Cheers - Carsten On 6 mrt. 2013, at 10:45, Bastien b...@altern.org wrote: Hi all, I wrote a worg page with some advice on how to speed up agenda commands: http://orgmode.org/worg/agenda-optimization.html I also reverted the change for two variables: org-agenda-inhibit-startup org-agenda-dim-blocked-tasks Those used to be respectively nil and t, and while working on agenda speedup, I changed them to t and nil. But the reasoning behind this was weak. Users who need to speed up their agenda commands are most probably long-time users and they will be able to stumble on the variables and/or on the worg page. New users expect the agenda to keep agenda files folded when running an agenda command, and to dim blocked tasks by default. So -- this is now the case: http://orgmode.org/cgit.cgi/org-mode.git/commit/?id=c00a43 (Note that it's by the same reasoning that `org-agenda-use-tag-inheritance' is set to (todo search timeline agenda) instead of nil, which would speed up most agendas.) Sorry for the instability here in master. I also set `org-time-clocksum-use-effort-durations' to nil by default, because it would surprise many users if they suddenly see new values in their clocktables. Thanks to Tassilo Horn and John Wiegley who let me rethink about all these defaults! -- Bastien
Re: [O] [new exporter] Captions for tables made by source blocks
Hello, Vikas Rawal vikasli...@agrarianresearch.org writes: There has been some change in the behaviour of #+CAPTION in case of tables made by source blocks. In the old exporter, #+CAPTION just before #+BEGIN_SRC was sufficient to place the caption before the table when the file was exported. The new exporter does not produce captions the same way. When I looked through the list archives, I found some discussion ( http://list-archives.org/2012/08/20/emacs-orgmode-gnu-org/o-new-exporter-and-latex-attributes/f/2837855005, and http://www.mail-archive.com/emacs-orgmode@gnu.org/msg57188.html ) It is, however, not clear if the problem was finally resolved and what is the recommended practice. Could somebody explain? CAPTION keyword above a source block applies to the source block only. If the source block generates a table, you have to put a CAPTION above it, as it will not inherit the caption of the source block. It also implies that you need to name the results. Otherwise, source block will not recognize its own production, due to the CAPTION keyword above it. HTH, Regards, -- Nicolas Goaziou
Re: [O] [new exporter] [html] Tables of Contents
tftor...@tftorrey.com (T.F. Torrey) writes: This gives a significant advantage in that authors can link to the various instances just by knowing their own usage. For instance, if they provided a top-level toc at the beginning of their book, and a deeper-level toc later on, they could link to each separately by id by knowing this plan. This seems like a valid use-case. I would recommend that you just specify just the use-case and leave out the hows of implementation. Put your user hat and set aside the developer's hat. What a strange, semi-insulting thing to say. There is nothing strange in what I said. I wasn't insulting. And misguided, too, as I was suggesting a design, not its implementation. As someone with all my own documents in Org and extensive experience developing XSLT and lisp to process the XHTML output of Org, I appreciate when the design of the HTML output is logical and useful. When you were suggesting #+toc: :a b :b c :c d that is implementation specifics and you were arguing from a HTML standpoint. If you were in fact designing, you would have articulated your case for other backends and how your suggested changes would impact ox.el. I would rather see a good design implemented in hacks than a poor design implemented in beautiful code. If you have better ideas, show us the patch. Otherwise, I suggest that you wear your user hat and place the use-case before use while others can take care of the details.
Re: [O] asynchronous exporter and babel confirmation
Hello, Alan Schmitt alan.schm...@polytechnique.org writes: Is the asynchronous exporter supposed to work when a request to evaluate a code block needs to be answered? Well, no, but its somewhat difficult to prevent it. Besides security considerations, even if we set `org-confirm-babel-evaluate' to nil during an asynchronous export, this won't handle the case of the user explicitly uses a :query keyword in a source block header. A very ugly hack would be to use: (defalias 'yes-or-no-p 'ignore) Eric, what do you think? Regards, -- Nicolas Goaziou
Re: [O] Bug: #+STARTUP: overview and org-startup-folded have no effect [7.9.3e (7.9.3e-1032-g791a8d @ /home/horn/Repos/el/org-mode/lisp/)]
Hi Bastien, Ok, the testfile looks like * The folded top-level headline ** TODO Some test todo headline 0 - also some contents ** TODO Some test todo headline 1 - also some contents and has 2000 such subheadlines. File size is 127K. `org-startup-folded' is t. That's not a very good test file, because you just need to unfold the main headline to get all headlines visible. I tested with a test.org file using this structure: * Test ** TODO Test *** Test repeated 10k times. Then run emacs -Q -l ~/test.el with the attached test.el file, I get sensible results here. Indeed, with this test file, `org-agenda-inhibit-startup' does have a major performance implication. PS: I will revert `org-agenda-inhibit-startup' to nil as a default and will explain why in another mail. I'm keen to hear the explanation. Bye, Tassilo
Re: [O] Using org-map-entries with org-export-before-processing-hook
Hello, Eric Abrahamsen e...@ericabrahamsen.net writes: I've attached a minimum org file that shows what I'm trying to do: essentially to attach a hook to the export process that ends up calling org-map-entries to make alterations to the file just before it's exported. As I've got it now, the hook does change the org buffer, but those changes are *not* reflected in the exported output. I can only guess that somehow the export process is able to continue on before the org-map-entries results are returned? Doesn't seem likely, but... This is actually kind of the opposite of what I'd like: to have the changes *only* reflected in the export, and leave the original buffer unchanged. On the other hand, I can see what thought and care has gone into setting up a clone buffer for export (and I do need to rely on buffer-local variables), so maybe an (undo) is my best solution for returning the buffer to its pre-export state. But I would like the changes to show up in the exported file! The problem is not directly related to the export framework, but to its relationship with `org-map-entries'. If you use the following function: (defun before-export-test (backend) ;; (org-map-entries 'test-map TODO=\TODO\ 'file) (while (re-search-forward ^\\*+ TODO nil t) (test-map))) it should work. I don't know why `org-map-entries' behaves badly with export. Meanwhile, I suggest to not use this function for export hooks. Regards, -- Nicolas Goaziou
Re: [O] [RFC] Org version of the Org manual
Achim Gratz strom...@nexgo.de writes: Bastien writes: org-macro-replace-all2222.371024111.185512 This one looks suspicious: if the function does what it says, why does it run twice? If we can spare 111 secs here, that's already an improvement. I'll have a look at some point but feel free to beat me on this! That interpretation makes assumptions that may not be valid. I'm not even sure that you can rely on the number of calls (elp may miss some at least), but especially not that each call takes the same time. So it is perfectly possible that the first call took 222 seconds and the second one just 0.371024… See (info (elisp) Profiling) on a fairly recent Emacs. , C-h n = Lisp Changes in Emacs 24.3 | ** New sampling-based Elisp profiler. | Try M-x profiler-start, do some work, and then call M-x profiler-report. | When finished, use M-x profiler-stop. The sampling rate can be based on | CPU time or memory allocations. ` The top entry for profiler btw is called-interactively. How helpful. Regards, Achim. --
Re: [O] [new exporter] is #+bind supported?
Eric S Fraga e.fr...@ucl.ac.uk writes: Nicolas Goaziou n.goaz...@gmail.com writes: [...] Bind keywords are supported. Unfortunately, `org-latex-pdf-process' is not bind-able. BIND variables are set as buffer-local variables in the buffer where the transcoding takes place. So, they affect the way the current buffer is changed into LaTeX code. However, `org-latex-pdf-process' is used during post-processing, i.e. after transcoding is over. At this time, the buffer where local variables were set has disappeared already. Okay, I see how this works. Thanks for the explanation. Would it not be possible to set the bound variables for the latex buffer as well? Or does that open up a can of worms? Just curious. There is no latex buffer. Export produces a string. Whet it is complete, the current buffer is the original buffer from which the original command was issued. IOW, what you suggest means that BIND keywords should set local variables in the original buffer. I'm not sure it is the intended goal for these keywords. If you need to set a local buffer variable, it is better to use the dedicated tools. Regards, -- Nicolas Goaziou
Re: [O] Using org-map-entries with org-export-before-processing-hook
Nicolas Goaziou n.goaz...@gmail.com writes: Hello, Eric Abrahamsen e...@ericabrahamsen.net writes: I've attached a minimum org file that shows what I'm trying to do: essentially to attach a hook to the export process that ends up calling org-map-entries to make alterations to the file just before it's exported. As I've got it now, the hook does change the org buffer, but those changes are *not* reflected in the exported output. I can only guess that somehow the export process is able to continue on before the org-map-entries results are returned? Doesn't seem likely, but... This is actually kind of the opposite of what I'd like: to have the changes *only* reflected in the export, and leave the original buffer unchanged. On the other hand, I can see what thought and care has gone into setting up a clone buffer for export (and I do need to rely on buffer-local variables), so maybe an (undo) is my best solution for returning the buffer to its pre-export state. But I would like the changes to show up in the exported file! The problem is not directly related to the export framework, but to its relationship with `org-map-entries'. If you use the following function: (defun before-export-test (backend) ;; (org-map-entries 'test-map TODO=\TODO\ 'file) (while (re-search-forward ^\\*+ TODO nil t) (test-map))) it should work. I don't know why `org-map-entries' behaves badly with export. Meanwhile, I suggest to not use this function for export hooks. That'll work! Thanks for looking at this. E
Re: [O] [new exporter] [html] Tables of Contents
tftor...@tftorrey.com (T.F. Torrey) writes: extensive experience developing XSLT and lisp to process the XHTML output of Org, Is there a way your specific problem could be solved if we were to use CSS counters for numbering various things? Would you like to submit a patch to ox-html.el that uses CSS-based counters rather than counters computed with hand. ps: I don't know HTML or CSS. --
Re: [O] [new exporter] Captions for tables made by source blocks
CAPTION keyword above a source block applies to the source block only. If the source block generates a table, you have to put a CAPTION above it, as it will not inherit the caption of the source block. It also implies that you need to name the results. Otherwise, source block will not recognize its own production, due to the CAPTION keyword above it. Thank you once again Nicolas. I understand from this that the variable org-babel-results-keyword has to be changed to NAME. I did this and it works. Is there a way that this could be file-specific? Vikas
[O] Disable auto-fill-mode within code block
Hi orgers, If there a way to disable auto-fill-mode within org-babel code block ? I had look through the FAQ as well as search in the mailing list archives but do not find any related answers. I am using org version 7.8.11. Thanks for your help, Xavier
Re: [O] New html exporter and filters
The div /div aren't really content elements but merely structuring or styling elements. I think there should be a clear separation between contents and how it is wrapped. The base HTML exporter should just generate content with no divs at all. There could be a fancy HTML exporter which does generate divs. I can think of splitting the current HTML exporter in to a base-html backend and an fancy-html backend. Rick can derive from base-html backend instead of fancy-html. The current HTML exporter is one in the circle. - ---/ \--- -/ \- / \ / Org Factory HTML\ Deck HTML / (adds factory divs) \ | /| \ | || +---+-+ || | | |V V | \Base HTML / \(no divs)/ \ / \ / -\ /- ---\ /--- - The problem here is much similar to what Torrey was saying in other thread wrt to TOC pseudo-elements [1]. The Id property is not the TOC itself but enhances (or particularizes) that specific transoding. Nicolas, Let me work with Rick Frankel on this. I will take over this thread. Jambunathan K. Rick Frankel r...@rickster.com writes: On Tue, Mar 05, 2013 at 09:16:16AM +0100, Nicolas Goaziou wrote: Rick Frankel r...@rickster.com writes: On the other hand, it would be easier if ox-html were modified so that org-html-headline uses a variable (or callback) for the format of the wrapper (currently div id=\%s...) and a callback for the div id generation. This would add flexibility for inherited backends as well as allow for more html5ish structures (e.g., section and article instead of generic divs). Wouldn't it be simpler to just fork `org-html-headline' in your back-end in order to replace the divs with something you need? Well, `org-html-headline' does a lot and I'm trying to rewrite as little as possible. Actually, i already wrap `org-html-headline', so i could fix the :CUSTOM_ID on the way in. I think i was looking for a solution to both the wrapper element and id in the same place (a filter). On the other hand, there are a couple of variables providing a way to modify divs ids in ox-html.el. I suppose one more doesn't hurt. It may be even better to collect them in a single defcustom. What do you think? What I think is missing is a way to customize the element used for the wrapper, and possiblly the id/class prefixes. The simple solution would be to add an `org-headline-wrapper-element' customization (defaulting to div), or if allowing change to the id and class: '(div outline-container-%s outline-%d). If you were to over-engineer it,something along the lines of the way the latex exporter specifies the headline hierarchies for one of the document classes would work :} Likewise, it would make sense for the `org-html-divs' to become a list of '(element . class) instead of a list of just classes. e.e.g (defcustom org-html-divs '((header . preamble) (section . content) (footer . postamble)) Rick --
[O] Org-mode latex pdf export issue: Underlined lines not breaking properly
Hi, While PDF exporting a .org file, the underlined lines which are at the right end of the page (in PDF) or underlined lines which are large and spans to next line (in pdf) are not breaking properly. How do I solve this problem ? Thanks. - *Sanjib Sikder ** *
Re: [O] Disable auto-fill-mode within code block
Hi Xavier, Xavier Garrido xavier.garr...@gmail.com writes: If there a way to disable auto-fill-mode within org-babel code block ? I had look through the FAQ as well as search in the mailing list archives but do not find any related answers. I am using org version 7.8.11. You need to update to the current Org version for this: See http://orgmode.org and http://orgmode.org/org.html#Installation HTH, -- Bastien
Re: [O] [new exporter] [html] Tables of Contents
Jambunathan K kjambunat...@gmail.com writes: This gives a significant advantage in that authors can link to the various instances just by knowing their own usage. For instance, if they provided a top-level toc at the beginning of their book, and a deeper-level toc later on, they could link to each separately by id by knowing this plan. This seems like a valid use-case. Brainstorimg here: Why not export a subtree (with displaced section numbers) and splice the exported strings together to produce the compelete document. Subtree export of headline 1, but with section numbers starting at 1. Subtree export of headline 2, but with section numbers starting at 2. Splice them together. Considering that HTML exporter can export a subtree, I believe you can do some XSLT magic so that the individual HTML generated by Org is transformed before being spliced. Do you really want this to be supported within the scope of the Org exporter? Are you sure you have explored all the tricks in your bag before raising this request. Just wanted to confirm, because you seem to be the HTML expert among the three of us... There are books where each chapter could be written by different authors. The chapters are later spliced together to produce the master document. In case of OpenDocument, such files have *.odm extension. I can look up what the OpenDocument spec says or LibreOffice does. Or Allow a subtree to take EXPORT_TOC property. (There should be a way to specifiy where this TOC will end up in - beginning of that chapter or end of the chapter) Similarly, one could introduce EXPORT_ENDNOTES property whereby each chapter can have it's own self-contained End Notes section.
Re: [O] [new exporter] #+TOC in beamer export
On Wed, Mar 06, 2013 at 12:52:24AM +0100, Nicolas Goaziou wrote: Suvayu Ali fatkasuvayu+li...@gmail.com writes: I'm not sure what a \tableofcontents outside a frame would look like. Can someone show an example? I think that the idea behind a frameless TOC is that you provide your own frame for it. It makes sense since #+TOC: allows to control accurately the location of your table of contents. That makes a lot of sense. :) I also had another thought; sometimes for long presentations, I use something like this: \AtBeginSubsection[]{ [...] } At the moment I put it in as one long LaTeX_HEADER line. But would it be possible to leverage #+TOC: into having a similar effect? It might then provide a greater degree of control where you want the toc frame to appear. I think this kind of control should really belong to specific latex code. A TOC limited to current section sure sounds seducing, but I'm not sure how to achieve this in LaTeX. I think you are right. I'll see if can find a nice way to do this in LaTeX, I'll share if I find something. Cheers, -- Suvayu Open source is the future. It sets us free.
Re: [O] [Bug] beamer backend and org-reload
I can confirm this is fixed now. :) Thanks, On Wed, Mar 06, 2013 at 12:29:10AM +0100, Nicolas Goaziou wrote: Hello, Suvayu Ali fatkasuvayu+li...@gmail.com writes: Hi Achim, On Tue, Mar 05, 2013 at 07:26:54PM +0100, Achim Gratz wrote: Suvayu Ali writes: That said, I have noticed something odd about the new exporter and org-reload. I think with the new exporter after doing org-reload, org related config is not reloaded properly. Config is not reloaded at all (and never has been), any configuration variables that are already existing are not touched when the file gets reloaded. This borks the Org instance. This is more visible when using the Beamer backend since it requires customisation of org-latex-classes by the user. One of these days, I'll try to come up with a proper recipe to reproduce this. Please do, this should not happen. Here is the recipe: 1. emacs -nw -Q -l ~/minimal-org.el ;;; minimal-org.el: Minimal setup to load latest `org-mode' ;;; Code: (setq debug-on-error t debug-on-signal nil debug-on-quit nil) (add-to-list 'load-path (expand-file-name ~/build/org-mode/lisp)) (require 'ox-beamer) (add-to-list 'org-latex-classes '(beamer \\documentclass\[presentation\]\{beamer\} (\\section\{%s\} . \\section*\{%s\}) (\\subsection\{%s\} . \\subsection*\{%s\}) (\\subsubsection\{%s\} . \\subsubsection*\{%s\}))) 2. C-x C-f some-file.org RET 3. Now try to export: C-c C-e. You can see menu options for beamer export. 4. Now reload Org: C-c C-x !. Try step 3 again. You will notice the entries for beamer is missing. This should be fixed in master. Thank you. Regards, -- Nicolas Goaziou -- Suvayu Open source is the future. It sets us free.
Re: [O] [new exporter] Captions for tables made by source blocks
Vikas Rawal vikasli...@agrarianresearch.org writes: CAPTION keyword above a source block applies to the source block only. If the source block generates a table, you have to put a CAPTION above it, as it will not inherit the caption of the source block. It also implies that you need to name the results. Otherwise, source block will not recognize its own production, due to the CAPTION keyword above it. Thank you once again Nicolas. I understand from this that the variable org-babel-results-keyword has to be changed to NAME. I did this and it works. Is there a way that this could be file-specific? I wasn't clear. By naming the results, I mean that you must provide your source block a #+NAME: something attribute, so the generated table gets a #+RESULTS: something attribute. BTW, you mustn't change `org-babel-results-keyword'. I don't even know why this is a defcustom and why it is allowed to turn it into NAME. RESULTS refers to the name of the src-block which produced the current element, whereas NAME refers to the name of the current element. Their purpose is completely different. Cc'ing Eric Schulte about it. Regards, -- Nicolas Goaziou
Re: [O] asynchronous exporter and babel confirmation
Nicolas Goaziou n.goaziou at gmail.com writes: Well, no, but its somewhat difficult to prevent it. Besides security considerations, even if we set `org-confirm-babel-evaluate' to nil during an asynchronous export, this won't handle the case of the user explicitly uses a :query keyword in a source block header. Right. A very ugly hack would be to use: (defalias 'yes-or-no-p 'ignore) Ugh. I hope this won't be necessary. I've recently refactored the evaluation check so it determines first whether the code-block should be run and only in the affirmative checks if it should query the user. So it should be much easier now to have another dynamic binding for preventing the question _and_ not run the block (as if the user had answered no, which is the only sensible choice when skipping the query). It already skips the query when the cached result is not stale (since it doesn't actually run any code in this case). Regards, Achim.
Re: [O] [new exporter] #+TOC in beamer export
Hello, Andreas Leha andreas.l...@med.uni-goettingen.de writes: Nicolas Goaziou n.goaz...@gmail.com writes: Andreas Leha andreas.l...@med.uni-goettingen.de writes: from a recent thread I learned about #+TOC (there's always something new to learn about org mode). I'd like to use it in a beamer document. Here I find it hard to use because it introduces its own frame. My question basically is: How is this supposed to be used in a beamer doc? (And would it not be easier if it did not introduce its own frame?) It seems useful to keep frame around TOC generated from toc:t option. But we could remove it from TOC generated from #+TOC keywords. Thanks for taking this further. Indeed, for the toc:t triggered TOC the frame is absolutely useful. So, I like your suggestion very much. Applied. Thanks for the feedback. Regards, -- Nicolas Goaziou
Re: [O] Disable auto-fill-mode within code block
Thanks Bastien for your prompt answer. For the time being, I prefer to wait the 8.0 release. Xavier Le 06/03/2013 12:41, Bastien a écrit : Hi Xavier, Xavier Garrido xavier.garr...@gmail.com writes: If there a way to disable auto-fill-mode within org-babel code block ? I had look through the FAQ as well as search in the mailing list archives but do not find any related answers. I am using org version 7.8.11. You need to update to the current Org version for this: See http://orgmode.org and http://orgmode.org/org.html#Installation HTH,
Re: [O] Emacs-orgmode Digest, Vol 85, Issue 5
emacs-orgmode-requ...@gnu.org writes: Today's Topics: 39. Re: org-exp-bibtex missing in git? (Vikas Rawal) Message: 39 Date: Mon, 4 Mar 2013 10:10:37 +0530 From: Vikas Rawal vikasli...@agrarianresearch.org To: emacs-orgmode emacs-orgmode@gnu.org Subject: Re: [O] org-exp-bibtex missing in git? I do confirm. Thank you. I have been trying to migrate to the new-exporter. I have not had much success so far but I hope to be able to figure it all out soon. Since we do not yet have a documentation, it is difficult. Nicolas has been very kind with help. I have a website that is built using old exporter. It used org-exp-bibtex. I will move it to the new exporter, and if there is a problem, get back to the mailing list. Till then, thank you for your responses. Vikas (or others): would you be willing provide a minialist example .org and .bib that exports to both .tex and .html with a citation? I'd be glad to use org-exp-bibtex while the new cite: (or whatever) format is worked out. Been beating my head on this for a few days. Thanks, ---George Jones
Re: [O] asynchronous exporter and babel confirmation
Hello, Achim Gratz strom...@nexgo.de writes: A very ugly hack would be to use: (defalias 'yes-or-no-p 'ignore) Ugh. I hope this won't be necessary. I hope too. I've recently refactored the evaluation check so it determines first whether the code-block should be run and only in the affirmative checks if it should query the user. So it should be much easier now to have another dynamic binding for preventing the question _and_ not run the block (as if the user had answered no, which is the only sensible choice when skipping the query). It already skips the query when the cached result is not stale (since it doesn't actually run any code in this case). From the export framework POV, this variable should be set to an appropriate value (i.e. so no question is asked) from `org-export-async-start'. I can take care of it once the new variable is defined (maybe in ob-exp.el?). Regards, -- Nicolas Goaziou
Re: [O] [new exporter] latex-date-timestamp-format not adhering #+LANGUAGE
Hello, Andreas Leha andreas.l...@med.uni-goettingen.de writes: I'd very much like to see org-latex-timestamp-format adhere to a possibly present #+LANGUAGE setting. There is no such variable as `org-latex-timestamp-format'. If I set org-latex-timestamp-format to %A, %Y-%m-%d the following org file produces Donnerstag, 2013-03-07 on my system, where I'd prefer Thursday, 2013-03-07. #+begin_src org #+TITLE: Some Document #+DATE: 2013-03-07 Do #+LANGUAGE: en * Some test document With some content #+end_src Would such a change be possible? It is difficult. %A depends on a locale built within glibc. Assuming we know the locale associated to the language string, it may or may not be available in glibc. Also, `format-time-string' is a primitive, so even if local is available, you cannot change it locally easily. A proper implementation would, IMO, not rely directly on `format-time-string'. There could be a `org-format-time-string' accepting the same arguments as `format-time-string' but replacing locale related placeholders beforehand, according to a dictionary. Regards, -- Nicolas Goaziou
Re: [O] asynchronous exporter and babel confirmation
Achim Gratz writes: I've recently refactored the evaluation check so it determines first whether the code-block should be run and only in the affirmative checks if it should query the user. So it should be much easier now to have another dynamic binding for preventing the question _and_ not run the block (as if the user had answered no, which is the only sensible choice when skipping the query). It already skips the query when the cached result is not stale (since it doesn't actually run any code in this case). This sounds reasonable. Thanks, Alan
Re: [O] Using org-map-entries with org-export-before-processing-hook
Eric Abrahamsen e...@ericabrahamsen.net writes: The problem is not directly related to the export framework, but to its relationship with `org-map-entries'. If you use the following function: (defun before-export-test (backend) ;; (org-map-entries 'test-map TODO=\TODO\ 'file) (while (re-search-forward ^\\*+ TODO nil t) (test-map))) it should work. I don't know why `org-map-entries' behaves badly with export. Meanwhile, I suggest to not use this function for export hooks. That'll work! Thanks for looking at this. I think I fixed the problem wrt `org-map-entries' and export. You cannot use `file' scope, since it refers to the base buffer associated to the current buffer file name, which never is the buffer where the export process takes place. OTHO, a nil scope (or tree, region for that matter) should be fine with a very recent Org. Regards, -- Nicolas Goaziou
[O] org-protocol commands are treated as filenames
Hello, First of all, if this question has been answered before or I should direct it elsewhere then please let me know. I've spent some time researching and experimenting, but I'm new to Emacs so I may well have overlooked something obvious. I'm trying to get org-protocol working, and I've hit a snag that I'm hoping is something basic that I'm missing. I've followed the instructions on the web (http://orgmode.org/worg/org-contrib/org-protocol.html). However, when I launch Emacs with a command-line argument consisting of an org-protocol command then Emacs treats it as a filename rather than a command. For example, if I run: \emacs-24.2\bin\emacsclientw.exe org-protocol:/store-link:/ www.google.com/Google Then I see in my buffer list that I'm editing a file called C:\trash\org-protocol:/store-link:/www.google.com/Google (or whatever). I'm using Emacs 24.2, M-x org-version reports version 7.8.11, and all I've got in my init.el is: (server-start) (require 'org-protocol) I believe that's all I need as org-protocol is included in 24.2 by default. Is there some special command that I'm missing that instructs Emacs that an argument should not be treated as a filename? Or is my problem more complex than that? Many thanks for any guidance you can give -- I'm a little new to all this. Cheers, Stu
Re: [O] org-exp-bibtex missing in git?
Nicolas Goaziou n.goaz...@gmail.com writes: Hello, Andreas Leha andreas.l...@med.uni-goettingen.de writes: Nicolas Goaziou n.goaz...@gmail.com writes: Bastien b...@altern.org writes: Hi Vikas, François Allisson franc...@allisson.co writes: org-exp-bibtex, because of its dependency on the old exporter, was first moved from contrib/lisp to contrib/oldexp during the process of migration towards org new exporter. And yesterday, the directory contrib/oldexp was eventually removed[1]. Yes. What features of org-exp-bibtex.el would you need that you don't have with the current version of Org (from the master branch)? It will help knowing what to implement. It would be good to integrate citations in export framework, so we do not rely on an external tool and \cite{...} constructs. We already got rid of \ref{...}. Maybe something like [cite:]. org-element could parse this, and ox.el provide some tools to access data. Then each back-end could deal with them. This would be truly *awesome*. This is the major barrier blocking truly cross-backend export. The data would be still from bibtex files? No idea. That's why specifications must be discussed first. What [cite:...] entries (if we agree on that syntax) should provide? Regards, Some thoughts on this. For me, citations are more than links but also include information on formatting (\citep) and on what to use in the citation (\citeauthor). I am not sure on how far an org-mode implementation of citations should go, but from a LaTeX-targeted view, they could support 1. different citation commands (\cite, \citep, ..., \footfullcite) 2. pre- and postnotes so that it'd be possible to have something like this generated in LaTeX export: \footfullcite[prenote][postnote]{key} Eric suggested/uses this format (thanks for sharing, Eric): [[cite:jones-etal-2000][Jones et al., 2000]] ^^^ ^^ key displayed in org So, a possible extension of that could, for instance, use a third pair of [] as in [[cite:jones-etal-2000][Jones et al., 2000][[citationcommand][prenote][postnote]]] ^^^ ^^ key displayed in org If org only supports \cite (or only \cite and \citep), for serious writing I'll still have to use LaTeX commands. On the other hand, since I don't (yet?) see a chance to support any of that for a different backend than LaTeX it might be overengineered to support these at org-modes side? Regards, Andreas
Re: [O] Org-mode latex pdf export issue: Underlined lines not breaking properly
Hi Sanjib, This is a known LaTeX issue that has nothing to do with Org. Please check the LaTeX packages ulem.sty and soul.sty or simply don't use underlining -- it's anyway ugly. Best regards -- Michael Strey www.strey.biz
Re: [O] [new exporter] latex-date-timestamp-format not adhering #+LANGUAGE
Hi Nicolas, thanks for taking this up! Nicolas Goaziou n.goaz...@gmail.com writes: Hello, Andreas Leha andreas.l...@med.uni-goettingen.de writes: I'd very much like to see org-latex-timestamp-format adhere to a possibly present #+LANGUAGE setting. There is no such variable as `org-latex-timestamp-format'. Of course I meant 'org-latex-date-timestamp-format'. If I set org-latex-timestamp-format to %A, %Y-%m-%d the following org file produces Donnerstag, 2013-03-07 on my system, where I'd prefer Thursday, 2013-03-07. #+begin_src org #+TITLE: Some Document #+DATE: 2013-03-07 Do #+LANGUAGE: en * Some test document With some content #+end_src Would such a change be possible? It is difficult. %A depends on a locale built within glibc. Assuming we know the locale associated to the language string, it may or may not be available in glibc. Also, `format-time-string' is a primitive, so even if local is available, you cannot change it locally easily. I understand. A proper implementation would, IMO, not rely directly on `format-time-string'. There could be a `org-format-time-string' accepting the same arguments as `format-time-string' but replacing locale related placeholders beforehand, according to a dictionary. That sound quite tedious and boring work... And while I still think, that setting the #+LANGUAGE in org should ideally be reflected in the export -- also for the date formatting -- I found a solution to my problem that I use now: It does not use orgmode's date and date-formatting facilities, but moves the work to LaTeX. Thus, the bad side is that it is backend specific. #+begin_src org #+TITLE: Some Document #+DATE: \printdate{2013-03-07} #+LANGUAGE: en #+LaTeX_HEADER: \usepackage[english]{isodate} * Some test document With some content #+end_src vs. #+begin_src org #+TITLE: Some Document #+DATE: \printdate{2013-03-07} #+LANGUAGE: en #+LaTeX_HEADER: \usepackage[german]{isodate} * Some test document With some content #+end_src Regards, Andreas
Re: [O] Org-mode latex pdf export issue: Underlined lines not breaking properly
Hello Sanjib, On Wed, Mar 06, 2013 at 06:55:36PM +0530, Sanjib Sikder wrote: If you feel that the problem is not related to org-mode, then ignore this email and thanks for your time and patience. It is indeed a LaTeX issue! And I have an answer too :). Org mode translates _underlined text_ to \underline{underlined text}, however if you read the TeX.sx question referenced below you will see that it doesn't support line breaks and the TeX community recommends \uline{..} from the ulem package. http://TeX.stackexchange.com/a/13382/4416 For now you can write a filter to alter the LaTeX source[1]; for the long haul you should start a separate thread asking to change the defaults in Org mode. However I'm not sure if that is desirable since it introduces an extra LaTeX package dependency to handle corner cases. Hope this helps, Footnotes: [1] A nice example can be found here: http://orgmode.org/worg/exporters/beamer/ox-beamer.html#sec-2-3 -- Suvayu Open source is the future. It sets us free.
Re: [O] Org-mode latex pdf export issue: Underlined lines not breaking properly
Hi, Thanks for the suggestions. For an user like me, who depends heavily on org-mode for several purposes, a basic feature like this (underline) is frequently used. Though it is ugly or (may be) not used for serious published materials, but for personal usage, this is very handy and very often I do pdf export my .org files. I wish, org-mode provides an easier solution as not everybody is familiar with lisp codes. Again, thanks a lot. - *Sanjib Sikder *
[O] sort lists by highest level entries
Hi, having - [2013-01-24 Do] text - [2013-01-25 Fr] text - [2013-02-01 Fr] text which in full view is - [2013-01-24 Do] text * text - [2013-01-25 Fr] text #+BEGIN_EXAMPLE TEXT #+END_EXAMPLE - [2013-02-01 Fr] text * other stuff I would like to sort the highest level entries, alphabetically would do in this case, ending up with - [2013-02-01 Fr] text - [2013-01-25 Fr] text - [2013-01-24 Do] text which of course in full view is - [2013-02-01 Fr] text * other stuff - [2013-01-25 Fr] text #+BEGIN_EXAMPLE TEXT #+END_EXAMPLE - [2013-01-24 Do] text * text org-sort and org-sort-entries does not what I want. Did I miss something obvious? Thanks, Rainer
Re: [O] sort lists by highest level entries
Hello, Rainer Stengele rainer.steng...@online.de writes: having - [2013-01-24 Do] text - [2013-01-25 Fr] text - [2013-02-01 Fr] text [...] I would like to sort the highest level entries, alphabetically would do in this case, ending up with - [2013-02-01 Fr] text - [2013-01-25 Fr] text - [2013-01-24 Do] text [...] org-sort and org-sort-entries does not what I want. Did I miss something obvious? You mean alphabetically, but in reverse order: C-c ^ A Regards, -- Nicolas Goaziou
Re: [O] org-caldav can't find org-prepare-agenda-buffers
Bastien b...@altern.org writes: Achim Gratz strom...@nexgo.de writes: I hope to put this together in the next week or so, then it will be possible to nuke all traces fr4om an old Org and then start from a clean slate with a new Org installation. Okay, thanks. Let us know how it goes, What temporary (as in every user fixing it locally) solution would you recommend to get org-caldav running in the mean time ? Julien.
Re: [O] sort lists by highest level entries
Am 06.03.2013 15:30, schrieb Nicolas Goaziou: Hello, Rainer Stengele rainer.steng...@online.de writes: having - [2013-01-24 Do] text - [2013-01-25 Fr] text - [2013-02-01 Fr] text [...] I would like to sort the highest level entries, alphabetically would do in this case, ending up with - [2013-02-01 Fr] text - [2013-01-25 Fr] text - [2013-01-24 Do] text [...] org-sort and org-sort-entries does not what I want. Did I miss something obvious? You mean alphabetically, but in reverse order: C-c ^ A Regards, I mark the region and do tried. I get Nothing to sort. There are no headlines in that region. Rainer
Re: [O] sort lists by highest level entries
Rainer Stengele rainer.steng...@online.de writes: Am 06.03.2013 15:30, schrieb Nicolas Goaziou: Hello, Rainer Stengele rainer.steng...@online.de writes: having - [2013-01-24 Do] text - [2013-01-25 Fr] text - [2013-02-01 Fr] text [...] I would like to sort the highest level entries, alphabetically would do in this case, ending up with - [2013-02-01 Fr] text - [2013-01-25 Fr] text - [2013-01-24 Do] text [...] org-sort and org-sort-entries does not what I want. Did I miss something obvious? You mean alphabetically, but in reverse order: C-c ^ A Regards, I mark the region and do tried. I get Nothing to sort. There are no headlines in that region. You want to sort a list. Point should be on one of its items when calling the command. Regards, -- Nicolas Goaziou
Re: [O] sort lists by highest level entries
Am 06.03.2013 16:51, schrieb Nicolas Goaziou: Rainer Stengele rainer.steng...@online.de writes: Am 06.03.2013 15:30, schrieb Nicolas Goaziou: Hello, Rainer Stengele rainer.steng...@online.de writes: having - [2013-01-24 Do] text - [2013-01-25 Fr] text - [2013-02-01 Fr] text [...] I would like to sort the highest level entries, alphabetically would do in this case, ending up with - [2013-02-01 Fr] text - [2013-01-25 Fr] text - [2013-01-24 Do] text [...] org-sort and org-sort-entries does not what I want. Did I miss something obvious? You mean alphabetically, but in reverse order: C-c ^ A Regards, I mark the region and do tried. I get Nothing to sort. There are no headlines in that region. You want to sort a list. Point should be on one of its items when calling the command. Regards, Awesome! That did it. Thanks Nicolas. I reread the manual: C-c ^ (org-sort) Sort same-level entries. When there is an active region, all entries in the region will be sorted. Otherwise the children of the current headline are sorted. The command prompts for the sorting method, which can be alphabetically, numerically, by time (first timestamp with active preferred, creation time, scheduled time, deadline time), by priority, by TODO keyword (in the sequence the keywords have been defined in the setup) or by the value of a property. Reverse sorting is possible as well. You can also supply your own function to extract the sorting key. With a C-u prefix, sorting will be case-sensitive. I cannot find the hint to have to be on a list item. It looked more promising to mark the region. How can I begin to help work on the documentation? Rainer
Re: [O] sort lists by highest level entries
Rainer Stengele rainer.steng...@online.de writes: I reread the manual: C-c ^ (org-sort) Sort same-level entries. When there is an active region, all entries in the region will be sorted. Otherwise the children of the current headline are sorted. The command prompts for the sorting method, which can be alphabetically, numerically, by time (first timestamp with active preferred, creation time, scheduled time, deadline time), by priority, by TODO keyword (in the sequence the keywords have been defined in the setup) or by the value of a property. Reverse sorting is possible as well. You can also supply your own function to extract the sorting key. With a C-u prefix, sorting will be case-sensitive. I cannot find the hint to have to be on a list item. It looked more promising to mark the region. It is documented in section 2.7. Plain lists. How can I begin to help work on the documentation? If you think something as to be done about it, you can provide a patch against org.texi (and orgguide.texi). See: http://orgmode.org/worg/org-contribute.html Regards, -- Nicolas Goaziou
Re: [O] org-caldav can't find org-prepare-agenda-buffers
Julien Cubizolles writes: Bastien b...@altern.org writes: Achim Gratz strom...@nexgo.de writes: I hope to put this together in the next week or so, then it will be possible to nuke all traces fr4om an old Org and then start from a clean slate with a new Org installation. Okay, thanks. Let us know how it goes, What temporary (as in every user fixing it locally) solution would you recommend to get org-caldav running in the mean time ? I just pushed a change which should fix this (if the new exporter is compatible; I don't use Org from git). -David
Re: [O] org-caldav can't find org-prepare-agenda-buffers
Hello, David Engster d...@randomsample.de writes: Julien Cubizolles writes: Bastien b...@altern.org writes: Achim Gratz strom...@nexgo.de writes: I hope to put this together in the next week or so, then it will be possible to nuke all traces fr4om an old Org and then start from a clean slate with a new Org installation. Okay, thanks. Let us know how it goes, What temporary (as in every user fixing it locally) solution would you recommend to get org-caldav running in the mean time ? I just pushed a change which should fix this (if the new exporter is compatible; I don't use Org from git). Interactive functions are usually not compatible between old export back-ends and new ones. What do you need from org-icalendar.el? Regards, -- Nicolas Goaziou
Re: [O] org-caldav can't find org-prepare-agenda-buffers
Nicolas Goaziou writes: Hello, David Engster d...@randomsample.de writes: Julien Cubizolles writes: Bastien b...@altern.org writes: Achim Gratz strom...@nexgo.de writes: I hope to put this together in the next week or so, then it will be possible to nuke all traces fr4om an old Org and then start from a clean slate with a new Org installation. Okay, thanks. Let us know how it goes, What temporary (as in every user fixing it locally) solution would you recommend to get org-caldav running in the mean time ? I just pushed a change which should fix this (if the new exporter is compatible; I don't use Org from git). Interactive functions are usually not compatible between old export back-ends and new ones. What do you need from org-icalendar.el? Only org-export-icalendar. As long as that one is producing the same output, everything should be fine. -David
Re: [O] org-caldav can't find org-prepare-agenda-buffers
David Engster d...@randomsample.de writes: I just pushed a change which should fix this (if the new exporter is compatible; It doesn't seem to be, I get --8---cut here---start-8--- apply: Symbol's function definition is void: org-export-icalendar --8---cut here---end---8--- when running org-caldav-sync, which is weird since org-export-icalendar is present in both org-icalendar and ox-icalendar. I don't use Org from git). I'm thinking about reverting to an older Org since org-caldav is more important to me than the new exporter. Does it work with the latest stable release (7.9.3f) ?
Re: [O] org-caldav can't find org-prepare-agenda-buffers
Julien Cubizolles writes: David Engster d...@randomsample.de writes: I just pushed a change which should fix this (if the new exporter is compatible; It doesn't seem to be, I get apply: Symbol's function definition is void: org-export-icalendar when running org-caldav-sync, which is weird since org-export-icalendar is present in both org-icalendar and ox-icalendar. No, it's not defined in ox-icalendar. I guess it must be generated by the new exporter first, probably through some additional require. I don't use Org from git). I'm thinking about reverting to an older Org since org-caldav is more important to me than the new exporter. Does it work with the latest stable release (7.9.3f) ? I'm still on 7.9.2, but I wouldn't know why it shouldn't work with that. -David
Re: [O] org-caldav can't find org-prepare-agenda-buffers
David Engster d...@randomsample.de writes: What do you need from org-icalendar.el? Only org-export-icalendar. As long as that one is producing the same output, everything should be fine. Unfortunately, there is no `org-export-icalendar' anymore. There is: (org-icalendar--combine-files nil FILES) which is equivalent to: (org-export-icalendar t FILES) Also (org-export-icalendar nil FILES) should be equivalent to something like: (dolist (file files) (find-file file) (org-mode) (org-icalendar-export-to-ics)) Regards, -- Nicolas Goaziou
Re: [O] org-caldav can't find org-prepare-agenda-buffers
David Engster d...@randomsample.de writes: Julien Cubizolles writes: David Engster d...@randomsample.de writes: I just pushed a change which should fix this (if the new exporter is compatible; It doesn't seem to be, I get apply: Symbol's function definition is void: org-export-icalendar when running org-caldav-sync, which is weird since org-export-icalendar is present in both org-icalendar and ox-icalendar. No, it's not defined in ox-icalendar. I guess it must be generated by the new exporter first, probably through some additional require. I have the following definition in ox-icalendar.el. --8---cut here---start-8--- (defgroup org-export-icalendar nil Options specific for iCalendar export back-end. :tag Org Export iCalendar :group 'org-export) --8---cut here---end---8---
Re: [O] org-caldav can't find org-prepare-agenda-buffers
Nicolas Goaziou writes: David Engster d...@randomsample.de writes: What do you need from org-icalendar.el? Only org-export-icalendar. As long as that one is producing the same output, everything should be fine. Unfortunately, there is no `org-export-icalendar' anymore. There is: (org-icalendar--combine-files nil FILES) which is equivalent to: (org-export-icalendar t FILES) Thanks, that's what I need. After skimming through the new exporter, it also seems that org-combined-agenda-icalendar-file was replaced with org-icalendar-combined-agenda-file. Is that correct? I'm also using org-icalendar-timezone, org-icalendar-store-UID, and org-icalendar-date-time-format, but it seems those are still there. -David
[O] Org documentation patches party next week on IRC?
Hi all, with the advent of Org 8.0, a special effort needs to be made to keep the manual and Worg updated. I thought it would be nice to gather on IRC and focus on this together for a few hours, so here is a doodle: http://doodle.com/s7fhueeifaex54t8 Also, I'll to discuss with people I only know by email... Thanks in advance for your help! -- Bastien
Re: [O] org-caldav can't find org-prepare-agenda-buffers
Julien Cubizolles writes: David Engster d...@randomsample.de writes: No, it's not defined in ox-icalendar. I guess it must be generated by the new exporter first, probably through some additional require. I have the following definition in ox-icalendar.el. (defgroup org-export-icalendar nil Options specific for iCalendar export back-end. :tag Org Export iCalendar :group 'org-export) That's just defining a group for the customization system. It's not a function. -David
Re: [O] [new exporter] #+TOC in beamer export
Suvayu Ali fatkasuvayu+li...@gmail.com writes: On Wed, Mar 06, 2013 at 12:52:24AM +0100, Nicolas Goaziou wrote: I think this kind of control should really belong to specific latex code. A TOC limited to current section sure sounds seducing, but I'm not sure how to achieve this in LaTeX. I think you are right. I'll see if can find a nice way to do this in LaTeX, I'll share if I find something. Perhaps package minitoc is what you are looking for? I don't know if it is usable within beamer. Cu, Robert
Re: [O] org-caldav can't find org-prepare-agenda-buffers
David Engster d...@randomsample.de writes: After skimming through the new exporter, it also seems that org-combined-agenda-icalendar-file was replaced with org-icalendar-combined-agenda-file. Is that correct? I'm also using org-icalendar-timezone, org-icalendar-store-UID, and org-icalendar-date-time-format, but it seems those are still there. Correct. Regards, -- Nicolas Goaziou
Re: [O] org-exp-bibtex missing in git?
Hi Andreas and all, Andreas Leha andreas.l...@med.uni-goettingen.de writes: Eric suggested/uses this format (thanks for sharing, Eric): [[cite:jones-etal-2000][Jones et al., 2000]] ^^^ ^^ key displayed in org I'd suggest to treat org-link-abbrev-alist and locally defined abbreviated links differently when opening the link at point and when exporting the buffer. At expand time, the exporter could attach a list of export functions (filters?) to the expanded link, depending on the local setting for the abbreviated link or `org-link-abbrev-alist'. For example: #+LINK: cite file:my.bib::%s org-latex-bibtex-link (setq org-link-abbrev-alist '((cite file:my.bib::%s 'org-latex-bibtex-link))) Then org-latex-bibtex-link would internally find the link, process the BibTeX entry and return a sensible \cite{...} string. What do you think? -- Bastien
Re: [O] org-exp-bibtex missing in git?
Hello, Bastien b...@altern.org writes: Hi Andreas and all, Andreas Leha andreas.l...@med.uni-goettingen.de writes: Eric suggested/uses this format (thanks for sharing, Eric): [[cite:jones-etal-2000][Jones et al., 2000]] ^^^ ^^ key displayed in org I'd suggest to treat org-link-abbrev-alist and locally defined abbreviated links differently when opening the link at point and when exporting the buffer. At expand time, the exporter could attach a list of export functions (filters?) to the expanded link, depending on the local setting for the abbreviated link or `org-link-abbrev-alist'. For example: #+LINK: cite file:my.bib::%s org-latex-bibtex-link (setq org-link-abbrev-alist '((cite file:my.bib::%s 'org-latex-bibtex-link))) Then org-latex-bibtex-link would internally find the link, process the BibTeX entry and return a sensible \cite{...} string. What do you think? If we're not going to provide a multi-backend solution, I suggest to keep things simple and write LaTeX code directly (or use the solution provided by Eric). Unless you have something else in mind with these link abbrevs, of course. Regards, -- Nicolas Goaziou
Re: [O] trouble exporting just one subtree while using babel and R code blocks
Thanks John. I was a little nervous about upgrading org version. I use Vince Goulet's version of emacs with ESS built-in, and he removed org-mode from his latest release (24.2.1) http://vgoulet.act.ulaval.ca/pub/emacs/NEWS-windows But I downloaded and installed the newer emacs anyway, and got org-mode version 7.9.3f from the org website, and that solved my problem. So far, so good . . . . --Chris Christopher W. Ryan, MD, MS SUNY Upstate Medical University Clinical Campus at Binghamton 425 Robinson Street, Binghamton, NY 13904 cryanatbinghamtondotedu Once we recognize that we do not err out of laziness, stupidity, or evil intent, we can liberate ourselves from the impossible burden of trying to be permanently right. We can take seriously the proposition that we could be in error, without deeming ourselves idiotic or unworthy. [Karen Schulz, in Being Wrong: Adventures in the Margin of Error] John Hendy wrote: On Mon, Feb 18, 2013 at 3:10 PM, Christopher W. Ryan cr...@binghamton.edu wrote: I have a long cumulative org file that contains work related to a series of studies. Each first-level subtree (*) is a new study. I need to be able to export any given first-level tree on its own, with an output pdf file name different from the main org filename, and with a title perhaps different from the * headline. And I need to execute R code as it exports. I am running org-mode 7.7 on Windows XP A sample org file to illustrate the problem looks like this: -- * goodbye foo foo * Hello :PROPERTIES: :EXPORT_FILE_NAME: TestMyBabelSetup :EXPORT_TITLE: foobar :EXPORT_AUTHOR: Christopher W. Ryan, MD MS :RESULTS: output :EXPORTS: both :END: foo #+begin_src R rnorm(3) #+end_src When I export the whole file to pdf, everything works fine. But if I try to export just the * Hello tree, then I get an error: Args out of range: , -1, 0 I can't reproduce. =M-x org-version= is Org-mode version 7.9.3e (7.9.3e-910-g33c4f6) Can you try updating your orgmode version? I attached the results of =C-c C-e 1 p= (export subtree) with the cursor within the * Hello headline contents. Best regards, John If I remove anything relating to R and babel from the * Hello tree, leaving just this: --- * goodbye foo foo * Hello :PROPERTIES: :EXPORT_FILE_NAME: TestMyBabelSetup :EXPORT_TITLE: foobar :EXPORT_AUTHOR: Christopher W. Ryan, MD MS :END: foo - then exporting just the * Hello treee works as expected. I'm stumped. What am I doing wrong? Thanks. --Chris -- Christopher W. Ryan, MD, MS SUNY Upstate Medical University Clinical Campus at Binghamton 425 Robinson Street, Binghamton, NY 13904 cryanatbinghamtondotedu
Re: [O] New html exporter and filters
Here is a quick patch. Not meant to be applied but meant for testing purpose only. So there is a html backend which doesn't add divs and there is a HTML backend that adds divs. (The difference is between html and HTML, in capslock). The `org-export-dispatch' uses HTML backend, while you can continue to derive from html backend and add divs of your own. Try this patch and let me know what you find. Or you can circulate a make-shift patch which improves the attached version to suit your needs. I can formalize this patch once I get a go ahead from you. binmWgmVqdIhy.bin Description: ox-html.el.diff Jambunathan K kjambunat...@gmail.com writes: The div /div aren't really content elements but merely structuring or styling elements. I think there should be a clear separation between contents and how it is wrapped. The base HTML exporter should just generate content with no divs at all. There could be a fancy HTML exporter which does generate divs. I can think of splitting the current HTML exporter in to a base-html backend and an fancy-html backend. Rick can derive from base-html backend instead of fancy-html. The current HTML exporter is one in the circle. - ---/ \--- -/ \- / \ / Org Factory HTML\ Deck HTML / (adds factory divs) \ | /| \ | || +---+-+ || | | |V V | \Base HTML / \(no divs)/ \ / \ / -\ /- ---\ /--- - The problem here is much similar to what Torrey was saying in other thread wrt to TOC pseudo-elements [1]. The Id property is not the TOC itself but enhances (or particularizes) that specific transoding. Nicolas, Let me work with Rick Frankel on this. I will take over this thread. Jambunathan K. Rick Frankel r...@rickster.com writes: On Tue, Mar 05, 2013 at 09:16:16AM +0100, Nicolas Goaziou wrote: Rick Frankel r...@rickster.com writes: On the other hand, it would be easier if ox-html were modified so that org-html-headline uses a variable (or callback) for the format of the wrapper (currently div id=\%s...) and a callback for the div id generation. This would add flexibility for inherited backends as well as allow for more html5ish structures (e.g., section and article instead of generic divs). Wouldn't it be simpler to just fork `org-html-headline' in your back-end in order to replace the divs with something you need? Well, `org-html-headline' does a lot and I'm trying to rewrite as little as possible. Actually, i already wrap `org-html-headline', so i could fix the :CUSTOM_ID on the way in. I think i was looking for a solution to both the wrapper element and id in the same place (a filter). On the other hand, there are a couple of variables providing a way to modify divs ids in ox-html.el. I suppose one more doesn't hurt. It may be even better to collect them in a single defcustom. What do you think? What I think is missing is a way to customize the element used for the wrapper, and possiblly the id/class prefixes. The simple solution would be to add an `org-headline-wrapper-element' customization (defaulting to div), or if allowing change to the id and class: '(div outline-container-%s outline-%d). If you were to over-engineer it,something along the lines of the way the latex exporter specifies the headline hierarchies for one of the document classes would work :} Likewise, it would make sense for the `org-html-divs' to become a list of '(element . class) instead of a list of just classes. e.e.g (defcustom org-html-divs '((header . preamble) (section . content) (footer . postamble)) Rick --
Re: [O] asynchronous exporter and babel confirmation
Hi Nicolas, I'm still waiting for feedback from Karl Voit over in the other thread, but here's the amended patch for you to review: From c49b4ab5afda4d223cbcf97cb8c7ac0f9cc8e39b Mon Sep 17 00:00:00 2001 From: Achim Gratz strom...@stromeko.de Date: Wed, 27 Feb 2013 22:55:26 +0100 Subject: [PATCH] ob-core: do not ask for confirmation if cached result is current MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * lisp/ob-core.el (org-babel-confirm-evaluate): Refactor this internal function. * lisp/ob-core.el (org-babel--suppress-confirm-evaluate-answer-no): Dynamically scoped variable, if bound non-nil the confirmation dialog will not be initiated and it is assumed the user answered with no. * lisp/ob-core.el (org-babel--check-confirm-evaluate): New macro to ensure that the initial let-bindings for `org-babel--check-evaluate´ and `org-babel--confirm-evaluate´ are consistent. * lisp/ob-core.el (org-babel--check-evaluate): First part of `org-babel-confirm-evaluate´, check whether this source block evaluation is enabled. * lisp/ob-core.el (org-babel--confirm-evaluate): Second part of `org-babel-confirm-evaluate´, let the user confirm evaluation. * lisp/ob-core.el (org-babel-execute-src-block): Do not ask for confirmation if the cached result is current. The call to `org-babel--check-evaluate´ will indicate if the block should be evaluated. If yes, determine whether the cached result block is current (since `org-babel-process-params´ might trigger expensive operations this has to be deferred). If `cache-current-p´ is t, evaluate the source block without asking. In case the cache is current the evaluation will not actually do anything but return the cached value, so this is safe. Otherwise ask permission from the user by calling `org-babel--confirm-evaluate´ and act depending on the answer. The new variable `org-babel--suppress-confirm-evaluate-answer-no´ can be bound to suppress the user interaction as is needed for async export, as discussed in http://thread.gmane.org/gmane.emacs.orgmode/67719 --- lisp/ob-core.el | 207 ++-- 1 file changed, 110 insertions(+), 97 deletions(-) diff --git a/lisp/ob-core.el b/lisp/ob-core.el index 3b7c463..af245ed 100644 --- a/lisp/ob-core.el +++ b/lisp/ob-core.el @@ -1,4 +1,4 @@ -;;; ob-core.el --- working with code blocks in org-mode +;; ob-core.el --- working with code blocks in org-mode ;; Copyright (C) 2009-2012 Free Software Foundation, Inc. @@ -284,7 +284,27 @@ (defun org-babel-get-src-block-info (optional light) (when info (append info (list name indent) (defvar org-current-export-file) ; dynamically bound -(defun org-babel-confirm-evaluate (info) +(defmacro org-babel--check-confirm-evaluate (info rest body) + Pull some information from code block INFO and evaluate BODY. + + (declare (indent defun)) + `(let* ((eval (or (cdr (assoc :eval (nth 2 ,info))) + (when (assoc :noeval (nth 2 ,info)) no))) + (code-block (if info (format %s (nth 0 ,info)) )) + (block-name (if (nth 4 ,info) (format (%s) (nth 4 ,info)) ))) + ,@body)) +(defun org-babel--check-evaluate (info) + Check whether the code block INFO should be evaluated. + + (org-babel--check-confirm-evaluate info +(if (or (equal eval never) (equal eval no) + (and (boundp 'org-current-export-file) org-current-export-file + (or (equal eval no-export) (equal eval never-export + (prog1 nil (message (format Evaluation of this%scode block%sis disabled. +code-block block-name))) + t))) +(defvar org-babel--suppress-confirm-evaluate-answer-no) ;; dynamically scoped +(defun org-babel--confirm-evaluate (info) Confirm evaluation of the code block INFO. This behavior can be suppressed by setting the value of `org-confirm-babel-evaluate' to nil, in which case all future @@ -293,33 +313,23 @@ (defun org-babel-confirm-evaluate (info) Note disabling confirmation may result in accidental evaluation of potentially harmful code. - (let* ((eval (or (cdr (assoc :eval (nth 2 info))) - (when (assoc :noeval (nth 2 info)) no))) - (query (cond ((equal eval query) t) - ((and (boundp 'org-current-export-file) - org-current-export-file - (equal eval query-export)) t) - ((functionp org-confirm-babel-evaluate) - (funcall org-confirm-babel-evaluate -(nth 0 info) (nth 1 info))) - (t org-confirm-babel-evaluate -(if (or (equal eval never) (equal eval no) - (and (boundp 'org-current-export-file) - org-current-export-file - (or (equal eval no-export) - (equal eval never-export))) - (and query - (not (yes-or-no-p - (format Evaluate this%scode block%son your system? - (if info (format %s (nth 0 info)) ) - (if (nth 4 info) - (format (%s) (nth 4 info))
Re: [O] trouble exporting just one subtree while using babel and R code blocks--spoke too soon
Well, with the little test file I initially posted, things worked OK with org version 7.9.3f. But things are bit more complicated: --- * goodbye foo foo * Hello :PROPERTIES: :EXPORT_FILE_NAME: TestMyBabelSetup :EXPORT_TITLE: foobar :EXPORT_AUTHOR: Christopher W. Ryan, MD MS :RESULTS: output :EXPORTS: both :END: ** Big foo foo #+begin_src R rnorm(3) #+end_src --- Put cursor on * Hello above and then C-c C-e 1 d The resulting pdf file does not show the results of the R code, only the verbatim code itself. Remove the line ** Big foo Then put cursor on * Hello above and then C-c C-e 1 d org/babel then asks if I want to execute the R code. Answer yes. A pdf file will open showing the R code and the results. I don't understand. --Chris Christopher W. Ryan, MD, MS SUNY Upstate Medical University Clinical Campus at Binghamton 425 Robinson Street, Binghamton, NY 13904 cryanatbinghamtondotedu Once we recognize that we do not err out of laziness, stupidity, or evil intent, we can liberate ourselves from the impossible burden of trying to be permanently right. We can take seriously the proposition that we could be in error, without deeming ourselves idiotic or unworthy. [Karen Schulz, in Being Wrong: Adventures in the Margin of Error] John Hendy wrote: On Mon, Feb 18, 2013 at 3:10 PM, Christopher W. Ryan cr...@binghamton.edu wrote: I have a long cumulative org file that contains work related to a series of studies. Each first-level subtree (*) is a new study. I need to be able to export any given first-level tree on its own, with an output pdf file name different from the main org filename, and with a title perhaps different from the * headline. And I need to execute R code as it exports. I am running org-mode 7.7 on Windows XP A sample org file to illustrate the problem looks like this: -- * goodbye foo foo * Hello :PROPERTIES: :EXPORT_FILE_NAME: TestMyBabelSetup :EXPORT_TITLE: foobar :EXPORT_AUTHOR: Christopher W. Ryan, MD MS :RESULTS: output :EXPORTS: both :END: foo #+begin_src R rnorm(3) #+end_src When I export the whole file to pdf, everything works fine. But if I try to export just the * Hello tree, then I get an error: Args out of range: , -1, 0 I can't reproduce. =M-x org-version= is Org-mode version 7.9.3e (7.9.3e-910-g33c4f6) Can you try updating your orgmode version? I attached the results of =C-c C-e 1 p= (export subtree) with the cursor within the * Hello headline contents. Best regards, John If I remove anything relating to R and babel from the * Hello tree, leaving just this: --- * goodbye foo foo * Hello :PROPERTIES: :EXPORT_FILE_NAME: TestMyBabelSetup :EXPORT_TITLE: foobar :EXPORT_AUTHOR: Christopher W. Ryan, MD MS :END: foo - then exporting just the * Hello treee works as expected. I'm stumped. What am I doing wrong? Thanks. --Chris -- Christopher W. Ryan, MD, MS SUNY Upstate Medical University Clinical Campus at Binghamton 425 Robinson Street, Binghamton, NY 13904 cryanatbinghamtondotedu Once we recognize that we do not err out of laziness, stupidity, or evil intent, we can liberate ourselves from the impossible burden of trying to be permanently right. We can take seriously the proposition that we could be in error, without deeming ourselves idiotic or unworthy. [Karen Schulz, in Being Wrong: Adventures in the Margin of Error]
Re: [O] [new exporter] latex-date-timestamp-format not adhering #+LANGUAGE
Andreas Leha writes: And while I still think, that setting the #+LANGUAGE in org should ideally be reflected in the export -- also for the date formatting -- I found a solution to my problem that I use now: It does not use orgmode's date and date-formatting facilities, but moves the work to LaTeX. Thus, the bad side is that it is backend specific. Well, you could bounce this via Babel to the shell, set LANG and run the date command with the appropriate format string and pull it back into org, perhaps as a macro. That makes it not play well with pure Windows where there is no locale setting per command and no date command (unless you install Cygwin), but it isn't langage specific anymore. Regards, Achim. -- +[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]+ Factory and User Sound Singles for Waldorf Q+, Q and microQ: http://Synth.Stromeko.net/Downloads.html#WaldorfSounds
[O] preview latex fragment with latex_header
Hi all, I have a beamer presentation in org-mode that contains a line like #+LaTeX_HEADER: \subtitle{foo} This prevents me from using 'org-preview-latex-fragment' as that one -- naturally, as it uses the article class -- fails with 'Failed to create dvi file from /tmp/orgtex49760oq.tex' due to , | ERROR: Undefined control sequence. | | --- TeX said --- | l.38 \subtitle ` What's the remedy here? Thanks in advance! Regards, Andreas
Re: [O] [new exporter] is #+bind supported?
Eric S Fraga writes: No, nothing complete yet. Here's what I have so far, some autoload definitions might still be there, but will error out due to the fact that their target files are not in load-path anymore. Thanks for this. I've incorporated it into my emacs startup. It should help! I name you the official tester for this code. :-) Please keep in mind that the assumption is that no actual Org code has been loaded, eg. no symbols starting with ob- or org- would be features. So you need to do this very early in the startup sequence. Regards, Achim. -- +[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]+ SD adaptations for Waldorf Q V3.00R3 and Q+ V3.54R2: http://Synth.Stromeko.net/Downloads.html#WaldorfSDada
Re: [O] [new exporter] #+TOC in beamer export
Nicolas Goaziou n.goaz...@gmail.com writes: [...] A TOC limited to current section sure sounds seducing, but I'm not sure how to achieve this in LaTeX. Something like this? \tableofcontents[sectionstyle=show/hide, subsectionstyle=show/show/hide] Full example: #+begin_src org #+TITLE: Something #+LaTeX_CLASS: beamer #+LaTeX_CLASS_OPTIONS: [presentation] #+COLUMNS: %45ITEM %10BEAMER_env(Env) %10BEAMER_act(Act) %4BEAMER_col(Col) %8BEAMER_opt(Opt) #+PROPERTY: BEAMER_col_ALL 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 0.0 :ETC #+OPTIONS: toc:nil H:3 * Intro ** Motivation *** Motivation Frame ** Challanges *** Challange 1 *** Challange 2 * TOC :B_frame: :PROPERTIES: :BEAMER_env: frame :END: #+LaTeX: \tableofcontents[sectionstyle=show/hide, subsectionstyle=show/show/hide] * Main Part ** One *** Frame One *** Frame Two ** Two *** Frame One *** Frame Two #+end_src Regards, Andreas
Re: [O] asynchronous exporter and babel confirmation
Achim Gratz strom...@nexgo.de writes: I'm still waiting for feedback from Karl Voit over in the other thread, but here's the amended patch for you to review: Thanks. I haven't much to say wrt to the internals since the only thing needed to make use of this patch is to set `org-babel--suppress-confirm-evaluate-answer-no' to t from `org-export-async-start'. I would suggest a shorter variable name, though, as: °org-babel--no-confirm-force-no'. But that doesn't really matter. I'll just focus on cosmetics. * lisp/ob-core.el (org-babel-confirm-evaluate): Refactor this internal function. You should mention explicitly that you removed this function. This is not a refactoring. -;;; ob-core.el --- working with code blocks in org-mode +;; ob-core.el --- working with code blocks in org-mode You should leave 3 semicolons. This is standard elisp library starter. +(defmacro org-babel--check-confirm-evaluate (info rest body) + Pull some information from code block INFO and evaluate BODY. + Spurious blank line. +(defun org-babel--check-evaluate (info) + Check whether the code block INFO should be evaluated. + Ditto. + (org-babel--check-confirm-evaluate info +(if (or (equal eval never) (equal eval no) + (and (boundp 'org-current-export-file) org-current-export-file + (or (equal eval no-export) (equal eval never-export + (prog1 nil (message (format Evaluation of this%scode block%sis disabled. + code-block block-name))) + t))) I would refactor it like the following: (org-babel--check-confirm-evaluate info (or (equal eval never) (equal eval no) (and (org-bound-and-true-p org-current-export-file) (or (equal eval no-export) (equal eval never-export))) (prog1 nil (message (format Evaluation of this%scode block%sis disabled. code-block block-name) + (org-babel--check-confirm-evaluate info +(let* ((query (cond ((equal eval query) t) + ((and (boundp 'org-current-export-file) org-current-export-file (org-bound-and-true-p org-current-export-file) + (if (and query +(or (null org-babel--suppress-confirm-evaluate-answer-no) +(not (yes-or-no-p + (format Evaluate this%scode block%son your system? + code-block block-name) + (prog1 nil (message + (format Evaluation of%scode-block%snot confirmed. + code-block block-name))) + t (and query (or (not org-babel--suppress-confirm-evaluate-answer-no) (not (yes-or-no-p (format Evaluate this%scode block%son your system? code-block block-name))) (prog1 nil (message (format Evaluation of%scode-block%snot confirmed. code-block block-name) + (if (boundp 'org-babel-call-process-region-original) + org-babel-call-process-region-original + (symbol-function 'call-process-region))) (or (org-bound-and-true-p org-babel-call-process-region-original) (symbol-function 'call-process-region)) [...] + (org-babel-insert-result +result result-params info new-hash indent lang) + (run-hooks 'org-babel-after-execute-hook) + result + ))) Dangling parens. Regards, -- Nicolas Goaziou
Re: [O] org-exp-bibtex missing in git?
Nicolas Goaziou n.goaz...@gmail.com writes: Hello, Bastien b...@altern.org writes: Hi Andreas and all, Andreas Leha andreas.l...@med.uni-goettingen.de writes: Eric suggested/uses this format (thanks for sharing, Eric): [[cite:jones-etal-2000][Jones et al., 2000]] ^^^ ^^ key displayed in org I'd suggest to treat org-link-abbrev-alist and locally defined abbreviated links differently when opening the link at point and when exporting the buffer. At expand time, the exporter could attach a list of export functions (filters?) to the expanded link, depending on the local setting for the abbreviated link or `org-link-abbrev-alist'. For example: #+LINK: cite file:my.bib::%s org-latex-bibtex-link (setq org-link-abbrev-alist '((cite file:my.bib::%s 'org-latex-bibtex-link))) Then org-latex-bibtex-link would internally find the link, process the BibTeX entry and return a sensible \cite{...} string. What do you think? If we're not going to provide a multi-backend solution, I suggest to keep things simple and write LaTeX code directly (or use the solution provided by Eric). Unless you have something else in mind with these link abbrevs, of course. I agree. Getting 'simple' \cite or better [[cite: ]] links to export in other backends than LaTeX only should be the first step, anyway. Regards, Andreas
Re: [O] [new exporter] [html] Tables of Contents
Hello Jambunathan, I admire your energy and coding skill, but I wish you would stop occupying our time with replies like this. Your tone is insulting, and seems deliberately so, and none of this response is helpful to the original thread. I won't reply to more of your posts like this, so if you don't get a reply, know that it's because your message was insulting and off-topic. I'm only sending this on the odd chance that you are not aware of what you are doing, in which case this might be helpful to you. If you want to follow up to this message, I invite you to do so off-list, where it might have been best for me to post this as well. Best regards, Terry Jambunathan K kjambunat...@gmail.com writes: tftor...@tftorrey.com (T.F. Torrey) writes: This gives a significant advantage in that authors can link to the various instances just by knowing their own usage. For instance, if they provided a top-level toc at the beginning of their book, and a deeper-level toc later on, they could link to each separately by id by knowing this plan. This seems like a valid use-case. I would recommend that you just specify just the use-case and leave out the hows of implementation. Put your user hat and set aside the developer's hat. What a strange, semi-insulting thing to say. There is nothing strange in what I said. I wasn't insulting. And misguided, too, as I was suggesting a design, not its implementation. As someone with all my own documents in Org and extensive experience developing XSLT and lisp to process the XHTML output of Org, I appreciate when the design of the HTML output is logical and useful. When you were suggesting #+toc: :a b :b c :c d that is implementation specifics and you were arguing from a HTML standpoint. If you were in fact designing, you would have articulated your case for other backends and how your suggested changes would impact ox.el. I would rather see a good design implemented in hacks than a poor design implemented in beautiful code. If you have better ideas, show us the patch. Otherwise, I suggest that you wear your user hat and place the use-case before use while others can take care of the details.
Re: [O] org-caldav can't find org-prepare-agenda-buffers
Nicolas Goaziou writes: David Engster d...@randomsample.de writes: After skimming through the new exporter, it also seems that org-combined-agenda-icalendar-file was replaced with org-icalendar-combined-agenda-file. Is that correct? I'm also using org-icalendar-timezone, org-icalendar-store-UID, and org-icalendar-date-time-format, but it seems those are still there. Correct. Thanks. I've now pushed a further fix which should hopefully make things work with the new exporter. Julien, please let me know if it works. -David
Re: [O] [new exporter] [html] Tables of Contents
Hello Jambunathan, Jambunathan K kjambunat...@gmail.com writes: Is there a way your specific problem could be solved if we were to use CSS counters for numbering various things? Would you like to submit a patch to ox-html.el that uses CSS-based counters rather than counters computed with hand. No. I'm not sure I understand your motives here, but I think you would like to make changes to ox-html.el that would address the bug report/feature request I sent. If so, read on. The problem is that in situations where the HTML exporter produces two tables of contents, it gives them both the same ID. That makes the XML invalid, breaks some linking, and tends to choke XSLT processors. I suggested three different strategies for the ID: 1. A detailed schema (see original email) 2. Allowing user to designate the ID 3. Just adding a sequence number to the end Of these, 1 would probably be the hardest to implement, but would provide the most accessibility for users and post-processors. 2 would probably be the easiest to implement, but would have the problem that users wouldn't know they had to do it until something didn't work. 3 is probably the easiest to implement, but with the lowest utility. My personal choice would be for both 1 and 2 to be implemented, but as I'm not doing the work, that might be too much to ask. Just doing 3 would make the XML valid again (in these cases), and would be good enough for now. So, if you're looking to implement a solution, 1 and 2 please, or 3 if 1 and 2 are too much work right now. If, on the other hand, you're just trying to find a way to make my suggestions sound dumb, please see my previous e-mail. Best regards, Terry -- T.F. Torrey
Re: [O] trouble exporting just one subtree while using babel and R code blocks
On Wed, Mar 6, 2013 at 1:33 PM, Christopher W. Ryan cr...@binghamton.edu wrote: Thanks John. I was a little nervous about upgrading org version. I use Vince Goulet's version of emacs with ESS built-in, and he removed org-mode from his latest release (24.2.1) http://vgoulet.act.ulaval.ca/pub/emacs/NEWS-windows But I downloaded and installed the newer emacs anyway, and got org-mode version 7.9.3f from the org website, and that solved my problem. So far, so good . . . . Yay! Glad things worked for you. John --Chris Christopher W. Ryan, MD, MS SUNY Upstate Medical University Clinical Campus at Binghamton 425 Robinson Street, Binghamton, NY 13904 cryanatbinghamtondotedu Once we recognize that we do not err out of laziness, stupidity, or evil intent, we can liberate ourselves from the impossible burden of trying to be permanently right. We can take seriously the proposition that we could be in error, without deeming ourselves idiotic or unworthy. [Karen Schulz, in Being Wrong: Adventures in the Margin of Error] John Hendy wrote: On Mon, Feb 18, 2013 at 3:10 PM, Christopher W. Ryan cr...@binghamton.edu wrote: I have a long cumulative org file that contains work related to a series of studies. Each first-level subtree (*) is a new study. I need to be able to export any given first-level tree on its own, with an output pdf file name different from the main org filename, and with a title perhaps different from the * headline. And I need to execute R code as it exports. I am running org-mode 7.7 on Windows XP A sample org file to illustrate the problem looks like this: -- * goodbye foo foo * Hello :PROPERTIES: :EXPORT_FILE_NAME: TestMyBabelSetup :EXPORT_TITLE: foobar :EXPORT_AUTHOR: Christopher W. Ryan, MD MS :RESULTS: output :EXPORTS: both :END: foo #+begin_src R rnorm(3) #+end_src When I export the whole file to pdf, everything works fine. But if I try to export just the * Hello tree, then I get an error: Args out of range: , -1, 0 I can't reproduce. =M-x org-version= is Org-mode version 7.9.3e (7.9.3e-910-g33c4f6) Can you try updating your orgmode version? I attached the results of =C-c C-e 1 p= (export subtree) with the cursor within the * Hello headline contents. Best regards, John If I remove anything relating to R and babel from the * Hello tree, leaving just this: --- * goodbye foo foo * Hello :PROPERTIES: :EXPORT_FILE_NAME: TestMyBabelSetup :EXPORT_TITLE: foobar :EXPORT_AUTHOR: Christopher W. Ryan, MD MS :END: foo - then exporting just the * Hello treee works as expected. I'm stumped. What am I doing wrong? Thanks. --Chris -- Christopher W. Ryan, MD, MS SUNY Upstate Medical University Clinical Campus at Binghamton 425 Robinson Street, Binghamton, NY 13904 cryanatbinghamtondotedu
Re: [O] [new exporter] latex-date-timestamp-format not adhering #+LANGUAGE
Achim Gratz strom...@nexgo.de writes: Andreas Leha writes: And while I still think, that setting the #+LANGUAGE in org should ideally be reflected in the export -- also for the date formatting -- I found a solution to my problem that I use now: It does not use orgmode's date and date-formatting facilities, but moves the work to LaTeX. Thus, the bad side is that it is backend specific. Well, you could bounce this via Babel to the shell, set LANG and run the date command with the appropriate format string and pull it back into org, perhaps as a macro. That makes it not play well with pure Windows where there is no locale setting per command and no date command (unless you install Cygwin), but it isn't langage specific anymore. Thanks for the suggestion. I like the idea a lot and will follow it up, I think. Regards, Andreas
Re: [O] asynchronous exporter and babel confirmation
Nicolas Goaziou writes: `org-babel--suppress-confirm-evaluate-answer-no' to t from `org-export-async-start'. I would suggest a shorter variable name, I've dropped the suppress- as it is redundant, but kept the confirm-evaluate. -;;; ob-core.el --- working with code blocks in org-mode +;; ob-core.el --- working with code blocks in org-mode You should leave 3 semicolons. This is standard elisp library starter. That was an accident. I would refactor it like the following: (org-babel--check-confirm-evaluate info (or (equal eval never) (equal eval no) (and (org-bound-and-true-p org-current-export-file) (or (equal eval no-export) (equal eval never-export))) (prog1 nil (message (format Evaluation of this%scode block%sis disabled. code-block block-name) I wouldn't, it reverses the logic of that function. Most of the code was copied from the original function and I had originally intended to adhere closely to that so Eric has an easier time to tell whether this is good or not. Anyway, I've had a go at this, not sure if it is much better than the original. The logic in these functions is a bit convoluted, after all. From 85ab6e8a2c81aad038b55350d6996035aaca3763 Mon Sep 17 00:00:00 2001 From: Achim Gratz strom...@stromeko.de Date: Wed, 27 Feb 2013 22:55:26 +0100 Subject: [PATCH] ob-core: do not ask for confirmation if cached result is current MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * lisp/ob-core.el (org-babel-confirm-evaluate): Remove this internal function and replace with `org-babel--check-evaluate´ and `org-babel--confirm-evaluate´. * lisp/ob-core.el (org-babel--check-confirm-evaluate): New macro to ensure that the initial let-bindings for `org-babel--check-evaluate´ and `org-babel--confirm-evaluate´ are consistent. * lisp/ob-core.el (org-babel--check-evaluate): First part of the original `org-babel-confirm-evaluate´, check whether this source block evaluation is enabled. * lisp/ob-core.el (org-babel--confirm-evaluate-answer-no): Dynamically scoped variable, if bound non-nil the confirmation dialog will not be initiated denial of evaluation is assumed. * lisp/ob-core.el (org-babel--confirm-evaluate): Second part of the original `org-babel-confirm-evaluate´, check if the user needs to be queried. If not, affirm evaluation, else check if evaluation should be auto-denied and lastly ask the user. * lisp/ob-core.el (org-babel-execute-src-block): Do not ask for confirmation if the cached result is current. The call to `org-babel--check-evaluate´ will indicate if the block should be evaluated. If yes, determine whether the cached result block is current (since `org-babel-process-params´ might trigger expensive operations this has to be deferred). If `cache-current-p´ is t, evaluate the source block without asking. In case the cache is current the evaluation will not actually do anything but return the cached value, so this is safe. Otherwise ask permission from the user by calling `org-babel--confirm-evaluate´ and act depending on the answer. The new variable `org-babel--confirm-evaluate-answer-no´ can be bound to suppress the user interaction as is needed for async export, as discussed in http://thread.gmane.org/gmane.emacs.orgmode/67719 --- lisp/ob-core.el | 204 +--- 1 file changed, 106 insertions(+), 98 deletions(-) diff --git a/lisp/ob-core.el b/lisp/ob-core.el index 3b7c463..7ac423b 100644 --- a/lisp/ob-core.el +++ b/lisp/ob-core.el @@ -283,43 +283,50 @@ (defun org-babel-get-src-block-info (optional light) (setf (nth 2 info) (org-babel-process-params (nth 2 info (when info (append info (list name indent) -(defvar org-current-export-file) ; dynamically bound -(defun org-babel-confirm-evaluate (info) +(defvar org-current-export-file) ; dynamically scoped +(defmacro org-babel--check-confirm-evaluate (info rest body) + Pull some information from code block INFO and evaluate BODY. + (declare (indent defun)) + `(let* ((eval (or (cdr (assoc :eval (nth 2 ,info))) + (when (assoc :noeval (nth 2 ,info)) no))) + (code-block (if info (format %s (nth 0 ,info)) )) + (block-name (if (nth 4 ,info) (format (%s) (nth 4 ,info)) ))) + ,@body)) +(defun org-babel--check-evaluate (info) + Check whether the code block INFO should be evaluated. + (org-babel--check-confirm-evaluate info +(not (when (or (equal eval never) (equal eval no) + (and (org-bound-and-true-p org-current-export-file) + (or (equal eval no-export) (equal eval never-export + (message (format Evaluation of this%scode block%sis disabled. + code-block block-name)) +(defvar org-babel--confirm-evaluate-answer-no) ;; dynamically scoped +(defun org-babel--confirm-evaluate (info) Confirm evaluation of the code block INFO. -This behavior can be
Re: [O] asynchronous exporter and babel confirmation
Thanks for considering the changes. Achim Gratz strom...@nexgo.de writes: + (org-babel-call-process-region-original + (if (org-bound-and-true-p org-babel-call-process-region-original) + (symbol-function 'call-process-region))) I think you mean (or () ()) I will wait for this patch to be committed. Regards, -- Nicolas Goaziou
Re: [O] [new exporter] #+TOC in beamer export
Andreas Leha andreas.l...@med.uni-goettingen.de writes: Nicolas Goaziou n.goaz...@gmail.com writes: [...] A TOC limited to current section sure sounds seducing, but I'm not sure how to achieve this in LaTeX. Something like this? \tableofcontents[sectionstyle=show/hide, subsectionstyle=show/show/hide] Actually, I am looking for a way to do it in regular (i.e. non-Beamer) LaTeX. I guess your code only applies to Beamer documentclass. Thanks anyway. Regards, -- Nicolas Goaziou
Re: [O] [new exporter] [html] Tables of Contents
Hello Jambunathan, You are not welcome on this list anymore, please ban yourself. Thanks, -- Bastien
Re: [O] asynchronous exporter and babel confirmation
Nicolas Goaziou writes: I think you mean (or () ()) Yes of course, thanks for catching that. This also means that the testsuite isn't picking upon that. I will wait for this patch to be committed. When and if Eric chimes in and Karl confirms that his earlier problem with this change is solved. Regards, Achim. -- +[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]+ Samples for the Waldorf Blofeld: http://Synth.Stromeko.net/Downloads.html#BlofeldSamplesExtra
Re: [O] preview latex fragment with latex_header
Hello, Andreas Leha andreas.l...@med.uni-goettingen.de writes: I have a beamer presentation in org-mode that contains a line like #+LaTeX_HEADER: \subtitle{foo} This prevents me from using 'org-preview-latex-fragment' as that one -- naturally, as it uses the article class -- fails with 'Failed to create dvi file from /tmp/orgtex49760oq.tex' due to , | ERROR: Undefined control sequence. | | --- TeX said --- | l.38 \subtitle ` What's the remedy here? Interesting. I put back use of #+latex_header keywords for latex snippets recently, but that is a double-edged sword. Overall, I'm not sure which is the right behaviour here. Is there one, anyway? To solve your problem, you can include your problematic header in a new latex class instead of relying on latex_header. Another solution is to put that latex_header line in an include file, or to generate it as a macro. Regards, -- Nicolas Goaziou
Re: [O] org-exp-bibtex missing in git?
Hi Nicolas, Nicolas Goaziou n.goaz...@gmail.com writes: If we're not going to provide a multi-backend solution, I suggest to keep things simple and write LaTeX code directly (or use the solution provided by Eric). Unless you have something else in mind with these link abbrevs, of course. Can you resend me the link to Eric's suggestion? Actually my suggestion is multi-backends ready: I gave an example for `org-latex-bibtex-link', but `org-html-bibtex-link' could be used at the same place. The link export mechanism would be in charge to select the right function when there are several. If there is no backend-specific function, the exporter would fall back on the normal export mechanism for links. The trick would just be to attach the available functions (possibly multiple ones, for the various backends) as properties to the links (aka :latex-link-function for the :link object in the internal representation) and to select the correct function depending on the export backend. Do it make (some) sense? The idea is to *not* add a new link type with a new syntax, but to rely on the abbreviated links, which I think are flexible enough. -- Bastien
Re: [O] preview latex fragment with latex_header
Nicolas Goaziou n.goaz...@gmail.com writes: Hello, Andreas Leha andreas.l...@med.uni-goettingen.de writes: I have a beamer presentation in org-mode that contains a line like #+LaTeX_HEADER: \subtitle{foo} This prevents me from using 'org-preview-latex-fragment' as that one -- naturally, as it uses the article class -- fails with 'Failed to create dvi file from /tmp/orgtex49760oq.tex' due to , | ERROR: Undefined control sequence. | | --- TeX said --- | l.38 \subtitle ` What's the remedy here? Interesting. I put back use of #+latex_header keywords for latex snippets recently, but that is a double-edged sword. Overall, I'm not sure which is the right behaviour here. Is there one, anyway? To solve your problem, you can include your problematic header in a new latex class instead of relying on latex_header. Another solution is to put that latex_header line in an include file, or to generate it as a macro. Thanks for the quick answer and for these hints. In this particular situation (the \subtitle will always be document specific) the latex class is not possible here -- I won't create latex classes per document. An include file just for a subtitle seems overkill. So I went with the macro. If there were multiple offending lines, I'd probably use the include file. Anyway, just for reference, this is the macro: #+begin_src org #+MACRO: subtitle #+latex_header: \subtitle{$1} {{{subtitle(foo)}}} #+end_src Downside is, that \ and , within the subtitle will have to be escaped. Regards, Andreas
Re: [O] [new exporter] #+TOC in beamer export
Nicolas Goaziou n.goaz...@gmail.com writes: Andreas Leha andreas.l...@med.uni-goettingen.de writes: Nicolas Goaziou n.goaz...@gmail.com writes: [...] A TOC limited to current section sure sounds seducing, but I'm not sure how to achieve this in LaTeX. Something like this? \tableofcontents[sectionstyle=show/hide, subsectionstyle=show/show/hide] Actually, I am looking for a way to do it in regular (i.e. non-Beamer) LaTeX. I guess your code only applies to Beamer documentclass. Sorry. Did not follow this thread closely. Yes, this is beamer-specific. For non-beamer documents, Robert's suggestion of the minitoc package is good. Regards, Andreas
Re: [O] org-exp-bibtex missing in git?
Hi Bastien, Bastien b...@altern.org writes: Hi Nicolas, Nicolas Goaziou n.goaz...@gmail.com writes: If we're not going to provide a multi-backend solution, I suggest to keep things simple and write LaTeX code directly (or use the solution provided by Eric). Unless you have something else in mind with these link abbrevs, of course. Can you resend me the link to Eric's suggestion? http://permalink.gmane.org/gmane.emacs.orgmode/67574 Actually my suggestion is multi-backends ready: I gave an example for `org-latex-bibtex-link', but `org-html-bibtex-link' could be used at the same place. The link export mechanism would be in charge to select the right function when there are several. If there is no backend-specific function, the exporter would fall back on the normal export mechanism for links. The trick would just be to attach the available functions (possibly multiple ones, for the various backends) as properties to the links (aka :latex-link-function for the :link object in the internal representation) and to select the correct function depending on the export backend. Do it make (some) sense? The idea is to *not* add a new link type with a new syntax, but to rely on the abbreviated links, which I think are flexible enough. To give some un-qualified comment: As far as I understand your suggestion, I like it from the technical point of view. But it looks very verbose to me. I expect the introduction to a scientific paper (with typically many \cite{}s) to look disrupted. Regards, Andreas
Re: [O] [new exporter] Captions for tables made by source blocks
I wasn't clear. By naming the results, I mean that you must provide your source block a #+NAME: something attribute, so the generated table gets a #+RESULTS: something attribute. Got it. Thanks. BTW, you mustn't change `org-babel-results-keyword'. I don't even know why this is a defcustom and why it is allowed to turn it into NAME. RESULTS refers to the name of the src-block which produced the current element, whereas NAME refers to the name of the current element. Their purpose is completely different. Have changed `org-babel-results-keyword' back to RESULTS. The captions are working fine. Thank you. Cc'ing Eric Schulte about it. Let us hear from Eric what is the purpose of this variable, and if it has some use. Best, Vikas