[Orgmode] Change color in fontified html export for strings
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi when exporting code blocks to html, strings are exported as yellow (#00), which is really difficult to read. Is there a possibility to customize the colors (specifically the one used for strings) used for the fontification when exporting to html? Thanks, Rainer - -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Natural Sciences Building Office Suite 2039 Stellenbosch University Main Campus, Merriman Avenue Stellenbosch South Africa Tel:+33 - (0)9 53 10 27 44 Cell: +27 - (0)8 39 47 90 42 Fax (SA): +27 - (0)8 65 16 27 82 Fax (D) : +49 - (0)3 21 21 25 22 44 Fax (FR): +33 - (0)9 58 10 27 44 email: rai...@krugs.de Skype: RMkrug -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkyOIcIACgkQoYgNqgF2egrBHACeIDxvfTQos5zlMgwky+7V8yCq xwsAnR92wa8TXzLO3QnKnJljFiqII7rk =ibKq -END PGP SIGNATURE- ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Re: Include files to be used in literate programming
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 13/09/10 14:47, Dan Davison wrote: > Giorgio Valoti writes: > >> Hi all, >> I’ve just switched from OmniFocus and began using Org mode. But I also >> discovered that it can be used for literate programming and I’d like to ask >> if is there a way to use an included file in the tangling phase. In other >> words, I have a file which includes a commons.org file, like this: >> >> === commons.org contents === >> * Variabili comuni >> :PROPERTIES: >> :END: >> #+SRCNAME: entity-name >> #+BEGIN_SRC :noweb yes >> nome_tabella >> #+END_SRC >> >> >> === main.org contents === >> #+INCLUDE: "commons.org" >> >> * Sezione in SQL >> :PROPERTIES: >> :END: >> #+SRCNAME: sql-module >> #+BEGIN_SRC sql :tangle module.sql :noweb yes >> select * >> from table <>; >> #+END_SRC >> >> <> should come from the commons but it’s not. >> >> Is there a way to expand values from included files? > > Hi Giorgio, > > I don't know of a way currently but I agree that it is desirable. It > does seem temtping to want to use #+INCLUDE for this purpose; > however #+INCLUDE is an /export/ construct, and tangling is not > (technically at least) an Org-mode export method. So some options that > come to my mind are: > > 1. I am overlooking an existing way of doing this. > > 2. Implement #+INCLUDE when tangling, optionally or by default. I think that using this option, to include org files using the #INCLUDE and treat them as if they would be part of the original file would be a good solution, especially for literate programming - e.g. having often used code blocks in files, work with "org libraries", ... The only problem might be header properties defined at the beginning of the #+INCLUDEd file - they should probably be excluded from the inclusion. Nevertheless, that could probably be handled by an additional parameter to #+INCLUDE : #+INCLUDE externalORGfile.org :headers exclude where "exclude" is the default. Rainer > > 3. Implement a general way of including blocks of code from other files >in such a way that they behave as 'normal' code blocks. This would >have several potentially useful consequences. > > 4. It seems that it should be possible to get what you want by first >using `org-export-as-org' followed by `org-babel-tangle'. However, >`org-export-as-org' doesn't currently include #+INCLUDE'd files. I >wonder if it should. A hack to do what you want is below (You'll be >prompted for a file name to save the Org export buffer to.): > > #+begin_src emacs-lisp > (defun ded/org-export-as-org-to-buffer () > (interactive) > (let* ((tmp-file (make-temp-file "org-tangle-with-include")) >(org-export-preprocess-after-include-files-hook > `((lambda () (let ((s (buffer-string))) >(with-temp-file ,tmp-file (insert s))) > (save-window-excursion (org-export-as-html-to-buffer nil)) > (switch-to-buffer >(get-buffer-create "*Org Org Export*")) > (insert-file-contents tmp-file)) > (org-mode)) > > (defun ded/tangle-with-include-files () > (interactive) > (save-window-excursion > (ded/org-export-as-org-to-buffer) > (org-babel-tangle))) > #+end_src > > Dan > > >> >> Thank you in advance. >> >> -- >> Giorgio Valoti >> >> >> ___ >> Emacs-orgmode mailing list >> Please use `Reply All' to send replies to the list. >> Emacs-orgmode@gnu.org >> http://lists.gnu.org/mailman/listinfo/emacs-orgmode > > ___ > Emacs-orgmode mailing list > Please use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode - -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Natural Sciences Building Office Suite 2039 Stellenbosch University Main Campus, Merriman Avenue Stellenbosch South Africa Tel:+33 - (0)9 53 10 27 44 Cell: +27 - (0)8 39 47 90 42 Fax (SA): +27 - (0)8 65 16 27 82 Fax (D) : +49 - (0)3 21 21 25 22 44 Fax (FR): +33 - (0)9 58 10 27 44 email: rai...@krugs.de Skype: RMkrug -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkyORcsACgkQoYgNqgF2egoZ0gCfai+D1C/2xCprMdBtUadiSFVs FLQAn3DPIyem4VMwNglzRJTWeWjn5w/T =M9XP -END PGP SIGNATURE- ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Change color in fontified html export for strings
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 14/09/10 02:36, Sebastian Rose wrote: > Rainer M Krug writes: >> Hi >> >> when exporting code blocks to html, strings are exported as yellow >> (#00), which is really difficult to read. Is there a possibility to >> customize the colors (specifically the one used for strings) used for >> the fontification when exporting to html? >> >> Thanks, >> >> Rainer > > Hi Sebastian, > Change the CSS styles for strings using a stylesheet. I must admit, I know nerly nothing about html, and even less about CSS stylesheets. So what do I have o do with the code you gave below? I found the following statement in the org manual: To set the latter variable individually for each file, you can use #+STYLE: For longer style definitions, you can use several such lines. You could also directly write a section in this way, without referring to an external file. ### As I only want to change the color for .string (right?), I am thinking about specifying it in the properties - but #+STYLE: .string {color: #ff4500;} failed. Any suggestions or CSS stylesheets? Rainer > > This is the htmlize-related section of my CSS stylesheet: > > > pre.src .comment { > color: #77; > font-style: italic; > } > pre.src .comment-delimiter { > color: #77; > font-style: italic; > } > .constant { > color: #ff4500; > } > .default { > color: #00; > } > .builtin { > color: #ff; > } > .function-name { > color:#ff; > } > .html-tag { > color: #ff; > } > .keyword { > color: #a52a2a; > font-weight: bold; > } > .string { > color: #006400; > } > .type { > font-weight:bold; > color:#238b8b; > } > .preprocessor { > color:#FF; > } > .variable-name { > color: #4d4d4d; > font-weight:bold; > } > .org-meta-line { > color: #99; > } > .css-selector { > color: #ff; > font-weight:bold; > } > .css-property { > color: #00; > font-weight:bold; > } > .makefile-targets { > font-weight:bold; > color: #ff; > } > pre.src .doc { > color:#77; > } > /* ENDE htmlize.el */ > > > > Sebastian - -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Natural Sciences Building Office Suite 2039 Stellenbosch University Main Campus, Merriman Avenue Stellenbosch South Africa Tel:+33 - (0)9 53 10 27 44 Cell: +27 - (0)8 39 47 90 42 Fax (SA): +27 - (0)8 65 16 27 82 Fax (D) : +49 - (0)3 21 21 25 22 44 Fax (FR): +33 - (0)9 58 10 27 44 email: rai...@krugs.de Skype: RMkrug -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkyPIAsACgkQoYgNqgF2egqo/QCcDJhu8+/rx79XUAO64k1PAybh vIMAnRTCqNYtejI0xo7wciLr4f4NzBw7 =sDxV -END PGP SIGNATURE- ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Change color in fontified html export for strings
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 14/09/10 09:41, Eric S Fraga wrote: > On Tue, 14 Sep 2010 09:11:07 +0200, Rainer M Krug wrote: >> >> -BEGIN PGP SIGNED MESSAGE- >> Hash: SHA1 >> >> On 14/09/10 02:36, Sebastian Rose wrote: >>> Rainer M Krug writes: >>>> Hi >>>> >>>> when exporting code blocks to html, strings are exported as yellow >>>> (#00), which is really difficult to read. Is there a possibility to >>>> customize the colors (specifically the one used for strings) used for >>>> the fontification when exporting to html? >>>> >>>> Thanks, >>>> >>>> Rainer >>> >>> >> Hi Sebastian, >> >>> Change the CSS styles for strings using a stylesheet. >> >> I must admit, I know nerly nothing about html, and even less about CSS >> stylesheets. So what do I have o do with the code you gave below? >> >> I found the following statement in the org manual: >> >> >> To set the latter variable individually for each file, you can >> use >> #+STYLE: >> For longer style definitions, you can use several such lines. You could >> also directly write a >> section in this way, without referring to an external file. >> ### >> >> As I only want to change the color for .string (right?), I am thinking >> about specifying it in the properties - but >> >> #+STYLE: .string {color: #ff4500;} >> >> failed. >> >> Any suggestions or CSS stylesheets? > > Did you C-c C-c after adding that line so that org setup is reset? Yes > Is there actually any HTML code in the exported file that has the > sequence > > : > > where XXX might be SPAN or DIV? That is, is there any HTML code that > is actually using the string class? Maybe try a very small example > and post the html file that results? > The string .string {color: #ff4500;} is in the html file, but it is not used - the color is hardcoded as #00: "seed" Here is an example .org file: - --- #+STYLE: .string {color: #ff4500;} * Results #+begin_src R :exports code plot( res, stages=c( "flower", "parFlower", "gall", "midgeAdult", "grePod", "weavilAdult", "seed" ), plot.type="multiple" ) #+end_src - --- and the resulting html file: - --- http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";> http://www.w3.org/1999/xhtml"; lang="en" xml:lang="en"> test <!--/*--><![CDATA[/*><!--*/ html { font-family: Times, serif; font-size: 12pt; } .title { text-align: center; } .todo { color: red; } .done { color: green; } .tag{ background-color: #add8e6; font-weight:normal } .target { } .timestamp { color: #bebebe; } .timestamp-kwd { color: #5f9ea0; } p.verse { margin-left: 3% } pre { border: 1pt solid #AEBDCC; background-color: #F3F5F7; padding: 5pt; font-family: courier, monospace; font-size: 90%; overflow:auto; } table { border-collapse: collapse; } td, th { vertical-align: top; } dt { font-weight: bold; } div.figure { padding: 0.5em; } div.figure p { text-align: center; } textarea { overflow-x: auto; } .linenr { font-size:smaller } .code-highlighted {background-color:#00;} .org-info-js_info-navigation { border-style:none; } #org-info-js_console-label { font-size:10px; font-weight:bold; white-space:nowrap; } .org-info-js_search-highlight {background-color:#00; color:#00; font-weight:bold; } /*]]>*/--> .string {color: #ff4500;} <!--/*--><![CDATA[/*><!--*/ function CodeHighlightOn(elem, id) { var target = document.getElementById(id); if(null != target) { elem.cacheClassElem = elem.className; elem.cacheClassTarget = target.className; target.className = "code-highlighted"; elem.className = "code-highlighted"; } } function CodeHighlightOff(elem, id) { var target = document.getElementById(id); if(elem.cacheClassElem) elem.className = elem.cacheClassElem; if(elem.cacheClassTarget) target.className = elem.cacheClassTarget; } /*]]>*///--> test Table of Contents 1 Results 1 Results plot( res, stages=c( "flower", "parFlower", "gall", "midgeAdult", "grePod"
Re: [Orgmode] Change color in fontified html export for strings
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 14/09/10 10:16, Eric S Fraga wrote: > On Tue, 14 Sep 2010 10:05:32 +0200, Rainer M Krug wrote: > > [...] > >> The string >> >> .string {color: #ff4500;} >> >> is in the html file, but it is not used - the color is hardcoded as >> #00: > > so this has nothing to do with CSS as style specifications can only > affect specific tags, not hard-coded style information. Agreed. > > The question then becomes one of which particular tool in the chain is > generating hard-coded colours and can that tool be configured to do > this in a different more general manner? Exactly. > > [...] > >> plot( >> res, >> stages=c( >>"flower", >>"parFlower", >>"gall", >>"midgeAdult", >>"grePod", >>"weavilAdult", >>"seed" >>), >> plot.type="multiple" >> ) >> > > Which tool generates this pre-formatted code snippet? I'm not up to > speed on the whole export tool chain for org unfortunately. > Me neither. Probably somebody can help? Rainer - -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Natural Sciences Building Office Suite 2039 Stellenbosch University Main Campus, Merriman Avenue Stellenbosch South Africa Tel:+33 - (0)9 53 10 27 44 Cell: +27 - (0)8 39 47 90 42 Fax (SA): +27 - (0)8 65 16 27 82 Fax (D) : +49 - (0)3 21 21 25 22 44 Fax (FR): +33 - (0)9 58 10 27 44 email: rai...@krugs.de Skype: RMkrug -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkyPMnMACgkQoYgNqgF2egrbWwCgjI1cOQrUbg4othy6VLX+YJqf JccAnAyo89M1BL5c+cQnMT43j/GnMsJp =GLS1 -END PGP SIGNATURE- ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] export of .org file from within a different .org file
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi I have an org file (report.org) which creates a report. Now I want to do a few things with the resulting report, before I create it to run a simulation, and afterwards copy it into a directory with a name linked to some parameter of the simulation. I am now using a seperate .org file (sim.org) which essentially looks as follow: - -- * Simulate #+begin_src R ... #+end_src * Create Report #+begin_src sh :exports results emacs --batch --visit=rep.sim.org - --execute='(org-export-as-html-and-open nil)' #+end_src * Do some copying #+begin_src sh cp rep.sim.html DifferentName.html ... #+end_src - -- As you can see, I am using sh to do a task in emacs - which is quite ridiculous, but I don't know how to do it in elisp. So: how can I translate emacs --batch --visit=rep.sim.org - --execute='(org-export-as-html-and-open nil)' into elisp? The (org-export-as-html-and-open nil) is clear - but the visit= ?? Thanks, Rainer - -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Natural Sciences Building Office Suite 2039 Stellenbosch University Main Campus, Merriman Avenue Stellenbosch South Africa Tel:+33 - (0)9 53 10 27 44 Cell: +27 - (0)8 39 47 90 42 Fax (SA): +27 - (0)8 65 16 27 82 Fax (D) : +49 - (0)3 21 21 25 22 44 Fax (FR): +33 - (0)9 58 10 27 44 email: rai...@krugs.de Skype: RMkrug -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkyPRBIACgkQoYgNqgF2egoUAgCffRw7w3oYflb6IAOyNoASAw8F ZpcAn2JRj7bWIuYBckiK+8UNxjfPd3dp =V5Qm -END PGP SIGNATURE- ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] SOLVED: export of .org file from within a different .org file
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 14/09/10 11:44, Rainer M Krug wrote: Found the solution: #+begin_src emacs-lisp (switch-to-buffer (find-file-noselect "report.org")) (org-export-as-html-and-open nil) #+end_src Cheers, Rainer > Hi > > I have an org file (report.org) which creates a report. > > Now I want to do a few things with the resulting report, before I create > it to run a simulation, and afterwards copy it into a directory with a > name linked to some parameter of the simulation. I am now using a > seperate .org file (sim.org) which essentially looks as follow: > > -- > * Simulate > #+begin_src R > ... > #+end_src > > * Create Report > #+begin_src sh :exports results > emacs --batch --visit=rep.sim.org > --execute='(org-export-as-html-and-open nil)' > #+end_src > > * Do some copying > #+begin_src sh > cp rep.sim.html DifferentName.html > ... > #+end_src > -- > > As you can see, I am using sh to do a task in emacs - which is quite > ridiculous, but I don't know how to do it in elisp. So: > > how can I translate > emacs --batch --visit=rep.sim.org > --execute='(org-export-as-html-and-open nil)' > > into elisp? > The (org-export-as-html-and-open nil) is clear - but the visit= ?? > > Thanks, > > Rainer > - -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Natural Sciences Building Office Suite 2039 Stellenbosch University Main Campus, Merriman Avenue Stellenbosch South Africa Tel:+33 - (0)9 53 10 27 44 Cell: +27 - (0)8 39 47 90 42 Fax (SA): +27 - (0)8 65 16 27 82 Fax (D) : +49 - (0)3 21 21 25 22 44 Fax (FR): +33 - (0)9 58 10 27 44 email: rai...@krugs.de Skype: RMkrug -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkyPSkgACgkQoYgNqgF2egrl8wCeL+DABEKJJ4SIXfm1oC3ivs1P YagAni6wPtICzlXjINI7BDPQj9SkiPWs =x+zA -END PGP SIGNATURE- ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] export of .org file from within a different .org file
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 14/09/10 12:17, Sebastian Rose wrote: > Rainer M Krug writes: >> Hi >> >> I have an org file (report.org) which creates a report. >> >> Now I want to do a few things with the resulting report, before I create >> it to run a simulation, and afterwards copy it into a directory with a >> name linked to some parameter of the simulation. I am now using a >> seperate .org file (sim.org) which essentially looks as follow: >> >> -- >> * Simulate >> #+begin_src R >> ... >> #+end_src >> >> * Create Report >> #+begin_src sh :exports results >> emacs --batch --visit=rep.sim.org >> --execute='(org-export-as-html-and-open nil)' >> #+end_src >> >> * Do some copying >> #+begin_src sh >> cp rep.sim.html DifferentName.html >> ... >> #+end_src >> -- >> >> As you can see, I am using sh to do a task in emacs - which is quite >> ridiculous, but I don't know how to do it in elisp. So: >> >> how can I translate >> emacs --batch --visit=rep.sim.org >> --execute='(org-export-as-html-and-open nil)' >> >> into elisp? > > > Could be done better maybe, but this works: > > (let ((buf (find-file-noselect "~/path/to/file.org"))) > (with-current-buffer buf > (org-export-as-html-and-open nil) > (kill-buffer buf))) Thanks - the kill-buffer is definitely a good idea Rainer > > > > Sebastian - -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Natural Sciences Building Office Suite 2039 Stellenbosch University Main Campus, Merriman Avenue Stellenbosch South Africa Tel:+33 - (0)9 53 10 27 44 Cell: +27 - (0)8 39 47 90 42 Fax (SA): +27 - (0)8 65 16 27 82 Fax (D) : +49 - (0)3 21 21 25 22 44 Fax (FR): +33 - (0)9 58 10 27 44 email: rai...@krugs.de Skype: RMkrug -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkyPTU8ACgkQoYgNqgF2egqzMwCeJg7MEQwJh0voZfysNrvOHVhG 3LAAn25sgD1yod8JnquufgXi/BRTZT5O =o6+0 -END PGP SIGNATURE- ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Nested exports - Exporting a "sub.org" file while exporting "main.org"
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi I want to export a subdocument (sub.org) while exporting a main document (main.org), but I am getting an "Args out of range: 0,0" error message after the sub.org document is exported. Am I doing something wrong or is it not possible to have nested exports? Example: - -begin-main.org-- * Generate Report #+begin_src emacs-lisp :exports results :results output silent (switch-to-buffer (find-file-noselect "sub.org")) (org-export-as-html nil) #+end_src - ---end-main.org-- - --begin-sub.org-- * This is a test report - end-sub.org-- org-mode version: Org-mode version 7.01trans (release_7.01h.502.gc464) emacs version:GNU Emacs 23.2.1 (i686-pc-linux-gnu, GTK+ Version 2.20.1) Ubuntu - Lucid Rainer - -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Natural Sciences Building Office Suite 2039 Stellenbosch University Main Campus, Merriman Avenue Stellenbosch South Africa Tel:+33 - (0)9 53 10 27 44 Cell: +27 - (0)8 39 47 90 42 Fax (SA): +27 - (0)8 65 16 27 82 Fax (D) : +49 - (0)3 21 21 25 22 44 Fax (FR): +33 - (0)9 58 10 27 44 email: rai...@krugs.de Skype: RMkrug -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkyPXdQACgkQoYgNqgF2egrF9wCbBfx8xrlaQrkhyssnl2V9kxrX NdcAnjbz2m5W0/xNPbKDDnK8RuJ8lVFQ =ZD2Y -END PGP SIGNATURE- ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Change color in fontified html export for strings
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 14/09/10 13:41, Sebastian Rose wrote: > Eric S Fraga writes: >> Thanks Sebastian. I think that will definitely help the OP. However, >> at least on my system, I believe the variable is actually >> org-export-htmlize-output-type (type, not style). > > > Yes, sorry Eric, right: org-export-htmlize-output-type I found the variable - but then all the highlighting is gone. I assume, I have to use CSS sylesheet for that. That is an overkill for me at the moment. Is there really no way, just to change the color of one entity in the htmlization of code? Thanks a lot, Rainer > > > Sebastian - -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Natural Sciences Building Office Suite 2039 Stellenbosch University Main Campus, Merriman Avenue Stellenbosch South Africa Tel:+33 - (0)9 53 10 27 44 Cell: +27 - (0)8 39 47 90 42 Fax (SA): +27 - (0)8 65 16 27 82 Fax (D) : +49 - (0)3 21 21 25 22 44 Fax (FR): +33 - (0)9 58 10 27 44 email: rai...@krugs.de Skype: RMkrug -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkyPYnMACgkQoYgNqgF2egqWygCfYGPjAlIwJczE4PBgPF7Ge6RO PhcAn3cTxJZ7d/oDHOdk87rhgu9dhuOq =rrpG -END PGP SIGNATURE- ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Change color in fontified html export for strings
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 14/09/10 18:25, Sebastian Rose wrote: > Rainer M Krug writes: >> On 14/09/10 13:41, Sebastian Rose wrote: >>> Eric S Fraga writes: >>>> Thanks Sebastian. I think that will definitely help the OP. However, >>>> at least on my system, I believe the variable is actually >>>> org-export-htmlize-output-type (type, not style). >>> >>> >>> Yes, sorry Eric, right: org-export-htmlize-output-type >> >> I found the variable - but then all the highlighting is gone. I assume, >> I have to use CSS sylesheet for that. That is an overkill for me at the >> moment. >> >> Is there really no way, just to change the color of one entity in the >> htmlization of code? > > > Ahhh, sorry, yes, there is one: > >M-x customize-variable RET org-export-html-style RET > > You should leave your `org-export-htmlize-output-type' setting as > discussed before. > > Set `org-export-html-style' to, e.g., > >.string { color:#006600; } Thanks - that looks more like it. But I don't get it as I want it - so I just leave it as it is for the moment. Thanks a lot for your help, Rainer > > > > HTH > >Sebastian - -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Natural Sciences Building Office Suite 2039 Stellenbosch University Main Campus, Merriman Avenue Stellenbosch South Africa Tel:+33 - (0)9 53 10 27 44 Cell: +27 - (0)8 39 47 90 42 Fax (SA): +27 - (0)8 65 16 27 82 Fax (D) : +49 - (0)3 21 21 25 22 44 Fax (FR): +33 - (0)9 58 10 27 44 email: rai...@krugs.de Skype: RMkrug -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkyPxXkACgkQoYgNqgF2egqHKgCdE4onbiHrkMpQCYuwPlOeK9Hs UT4An0ucD4LCAJGj+D5rHn508NmzLzT6 =f/xF -END PGP SIGNATURE- ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Nested exports - Exporting a "sub.org" file while exporting "main.org"
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 14/09/10 18:21, Sebastian Rose wrote: > Rainer M Krug writes: >> Hi >> >> I want to export a subdocument (sub.org) while exporting a main document >> (main.org), but I am getting an >> "Args out of range: 0,0" >> error message after the sub.org document is exported. >> >> Am I doing something wrong or is it not possible to have nested exports? > > Hi Rainer, > > > in Org mode you would rather set up a special publishing project for > such a task: > > (setq org-publish-project-alist > '(("main-and-sub" > :base-directory "~/org/" > :auto-sitemap nil ; NO sitemap for this project !! > :recursive t > :base-extension "org" > :publishing-directory "~/public_html/org/" > :publishing-function org-publish-org-to-html > ) > ("one-more-project" > ;;... > ))) > > See also: > > http://orgmode.org/manual/Publishing.html#Publishing > > This describes my publishing setup: > > http://orgmode.org/worg/org-tutorials/org-publish-html-tutorial.php Hi Sebastian yes - I guess that is exactly what I am looking for. Thanks a lot, Rainer > > > > > Best wishes > >Sebastian - -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Natural Sciences Building Office Suite 2039 Stellenbosch University Main Campus, Merriman Avenue Stellenbosch South Africa Tel:+33 - (0)9 53 10 27 44 Cell: +27 - (0)8 39 47 90 42 Fax (SA): +27 - (0)8 65 16 27 82 Fax (D) : +49 - (0)3 21 21 25 22 44 Fax (FR): +33 - (0)9 58 10 27 44 email: rai...@krugs.de Skype: RMkrug -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkyPxcMACgkQoYgNqgF2ego9nACggsb1l9mzEKkxdzwzSvoykt4c 0W8AnRyz94+13XIsKxlRbJ5lF6Bxl+SO =IPjA -END PGP SIGNATURE- ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Re: Nested exports - Exporting a "sub.org" file while exporting "main.org"
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 14/09/10 20:57, Sébastien Vauban wrote: > Hi Sebastian, > > Sebastian Rose wrote: >> Rainer M Krug writes: >>> >>> I want to export a subdocument (sub.org) while exporting a main document >>> (main.org), but I am getting an >>> "Args out of range: 0,0" >>> error message after the sub.org document is exported. >>> >>> Am I doing something wrong or is it not possible to have nested exports? >> >> in Org mode you would rather set up a special publishing project for >> such a task: >> >> (setq org-publish-project-alist [...] > > Rainer talks of exporting, hence the PDFLaTeX route, if he uses the right > vocabulary. I was actually thinking about export to html, but the same error occurs when exporting to pdf. Rainer > > I have a serious impression that it's related to what I experience myself > since a couple of days with LaTeX. Exactly the same message, in any case. See > my post on http://www.mail-archive.com/emacs-orgmode@gnu.org/msg30148.html. > > Best regards, > Seb > - -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Natural Sciences Building Office Suite 2039 Stellenbosch University Main Campus, Merriman Avenue Stellenbosch South Africa Tel:+33 - (0)9 53 10 27 44 Cell: +27 - (0)8 39 47 90 42 Fax (SA): +27 - (0)8 65 16 27 82 Fax (D) : +49 - (0)3 21 21 25 22 44 Fax (FR): +33 - (0)9 58 10 27 44 email: rai...@krugs.de Skype: RMkrug -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkyQd0oACgkQoYgNqgF2egruBQCfS+gesgo79FbupFhOcW2bwdJ7 kKUAoIl5nwcgHGOCGABaeHhqLmrKINLS =eXsV -END PGP SIGNATURE- ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Re: Nested exports - Exporting a "sub.org" file while exporting "main.org"
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 15/09/10 11:23, Sébastien Vauban wrote: > Hi Rainer, > > Rainer M Krug wrote: >> On 14/09/10 20:57, Sébastien Vauban wrote: >>> Sebastian Rose wrote: >>>> Rainer M Krug writes: >>>>> >>>>> I want to export a subdocument (sub.org) while exporting a main document >>>>> (main.org), but I am getting an "Args out of range: 0,0" error message >>>>> after the sub.org document is exported. >>>> >>>> in Org mode you would rather set up a special publishing project for such >>>> a task: >>>> >>>> (setq org-publish-project-alist [...] >>> >>> Rainer talks of exporting, hence the PDFLaTeX route, if he uses the right >>> vocabulary. >>> >>> I have a serious impression that it's related to what I experience myself >>> since a couple of days with LaTeX. Exactly the same message, in any case. >>> See >>> my post on http://www.mail-archive.com/emacs-orgmode@gnu.org/msg30148.html. >> >> I was actually thinking about export to html, but the same error occurs when >> exporting to pdf. > > So, you still can't export to PDF, because of that same message, right? I can export a .org file to pdf and html, but when I have "nested exports", i.e. when I have in one org file which I want to export to html or pdf, the following: #+begin_src emacs-lisp :exports none :results silent (switch-to-buffer (find-file-noselect "rep.sim.org")) (org-export-as-pdf-and-open nil) (org-export-as-html-and-open nil) (kill-buffer "rep.sim.org") #+end_src it aborts after executing the code block (i.e. rep.sim.org is exported to html as well as pdf) with the byte-code: Args out of range: 0, 0 error. So I assume, it is something different. Cheers, Rainer > > Best regards, > Seb > - -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Natural Sciences Building Office Suite 2039 Stellenbosch University Main Campus, Merriman Avenue Stellenbosch South Africa Tel:+33 - (0)9 53 10 27 44 Cell: +27 - (0)8 39 47 90 42 Fax (SA): +27 - (0)8 65 16 27 82 Fax (D) : +49 - (0)3 21 21 25 22 44 Fax (FR): +33 - (0)9 58 10 27 44 email: rai...@krugs.de Skype: RMkrug -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkyQlTIACgkQoYgNqgF2egoHhACcDYNW5SdjT+TMWw+2OuC6Nzar edQAn1Wg68Wg7LqDoQBbZAwtDJPcWfC0 =iQaF -END PGP SIGNATURE- ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Color of exported R code results using LaTeX listings
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 17/09/10 09:31, Steven Delean wrote: > Hi everyone, > > I am using org-mode to make a beamer presentation that includes > blocks of R code and wish to export the source code and results to > pdf in color (using the listings package). > > The source code block syntax is highlighted successfully, but the > output results of the executed R code are not colored at all. Hi This is not an answer to your question, but rather a question to you: I added your settings to my .emacs file, and I get fontification in the pdf output, but no color. Do I need any additional settings to get coloring of the source code? Cheers, Rainer > > The results are presented in \begin{verbatim}...\end{verbatim}, > whereas the source code is presented within > \begin{lstlisting}...\end{lstlisting}. I can affect changes to the > fontsize and color of the source code using \lstset in the .org > document header, but not the results output from evaluating the > code. > > Is there some way I can export these results in color? > > Thanks for any suggestions, > > Regards, Steve > > PS I have the follwing in my .emacs (require 'org-latex) (setq > org-export-latex-listings t) (add-to-list > 'org-export-latex-packages-alist '("" "listings")) (add-to-list > 'org-export-latex-packages-alist '("" "color")) > > > > > > ___ Emacs-orgmode mailing > list Please use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode - -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Natural Sciences Building Office Suite 2039 Stellenbosch University Main Campus, Merriman Avenue Stellenbosch South Africa Tel:+33 - (0)9 53 10 27 44 Cell: +27 - (0)8 39 47 90 42 Fax (SA): +27 - (0)8 65 16 27 82 Fax (D) : +49 - (0)3 21 21 25 22 44 Fax (FR): +33 - (0)9 58 10 27 44 email: rai...@krugs.de Skype: RMkrug -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkyTIAIACgkQoYgNqgF2egrfiwCeNk5+mduTj/HamQs9lAQG5CEE zeIAn2kc+F+yL9XGyQu771zEKyFSxxin =/jMz -END PGP SIGNATURE- ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Color of exported R code results using LaTeX listings
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 17/09/10 10:28, Steven Delean wrote: > Hi Rainer, > > Yes, you will need to provide arguments to the \lstset listings variable > (i.e. add these arguments to a #+BEAMER_HEADER_EXTRA: line). Below are > the subset of arguments that I am using so far, though greater > customisation is available (see listings.pdf > www.ctan.org/tex-archive/macros/latex/contrib/listings/listings.pdf). > > \lstset{ > keywordstyle=\color{blue}, > commentstyle=\color{red}, > stringstyle=\color{green}, > basicstyle=\ttfamily\small, > columns=fullflexible, > basewidth={0.5em,0.4em} > } Now this explains it - thanks a million - works absolutely perfectly. Could that info be added to worg or even the org manual? It mentions the listings and color package are mentioned, but not that colors need to be specified to have colors in the resulting latex / pdf file. Thanks a lot, Rainer > > Cheers, > Steve > > > On Fri, 2010-09-17 at 10:00 +0200, Rainer M Krug wrote: > On 17/09/10 09:31, Steven Delean wrote: >>>> Hi everyone, >>>> >>>> I am using org-mode to make a beamer presentation that includes >>>> blocks of R code and wish to export the source code and results to >>>> pdf in color (using the listings package). >>>> >>>> The source code block syntax is highlighted successfully, but the >>>> output results of the executed R code are not colored at all. > > Hi > > This is not an answer to your question, but rather a question to you: > I added your settings to my .emacs file, and I get fontification in the > pdf output, but no color. Do I need any additional settings to get > coloring of the source code? > > Cheers, > > Rainer > >>>> >>>> The results are presented in \begin{verbatim}...\end{verbatim}, >>>> whereas the source code is presented within >>>> \begin{lstlisting}...\end{lstlisting}. I can affect changes to the >>>> fontsize and color of the source code using \lstset in the .org >>>> document header, but not the results output from evaluating the >>>> code. >>>> >>>> Is there some way I can export these results in color? >>>> >>>> Thanks for any suggestions, >>>> >>>> Regards, Steve >>>> >>>> PS I have the follwing in my .emacs (require 'org-latex) (setq >>>> org-export-latex-listings t) (add-to-list >>>> 'org-export-latex-packages-alist '("" "listings")) (add-to-list >>>> 'org-export-latex-packages-alist '("" "color")) >>>> >>>> >>>> >>>> >>>> >>>> ___ Emacs-orgmode mailing >>>> list Please use `Reply All' to send replies to the list. >>>> Emacs-orgmode@gnu.org >>>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode > > >> ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode > ___ > Emacs-orgmode mailing list > Please use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode - -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Natural Sciences Building Office Suite 2039 Stellenbosch University Main Campus, Merriman Avenue Stellenbosch South Africa Tel:+33 - (0)9 53 10 27 44 Cell: +27 - (0)8 39 47 90 42 Fax (SA): +27 - (0)8 65 16 27 82 Fax (D) : +49 - (0)3 21 21 25 22 44 Fax (FR): +33 - (0)9 58 10 27 44 email: rai...@krugs.de Skype: RMkrug -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkyTL1IACgkQoYgNqgF2egp6VwCgiF0bC1uOTVFKeCr9Q+3S9O/o KnQAn3cBqE6E4NYMUkYJ9esqQGO0GZ1g =5aQ7 -END PGP SIGNATURE- ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Re: Color of exported R code results using LaTeX listings
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 17/09/10 10:52, Sébastien Vauban wrote: > Hi Steven and Rainer, > > Steven Delean wrote: >>> This is not an answer to your question, but rather a question to you: >>> I added your settings to my .emacs file, and I get fontification in the >>> pdf output, but no color. Do I need any additional settings to get >>> coloring of the source code? >> >> Yes, you will need to provide arguments to the \lstset listings variable > > See http://www.mail-archive.com/emacs-orgmode@gnu.org/msg28251.html for > examples of pretty-printed code. Thanks - that looks really nice. Nice example. As I said in the other email, that should go to worg. Instead of #+begin_LaTeX #+end_LaTeX I use #+LATEX_HEADER: \lstset{ #+LATEX_HEADER: keywordstyle=\color{blue}, #+LATEX_HEADER: commentstyle=\color{red}, #+LATEX_HEADER: stringstyle=\color{green}, #+LATEX_HEADER: basicstyle=\ttfamily\small, #+LATEX_HEADER: columns=fullflexible, #+LATEX_HEADER: basewidth={0.5em,0.4em} #+LATEX_HEADER: } And it also works. Cheers, Rainer > > Best regards, > Seb > - -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Natural Sciences Building Office Suite 2039 Stellenbosch University Main Campus, Merriman Avenue Stellenbosch South Africa Tel:+33 - (0)9 53 10 27 44 Cell: +27 - (0)8 39 47 90 42 Fax (SA): +27 - (0)8 65 16 27 82 Fax (D) : +49 - (0)3 21 21 25 22 44 Fax (FR): +33 - (0)9 58 10 27 44 email: rai...@krugs.de Skype: RMkrug -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEUEARECAAYFAkyTMS4ACgkQoYgNqgF2egp8egCggtSGTzSGjx3IICnt6AM0ibsV irYAmL73loKjAanP5pEg79LbcXZbccQ= =C9VB -END PGP SIGNATURE- ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Re: Color of exported R code results using LaTeX listings
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 17/09/10 15:14, Steven Delean wrote: > Thanks very much Rainer and Sébastien for your comments and information. > > However, I am still unable to get color output for the _result_ of > evaluating R code blocks. > > #+source: Rcode > #+begin_src R :results output :exports both > x <- 1:5 > square <- function(x) { > x^2 > } > square(x) > #+end_src > > > ## below is the .tex code generated which results in fontified and > colored source code (code within lstlisting), but non-colored results > (within verbatim). > > \lstset{language=R} > > Rcode() $\equiv$ > \begin{lstlisting} > x <- 1:5 > square <- function(x) { > x^2 > } > square(x) > \end{lstlisting} > > \begin{verbatim} > [1] 1 4 9 16 25 > \end{verbatim} > > So the question is how to color the output of text within > \begin{verbatim} ...\end{verbatim} in an exported pdf (just a single > color is fine)? You could redefine the verbatim environment with \renewenvironment{verbatim}[args]{begdef}{enddef} http://www.personal.ceu.hu/tex/defs.htm http://en.wikibooks.org/wiki/LaTeX/Customizing_LaTeX If verbatim is only used for the results, nothing should go wrong. Cheers, Rainer > Thanks for your time, > Steve > > > On Fri, 2010-09-17 at 11:13 +0200, Rainer M Krug wrote: > On 17/09/10 10:52, Sébastien Vauban wrote: >>>> Hi Steven and Rainer, >>>> >>>> Steven Delean wrote: >>>>>> This is not an answer to your question, but rather a question to you: >>>>>> I added your settings to my .emacs file, and I get fontification in the >>>>>> pdf output, but no color. Do I need any additional settings to get >>>>>> coloring of the source code? >>>>> >>>>> Yes, you will need to provide arguments to the \lstset listings variable >>>> >>>> See http://www.mail-archive.com/emacs-orgmode@gnu.org/msg28251.html for >>>> examples of pretty-printed code. > > Thanks - that looks really nice. Nice example. > > As I said in the other email, that should go to worg. > > Instead of > #+begin_LaTeX > #+end_LaTeX > > I use > > #+LATEX_HEADER: \lstset{ > #+LATEX_HEADER: keywordstyle=\color{blue}, > #+LATEX_HEADER: commentstyle=\color{red}, > #+LATEX_HEADER: stringstyle=\color{green}, > #+LATEX_HEADER: basicstyle=\ttfamily\small, > #+LATEX_HEADER: columns=fullflexible, > #+LATEX_HEADER: basewidth={0.5em,0.4em} > #+LATEX_HEADER: } > > And it also works. > > Cheers, > > Rainer > > >>>> >>>> Best regards, >>>> Seb >>>> > > >> ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode - -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Natural Sciences Building Office Suite 2039 Stellenbosch University Main Campus, Merriman Avenue Stellenbosch South Africa Tel:+33 - (0)9 53 10 27 44 Cell: +27 - (0)8 39 47 90 42 Fax (SA): +27 - (0)8 65 16 27 82 Fax (D) : +49 - (0)3 21 21 25 22 44 Fax (FR): +33 - (0)9 58 10 27 44 email: rai...@krugs.de Skype: RMkrug -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkyTazsACgkQoYgNqgF2egoqcQCfb5h49qQjF1zYI6F48x8d+6NZ MMoAnA7VoeD5W9Q7CB2ElUgs4S8kjAVF =gBaP -END PGP SIGNATURE- ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Re: Color of exported R code results using LaTeX listings
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 17/09/10 15:30, Sébastien Vauban wrote: > Steven, > > Rainer M Krug wrote: >> On 17/09/10 15:14, Steven Delean wrote: >>> I am still unable to get color output for the _result_ of evaluating R code >>> blocks. >> >> You could redefine the verbatim environment with >> \renewenvironment{verbatim}[args]{begdef}{enddef} >> >> If verbatim is only used for the results, nothing should go wrong. > > For me, this should be addressed in a more semantic view of the Babel world, > and that's (by coincidence) exactly what I asked to Eric (currently on > holidays, if I read correctly) and Dan, yesterday at 17:16. > > See [[http://mid.gmane.org/87zkvhoh18.fsf%40mundaneum.com][{babel} > Environment around exported results]]. Absolutely - but that does not help Steven at the moment. But I second your suggestion and statement. Cheers, Rainer > > I am positively sure they will address this feature in a fantastic way, as > always... > > Best regards, > Seb > - -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Natural Sciences Building Office Suite 2039 Stellenbosch University Main Campus, Merriman Avenue Stellenbosch South Africa Tel:+33 - (0)9 53 10 27 44 Cell: +27 - (0)8 39 47 90 42 Fax (SA): +27 - (0)8 65 16 27 82 Fax (D) : +49 - (0)3 21 21 25 22 44 Fax (FR): +33 - (0)9 58 10 27 44 email: rai...@krugs.de Skype: RMkrug -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkyTd+kACgkQoYgNqgF2egpd7wCeP3raKjHlGlB7z0JvEiQQqkoO dEUAnjwBAMluSLGIjxwLIvGYpJx8liUu =Ugou -END PGP SIGNATURE- ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Re: [babel] Environment around exported results
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 24/09/10 11:28, Sébastien Vauban wrote: > Hi Eric, > > "Eric Schulte" wrote: >> Sébastien Vauban writes: >>> "Eric Schulte" wrote: >>>>> Would you mind creating an LaTeX environment around the =results= block, >>>>> so that we could have the code colorized (via listings or Minted), and >>>>> clearly distinguish the results, if we want so. >>>>> >>>>> Having an environment would allow one to use non-proportional font for >>>>> the results, or a shadowed background, or... >>>> >>>> Would such an environment be in addition too or in place of wrapping >>>> results in the example environment? >>> >>> I would think of something like this: >>> >>> \begin{orgresults} >>> <... results block ...> >>> \end{orgresults} >>> >>> so that one can customize the =orgresults= environment in LaTeX to get a >>> colored background, another font, etc. >>> >>>> What would you suggest for tabular results? >>> >>> Nothing different for tables: just the same plain default environment >>> around the results part. >>> >>>> One very nice property of the current setup is that it relies solely on >>>> vanilla Org-mode for export features. If the example export of Org-mode >>>> allowed some form of customization through a customizable div class or >>>> latex environment would that be sufficient? >>> >>> The name of the environment could be in a variable, yes. >>> >>> But please note the above request can come out of a misunderstanding or >>> poor knowledge of already existing parametrization of Org-Babel. Put me >>> back on tracks if needed... >> >> I think you've made a good point for adding this functionality. > > Thanks ;-) > >> I'll put this on the Babel TODO stack, and reply to this email when we get >> something implemented. > > FYI, I think it such a thing should be on by default, but with a possibility > to disable it, block per block (or subtree, or file, ...). > > Something like a =:nowrapper= header argument? Probably even one step further: being able to specify the environment to be used in a header argument, so we would have three possible scenarios: 1) default (equals to :wrapper orgresults) : using \begin{orgresults} ... \end{orgresult} 2) :nowrapper : using no wrapper around the results block 3) :wrapper myEnvironment : using \begin{myEnvironment} ... \end{myEnvironment} This could possibly even extended to source blocks as well, enabling the use of different formating for different source blocks? Cheers, Rainer > > Many thanks in advance... > > Best regards, > Seb > - -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Natural Sciences Building Office Suite 2039 Stellenbosch University Main Campus, Merriman Avenue Stellenbosch South Africa Tel:+33 - (0)9 53 10 27 44 Cell: +27 - (0)8 39 47 90 42 Fax (SA): +27 - (0)8 65 16 27 82 Fax (D) : +49 - (0)3 21 21 25 22 44 Fax (FR): +33 - (0)9 58 10 27 44 email: rai...@krugs.de Skype: RMkrug -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkydEZYACgkQoYgNqgF2egrXKgCfUK66v+huGysHoau6GRWy0wJr UOAAmQGHseEUyUzI7pap5nB31SAnIN1T =tkMG -END PGP SIGNATURE- ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Re: From state table to state diagram
Hi I really like the idea of this conversion from a State Transition Table to a State Transition Diagram as it is much easier to make a table then a graph. Unfortunately I don't know enough of python to help here. Could you please publish your solution here (and on worg) as it would be a very useful addition to org. Cheers, Rainer On Thu, Sep 23, 2010 at 5:02 PM, Gary wrote: > Sorry, I've been rather lax on this :( I got dragged onto other stuff, > went on training courses, and all sorts of other things. > > Eric Schulte wrote: > > Babel does support generating diagrams with graphviz via "dot" code > > blocks. Babel is also capable of converting Org-mode tables to list > > objects in a number of languages, so I'd recommend writing a table->dot > > script in your favorite language, and then using babel to handle the > > coordination and Org-mode integration. > > That's all very easy for you to say :)) > > > I'm happy to help in this regard, the first step would be something like > > the following example which assumes python is your preferred scripting > > language (as you can see I have no idea what your state table may look > > like)... > > Well, wikipedia suggests the following[1] (and goes into further detail > as well[2]) >| Current State -> | State | State | State | >| Input v| A | B | C | >|--+---+---+---| >| x| B | ... | ... | >| y| ... | C | ... | > which basically says that when the machine is in State A and receives > 'x' then it transitions to State B, and when it receives a 'y' in State > B it transitions to State C. > > > #+results: state-table > > | 1 | 2 | > > | 3 | 4 | > > > > #+source: table-to-dot > > #+begin_src python :var table=state-table > > python code here > > Okay. What should this python code here do? :) I know, it converts a > table to dot-script, but are there any examples I could look at which > take a table as input and output something (anything), just so I can see > how the python code should expect its input? > > > #+end_src > > > > #+begin_src dot :var text=table-to-dot(table=state-table) > > graph{ > > $text > > } > > #+end_src > > > > Once this is working I think it could make a great addition to the > > library of babel [1] (a collection of generally useful code blocks). > > Sure :) > > [1] > http://en.wikipedia.org/wiki/Finite-state_machine#Concepts_and_vocabulary > [2] http://en.wikipedia.org/wiki/State_transition_table > > > ___ > Emacs-orgmode mailing list > Please use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode > -- NEW GERMAN FAX NUMBER!!! Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Natural Sciences Building Office Suite 2039 Stellenbosch University Main Campus, Merriman Avenue Stellenbosch South Africa Cell: +27 - (0)83 9479 042 Fax:+27 - (0)86 516 2782 Fax:+49 - (0)321 2125 2244 email: rai...@krugs.de Skype: RMkrug Google: r.m.k...@gmail.com ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Problem with PROPERTIES :OPTIONS: when exporting subtree
Hi I hava a problem with exporting to LaTeX. I want to export a table to latex. I put it into a subtree, containing only the table, i.e. no headers, as I want to include it into another document. I thought, that using the :OPTIONS: property, I can disable the headers - but it does not seem to be working - am I missing something? For a small example, see below. The resulting pdf is attached. version: Org-mode version 7.01trans (release_7.01h.514.g878d) Thanks, Rainer ### * Table of Parameter The parameters are as follow: ** The Table :PROPERTIES: :EXPORT_FILE_NAME: table :OPTIONS: H:0 num:f toc:f author:f timestamp:f creator:f :END: | A | B | C | |---+---+| | 1 | 2 | 33 | | | || ### -- NEW GERMAN FAX NUMBER!!! Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Natural Sciences Building Office Suite 2039 Stellenbosch University Main Campus, Merriman Avenue Stellenbosch South Africa Cell: +27 - (0)83 9479 042 Fax:+27 - (0)86 516 2782 Fax:+49 - (0)321 2125 2244 email: rai...@krugs.de Skype: RMkrug Google: r.m.k...@gmail.com table.pdf Description: Adobe PDF document ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Problem with PROPERTIES :OPTIONS: when exporting subtree
On Sat, Sep 25, 2010 at 4:05 PM, Noorul Islam wrote: > On Sat, Sep 25, 2010 at 4:02 PM, Rainer M Krug wrote: > > Hi > > I hava a problem with exporting to LaTeX. > > I want to export a table to latex. I put it into a subtree, containing > only > > the table, i.e. no headers, as I want to include it into another > document. I > > thought, that using the :OPTIONS: property, I can disable the headers - > but > > it does not seem to be working - am I missing something? > > For a small example, see below. The resulting pdf is attached. > > version: Org-mode version 7.01trans (release_7.01h.514.g878d) > > Thanks, > > Rainer > > > > > > ### > > * Table of Parameter > > The parameters are as follow: > > ** The Table > > :PROPERTIES: > > :EXPORT_FILE_NAME: table > > :OPTIONS: H:0 num:f toc:f author:f timestamp:f creator:f > > :END: > > | A | B | C | > > |---+---+| > > | 1 | 2 | 33 | > > | | || > > ### > > -- > > What are you expecting as output? > Well - As it says in the org manual in 12.2 Export options, author: turn on/off inclusion of author name/email into exported file timestamp: turn on/off inclusion creation time into exported file etc. So I effectively expected that I don't have a header, no toc and no timestamp. So effectively (what I would like to have) only the second page (the table) of the pdf. Rainer > Thanks and Regards > Noorul > -- NEW GERMAN FAX NUMBER!!! Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Natural Sciences Building Office Suite 2039 Stellenbosch University Main Campus, Merriman Avenue Stellenbosch South Africa Cell: +27 - (0)83 9479 042 Fax:+27 - (0)86 516 2782 Fax:+49 - (0)321 2125 2244 email: rai...@krugs.de Skype: RMkrug Google: r.m.k...@gmail.com ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Problem with PROPERTIES :OPTIONS: when exporting subtree
On Sat, Sep 25, 2010 at 4:15 PM, Rainer M Krug wrote: > > > On Sat, Sep 25, 2010 at 4:05 PM, Noorul Islam wrote: > >> On Sat, Sep 25, 2010 at 4:02 PM, Rainer M Krug >> wrote: >> > Hi >> > I hava a problem with exporting to LaTeX. >> > I want to export a table to latex. I put it into a subtree, containing >> only >> > the table, i.e. no headers, as I want to include it into another >> document. I >> > thought, that using the :OPTIONS: property, I can disable the headers - >> but >> > it does not seem to be working - am I missing something? >> > For a small example, see below. The resulting pdf is attached. >> > version: Org-mode version 7.01trans (release_7.01h.514.g878d) >> > Thanks, >> > Rainer >> > >> > >> > ### >> > * Table of Parameter >> > The parameters are as follow: >> > ** The Table >> > :PROPERTIES: >> > :EXPORT_FILE_NAME: table >> > :OPTIONS: H:0 num:f toc:f author:f timestamp:f creator:f >> > :END: >> > | A | B | C | >> > |---+---+| >> > | 1 | 2 | 33 | >> > | | || >> > ### >> > -- >> >> What are you expecting as output? >> > > Well - As it says in the org manual in 12.2 Export options, > author: > turn on/off inclusion of author name/email into exported file > > timestamp: turn on/off inclusion creation time into exported file > etc. > > So I effectively expected that I don't have a header, no toc and no > timestamp. So effectively (what I would like to have) only the second page > (the table) of the pdf. > Should have read: So effectively (what I would like to have) everything below "Contents", i.e. only the table as a pdf. > Rainer > > > > >> Thanks and Regards >> Noorul >> > > > > -- > NEW GERMAN FAX NUMBER!!! > > Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, > UCT), Dipl. Phys. (Germany) > > Centre of Excellence for Invasion Biology > Natural Sciences Building > Office Suite 2039 > Stellenbosch University > Main Campus, Merriman Avenue > Stellenbosch > South Africa > > Cell: +27 - (0)83 9479 042 > Fax:+27 - (0)86 516 2782 > Fax:+49 - (0)321 2125 2244 > email: rai...@krugs.de > > Skype: RMkrug > Google: r.m.k...@gmail.com > > -- NEW GERMAN FAX NUMBER!!! Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Natural Sciences Building Office Suite 2039 Stellenbosch University Main Campus, Merriman Avenue Stellenbosch South Africa Cell: +27 - (0)83 9479 042 Fax:+27 - (0)86 516 2782 Fax:+49 - (0)321 2125 2244 email: rai...@krugs.de Skype: RMkrug Google: r.m.k...@gmail.com ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Re: From state table to state diagram
I just started, in another context, to look into radio tables, and I thought - wouldn't this be an option? I mean - putting a radio table into a plantuml block and translating it, should not be to difficult? And it would be perfectly in line with org. The same could be done for graphviz. Just an idea, Cheers, Rainer On Mon, Sep 27, 2010 at 8:27 AM, Gary wrote: > Rainer M Krug wrote: > > > I really like the idea of this conversion from a State Transition Table > to a > > State Transition Diagram as it is much easier to make a table then a > > graph. > > Easier to maintain, too - I ahte trying to reorganise all the transition > arrows when I change something :)) > > > Unfortunately I don't know enough of python to help here. > > I'm learning it in order to do this :P > > > Could you please publish your solution here (and on worg) as it would be > a > > very useful addition to org. > > Sure :) > > > ___ > Emacs-orgmode mailing list > Please use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode > -- NEW GERMAN FAX NUMBER!!! Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Natural Sciences Building Office Suite 2039 Stellenbosch University Main Campus, Merriman Avenue Stellenbosch South Africa Cell: +27 - (0)83 9479 042 Fax:+27 - (0)86 516 2782 Fax:+49 - (0)321 2125 2244 email: rai...@krugs.de Skype: RMkrug Google: r.m.k...@gmail.com ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Re: Problem with PROPERTIES :OPTIONS: when exporting subtree
On Mon, Sep 27, 2010 at 2:03 AM, Matt Lundin wrote: > Rainer M Krug writes: > > > Hi > > > > I hava a problem with exporting to LaTeX. > > > > I want to export a table to latex. I put it into a subtree, containing > > only the table, i.e. no headers, as I want to include it into another > > document. I thought, that using the :OPTIONS: property, I can disable > > the headers - but it does not seem to be working - am I missing > > something? > > I believe the relevant property is :EXPORT_OPTIONS:. > > ,[ (info "(org) Export options") ] > |When exporting only a single subtree by selecting it with `C-c @' > | before calling an export command, the subtree can overrule some of the > | file's export settings with properties `EXPORT_FILE_NAME', > | `EXPORT_TITLE', `EXPORT_TEXT', `EXPORT_AUTHOR', `EXPORT_DATE', and > | `EXPORT_OPTIONS'. > ` > > > ### > > * Table of Parameter > > > > The parameters are as follow: > > ** The Table > > :PROPERTIES: > > :EXPORT_FILE_NAME: table > > :OPTIONS: H:0 num:f toc:f author:f timestamp:f creator:f > > :END: > > | A | B | C | > > |---+---+| > > | 1 | 2 | 33 | > > | | || > > ### > > > > Is it correct that you are trying to disable author, table-of-contents, > etc.? If so, I believe these can be turned off with the nil option: > > --8<---cut here---start->8--- > * Table of Parameter > > The parameters are as follow: > ** The Table > :PROPERTIES: > :EXPORT_FILE_NAME: table > :EXPORT_OPTIONS: H:0 num:nil toc:nil author:nil timestamp:nil creator:nil > :END: > | A | B | C | > |---+---+| > | 1 | 2 | 33 | > | | || > --8<---cut here---end--->8 > > Have you considered radio tables? It's a nice solution for including an > org-mode table in a LaTeX document. > Yes - I looked into them, but I don't get them to work. Do you have an org file with a radio table so that I can see it? Actually, I don't think they would do what I want: want to save the table as LaTeX to a file and use it in a different program (LyX), so that I can update the table while I am working on my simulation, and that when I open LyX, I always have the up-to-date version for the paper I am writing. Cheers, Rainer > > Best, > Matt > -- NEW GERMAN FAX NUMBER!!! Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Natural Sciences Building Office Suite 2039 Stellenbosch University Main Campus, Merriman Avenue Stellenbosch South Africa Cell: +27 - (0)83 9479 042 Fax:+27 - (0)86 516 2782 Fax:+49 - (0)321 2125 2244 email: rai...@krugs.de Skype: RMkrug Google: r.m.k...@gmail.com ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Re: Problem with PROPERTIES :OPTIONS: when exporting subtree
On Tue, Sep 28, 2010 at 7:29 PM, Matthew Lundin wrote: > Rainer M Krug writes: > > > On Mon, Sep 27, 2010 at 2:03 AM, Matt Lundin wrote: > > > > Rainer M Krug writes: > > > > > Hi > > > > > > I hava a problem with exporting to LaTeX. > > > > > > I want to export a table to latex. I put it into a subtree, > > containing > > > only the table, i.e. no headers, as I want to include it into > > another > > > document. I thought, that using the :OPTIONS: property, I can > > disable > > > the headers - but it does not seem to be working - am I missing > > > something? > > > > I believe the relevant property is :EXPORT_OPTIONS:. > > > > ... > > > > Have you considered radio tables? It's a nice solution for > > including an > > org-mode table in a LaTeX document. > > > > Yes - I looked into them, but I don't get them to work. Do you have an > > org file with a radio table so that I can see it? > > There's a nice example in the manual: > > (info "(org) A LaTeX example") > > > > > Actually, I don't think they would do what I want: want to save the > > table as LaTeX to a file and use it in a different program (LyX), so > > that I can update the table while I am working on my simulation, and > > that when I open LyX, I always have the up-to-date version for the > > paper I am writing. > > Ah, then they wouldn't work in this scenario. Radio tables allow you to > use the minor mode orgtbl to edit org-mode tables within a commented > section of a source file (e.g., LaTeX, html) and then to place the > "exported" table at a target location within the same file. > That what I thought. > > It would, however, be very nice to be able to send the results or a > source code block (either executed code or exported org snippets) via > babel to a target in an external file. > Yes - I will raise that point in a new thread. Thanks a lot for your help, Cheers, Rainer > > Best, > Matt > -- NEW GERMAN FAX NUMBER!!! Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Natural Sciences Building Office Suite 2039 Stellenbosch University Main Campus, Merriman Avenue Stellenbosch South Africa Cell: +27 - (0)83 9479 042 Fax:+27 - (0)86 516 2782 Fax:+49 - (0)321 2125 2244 email: rai...@krugs.de Skype: RMkrug Google: r.m.k...@gmail.com ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] [babel] FEATURE REQUEST: send results into file
Hi Based on a discussion in the thread "Problem with PROPERTIES :OPTIONS: when exporting subtree", The idea came ub by Mathew Lundin to be able to "send the results or a source code block (either executed code or exported org snippets) via babel to a target in an external file.". The scenario or context in which the idea came up: I am using org babel for literate programming and I document my parameters for simulations in a table in org. Now when writing a paper, for which I use a different program (I use LyX), but I still would like to include the tables from my original org file in them. Therefore I was looking for a possibility to export ONLY the table into a .tex file, so that it can be included in the LyX / LaTeX via \input{theTable.tex} . Therefore I would need an export of the table in LaTeX format, but no preamble or anything. As far as I was told, this possibility does not exist in org. So Mathew's / my question is if it would be possible to include a functionality to "send the results or a source code block (either executed code or exported org snippets) via babel to a target in an external file.". Cheers, Rainer -- NEW GERMAN FAX NUMBER!!! Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Natural Sciences Building Office Suite 2039 Stellenbosch University Main Campus, Merriman Avenue Stellenbosch South Africa Cell: +27 - (0)83 9479 042 Fax:+27 - (0)86 516 2782 Fax:+49 - (0)321 2125 2244 email: rai...@krugs.de Skype: RMkrug Google: r.m.k...@gmail.com ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Re: [babel] FEATURE REQUEST: send results into file
2010/9/29 Sébastien Vauban > Hi Rainer, > > Rainer M Krug wrote: > > Based on a discussion in the thread "Problem with PROPERTIES :OPTIONS: > when > > exporting subtree", The idea came ub by Mathew Lundin to be able to "send > > the results or a source code block (either executed code or exported org > > snippets) via babel to a target in an external file.". > > > > The scenario or context in which the idea came up: > > > > I am using org babel for literate programming and I document my > parameters > > for simulations in a table in org. Now when writing a paper, for which I > use > > a different program (I use LyX), but I still would like to include the > > tables from my original org file in them. Therefore I was looking for a > > possibility to export ONLY the table into a .tex file, so that it can be > > included in the LyX / LaTeX via \input{theTable.tex} . Therefore I would > > need an export of the table in LaTeX format, but no preamble or anything. > > *Side question*, because this is quite important, I think: why are you > still > using LyX directly? > Because it is easier for me? Don't get me wrong - I really like org mode and org babel - I can not imagine working without them (wait - I did that until about a year ago...). But for writing papers for publication, other tools are more suitable FOR ME: These papers do not include any literate programming and no to be executed code, and I really like the interface of LyX for writing. More even then a text editor for LaTeX (however advanced or not it may be), it does what it is supposed to be doing: to let me concentrate on the contents of the paper. But as I said, that is my personal opinion, and others might prefer other approaches. > > For my literate programming needs, I've been able to completely forget > about > my past ways to do: > > - Nuweb (in MS Windows) extensions to LaTeX > - Noweb (in Linux) extensions to LaTeX > > and switch, with much more benefits, to Org-only files. Yes - concerning programming, literate programming, documenting the source code, etc., org mode with org-babel is PERFECT. > What is stopping you from being able to do so? As I said - org is getting close to being a swiss army knife, but I tried to open a bottle with it and my screen broke - so I still use a bottle opener for that... > That root cause should be fixed, IMHO -- if doable, of course... > > > > As far as I was told, this possibility does not exist in org. > > If I understand correctly, this is, indeed, the difficulty Eric exposed us, > when I was working on the isodoc letter (trying to convert Org blocks to > LaTeX, and get everything assembled upon exporting). > Effectively, yes - except that the org block converted to LaTeX should be available in files, which can be used from other programs as well. Cheers, Rainer > Best regards, > Seb > > -- > Sébastien Vauban > > > _______ > Emacs-orgmode mailing list > Please use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode > -- NEW GERMAN FAX NUMBER!!! Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Natural Sciences Building Office Suite 2039 Stellenbosch University Main Campus, Merriman Avenue Stellenbosch South Africa Cell: +27 - (0)83 9479 042 Fax:+27 - (0)86 516 2782 Fax:+49 - (0)321 2125 2244 email: rai...@krugs.de Skype: RMkrug Google: r.m.k...@gmail.com ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Sidewaystable in org?
Hi I would like to have a table exported to LaTeX in landscape formate. I tried \begin{sidewaystable} THE TABLE \end{sidewaystable} but I did not succeed. Is there a way to produce a sideways table from org? OK - one approach would be to use a radio table in a LaTeX block, but I am struggling with those as well. Cheers, Rainer -- NEW GERMAN FAX NUMBER!!! Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Natural Sciences Building Office Suite 2039 Stellenbosch University Main Campus, Merriman Avenue Stellenbosch South Africa Cell: +27 - (0)83 9479 042 Fax:+27 - (0)86 516 2782 Fax:+49 - (0)321 2125 2244 email: rai...@krugs.de Skype: RMkrug Google: r.m.k...@gmail.com ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Re: [babel] FEATURE REQUEST: send results into file
2010/9/29 Sébastien Vauban > Rainer, > > Rainer M Krug wrote: > > 2010/9/29 Sébastien Vauban > >> Rainer M Krug wrote: > >> *Side question*, because this is quite important, I think: why are you > >> still using LyX directly? > > > > Because it is easier for me? Don't get me wrong - I really like org mode > and > > org babel - I can not imagine working without them (wait - I did that > until > > about a year ago...). But for writing papers for publication, other tools > > are more suitable FOR ME: These papers do not include any literate > > programming and no to be executed code, and I really like the interface > of > > LyX for writing. More even then a text editor for LaTeX (however advanced > or > > not it may be), it does what it is supposed to be doing: to let me > > concentrate on the contents of the paper. > > On concentrating on the contents, I find it easier to (as someone to) read: > > --8<---cut here---start->8--- > Because: > - reason 1 > - and reason 2 > --8<---cut here---end--->8--- > > than: > > --8<---cut here---start->8--- > Because: > \begin{itemize} > \item reason 1 > \item and reason 2 > \end{itemize} > --8<---cut here---end--->8--- > Absolutely - and that is why I am using LyX and not LaTeX: in these regards a LITTLE bit like WYSIWYG, but within the complete LaTeX power and not with "painting" layouts like in word. Cheers, Rainer > > Same for tables... > > That's why I now hate going back to LaTeX. But, I know, habits can be hard > to > change. > > Best regards, > Seb > > -- > Sébastien Vauban > > > ___ > Emacs-orgmode mailing list > Please use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode > -- NEW GERMAN FAX NUMBER!!! Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Natural Sciences Building Office Suite 2039 Stellenbosch University Main Campus, Merriman Avenue Stellenbosch South Africa Cell: +27 - (0)83 9479 042 Fax:+27 - (0)86 516 2782 Fax:+49 - (0)321 2125 2244 email: rai...@krugs.de Skype: RMkrug Google: r.m.k...@gmail.com ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] [babel] bug in ob-plantuml.el
Hi I just found a bug in ob-plantuml.el (if (string= (file-name-extension out-file) "svg") "-tsvg" "") needs to be changed to (if (string= (file-name-extension out-file) "svg") " -tsvg" "") as otherwise, when using the file name extension .svg, the -tsvg is concatenated behing -jar without space producing an error message. Cheers, Rainer -- NEW GERMAN FAX NUMBER!!! Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Natural Sciences Building Office Suite 2039 Stellenbosch University Main Campus, Merriman Avenue Stellenbosch South Africa Cell: +27 - (0)83 9479 042 Fax:+27 - (0)86 516 2782 Fax:+49 - (0)321 2125 2244 email: rai...@krugs.de Skype: RMkrug Google: r.m.k...@gmail.com ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] [babel] Writing R-packages the org way?
Hi I am about to write an R package, and as I am an org-mode and org-babel user, I would (obviously) like to use org-mode for that. Is there a recommended way of writing an R package in org-babel, or do I have effectively wrap the R code for the documentation etc. into source blocks in babel? Any suggestions how to best proceed? Dream: I would like to have one org file which contains everything (documentation, code, other relevant files) and if I export or tangle the file, I have the package ready. Is there anything like that? Rainer -- NEW GERMAN FAX NUMBER!!! Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Natural Sciences Building Office Suite 2039 Stellenbosch University Main Campus, Merriman Avenue Stellenbosch South Africa Cell: +27 - (0)83 9479 042 Fax:+27 - (0)86 516 2782 Fax:+49 - (0)321 2125 2244 email: rai...@krugs.de Skype: RMkrug Google: r.m.k...@gmail.com ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Re: [babel] Writing R-packages the org way?
On Thu, Oct 7, 2010 at 5:12 PM, Erik Iverson wrote: > > Dan Davison wrote: > >> Erik Iverson writes: >> >> Rainer M Krug wrote: >>> >>>> Hi >>>> >>>> I am about to write an R package, and as I am an org-mode and >>>> org-babel user, I would (obviously) like to use org-mode for that. >>>> >>>> Is there a recommended way of writing an R package in org-babel, or >>>> do I have effectively wrap the R code for the documentation >>>> etc. into source blocks in babel? >>>> >>> That's what I do. I've looked into converting an org-file to >>> Roxygen or Rd markup, but never got very far. My idea at the time >>> was to do something like: >>> >>> * function1 >>> ** Help >>> *** Title >>>this is function 1 title >>> *** Description >>>function1 does this... >>> *** Usage >>>function1(arg1, arg2, ...) >>> *** Arguments >>>arg1: the first argument >>> *** Examples >>>function1(arg1 = x, arg2 = y) >>> **Definition >>>begin_src R :tangle R/package.R >>>function1 <- function(arg1, arg2) { >>> >>>} >>> >>> I like the idea of a kind of template, which takes the function name as a parameter and expands it to the above described structure, but also including one section for tests. That would definitely be a starting point from which one could look into the "problem" of the .Rd files. As I am not an emacs / elisp expert, how could that be done (the template)? > >>> Any suggestions how to best proceed? >>>> >>>> Dream: I would like to have one org file which contains everything >>>> (documentation, code, other relevant files) and if I export or >>>> tangle the file, I have the package ready. >>>> >>> Well, that functionality is essentially present with code blocks >>> and tangling, except the documentation part. >>> >> Exactly - and that is the part I would like to have. > >> Hi Erik, >> >> Would you mind expanding on that -- what are we missing for the >> documentation part? >> >> > Dan, by "except for the documentation part", I meant generating > .Rd files (the LaTeX-like syntax) automatically from some org-syntax > that does *not* depend on code blocks. I.e., it would be cool to > specify syntax like I have above for documentation. Using org-mode > headlines for each section like Description, Usage, Arguments, etc. > > Just like exporting to LaTeX generates sections, some process would > use these headlines to generate the .Rd sections. > > That way, you don't have to use the .Rd syntax yourself. No big deal, > just a convenience feature. I don't know how you'd specify to org-mode > that a particular subtree was to generate .Rd syntax, and I don't know > if it would be on export or tangling. > > An alternative is simply just to use code blocks of type Rd within > org-mode and then tangle to .Rd files. That's what I currently do. > > Hope that explains it, > Erik > > > Dan >> > -- NEW GERMAN FAX NUMBER!!! Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Natural Sciences Building Office Suite 2039 Stellenbosch University Main Campus, Merriman Avenue Stellenbosch South Africa Cell: +27 - (0)83 9479 042 Fax:+27 - (0)86 516 2782 Fax:+49 - (0)321 2125 2244 email: rai...@krugs.de Skype: RMkrug Google: r.m.k...@gmail.com ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Re: [babel] Writing R-packages the org way?
On Thu, Oct 7, 2010 at 5:59 PM, Dan Davison wrote: > Erik Iverson writes: > > > Dan Davison wrote: > >> Erik Iverson writes: > >> > >>> Rainer M Krug wrote: > >>>> Hi > >>>> > >>>> I am about to write an R package, and as I am an org-mode and > >>>> org-babel user, I would (obviously) like to use org-mode for that. > >>>> > >>>> Is there a recommended way of writing an R package in org-babel, or > >>>> do I have effectively wrap the R code for the documentation > >>>> etc. into source blocks in babel? > >>> That's what I do. I've looked into converting an org-file to > >>> Roxygen or Rd markup, but never got very far. My idea at the time > >>> was to do something like: > >>> > >>> * function1 > >>> ** Help > >>> *** Title > >>> this is function 1 title > >>> *** Description > >>> function1 does this... > >>> *** Usage > >>> function1(arg1, arg2, ...) > >>> *** Arguments > >>> arg1: the first argument > >>> *** Examples > >>> function1(arg1 = x, arg2 = y) > >>> **Definition > >>> begin_src R :tangle R/package.R > >>> function1 <- function(arg1, arg2) { > >>> > >>> } > >>> > >>> > >>>> Any suggestions how to best proceed? > >>>> > >>>> Dream: I would like to have one org file which contains everything > >>>> (documentation, code, other relevant files) and if I export or > >>>> tangle the file, I have the package ready. > >>> Well, that functionality is essentially present with code blocks > >>> and tangling, except the documentation part. > >> > >> Hi Erik, > >> > >> Would you mind expanding on that -- what are we missing for the > >> documentation part? > >> > > > > Dan, by "except for the documentation part", I meant generating > > .Rd files (the LaTeX-like syntax) automatically from some org-syntax > > that does *not* depend on code blocks. I.e., it would be cool to > > specify syntax like I have above for documentation. Using org-mode > > headlines for each section like Description, Usage, Arguments, etc. > > > > Just like exporting to LaTeX generates sections, some process would > > use these headlines to generate the .Rd sections. > > > > That way, you don't have to use the .Rd syntax yourself. No big deal, > > just a convenience feature. I don't know how you'd specify to org-mode > > that a particular subtree was to generate .Rd syntax, and I don't know > > if it would be on export or tangling. > > > > An alternative is simply just to use code blocks of type Rd within > > org-mode and then tangle to .Rd files. That's what I currently do. > > > > Hope that explains it, > > Yes perfectly, thanks. I had only thought of the solution you mention > involving writing Rd explicitly; I hadn't thought of Rd as an export > target. > I would not say that an Rd export target would be the solution, as only parts of the document have to exported to .Rd format, and others (the code) has to be tangled --- well, I guess one could do it in a two step process: first exporting to .Rd based on the headers, and then tangling the code blocks (which were not exported) into the same structure. > > Well, anyone who wants to put Bastien's new export machinery to the > test, I'll have a texinfo and an Rd backend please. > Agreed. > > :) > > Dan > > > Erik > Dan > > ___ > > Emacs-orgmode mailing list > > Please use `Reply All' to send replies to the list. > > Emacs-orgmode@gnu.org > > http://lists.gnu.org/mailman/listinfo/emacs-orgmode > -- NEW GERMAN FAX NUMBER!!! Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Natural Sciences Building Office Suite 2039 Stellenbosch University Main Campus, Merriman Avenue Stellenbosch South Africa Cell: +27 - (0)83 9479 042 Fax:+27 - (0)86 516 2782 Fax:+49 - (0)321 2125 2244 email: rai...@krugs.de Skype: RMkrug Google: r.m.k...@gmail.com ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Re: [babel] Writing R-packages the org way?
gt; >>> > >>> > >>>> > >>>>> Hi Erik, > >>>>> > >>>>> Would you mind expanding on that -- what are we missing for the > >>>>> documentation part? > >>>>> > >>>>> > >>>> Dan, by "except for the documentation part", I meant generating > >>>> .Rd files (the LaTeX-like syntax) automatically from some org-syntax > >>>> that does *not* depend on code blocks. I.e., it would be cool to > >>>> specify syntax like I have above for documentation. Using org-mode > >>>> headlines for each section like Description, Usage, Arguments, etc. > >>>> > >>>> Just like exporting to LaTeX generates sections, some process would > >>>> use these headlines to generate the .Rd sections. > >>>> > >>>> That way, you don't have to use the .Rd syntax yourself. No big deal, > >>>> just a convenience feature. I don't know how you'd specify to > org-mode > >>>> that a particular subtree was to generate .Rd syntax, and I don't know > >>>> if it would be on export or tangling. > >>>> > >>>> An alternative is simply just to use code blocks of type Rd within > >>>> org-mode and then tangle to .Rd files. That's what I currently do. > >>>> > >>>> Hope that explains it, > >>>> Erik > >>>> > >>>> > >>>> Dan > >>>>> > >>>> > >> > >> ___ > >> Emacs-orgmode mailing list > >> Please use `Reply All' to send replies to the list. > >> Emacs-orgmode@gnu.org > >> http://lists.gnu.org/mailman/listinfo/emacs-orgmode > >> > > > > Charles C. Berry(858) 534-2098 > > Dept of Family/Preventive > Medicine > > E mailto:cbe...@tajo.ucsd.edu UC San Diego > > http://famprevmed.ucsd.edu/faculty/cberry/ La Jolla, San Diego > 92093-0901 > > > > > > > > ___ > > Emacs-orgmode mailing list > > Please use `Reply All' to send replies to the list. > > Emacs-orgmode@gnu.org > > http://lists.gnu.org/mailman/listinfo/emacs-orgmode > -- NEW GERMAN FAX NUMBER!!! Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Natural Sciences Building Office Suite 2039 Stellenbosch University Main Campus, Merriman Avenue Stellenbosch South Africa Cell: +27 - (0)83 9479 042 Fax:+27 - (0)86 516 2782 Fax:+49 - (0)321 2125 2244 email: rai...@krugs.de Skype: RMkrug Google: r.m.k...@gmail.com ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Re: [babel] Writing R-packages the org way?
On Fri, Oct 8, 2010 at 3:09 PM, Stephen Eglen wrote: > > > > Dan Davison writes: > > > Hi Chuck, > > > > I agree about making use of existing ESS tools and that a more > > traditional Org approach might be appropriate. > > this may be slightly off-topic, but another way of adding documentation > is to the 'roxygen' markup. > http://roxygen.org/ Actually not - I did not specify that I want to use .Rd . > > ESS has some support for editing roxygen comment chunks within ESS > buffers, > Yes - I looked into Roxygen some time ago, but in the context of org, I see it as not necessary to include the documentation in the source code block - when using #+begin_src Rd #+end_src and #+begin_src R #+end_src I can nicely separate these two on the code level - but in the org file, they are still literate programming. Cheers, Rainer > Stephen > > > ___ > Emacs-orgmode mailing list > Please use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode > -- NEW GERMAN FAX NUMBER!!! Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Natural Sciences Building Office Suite 2039 Stellenbosch University Main Campus, Merriman Avenue Stellenbosch South Africa Cell: +27 - (0)83 9479 042 Fax:+27 - (0)86 516 2782 Fax:+49 - (0)321 2125 2244 email: rai...@krugs.de Skype: RMkrug Google: r.m.k...@gmail.com ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] [babel] Links in tangled file - howto jump to .org?
Hi I just discovered one of the mysteries I experienced with org: the appearing ID properties. They are caused by the back-linking of code (sitting in the file resulting from tangling) to the actual location in the .org file which was tangled - a REALLY nice feature. Now I am using R (and therefore ESS), and I would like to know, how I can jump from the .R file to the .org file? The links are not recognised in ESS - how can I tell ESS that these are .org links? Cheers, Rainer -- NEW GERMAN FAX NUMBER!!! Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Natural Sciences Building Office Suite 2039 Stellenbosch University Main Campus, Merriman Avenue Stellenbosch South Africa Cell: +27 - (0)83 9479 042 Fax:+27 - (0)86 516 2782 Fax:+49 - (0)321 2125 2244 email: rai...@krugs.de Skype: RMkrug Google: r.m.k...@gmail.com ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Re: [Babel] Macro for begin_src?
On Tue, Apr 20, 2010 at 4:48 PM, Eric Schulte wrote: > Sébastien Vauban writes: > > > Hi Eric, > > > > Eric S Fraga wrote: > >> it might be nice to have a worg page on snippets for org-mode? > > > > Sure. Or having them somewhere in the git directories... > > > > +1 for git directories. > Is there any progress on that? I just started with yasnippet and think they are quite handy. > > That way users who keep their Emacs config in git repos can add the > snippets as a submodule, and I can include the submodule in the literate > emacs-starter-kit [1]. > I got the yasnipet expansion working through your Starter Kit ( http://eschulte.github.com/emacs-starter-kit/starter-kit-org.html) and I realised that you have org-toggle-iimage-in-org in it - as far as I know, this does not exist any more in the newer versions of org (but it does not cause an error). Cheers, Rainer > > -- Eric > > > > > > >> I'm happy to contribute a few. > >> > >> figure: > >> #name : figure > >> # -- > >> #+attr_latex: width=$1\textwidth > >> [[file:$2.pdf]] > >> $0 > > > > Better use \linewidth instead of \textwidth. You will avoid bad > surprises. > > > > They are generally equivalent, but \linewidth is more often the real > width to > > consider: it is correctly adapted in column environments, itemized lists > and > > quotes, to cite a few. > > > > Seb > > Footnotes: > [1] http://eschulte.github.com/emacs-starter-kit/ > > > > ___ > Emacs-orgmode mailing list > Please use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode > -- NEW GERMAN FAX NUMBER!!! Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Natural Sciences Building Office Suite 2039 Stellenbosch University Main Campus, Merriman Avenue Stellenbosch South Africa Cell: +27 - (0)83 9479 042 Fax:+27 - (0)86 516 2782 Fax:+49 - (0)321 2125 2244 email: rai...@krugs.de Skype: RMkrug Google: r.m.k...@gmail.com ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] org-capture target based on filename of .org file from which called
Hi I am using org-mode and org-babel a lot for literate programming. Now I would like to setup a system for capturing 1) bugs which I find and want to fix later and 2) issues which should be solved / addressed but are not that urgent right now. Therefore I would like to use org-capture and its templates. so far so good --- but I would like to have them in two separate files, of which the file name structure is as follow: if the org file in which I want to capture the bug / issue is called project.org, I want the bug file be called project.bugs.org and the issues file project.issues.org. and filed under the heading *BUGS and *ISSUES I have seen the (function function-finding-location) for the target of org-capture, but I don't know how to write that function. Any input welcome, Rainer -- NEW GERMAN FAX NUMBER!!! Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Natural Sciences Building Office Suite 2039 Stellenbosch University Main Campus, Merriman Avenue Stellenbosch South Africa Cell: +27 - (0)83 9479 042 Fax:+27 - (0)86 516 2782 Fax:+49 - (0)321 2125 2244 email: rai...@krugs.de Skype: RMkrug Google: r.m.k...@gmail.com ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Re: epresent and Org-mode: using Emacs to run presentations of Org-mode docs
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 11/02/2010 12:25 PM, Christian Moe wrote: > Hi, > > the librsvg man page says PNG and JPEG raster formats only. Unless I have completely misunderstood these two formats, they are raster formats - consequently, svg (vector) has to be converted to raster. Cheers, Rainer > > CM > > On 11/2/10 11:40 AM, Rainer M Krug wrote: >> >> >> On Mon, Nov 1, 2010 at 11:47 PM, Christian Moe > <mailto:m...@christianmoe.com>> wrote: >> >> Re: converting SVG >> >> >> Have you looked at rsvg (http://librsvg.sourceforge.net/)? >> >> I am not sure if it uses vector for pdf, but it might be worth a try? >> >> Cheers, >> >> Rainer >> >> >> 1. Prince (http://www.princexml.com) does SVG to PDF as vector >> graphics from the command line, very nicely. Too bad it's >> proprietary. >> >> e.g. >> >> : prince drawing.svg drawing.pdf >> >> 2. Ask Inkscape -- it's free software; unfortunately, the result >> is rasterized. >> >> e.g. >> >> : inkscape --without-gui --export-text-to-path >> --export-eps=drawing.eps drawing.svg >> >> >From a sample 52 KB SVG file, Inkscape gives me a 420 KB EPS and >> Prince a 20 KB PDF. >> >> Cheers, >> Christian >> >> >> >> On 10/29/10 4:19 PM, Eric S Fraga wrote: >> >> Łukasz Stelmach> <mailto:lukasz.stelm...@iem.pw.edu.pl>> writes: >> >> Eric S Fragamailto:ucec...@ucl.ac.uk>> >> writes: >> >> ImageMagick [1] will convert from/to SVG to/from many >> formats including >> EPS. I've not tried any conversions with SVG, mind >> you, so this is >> based on the documentation. >> >> >> I'll check it, but I'm afraid it does render SVG as bitmap >> first, >> and then "converts", or rather encapsulates, it to >> EPS/PDF. ImageMagick >> is a bitmap manipulation tool after all. >> >> >> Very true. For presentations, this may not be that much of an >> issue >> (given the resolution of many data projectors)... but it's a >> very valid >> point. >> >> Do let us know if you find a vector based converter. >> >> Thanks, >> eric >> >> >> >> ___ >> Emacs-orgmode mailing list >> Please use `Reply All' to send replies to the list. >> Emacs-orgmode@gnu.org <mailto:Emacs-orgmode@gnu.org> >> http://lists.gnu.org/mailman/listinfo/emacs-orgmode >> >> >> >> >> -- >> NEW GERMAN FAX NUMBER!!! >> >> Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation >> Biology, UCT), Dipl. Phys. (Germany) >> >> Centre of Excellence for Invasion Biology >> Natural Sciences Building >> Office Suite 2039 >> Stellenbosch University >> Main Campus, Merriman Avenue >> Stellenbosch >> South Africa >> >> Cell: +27 - (0)83 9479 042 >> Fax:+27 - (0)86 516 2782 >> Fax:+49 - (0)321 2125 2244 >> email: rai...@krugs.de <mailto:rai...@krugs.de> >> >> Skype: RMkrug >> Google: r.m.k...@gmail.com <mailto:r.m.k...@gmail.com> >> > > - -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Natural Sciences Building Office Suite 2039 Stellenbosch University Main Campus, Merriman Avenue Stellenbosch South Africa Tel:+33 - (0)9 53 10 27 44 Cell: +27 - (0)8 39 47 90 42 Fax (SA): +27 - (0)8 65 16 27 82 Fax (D) : +49 - (0)3 21 21 25 22 44 Fax (FR): +33 - (0)9 58 10 27 44 email: rai...@krugs.de Skype: RMkrug -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkzQD/YACgkQoYgNqgF2egrXBwCePSE1PWJokXadeR0Pd4h6u11q LxoAoItPkz/Azs/fXTpypCRByZSVMXmZ =u073 -END PGP SIGNATURE- ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Re: epresent and Org-mode: using Emacs to run presentations of Org-mode docs
On Mon, Nov 1, 2010 at 11:47 PM, Christian Moe wrote: > Re: converting SVG > Have you looked at rsvg (http://librsvg.sourceforge.net/)? I am not sure if it uses vector for pdf, but it might be worth a try? Cheers, Rainer > > 1. Prince (http://www.princexml.com) does SVG to PDF as vector graphics > from the command line, very nicely. Too bad it's proprietary. > > e.g. > > : prince drawing.svg drawing.pdf > > 2. Ask Inkscape -- it's free software; unfortunately, the result is > rasterized. > > e.g. > > : inkscape --without-gui --export-text-to-path --export-eps=drawing.eps > drawing.svg > > From a sample 52 KB SVG file, Inkscape gives me a 420 KB EPS and Prince a > 20 KB PDF. > > Cheers, > Christian > > > > On 10/29/10 4:19 PM, Eric S Fraga wrote: > >> Łukasz Stelmach writes: >> >> Eric S Fraga writes: >>> >>> ImageMagick [1] will convert from/to SVG to/from many formats including >>>> EPS. I've not tried any conversions with SVG, mind you, so this is >>>> based on the documentation. >>>> >>>> >>> I'll check it, but I'm afraid it does render SVG as bitmap first, >>> and then "converts", or rather encapsulates, it to EPS/PDF. ImageMagick >>> is a bitmap manipulation tool after all. >>> >> >> Very true. For presentations, this may not be that much of an issue >> (given the resolution of many data projectors)... but it's a very valid >> point. >> >> Do let us know if you find a vector based converter. >> >> Thanks, >> eric >> > > > ___ > Emacs-orgmode mailing list > Please use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode > -- NEW GERMAN FAX NUMBER!!! Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Natural Sciences Building Office Suite 2039 Stellenbosch University Main Campus, Merriman Avenue Stellenbosch South Africa Cell: +27 - (0)83 9479 042 Fax:+27 - (0)86 516 2782 Fax:+49 - (0)321 2125 2244 email: rai...@krugs.de Skype: RMkrug Google: r.m.k...@gmail.com ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Edit source buffer in same frame
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi I know that it was discussed here, but I can't find it anymore - sorry: I am looking for the option, that, when C-c ' in a source block, the source edit buffer does not open in a new frame, but uses the one from which C-c ' was called. Thanks, Rainer - -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Natural Sciences Building Office Suite 2039 Stellenbosch University Main Campus, Merriman Avenue Stellenbosch South Africa Tel:+33 - (0)9 53 10 27 44 Cell: +27 - (0)8 39 47 90 42 Fax (SA): +27 - (0)8 65 16 27 82 Fax (D) : +49 - (0)3 21 21 25 22 44 Fax (FR): +33 - (0)9 58 10 27 44 email: rai...@krugs.de Skype: RMkrug -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkzj11sACgkQoYgNqgF2egpwzQCfdR+bj2AONO9zeNbRKcay6SxH POEAnRqjdxJp/VI3z285tNMvS/VfhnSh =Y3Qx -END PGP SIGNATURE- ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Re: Edit source buffer in same frame
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 11/17/2010 03:42 PM, Sébastien Vauban wrote: > #+begin_src emacs-lisp Thanks - exactly that. Rainer - -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Natural Sciences Building Office Suite 2039 Stellenbosch University Main Campus, Merriman Avenue Stellenbosch South Africa Tel:+33 - (0)9 53 10 27 44 Cell: +27 - (0)8 39 47 90 42 Fax (SA): +27 - (0)8 65 16 27 82 Fax (D) : +49 - (0)3 21 21 25 22 44 Fax (FR): +33 - (0)9 58 10 27 44 email: rai...@krugs.de Skype: RMkrug -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkzj73kACgkQoYgNqgF2egqhQACcDO2D98Yhcq/pP07uNuoVq7Fa hLoAn25g1BivCHrrzq92q1ZfGrMBTk1s =vrlZ -END PGP SIGNATURE- ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Okular Metadata to Org
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 11/20/2010 01:51 AM, Ross Glover wrote: > Hi All, > > My first post to the list. I've been working on this python script to > extract Okular metadata and insert it into an org-mode file. I like > using Okular to read and take notes, but accessing those notes is a > total pain. This script takes care of that problem. > > You can get the code here: > git clone git://lair.fifthhorseman.net/~rossg/okutorg.git > > What the script does is read the xml and creates a .org file with this > structure: > > * [[/home/USER/articles/feminism/aronson-Feminism_or_Post-feminism.pdf]] > ** [[bibnotes:1 > /home/USER/articles/feminism/aronson-Feminism_or_Post-feminism.pdf][Young > women no longer]] > Young women no longer concern themselves with discrimination. > > By adding the following lisp to my .emacs files, each 'bibnotes' link > type will open the file to the page on which the note was taken. > Unfortunately, Okular has no switch for opening on a specified > annotation, but the page is not a bad result. > > {{{ > ;; Open okular from org bibnotes to correct page. > (org-add-link-type "bibnotes" 'org-follow-bibnotes-link) > (defun org-follow-bibnotes-link (link) > "Follow links of the type 'pagenumber path/to/file" > (when (string-match "\\([0-9]+\\)\\([[:blank:]]+\\)\\(\/.*\.pdf\\)" link) >(start-process "okular" nil "okular" "-p" > (match-string 1 link) > (match-string 3 link > }}} > > > The overall code is not great, as I am not a great coder by any > stretch. Nor is the script feature rich, currently it just does a > recursive dump of all the okular metadata files that have > annotations. It does check the .org file for duplicate entries, but in > a rudamentary fashion. > > I wanted to integrate this with pymacs or do the import with > lisp, but both of those things are beyond me at the moment. > > Any thoughts are welcome. You're welcome to flame me about feminism, > but please not about the code (I know it's weak). This is the first > thing I've ever made public. Help don't hate ;) . I like it - it looks really nice. I liked okular as well, but reluctant to use as the comments and notes were for me locked into okular, which I did not like. So with this script, I can at least extract them to be readable from org. 1) Are you planning to also include the edits (new text, ...) into the org file, as it would be useful to have all those in it. 2) Would it be possible to re-use an existing okular instance? it is a little bit annoying to have several instances open, when browsing through notes. As I said, I like the script, and I am thinking about running this as a batch job each time I start emacs. Now we just need the opposite: click in a pdf at a certain location and org opens with the link to there to add the note - am I dreaming here? Cheers, Rainer > > Hopefully someone else will find this useful, > > Ross > - -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Natural Sciences Building Office Suite 2039 Stellenbosch University Main Campus, Merriman Avenue Stellenbosch South Africa Tel:+33 - (0)9 53 10 27 44 Cell: +27 - (0)8 39 47 90 42 Fax (SA): +27 - (0)8 65 16 27 82 Fax (D) : +49 - (0)3 21 21 25 22 44 Fax (FR): +33 - (0)9 58 10 27 44 email: rai...@krugs.de Skype: RMkrug -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkzqNDUACgkQoYgNqgF2egp9MwCfYracbYeqLz75q20SzrPY3MOv wEQAn3Z5GIpyVhOBbAQz8ISJI4E4udGW =/1s/ -END PGP SIGNATURE- ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] OT: Question concerning vc-working-revision in git versus svn
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi I migrated from svn to git, but I have one problem: in some documents, I used src_emacs-lisp[:exports results]{(vc-working-revision (or (buffer-file-name) org-current-export-file))} to insert the revision of the document. In svn, this resulted in a number, through which I could identify the revision and retrieve it from svn when needed in the future. Under git, it simply tells me "master" - is there anything I can do to get something similar then the revision number in svn, which I can use to retrieve the version from git? Thanks, Rainer - -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Natural Sciences Building Office Suite 2039 Stellenbosch University Main Campus, Merriman Avenue Stellenbosch South Africa Tel:+33 - (0)9 53 10 27 44 Cell: +27 - (0)8 39 47 90 42 Fax (SA): +27 - (0)8 65 16 27 82 Fax (D) : +49 - (0)3 21 21 25 22 44 Fax (FR): +33 - (0)9 58 10 27 44 email: rai...@krugs.de Skype: RMkrug -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkzuZtUACgkQoYgNqgF2egoa/ACfWnus5RHcIUq45FJns2xZI7mj ixsAn2r+/vQaahvbcEex8s93iR9QcP47 =MmZf -END PGP SIGNATURE- ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] [babel] Enabling language mode for plantuml?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi I would like to be able to edit code blocks of plantuml via C-', but I get the message No such language mode: plantuml-mode Is there an easy way of defining this new language mode, so that I can edit it via C-'? I don't need syntax highlighting at the moment, although ' as the comment character would be nice. Thanks, Rainer - -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Natural Sciences Building Office Suite 2039 Stellenbosch University Main Campus, Merriman Avenue Stellenbosch South Africa Tel:+33 - (0)9 53 10 27 44 Cell: +27 - (0)8 39 47 90 42 Fax (SA): +27 - (0)8 65 16 27 82 Fax (D) : +49 - (0)3 21 21 25 22 44 Fax (FR): +33 - (0)9 58 10 27 44 email: rai...@krugs.de Skype: RMkrug -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkz3cJoACgkQoYgNqgF2egrd6QCeIY22tkaAKMhU263YpW+O515N JLsAoIGyTFa+cWyc6aq52wuabP0NQNBh =J2EM -END PGP SIGNATURE- ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] [babel] Enabling language mode for plantuml?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 12/02/2010 08:42 PM, Eric Schulte wrote: > Hi Rainer, Hi Eric, > > Try something like the following works nicely - thanks. > > #+begin_src emacs-lisp > (add-to-list 'org-src-lang-modes '("plantuml" . fundamental)) > #+end_src > > Perhaps the above code should be part of the ob-plantuml.el file. Yes. That would be useful. Is there an easy way of bringing some syntax highlighting and comments character into the C' buffer? Rainer > > Best -- Eric > > Rainer M Krug writes: > >> Hi >> >> I would like to be able to edit code blocks of plantuml via C-', but I >> get the message >> No such language mode: plantuml-mode >> >> Is there an easy way of defining this new language mode, so that I can >> edit it via C-'? >> I don't need syntax highlighting at the moment, although ' as the >> comment character would be nice. >> >> Thanks, >> >> Rainer - -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Natural Sciences Building Office Suite 2039 Stellenbosch University Main Campus, Merriman Avenue Stellenbosch South Africa Tel:+33 - (0)9 53 10 27 44 Cell: +27 - (0)8 39 47 90 42 Fax (SA): +27 - (0)8 65 16 27 82 Fax (D) : +49 - (0)3 21 21 25 22 44 Fax (FR): +33 - (0)9 58 10 27 44 email: rai...@krugs.de Skype: RMkrug -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkz4tK4ACgkQoYgNqgF2egpmEwCeL2LSCALKzyKQ8eIhkfzoeKSh AYMAninhOQtKyecyKxZ1qapgBYJ5jCwy =zoWi -END PGP SIGNATURE- ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Re: [babel] Enabling language mode for plantuml?
Hi zwz That looks great. Do you have a repository, where I could check for updates? Rainer On Fri, Dec 3, 2010 at 12:31 PM, zwz wrote: > Rainer M Krug writes: > > > Hi > > > > I would like to be able to edit code blocks of plantuml via C-', but I > > get the message > > No such language mode: plantuml-mode > > > > Is there an easy way of defining this new language mode, so that I can > > edit it via C-'? > > I don't need syntax highlighting at the moment, although ' as the > > comment character would be nice. > > > > Thanks, > > > > Rainer > Hi, Rainer > > I wrote a plantuml-mode, which is now not perfect but usable. > It is available on: > http://zhangweize.wordpress.com/2010/09/20/update-plantuml-mode/ > > Just copy the code and save it as "plantuml-mode.el" in a path where > emacs finds its libraries. > > Best regards, > zwz > > > ___ > Emacs-orgmode mailing list > Please use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode > -- NEW GERMAN FAX NUMBER!!! Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Natural Sciences Building Office Suite 2039 Stellenbosch University Main Campus, Merriman Avenue Stellenbosch South Africa Cell: +27 - (0)83 9479 042 Fax:+27 - (0)86 516 2782 Fax:+49 - (0)321 2125 2244 email: rai...@krugs.de Skype: RMkrug Google: r.m.k...@gmail.com ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Re: [babel] Enabling language mode for plantuml?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 12/03/2010 12:31 PM, zwz wrote: > Rainer M Krug writes: > >> Hi >> >> I would like to be able to edit code blocks of plantuml via C-', but I >> get the message >> No such language mode: plantuml-mode >> >> Is there an easy way of defining this new language mode, so that I can >> edit it via C-'? >> I don't need syntax highlighting at the moment, although ' as the >> comment character would be nice. >> >> Thanks, >> >> Rainer > Hi, Rainer > > I wrote a plantuml-mode, which is now not perfect but usable. > It is available on: > http://zhangweize.wordpress.com/2010/09/20/update-plantuml-mode/ > > Just copy the code and save it as "plantuml-mode.el" in a path where > emacs finds its libraries. Just a quick question: whenever I add the line #+begin_src emacs-lisp (load-file "~/.emacs.d/site-lisp/plantuml-mode.el") #+end_src to load the plantuml-mode into my emacs.org file, the message window opens when starting emacs --- when I comment it out, it doesn't. Am I doing something wrong here? Rainer > > Best regards, > zwz > > > ___ > Emacs-orgmode mailing list > Please use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode - -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Natural Sciences Building Office Suite 2039 Stellenbosch University Main Campus, Merriman Avenue Stellenbosch South Africa Tel:+33 - (0)9 53 10 27 44 Cell: +27 - (0)8 39 47 90 42 Fax (SA): +27 - (0)8 65 16 27 82 Fax (D) : +49 - (0)3 21 21 25 22 44 Fax (FR): +33 - (0)9 58 10 27 44 email: rai...@krugs.de Skype: RMkrug -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkz5CAEACgkQoYgNqgF2egqiWQCfYLNcIyxacLrf4JROLtTqE811 TOwAniWnZ/HIjswppuiKATa/4/ngzbRY =P0Qv -END PGP SIGNATURE- ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Re: re-importing ascii export
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 12/06/2010 06:34 PM, Sébastien Mengin wrote: > Le lun. 06/12/10 (05:49:34 +0100), Erik Butz a écrit : >> any hints at all? > Hi Sébastian > I read this morning that pandoc was now converting into orgmode... might > worth giving it a try? Sounds interesting - where did you find this? I can not find anything on the website of pandoc ( http://johnmacfarlane.net/pandoc/index.html ) Cheers, Rainer > > S. > >> On Fri, Nov 26, 2010 at 5:54 PM, Erik Butz wrote: >>> Hi all, >>> >>> I have a possibly stupid question, which is the following: I have a >>> txt file which has been exported using org mode and I don't have the >>> initial file. Is there any way to convert the ascii export back into a >>> native orgmode file so as to have the usual feature as folding etc? > - -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Natural Sciences Building Office Suite 2039 Stellenbosch University Main Campus, Merriman Avenue Stellenbosch South Africa Tel:+33 - (0)9 53 10 27 44 Cell: +27 - (0)8 39 47 90 42 Fax (SA): +27 - (0)8 65 16 27 82 Fax (D) : +49 - (0)3 21 21 25 22 44 Fax (FR): +33 - (0)9 58 10 27 44 email: rai...@krugs.de Skype: RMkrug -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkz97D8ACgkQoYgNqgF2egoe6ACggR1zI6KD9lYtArvcHXxwHlz0 6xkAoIIqFjInOo+DDhmkW8n1c3oeCisf =8VZr -END PGP SIGNATURE- ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Re: re-importing ascii export
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 12/07/2010 09:30 AM, Jeff Horn wrote: >> Sounds interesting - where did you find this? I can not find anything on >> the website of pandoc ( http://johnmacfarlane.net/pandoc/index.html ) > > Puneeth mentioned this a few days ago on this list. Search the > archives for "pandoc" maybe? Must have overlooked that - thanks. Found it. Rainer > > Jeff > - -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Natural Sciences Building Office Suite 2039 Stellenbosch University Main Campus, Merriman Avenue Stellenbosch South Africa Tel:+33 - (0)9 53 10 27 44 Cell: +27 - (0)8 39 47 90 42 Fax (SA): +27 - (0)8 65 16 27 82 Fax (D) : +49 - (0)3 21 21 25 22 44 Fax (FR): +33 - (0)9 58 10 27 44 email: rai...@krugs.de Skype: RMkrug -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEUEARECAAYFAkz99YsACgkQoYgNqgF2egpVwQCYuzx90gvJnAB4V12BT0+8RY3U UACfRbrw9gYC4TeQz51xTrTuqiYTMHc= =iA8g -END PGP SIGNATURE- ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Combination of =code= and Description
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi I would like to have a description as follow: - - first :: some text - - second :: some more text - - =code= :: some additional text but =code= is not formatted as bold. If I say - - \bold{=code=} :: some additional text I get, as one could expect, "=code=" in bold. Is it possible to get code in bold? Cheers, Rainer - -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Natural Sciences Building Office Suite 2039 Stellenbosch University Main Campus, Merriman Avenue Stellenbosch South Africa Tel:+33 - (0)9 53 10 27 44 Cell: +27 - (0)8 39 47 90 42 Fax (SA): +27 - (0)8 65 16 27 82 Fax (D) : +49 - (0)3 21 21 25 22 44 Fax (FR): +33 - (0)9 58 10 27 44 email: rai...@krugs.de Skype: RMkrug -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk0B/0wACgkQoYgNqgF2egp63gCfaAkADwvJobTVcjmhY8JSnEO1 MpIAnj/SHyA84dm4aM+kVH0RlLb4tdlL =v6du -END PGP SIGNATURE- ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Re: A python module for orgmode files
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 12/14/2010 02:34 PM, Jonathan BISSON wrote: > Jeff Horn gmail.com> writes: > >> I think what Chris was referring to is the fact that you can write >> literate programs using org-mode and org-babel. You can mix >> documentation and code, and then run some nifty functions that >> separate them out. The advantage, of course, is that your source is >> self-documenting. >> > Yes, but an org file with babel is not python native. So I needed for one > of my projects an orgmode translator that is totally python native. > org-babel is nice for orgfiles doing computations but not for software > development. What about tangling? When you tangle your org file, you get a source file for that language. Rainer >> I suppose most people comment their code when they open-source a >> project, but I also suspect their are some real advantages to >> organizing your source code using org-mode's hierachies. > Yes, but I'm looking for a way to use org-mode kind of treating with > text files > but with a native python file. > I need to look at this : > http://tinyurl.com/2v26rsr > > > ___ > Emacs-orgmode mailing list > Please use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode - -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Natural Sciences Building Office Suite 2039 Stellenbosch University Main Campus, Merriman Avenue Stellenbosch South Africa Tel:+33 - (0)9 53 10 27 44 Cell: +27 - (0)8 39 47 90 42 Fax (SA): +27 - (0)8 65 16 27 82 Fax (D) : +49 - (0)3 21 21 25 22 44 Fax (FR): +33 - (0)9 58 10 27 44 email: rai...@krugs.de Skype: RMkrug -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk0HdXYACgkQoYgNqgF2egrpZwCeMwIV1xbsBcTwffMzhApsONBP MyEAn3mGmP/YTrPZGm5ZrlXzORbu7BfM =1inx -END PGP SIGNATURE- ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Sending org buffer as mail?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi - From time to time, I would like to mail an .org buffer. At the moment, I copy it into thunderbird and mail it - this is quite awkward. I assume, there must be a better way of doing this from within emacs?. I do not intend to switch to gnus or similar for reading my email, I just want to be able to send, from time to time, an .org buffer as an email Cheers, Rainer - -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Natural Sciences Building Office Suite 2039 Stellenbosch University Main Campus, Merriman Avenue Stellenbosch South Africa Tel:+33 - (0)9 53 10 27 44 Cell: +27 - (0)8 39 47 90 42 Fax (SA): +27 - (0)8 65 16 27 82 Fax (D) : +49 - (0)3 21 21 25 22 44 Fax (FR): +33 - (0)9 58 10 27 44 email: rai...@krugs.de Skype: RMkrug -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk0Jx/IACgkQoYgNqgF2egpTCwCeK6UqllAlqUdXYOe/geP6CDzT 9ZQAnRvUhOMP0Qo/HSkhxx5NtsSCzgQn =Ugi2 -END PGP SIGNATURE- ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Re: Sending org buffer as mail?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 12/16/2010 09:25 AM, Jeff Horn wrote: > On Thu, Dec 16, 2010 at 3:17 AM, Oscar Carlsson > wrote: >> And then, I can send a org-file by attaching it to a mail in Emacs. Try >> C-x m to start a new mail buffer, attach with C-c C-a and send with C-c >> C-c. Sounds very interesting - I'll try it out. C-x m looks great - I am sure I am going to use it a lot. And gmail is exactly what I want to use it for. > > Does this attach the buffer or read it into the message? I thought the > OP wanted to read-in a buffer. Yes - that was effectively what I am looking for: the possiblility to write my email in org mode and send the buffer content as the email text. Dream: Specify subject, to, cc, bcc (probably even attachments) as properties, press a key and the org file is send to the addresses. Rainer > There should be a built-in function for > that, but I've never used it. > - -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Natural Sciences Building Office Suite 2039 Stellenbosch University Main Campus, Merriman Avenue Stellenbosch South Africa Tel:+33 - (0)9 53 10 27 44 Cell: +27 - (0)8 39 47 90 42 Fax (SA): +27 - (0)8 65 16 27 82 Fax (D) : +49 - (0)3 21 21 25 22 44 Fax (FR): +33 - (0)9 58 10 27 44 email: rai...@krugs.de Skype: RMkrug -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk0J07sACgkQoYgNqgF2egrdpACfQkvt6rkmqyESt2r+wOvdq1hn fCsAn0ReY6hNGtxnKP1lZUTXdAY/ev7L =Z0gh -END PGP SIGNATURE- ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Re: Sending org buffer as mail?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 12/16/2010 11:38 AM, Oscar Carlsson wrote: > Rainer M Krug writes: > >> On 12/16/2010 09:25 AM, Jeff Horn wrote: >>> On Thu, Dec 16, 2010 at 3:17 AM, Oscar Carlsson >>> wrote: >>>> And then, I can send a org-file by attaching it to a mail in Emacs. Try >>>> C-x m to start a new mail buffer, attach with C-c C-a and send with C-c >>>> C-c. >> >> Sounds very interesting - I'll try it out. >> >> C-x m looks great - I am sure I am going to use it a lot. And gmail is >> exactly what I want to use it for. >> >>> >>> Does this attach the buffer or read it into the message? I thought the >>> OP wanted to read-in a buffer. >> >> Yes - that was effectively what I am looking for: the possiblility to >> write my email in org mode and send the buffer content as the email text. >> >> Dream: Specify subject, to, cc, bcc (probably even attachments) as >> properties, press a key and the org file is send to the addresses. >> >> Rainer >> >>> There should be a built-in function for >>> that, but I've never used it. >>> > > In my answer above, you'd have to include the file as an attachment, or > insert the text into the mail (either with M-x insert-file or > copy/paste), it would have been better if compose-mail would have > inserted any marked text or such, but I don't know how to code such > functionality :-( Thanks Oscar - I think I can live with it at the moment. But to insert the marked text in the email body sounds a lot like emacs... Cheers, Rainer > > > Oscar - -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Natural Sciences Building Office Suite 2039 Stellenbosch University Main Campus, Merriman Avenue Stellenbosch South Africa Tel:+33 - (0)9 53 10 27 44 Cell: +27 - (0)8 39 47 90 42 Fax (SA): +27 - (0)8 65 16 27 82 Fax (D) : +49 - (0)3 21 21 25 22 44 Fax (FR): +33 - (0)9 58 10 27 44 email: rai...@krugs.de Skype: RMkrug -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEUEARECAAYFAk0J7MoACgkQoYgNqgF2egoVSQCeM6Hlm6FBRKzsVARZlovJsS2l Z8YAljq2RvUkqS+AVf4hMYbEsKfkBbM= =L9Cf -END PGP SIGNATURE- ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Re: Sending org buffer as mail?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 12/16/2010 11:41 AM, Rainer M Krug wrote: > On 12/16/2010 11:38 AM, Oscar Carlsson wrote: >> Rainer M Krug writes: > >>> On 12/16/2010 09:25 AM, Jeff Horn wrote: >>>> On Thu, Dec 16, 2010 at 3:17 AM, Oscar Carlsson >>>> wrote: >>>>> And then, I can send a org-file by attaching it to a mail in Emacs. Try >>>>> C-x m to start a new mail buffer, attach with C-c C-a and send with C-c >>>>> C-c. >>> >>> Sounds very interesting - I'll try it out. >>> >>> C-x m looks great - I am sure I am going to use it a lot. And gmail is >>> exactly what I want to use it for. >>> >>>> >>>> Does this attach the buffer or read it into the message? I thought the >>>> OP wanted to read-in a buffer. >>> >>> Yes - that was effectively what I am looking for: the possiblility to >>> write my email in org mode and send the buffer content as the email text. >>> >>> Dream: Specify subject, to, cc, bcc (probably even attachments) as >>> properties, press a key and the org file is send to the addresses. >>> >>> Rainer >>> >>>> There should be a built-in function for >>>> that, but I've never used it. >>>> > >> In my answer above, you'd have to include the file as an attachment, or >> insert the text into the mail (either with M-x insert-file or >> copy/paste), it would have been better if compose-mail would have >> inserted any marked text or such, but I don't know how to code such >> functionality :-( > > Thanks Oscar - I think I can live with it at the moment. > > But to insert the marked text in the email body sounds a lot like emacs... OK - I asked on the emacs help list, and got a response. I added the followig to my emacs.org: * Add message hook to include selected text as body Thanks to Deniz Dogan #+begin_src emacs-lisp (add-hook 'message-mode-hook (lambda () (let (text) (with-current-buffer (other-buffer) (when (region-active-p) (setq text (buffer-substring (region-beginning) (region-end) (when text (end-of-buffer) (insert text) #+end_src This is doing exactly as expected. Cheers, Rainer > > Cheers, > > Rainer > > >> Oscar > > - -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Natural Sciences Building Office Suite 2039 Stellenbosch University Main Campus, Merriman Avenue Stellenbosch South Africa Tel:+33 - (0)9 53 10 27 44 Cell: +27 - (0)8 39 47 90 42 Fax (SA): +27 - (0)8 65 16 27 82 Fax (D) : +49 - (0)3 21 21 25 22 44 Fax (FR): +33 - (0)9 58 10 27 44 email: rai...@krugs.de Skype: RMkrug -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk0KCFkACgkQoYgNqgF2egqX/ACdHmduO8M0C/QU6y9v9L/pTITj BV4An1xAQJsRr+hd3Dx8UKWQ7d3+w7ps =RDpz -END PGP SIGNATURE- ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Re: Sending org buffer as mail?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 12/16/2010 02:22 PM, Eric Schulte wrote: Hi Eric > Please look at org-mime in the contrib directory. It is designed for > this exact need. Calling `org-mime-org-buffer-htmlize' from within an > Org-mode document will export the document to html, and then place the > html into a mail buffer with appropriate mime configuration, ensuring > things like linked images are handled appropriately. See the worg page > for more information (follow gnus instructions for simple mail use) > http://orgmode.org/worg/org-contrib/org-mime.php Interesting - there is always something new in org-land. But I was actually looking at not exporting the org file, but sending it as text - so I am happy with what I have now. Thanks a lot, Rainer > > Hope this helps -- Eric > > Oscar Carlsson writes: > >> Jeff Horn writes: >> >>> On Thu, Dec 16, 2010 at 3:17 AM, Oscar Carlsson >>> wrote: >>>> And then, I can send a org-file by attaching it to a mail in Emacs. Try >>>> C-x m to start a new mail buffer, attach with C-c C-a and send with C-c >>>> C-c. >>> >>> Does this attach the buffer or read it into the message? I thought the >>> OP wanted to read-in a buffer. There should be a built-in function for >>> that, but I've never used it. >> >> It would attach the file. But inserting the file would be trivial: =M-x >> insert-file= >> >> But I have to admit that's not optimal - it would be better have a macro >> (or such) that did it for you. Or properties in the org-file in >> question. Or tell compose-mail that it should include marked text. >> >> >> Oscar >> >> ___ >> Emacs-orgmode mailing list >> Please use `Reply All' to send replies to the list. >> Emacs-orgmode@gnu.org >> http://lists.gnu.org/mailman/listinfo/emacs-orgmode > > ___ > Emacs-orgmode mailing list > Please use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode - -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Natural Sciences Building Office Suite 2039 Stellenbosch University Main Campus, Merriman Avenue Stellenbosch South Africa Tel:+33 - (0)9 53 10 27 44 Cell: +27 - (0)8 39 47 90 42 Fax (SA): +27 - (0)8 65 16 27 82 Fax (D) : +49 - (0)3 21 21 25 22 44 Fax (FR): +33 - (0)9 58 10 27 44 email: rai...@krugs.de Skype: RMkrug -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk0KFpwACgkQoYgNqgF2ego/EgCdEPFql4mVoc2Z6V8xNt9quUdY nfcAn2+WFS7A++f0G1yM/MybZYM1Qit+ =BzER -END PGP SIGNATURE- ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Re: disable automatic source block evaluation but allow manual
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 12/16/2010 10:48 AM, Sébastien Vauban wrote: > Hi Andreas, > > Andreas Leha wrote: >> is there an option (source block header argument) that allows to disable the >> evaluation of the block, but still allows C-c C-c to perform the evaluation? >> The header argument ':eval never' disables the evaluation completely. I'd >> like the C-c C-c to take precedence over this. >> >> So I guess I am looking for something like ':eval manual' > > If I rewrite what I understood from your post, you want to make a clear > distinction between: > > - allowing evaluation in the Org buffer (when *editing*) > - allowing evaluation when *exporting* it > > In fact, I've been thinking at something that annoys me a bit, around this > similar subject: I find it weird to have a buffer that does not contain the > same up-to-date information as the exported (and updated) document. > > Arbitrary example: > > --8<---cut here---start->8--- > * Sh code > > #+begin_src sh :results output :exports both > date > #+end_src > > #+results: > : Thu, Dec 16, 2010 10:32:36 AM > > #+begin_src sh :var thisfile=(buffer-file-name) > echo $(ls -lia "$thisfile" | cut -d " " -f 6) "Bytes in this buffer" > #+end_src > > #+results: > : 297 Bytes in this buffer > --8<---cut here---end--->8--- > > If I add words in that file, the number of characters will go up. That will be > correctly "visible" (shown) in the exported document. > > But, *if I don't manually execute* all the code snippets above, they will have > a wrong output...[1] > > ... moreover, as said previously, it will always (in the above example) be > different from the HTML/PDF version of that buffer. It may lead to erroneous > appreciation of code results, and lead to different and unsynchronized > versions of documents (source Org file, exported documents). Here the distinction (or view) of what the org file is comes in: as you see it, the org-file is a *usable result* in itself and already the *final product*. Then, it *has* to reflect (and be identical to) the exported one. If, on the other hand, I see the org file as a *source*, equivalent to source code, the final product is what I get when I export (or compile) - - then it is irrelevant if the results in the org file are up to date or not - they could be seen as an *illustration* or an *example* on how the final results will look. This is how I see it. But I can completely understand, why you would like to have your org-file as an up-to-date document in its own right. I guess one possibility would be to have a header argument (update-results-when-exporting) which, if set, would update all results in the org buffer and export then. I for myself actually only use the C-c with the results block for testing, and the final evaluation is done in the export. Cheers, Rainer > > I have a gut feeling that either: > > - the export function should not evaluate any code block, or > > - when evaluating them for the export, the Org buffer should be updated in the > same way (results of evaluation copied back into the Org buffer). > > I guess the first solution is not a good one. What about the second? > > Best regards, > Seb > > Footnotes: > [1] Number of characters won't reflect the new values. And, even if I don't > touch it, the time information will be different between the Org and the > exported files. - -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Natural Sciences Building Office Suite 2039 Stellenbosch University Main Campus, Merriman Avenue Stellenbosch South Africa Tel:+33 - (0)9 53 10 27 44 Cell: +27 - (0)8 39 47 90 42 Fax (SA): +27 - (0)8 65 16 27 82 Fax (D) : +49 - (0)3 21 21 25 22 44 Fax (FR): +33 - (0)9 58 10 27 44 email: rai...@krugs.de Skype: RMkrug -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk0KHVkACgkQoYgNqgF2egp14ACcD/pWZAUaYYyjYUKip3Mx/Hb1 +UIAnjk5nIB6aSwNpqNoTF501DlKVZDd =wp+6 -END PGP SIGNATURE- ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] org-mime
-- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Natural Sciences Building Office Suite 2039 Stellenbosch University Main Campus, Merriman Avenue Stellenbosch South Africa Tel:+33 - (0)9 53 10 27 44 Cell: +27 - (0)8 39 47 90 42 Fax (SA): +27 - (0)8 65 16 27 82 Fax (D) : +49 - (0)3 21 21 25 22 44 Fax (FR): +33 - (0)9 58 10 27 44 email: rai...@krugs.de Skype: RMkrug * Problem When using org-mime and a signature, the signature is above the htmlized org document and not below. This is illustrated here. My mail client is gnus. Cheers, Rainer ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Re: Sending org buffer as mail?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 12/17/2010 07:48 AM, Eric Schulte wrote: Hi eric > I'm attaching a new version of org-mime.el which incorporates Matt's > function below. There are now two new functions, `org-mime-org-buffer' > and `org-mime-org-subtree' each of which takes a format argument > specifying the format of the final email, one of 'org, 'ascii, or 'html. This sounds perfect. So now a *subtree* or *org buffer* can be send as *org*, *ascii or *html*. Right? I just would like to suggest two more things: 1) to be able to mail the subtree or buffer as an attached pdf. Thinking of it, this could also be used for the other formats which result in one file, e.g. ascii, taskjuggle and I think all others except of the html? 2) the format of the inline text (and the attached one?) could be specified as a property, as a property - this would make sending the email consistent. And I must say, I really like the subtree option - now we just need a function to import an email into org, and one could use an org file to manage email conversations... Cheers and thanks a lot - this sounds really good, Rainer > > So, for example the following will export the current subtree as ascii > into an email body, using the MAIL_TO, MAIL_CC, and MAIL_BCC properties > to build the email headers, and the headline to set the subject (both > directly from Matt's function below). > > (defun org-mime-subtree-to-ascii () > (interactive) > (org-mime-org-subtree 'ascii)) > > Does this new version of org-mime look like it should be committed? Are > there any features or changes that should be considered first? > > Cheers -- Eric > > > > > > "Eric Schulte" writes: > >> Hi Matt, >> >> This looks great, how would you feel about trying to fold this into >> org-mime, or would you mind if I did so. I've already mimicked your >> function to set subjects of outgoing emails to match the title of the >> org-mode buffer. I think that generalizing the org-mime functions to >> operate over either subtrees or whole files, and to output either html >> or plain text should cover all use cases with maximal code re-use. >> >> Thanks for sharing this function. >> >> Cheers -- Eric >> >> Matt Lundin writes: >> >>> Rainer M Krug writes: >>> >>>> On 12/16/2010 09:25 AM, Jeff Horn wrote: >>>>> On Thu, Dec 16, 2010 at 3:17 AM, Oscar Carlsson >>>>> wrote: >>>>>> And then, I can send a org-file by attaching it to a mail in Emacs. Try >>>>>> C-x m to start a new mail buffer, attach with C-c C-a and send with C-c >>>>>> C-c. >>>> >>>> Sounds very interesting - I'll try it out. >>>> >>>> C-x m looks great - I am sure I am going to use it a lot. And gmail is >>>> exactly what I want to use it for. >>>> >>>>> >>>>> Does this attach the buffer or read it into the message? I thought the >>>>> OP wanted to read-in a buffer. >>>> >>>> Yes - that was effectively what I am looking for: the possiblility to >>>> write my email in org mode and send the buffer content as the email text. >>>> >>>> Dream: Specify subject, to, cc, bcc (probably even attachments) as >>>> properties, press a key and the org file is send to the addresses. >>> >>> I too have been looking for this functionality for a while, so here's a >>> quick solution. When called on an Org-mode subtree, the following >>> function makes the headline the subject, exports the subtree to ascii, >>> and uses properties ("MAIL_TO", "MAIL_CC", "MAIL_BCC") to specify the >>> addressees: >>> >>> (defun my-org-subtree-to-message () >>> (interactive) >>> (unless (eq major-mode 'org-mode) >>> (error "Not in org buffer")) >>> (let ((subject (nth 4 (org-heading-components))) >>> (to (org-entry-get nil "MAIL_TO")) >>> (cc (org-entry-get nil "MAIL_CC")) >>> (bcc (org-entry-get nil "MAIL_BCC")) >>> text) >>> (save-excursion >>> (org-mark-subtree) >>> ;; don't include title in body >>> (forward-line) >>> (setq text (org-export-region-as-ascii (point) >>> (mark) t 'string))) >>> (message-mail to subject `((cc . ,cc) (bcc . ,bcc)) nil) >>> (when text
[Orgmode] Capture template and elisp expression
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi I want to use a Capture Template to record changes to files under version control. Everything works as expected, but I would like to include the current revision in the template. Therefore I tried the following: * %T %? at %a by Rainer M Krug, email: rai...@krugs.de %(vc-working-revision buffer-file-name) for the template, but I get an error: <2011-01-06 Thu 13:06> at [[file:~/Documents/Projects/BiocontrolAndAlienDynamics/nonSpatialAcacia/trunc/R/nsa.org::*Finalise][Finalise]] by Rainer M Krug, email: rai...@krugs.de %![Error: (wrong-type-argument stringp nil)] Any idea how I could get the revision of the org file from which the Capture has been initiated (here ~/Documents/Projects/BiocontrolAndAlienDynamics/nonSpatialAcacia/trunc/R/nsa.org )? Thanks, Rainer - -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Natural Sciences Building Office Suite 2039 Stellenbosch University Main Campus, Merriman Avenue Stellenbosch South Africa Tel:+33 - (0)9 53 10 27 44 Cell: +27 - (0)8 39 47 90 42 Fax (SA): +27 - (0)8 65 16 27 82 Fax (D) : +49 - (0)3 21 21 25 22 44 Fax (FR): +33 - (0)9 58 10 27 44 email: rai...@krugs.de Skype: RMkrug -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk0lsL4ACgkQoYgNqgF2egqR+ACfYJeAc3K6DM9YQh5E7TleGscY i5oAn07YTRrie1i+7XieuyYcw9AOtFh/ =T3LH -END PGP SIGNATURE- ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Capture template and elisp expression
On 01/06/2011 11:44 PM, Carsten Dominik wrote: > > On Jan 6, 2011, at 11:26 PM, Nick Dokos wrote: > >> Rainer M Krug wrote: >> >>> >>> Hi >>> >>> I want to use a Capture Template to record changes to files under >>> version control. Everything works as expected, but I would like to >>> include the current revision in the template. >>> >>> Therefore I tried the following: >>> >>> * %T %? at %a by Rainer M Krug, email: rai...@krugs.de >>> %(vc-working-revision buffer-file-name) >>> >>> for the template, but I get an error: >>> >>> **** <2011-01-06 Thu 13:06> at >>> [[file:~/Documents/Projects/BiocontrolAndAlienDynamics/nonSpatialAcacia/trunc/R/nsa.org::*Finalise][Finalise]] >>> >>> by Rainer M Krug, email: rai...@krugs.de %![Error: (wrong-type-argument >>> stringp nil)] >>> >>> Any idea how I could get the revision of the org file from which the >>> Capture has been initiated (here >>> ~/Documents/Projects/BiocontrolAndAlienDynamics/nonSpatialAcacia/trunc/R/nsa.org >>> >>> )? >>> >> >> There are a few problems: the evaluation of the sexp happens in the >> capture buffer where buffer-file-name returns nil. Even if you could >> get the file name, vc-working-revision would return nil on a file that >> is not VC-registered and the template would barf. >> >> Those are easy problems to solve but there is another one that seems >> insurmountable (with current code): my original thought was to use the >> %a escape to pass the link to a lisp function, extract the file name >> from it[fn:1] and run vc-working-revision on it (with appropriate >> safeguards >> to catch non-VC files), something like this: >> >> "* %T %? at %a by Rainer M Krug, email: rai...@krugs.de >> %(rk-custom-function-to-get-vc-revision \"%a\")" >> >> However, this fails because at the time that %(sexp) constructs are >> expanded, simple %a etc. constructs have not been expanded yet, so what >> the function above gets is a literal "%a": the subtitution sequence is >> >>;; %[] Insert contents of a file. >> >>... >> >>;; %() embedded elisp >> >>... >> >>;; Simple %-escapes >> >> (see lisp/org-capture.el, lines 1181-1229 or so). >> >> Moreover, this sequence was different and was changed deliberately (see >> the thread http://thread.gmane.org/gmane.emacs.orgmode/27649), so if it >> is changed back, Sebastion Rose will not be happy :-) >> >> So it seems there is no way to pass values from the capture context to a >> lisp function in the capture template, but maybe I'm missing something. >> >> Thanks, >> Nick >> >> Footnotes: >> [fn:1] Is there an easier way to get the filename of the file I was >> visiting when I initiated the capture? If not, should there be? Perhaps >> a %f escape? > > Hi Nick, Hi Carsten, > > you can use > > (buffer-file-name (org-capture-get :original-buffer)) This works perfectly - thanks a million. For the record: I use %(vc-working-revision (buffer-file-name (org-capture-get :original-buffer))) to get the vc revision number. But now I thought - OK - now I can add the state of the file, returned by vc-state (this is working i a nother document in the org-document). So I added: %(vc-state (buffer-file-name (org-capture-get :original-buffer))) but I get the error Capture abort: (wrong-type-argument char-or-string-p edited) It seems, that vc-state (which should be "up-to-date" or "edited") does return a different type then vc-working-revision ? Can I convert vc-state, so that it works? > > and we could certainly introduce a special escape for it if helpful. as this is a basic info, I think it would be useful to have a special escape for this. > > If it is easier, we can also put the filename itself into the property > list, > and any other information we like. This should happen in the function > org-capture, > close to the location where the buffer is stored, so near this line: > > (org-capture-put :original-buffer orig-buf :annotation annotation > :initial initial) > > org-capture uses this property list precisely so that it is simple > to add any information required. In addition to above, it should also be in the properties, oncluding with other information, like e.g. path. > > Note that, after the template has been filled in, it is better > to access in
[Orgmode] BUG? - Capture escape %n not working
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi I am not sure if it is a bug, or a configuration issue, but %n (user name (taken from `user-full-name')) is not working - it is not expanded and displayed as %n Emacs : GNU Emacs 23.2.1 (i686-pc-linux-gnu, GTK+ Version 2.20.1) of 2010-07-05 on ecolmod Package: Org-mode version 7.4 (release_7.4.100.gdf7d) Cheers, Rainer - -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Natural Sciences Building Office Suite 2039 Stellenbosch University Main Campus, Merriman Avenue Stellenbosch South Africa Tel:+33 - (0)9 53 10 27 44 Cell: +27 - (0)8 39 47 90 42 Fax (SA): +27 - (0)8 65 16 27 82 Fax (D) : +49 - (0)3 21 21 25 22 44 Fax (FR): +33 - (0)9 58 10 27 44 email: rai...@krugs.de Skype: RMkrug -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk0mzpYACgkQoYgNqgF2egpDYgCfdhwTTZ+yHK5NqidbcaNQ2h2p jwsAmwREFjnqSMUavfrIKjV2dH9oEis6 =GmNX -END PGP SIGNATURE- ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Re: Capture template and elisp expression
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 01/07/2011 03:14 PM, Carsten Dominik wrote: > > On Jan 7, 2011, at 1:08 PM, Štěpán Němec wrote: > >> Carsten Dominik writes: >> >>> On Jan 6, 2011, at 11:26 PM, Nick Dokos wrote: >>> >>>> Rainer M Krug wrote: >>>> >>>>> >>>>> Hi >>>>> >>>>> I want to use a Capture Template to record changes to files under >>>>> version control. Everything works as expected, but I would like to >>>>> include the current revision in the template. >>>>> >>>>> Therefore I tried the following: >>>>> >>>>> * %T %? at %a by Rainer M Krug, email: rai...@krugs.de >>>>> %(vc-working-revision buffer-file-name) >>>>> >>>>> for the template, but I get an error: >>>>> >>>>> <2011-01-06 Thu 13:06> at >>>>> [[file:~/Documents/Projects/BiocontrolAndAlienDynamics/ >>>>> nonSpatialAcacia/trunc/R/nsa.org::*Finalise][Finalise]] >>>>> by Rainer M Krug, email: rai...@krugs.de %![Error: (wrong-type- >>>>> argument >>>>> stringp nil)] >>>>> >>>>> Any idea how I could get the revision of the org file from which the >>>>> Capture has been initiated (here >>>>> ~/Documents/Projects/BiocontrolAndAlienDynamics/nonSpatialAcacia/ >>>>> trunc/R/nsa.org >>>>> )? >>>>> >>>> >>>> There are a few problems: the evaluation of the sexp happens in the >>>> capture buffer where buffer-file-name returns nil. Even if you could >>>> get the file name, vc-working-revision would return nil on a file that >>>> is not VC-registered and the template would barf. >>>> >>>> Those are easy problems to solve but there is another one that seems >>>> insurmountable (with current code): my original thought was to use the >>>> %a escape to pass the link to a lisp function, extract the file name >>>> from it[fn:1] and run vc-working-revision on it (with appropriate >>>> safeguards >>>> to catch non-VC files), something like this: >>>> >>>> "* %T %? at %a by Rainer M Krug, email: rai...@krugs.de%(rk- >>>> custom-function-to-get-vc-revision \"%a\")" >>>> >>>> However, this fails because at the time that %(sexp) constructs are >>>> expanded, simple %a etc. constructs have not been expanded yet, so what >>>> the function above gets is a literal "%a": the subtitution sequence is >>>> >>>> ;; %[] Insert contents of a file. >>>> >>>> ... >>>> >>>> ;; %() embedded elisp >>>> >>>> ... >>>> >>>> ;; Simple %-escapes >>>> >>>> (see lisp/org-capture.el, lines 1181-1229 or so). >>>> >>>> Moreover, this sequence was different and was changed deliberately (see >>>> the thread http://thread.gmane.org/gmane.emacs.orgmode/27649), so if it >>>> is changed back, Sebastion Rose will not be happy :-) >>>> >>>> So it seems there is no way to pass values from the capture context >>>> to a >>>> lisp function in the capture template, but maybe I'm missing something. >>>> >>>> Thanks, >>>> Nick >>>> >>>> Footnotes: >>>> [fn:1] Is there an easier way to get the filename of the file I was >>>> visiting when I initiated the capture? If not, should there be? Perhaps >>>> a %f escape? >>> >>> Hi Nick, >>> >>> you can use >>> >>>(buffer-file-name (org-capture-get :original-buffer)) >>> >>> and we could certainly introduce a special escape for it if helpful. >>> >>> If it is easier, we can also put the filename itself into the >>> property list, >>> and any other information we like. This should happen in the function >>> org-capture, >>> close to the location where the buffer is stored, so near this line: >>> >>> (org-capture-put :original-buffer orig-buf :annotation annotation >>> :initial initial) >>> >>> org-capture uses this property list precisely so that it is simple >>> to add any information required. >>> >>> Note tha
Re: [Orgmode] BUG? - Capture escape %n not working
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 01/07/2011 03:29 PM, Carsten Dominik wrote: > Applied, thanks. Thanks a lot, Rainer > > - Carsten > > On Jan 7, 2011, at 3:15 PM, Nick Dokos wrote: > >> Rainer M Krug wrote: >> >>> Hi >>> >>> I am not sure if it is a bug, or a configuration issue, but %n (user >>> name (taken from `user-full-name')) is not working - it is not expanded >>> and displayed as %n >>> >>> Emacs : GNU Emacs 23.2.1 (i686-pc-linux-gnu, GTK+ Version 2.20.1) >>> of 2010-07-05 on ecolmod >>> Package: Org-mode version 7.4 (release_7.4.100.gdf7d) >>> >> >> It's a bug - there is an "n" missing from the regexp: >> >> diff --git a/lisp/org-capture.el b/lisp/org-capture.el >> index 85747ee..2076f68 100644 >> --- a/lisp/org-capture.el >> +++ b/lisp/org-capture.el >> @@ -1213,7 +1213,7 @@ The template may still contain \"%?\" for cursor >> positioning." >> >> ;; Simple %-escapes >> (goto-char (point-min)) >> - (while (re-search-forward "%\\([tTuUaiAcxkKI]\\)" nil t) >> + (while (re-search-forward "%\\([tTuUaiAcxkKIn]\\)" nil t) >> (unless (org-capture-escaped-%) >> (when (and initial (equal (match-string 0) "%i")) >> (save-match-data >> >> Nick >> >> ___ >> Emacs-orgmode mailing list >> Please use `Reply All' to send replies to the list. >> Emacs-orgmode@gnu.org >> http://lists.gnu.org/mailman/listinfo/emacs-orgmode > > - Carsten > > > - -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Natural Sciences Building Office Suite 2039 Stellenbosch University Main Campus, Merriman Avenue Stellenbosch South Africa Tel:+33 - (0)9 53 10 27 44 Cell: +27 - (0)8 39 47 90 42 Fax (SA): +27 - (0)8 65 16 27 82 Fax (D) : +49 - (0)3 21 21 25 22 44 Fax (FR): +33 - (0)9 58 10 27 44 email: rai...@krugs.de Skype: RMkrug -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk0nI1oACgkQoYgNqgF2ego7HwCfd3dtbG/nqZqDfKB2XpW/EKMG ywIAn3mj/V+Tqg8QwTvttR9ICudi9/r1 =xsLC -END PGP SIGNATURE- ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Capture template and elisp expression
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 01/07/2011 03:03 PM, Nick Dokos wrote: > Rainer M Krug wrote: > >> But now I thought - OK - now I can add the state of the file, returned >> by vc-state (this is working i a nother document in the org-document). >> So I added: >> >> %(vc-state (buffer-file-name (org-capture-get :original-buffer))) >> >> but I get the error >> >> Capture abort: (wrong-type-argument char-or-string-p edited) >> >> It seems, that vc-state (which should be "up-to-date" or "edited") does >> return a different type then vc-working-revision ? Can I convert >> vc-state, so that it works? >> > > Yes, vc-state returns a symbol. You can convert it to a string with > symbol-name. Thanks - it's working perfectly now Cheers, Rainer > > Nick - -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Natural Sciences Building Office Suite 2039 Stellenbosch University Main Campus, Merriman Avenue Stellenbosch South Africa Tel:+33 - (0)9 53 10 27 44 Cell: +27 - (0)8 39 47 90 42 Fax (SA): +27 - (0)8 65 16 27 82 Fax (D) : +49 - (0)3 21 21 25 22 44 Fax (FR): +33 - (0)9 58 10 27 44 email: rai...@krugs.de Skype: RMkrug -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk0nI8gACgkQoYgNqgF2egpK8QCghhEbFrO6ENA93fEM8KonkB13 grwAmwas8uKA83JdoyLwXlImZtmTVtfS =h2xa -END PGP SIGNATURE- ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Embedded code
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 01/18/2011 12:48 AM, Eric Schulte wrote: > Hi, > > This is possible using Babel, the attached org-mode file will execute > its code block every time it is opened. You can replace the contents of > the code block with any arbitrary elisp you would like to have executed > in the file. > > To see this work, save the attached org-mode file to your system, open > the file, answer "y" to allow execution, and then check your messages > buffer for the "I have been run" message to see that the code block has > in fact been evaluated. This is indeed very useful (e.g. if I open an R script, to open an R session and source the file). But it seems that all code blocks are evaluated on loading. Is there a way of only executing a specific code block? Cheers, Rainer > > Best -- Eric > > > > > > Ido Magal writes: > >> Hello, >> >> Is it possible to put a block of code in a document such that it gets >> evaluated when the document is opened? For example, I'd like to have >> a link-back section in each note. >> >> I'm aware of babel but I neither understand how to make it auto-evaluate on >> open nor do i know if >> making it compact ( and avoid having code and result blocks ) is possible. >> I see examples where it's used for export but haven't seen one for general >> org usage. >> >> Thanks in advance. >> ___ >> Emacs-orgmode mailing list >> Please use `Reply All' to send replies to the list. >> Emacs-orgmode@gnu.org >> http://lists.gnu.org/mailman/listinfo/emacs-orgmode >> >> >> ___ >> Emacs-orgmode mailing list >> Please use `Reply All' to send replies to the list. >> Emacs-orgmode@gnu.org >> http://lists.gnu.org/mailman/listinfo/emacs-orgmode - -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Natural Sciences Building Office Suite 2039 Stellenbosch University Main Campus, Merriman Avenue Stellenbosch South Africa Tel:+33 - (0)9 53 10 27 44 Cell: +27 - (0)8 39 47 90 42 Fax (SA): +27 - (0)8 65 16 27 82 Fax (D) : +49 - (0)3 21 21 25 22 44 Fax (FR): +33 - (0)9 58 10 27 44 email: rai...@krugs.de Skype: RMkrug -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk01VKwACgkQoYgNqgF2egqGpQCfV+cIwibbFNGENpeem101fxy2 DQkAnRx825iX2QP/B9wl/M5xYa61yqQV =1BSa -END PGP SIGNATURE- ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Embedded code
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 01/18/2011 05:16 PM, Eric Schulte wrote: > Rainer M Krug writes: > >> On 01/18/2011 12:48 AM, Eric Schulte wrote: >>> Hi, >>> >>> This is possible using Babel, the attached org-mode file will execute >>> its code block every time it is opened. You can replace the contents of >>> the code block with any arbitrary elisp you would like to have executed >>> in the file. >>> >>> To see this work, save the attached org-mode file to your system, open >>> the file, answer "y" to allow execution, and then check your messages >>> buffer for the "I have been run" message to see that the code block has >>> in fact been evaluated. >> >> This is indeed very useful (e.g. if I open an R script, to open an R >> session and source the file). >> >> But it seems that all code blocks are evaluated on loading. Is there a >> way of only executing a specific code block? >> > > Yes, replace the > > # -*- eval: (org-babel-execute-buffer) -*- > > with > > # -*- eval: (save-excursion (org-babel-goto-named-src-block NAME) > (org-babel-execute-src-block)) -*- > > where NAME is replaced with the name of the code block to execute. Thanks - sounds perfect. Cheers, Rainer > > Cheers -- Eric - -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Natural Sciences Building Office Suite 2039 Stellenbosch University Main Campus, Merriman Avenue Stellenbosch South Africa Tel:+33 - (0)9 53 10 27 44 Cell: +27 - (0)8 39 47 90 42 Fax (SA): +27 - (0)8 65 16 27 82 Fax (D) : +49 - (0)3 21 21 25 22 44 Fax (FR): +33 - (0)9 58 10 27 44 email: rai...@krugs.de Skype: RMkrug -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk01w4kACgkQoYgNqgF2egpHFACfaspSlVeXg9oQ6Dr5zJIsEN1z zT0An2UoPkOi6GiQcmZfzKiFTbQgrCex =eICm -END PGP SIGNATURE- ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Footnotes in table?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi I have to add some footnotes in a table. I remember from LaTeX, that I used a minipage for that, but don't get it to work in org. Could somebody provide an example, how I can add the footnotes in a table? The table is a longtable, and might have to be rescaled to fit on a page or smaller font size used. Thanks, Rainer - -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Natural Sciences Building Office Suite 2039 Stellenbosch University Main Campus, Merriman Avenue Stellenbosch South Africa Tel:+33 - (0)9 53 10 27 44 Cell: +27 - (0)8 39 47 90 42 Fax (SA): +27 - (0)8 65 16 27 82 Fax (D) : +49 - (0)3 21 21 25 22 44 Fax (FR): +33 - (0)9 58 10 27 44 email: rai...@krugs.de Skype: RMkrug -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk01xQEACgkQoYgNqgF2egqv4ACeNxYG7QUm42/zA0J46eFIGfPG RvEAnAuwqOrxPr4q7ObsWpBtxKBmzWmO =J1Ve -END PGP SIGNATURE- ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] [BABEL] Tangling to a hierarchy of files?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 01/19/2011 08:22 AM, Eric Schulte wrote: > "Charles C. Berry" writes: > >> On Wed, 19 Jan 2011, Christopher Maier wrote: >> >>> I've been experimenting with literate programming using Org mode recently >>> and am >>> really enjoying it. I am trying to figure out the best way to create a >>> nested >>> hierarchy of tangled files from a single Org file, and am not sure the best >>> way >>> to go about it. >>> >>> I know that, for example, this block, when tangled, will produce a file >>> "foo.clj" in the same directory as my Org file... so far so good. >>> >>> #+begin_src clojure :tangle foo.clj >>> (ns foo) >>> >>> (defn my-inc [x] >>>(+ x 1)) >>> #+end_src >>> >>> However, I would like to be able to do something like this: >>> >>> #+begin_src clojure :tangle src/foo.clj >>> (ns foo) >>> >>> (defn my-inc [x] >>>(+ x 1)) >>> #+end_src >>> > > In addition to the solution Charles posted, it is possible to put > arbitrary elisp forms into header arguments, so the following > alternative to your block above will create the directory (if it doesn't > already exist) whenever the block is tangled or evaluated. > > #+begin_src clojure :tangle (prog1 "src/foo.clj" (make-directory "src" ".")) > (ns foo) > > (defn my-inc [x] > (+ x 1)) > #+end_src Would it be possible, to include this into tangling, i.e. if the folder in which the source file should be created does not exist, create it? I remember vaguely a discussion along these lines some time ago, but I don't remember the outcome? Rainer > > Cheers -- Eric > > ___ > Emacs-orgmode mailing list > Please use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode - -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Natural Sciences Building Office Suite 2039 Stellenbosch University Main Campus, Merriman Avenue Stellenbosch South Africa Tel:+33 - (0)9 53 10 27 44 Cell: +27 - (0)8 39 47 90 42 Fax (SA): +27 - (0)8 65 16 27 82 Fax (D) : +49 - (0)3 21 21 25 22 44 Fax (FR): +33 - (0)9 58 10 27 44 email: rai...@krugs.de Skype: RMkrug -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk02t20ACgkQoYgNqgF2egqJcwCeMaM/k5MeTsZ07crbr0CfpCMB zrkAniGC6QejbjMsksxnD7I/QS3em0Xh =+yMc -END PGP SIGNATURE- ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Why second \footnotemarker no link?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 #+TITLE: Second footnotemarker not as link I have the following problem: The second footnotemarker\footnotemark is not formated as link. This seems to be a LaTeX problem, but has anybody here an answer, on how I can make this second footnotemark\footnotemark[\value{footnote}], which references to the same footnote, also format as a linkt to the footnote\footnotemark[\value{footnote}] ? Thanks for any help, Rainer \footnotemark[\value{footnote}] \footnotetext[1]{This is the inline definition of this footnote} -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk02yFQACgkQoYgNqgF2egpBFACfQmhAAAf+i9G4BgJZd8i3xTCR ViEAmweiXoAt114LGwShysdv5GjIdcrn =8FpX -END PGP SIGNATURE- ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Not opening .tex file when exporting to pdf?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi I export my org files quite often to a pdf, but I am not interested in the .tex file --- I don't mind it (it is needed) and I would not like it to be deleted after the pdf has been created, but is there an option to *not* opening it in emacs? The same applies by the way also for export to html - how can I avoid of having the html opened in a buffer - my browser is fine for me. Cheers, Rainer - -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Natural Sciences Building Office Suite 2039 Stellenbosch University Main Campus, Merriman Avenue Stellenbosch South Africa Tel:+33 - (0)9 53 10 27 44 Cell: +27 - (0)8 39 47 90 42 Fax (SA): +27 - (0)8 65 16 27 82 Fax (D) : +49 - (0)3 21 21 25 22 44 Fax (FR): +33 - (0)9 58 10 27 44 email: rai...@krugs.de Skype: RMkrug -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk02zdsACgkQoYgNqgF2egrE6wCffhgH3L0cDGDx8Bo6wE9EJBaJ opkAoId/QidswoPRRYsJ7b8cx2J8vmoC =09yq -END PGP SIGNATURE- ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] [BABEL] Tangling to a hierarchy of files?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 01/19/2011 12:59 PM, Chris Maier wrote: > On Wed, Jan 19, 2011 at 5:05 AM, Rainer M Krug wrote: >> On 01/19/2011 08:22 AM, Eric Schulte wrote: >>> >>> In addition to the solution Charles posted, it is possible to put >>> arbitrary elisp forms into header arguments, so the following >>> alternative to your block above will create the directory (if it doesn't >>> already exist) whenever the block is tangled or evaluated. >>> >>> #+begin_src clojure :tangle (prog1 "src/foo.clj" (make-directory "src" ".")) >>> (ns foo) >>> >>> (defn my-inc [x] >>> (+ x 1)) >>> #+end_src > > This will do what I'm looking for, thanks! > > Is there a place where this and the eval-on-startup trick Charles > posted are documented? If so, I missed it, and these are both really > useful to know. > >> Would it be possible, to include this into tangling, i.e. if the folder >> in which the source file should be created does not exist, create it? >> >> I remember vaguely a discussion along these lines some time ago, but I >> don't remember the outcome? > > This would be a great feature to have. Eric's embedded Lisp code > trick will do the job, but I can imagine that it would get cumbersome > for more complex projects. Exactly - you effectively have to specify the same path twice - very error prone. Cheers, Rainer > > Thanks for all the help, everyone! > > Chris - -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Natural Sciences Building Office Suite 2039 Stellenbosch University Main Campus, Merriman Avenue Stellenbosch South Africa Tel:+33 - (0)9 53 10 27 44 Cell: +27 - (0)8 39 47 90 42 Fax (SA): +27 - (0)8 65 16 27 82 Fax (D) : +49 - (0)3 21 21 25 22 44 Fax (FR): +33 - (0)9 58 10 27 44 email: rai...@krugs.de Skype: RMkrug -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk0209kACgkQoYgNqgF2egpTuACeKw3OUQSA5x7ugyJe4syt0PkP pPgAnj77qMjWHKputXIn836nEclfsjg6 =mkG3 -END PGP SIGNATURE- ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Not opening .tex file when exporting to pdf?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 01/19/2011 01:43 PM, Puneeth Chaganti wrote: > On Wed, Jan 19, 2011 at 5:30 PM, Noorul Islam wrote: >> On Wed, Jan 19, 2011 at 5:11 PM, Rainer M Krug wrote: >>> -BEGIN PGP SIGNED MESSAGE- >>> Hash: SHA1 >>> >>> Hi >>> >>> I export my org files quite often to a pdf, but I am not interested in >>> the .tex file --- I don't mind it (it is needed) and I would not like it >>> to be deleted after the pdf has been created, but is there an option to >>> *not* opening it in emacs? >>> >>> The same applies by the way also for export to html - how can I avoid of >>> having the html opened in a buffer - my browser is fine for me. >>> >> >> Did you try C-c e d ? >> >> and C-c e b? > > You will need to set the variable > `org-export-kill-product-buffer-when-displayed' for this to work. Thanks - that's exactly what I was looking for Rainer > > HTH, > Puneeth - -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Natural Sciences Building Office Suite 2039 Stellenbosch University Main Campus, Merriman Avenue Stellenbosch South Africa Tel:+33 - (0)9 53 10 27 44 Cell: +27 - (0)8 39 47 90 42 Fax (SA): +27 - (0)8 65 16 27 82 Fax (D) : +49 - (0)3 21 21 25 22 44 Fax (FR): +33 - (0)9 58 10 27 44 email: rai...@krugs.de Skype: RMkrug -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk023msACgkQoYgNqgF2egrH2gCfbHQWwNc3jt+355F5YKvg/6lW 3MMAnAto3cEUshsGPIc5BelRkM49a6u1 =XFgp -END PGP SIGNATURE- ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] [BABEL] Tangling to a hierarchy of files?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 01/20/2011 04:37 AM, Eric Schulte wrote: >> >> A customization variable would be fantastic. Could it be done such >> that it could be applied (or not applied, according to taste) to a >> sub-tree of your Org file? That way you could have it disabled on >> whatever code you might be currently working on so you still see the >> error messages if you mistype. Then, when you're satisfied with all >> your tangle paths, you could flip the switch on that sub-tree and have >> Org do everything for you. >> > > This has now been added as a new :mkdirp code block header argument, so > it can be set on the block, subtree, file, language, or global level > (see http://orgmode.org/manual/Using-header-arguments.html). > > #+begin_src language :mkdirp yes :tangle nested/directories/target.ext > code body > #+end_src Sounds perfect for me - thanks. Rainer > > Cheers -- Eric - -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Natural Sciences Building Office Suite 2039 Stellenbosch University Main Campus, Merriman Avenue Stellenbosch South Africa Tel:+33 - (0)9 53 10 27 44 Cell: +27 - (0)8 39 47 90 42 Fax (SA): +27 - (0)8 65 16 27 82 Fax (D) : +49 - (0)3 21 21 25 22 44 Fax (FR): +33 - (0)9 58 10 27 44 email: rai...@krugs.de Skype: RMkrug -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk04CRcACgkQoYgNqgF2ego39ACaAhYz3GYfAKBODtY8KDJmYIdZ jpQAn0pQNxcCwnzUtQo6m1lugmSIXaDE =Fxrd -END PGP SIGNATURE- ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Several graphs in R
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi I just solved a problem of mine, i.e. how to deal with multiple graphs generated in an R script. OK - all are saved into separate pdfs in separate paths. But I would like to see them after they are generated - and this is my solution: #+begin_src R :results output path <- "./" for (i in 1:10) { fn <- paste(path, "/", "graph-", i, ".pdf", sep="") pdf(fn) try( plot(runif(100)) ) dev.off() cat("[[", fn, "]]\n", sep="") #<=== here it is! } #+end_src Then in the results bluck, there will be links to all pdfs. Thought this might help somebody. Cheers, Rainer - -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Natural Sciences Building Office Suite 2039 Stellenbosch University Main Campus, Merriman Avenue Stellenbosch South Africa Tel:+33 - (0)9 53 10 27 44 Cell: +27 - (0)8 39 47 90 42 Fax (SA): +27 - (0)8 65 16 27 82 Fax (D) : +49 - (0)3 21 21 25 22 44 Fax (FR): +33 - (0)9 58 10 27 44 email: rai...@krugs.de Skype: RMkrug -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk05ZyoACgkQoYgNqgF2egqWJgCeJUpT+ARyM1eoG/4l6Bt2oLpP X2oAn0aInzEUIpSvmM2PqpthekJ/f9iJ =taVu -END PGP SIGNATURE- ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Re: Several graphs in R
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 01/21/2011 03:35 PM, Dan Davison wrote: > Rainer M Krug writes: > >> Hi >> >> I just solved a problem of mine, i.e. how to deal with multiple graphs >> generated in an R script. >> >> OK - all are saved into separate pdfs in separate paths. But I would >> like to see them after they are generated - and this is my solution: >> >> #+begin_src R :results output >> path <- "./" >> for (i in 1:10) { >> fn <- paste(path, "/", "graph-", i, ".pdf", sep="") >> pdf(fn) >> try( >> plot(runif(100)) >>) >> dev.off() >> cat("[[", fn, "]]\n", sep="") #<=== here it is! >> } >> #+end_src >> >> Then in the results bluck, there will be links to all pdfs. >> >> Thought this might help somebody. > > Hi Rainer, > > Cool. You might want to experiment with > > :results output raw > :results output org Good idea - I'll try it out - although I quite like it to be in a results block - so it is a clear that it results from the code above. > > also (I suspect that strictly speaking those links should not be > functioning as links inside an example block). > > Feel free to add useful tricks like this to the babel R page: > > http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-R.html If you tell me how, I could do it. Cheers, Rainer > > Dan > >> >> Cheers, >> >> Rainer > > > ___ > Emacs-orgmode mailing list > Please use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode - -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Natural Sciences Building Office Suite 2039 Stellenbosch University Main Campus, Merriman Avenue Stellenbosch South Africa Tel:+33 - (0)9 53 10 27 44 Cell: +27 - (0)8 39 47 90 42 Fax (SA): +27 - (0)8 65 16 27 82 Fax (D) : +49 - (0)3 21 21 25 22 44 Fax (FR): +33 - (0)9 58 10 27 44 email: rai...@krugs.de Skype: RMkrug -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk05nKUACgkQoYgNqgF2egoPKgCfYkyahaglT27kOOYtf29s/fqD A98AmwRm3sRvbB+dpZNGZIKMvLmWD0Tp =of+w -END PGP SIGNATURE- ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Re: Several graphs in R
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 01/21/2011 03:48 PM, Rainer M Krug wrote: > On 01/21/2011 03:35 PM, Dan Davison wrote: >> Rainer M Krug writes: > >>> Hi >>> >>> I just solved a problem of mine, i.e. how to deal with multiple graphs >>> generated in an R script. >>> >>> OK - all are saved into separate pdfs in separate paths. But I would >>> like to see them after they are generated - and this is my solution: >>> >>> #+begin_src R :results output >>> path <- "./" >>> for (i in 1:10) { >>> fn <- paste(path, "/", "graph-", i, ".pdf", sep="") >>> pdf(fn) >>> try( >>> plot(runif(100)) >>>) >>> dev.off() >>> cat("[[", fn, "]]\n", sep="") #<=== here it is! >>> } >>> #+end_src >>> >>> Then in the results bluck, there will be links to all pdfs. >>> >>> Thought this might help somebody. > >> Hi Rainer, > >> Cool. You might want to experiment with > >> :results output raw >> :results output org > > Good idea - I'll try it out - although I quite like it to be in a > results block - so it is a clear that it results from the code above. > >> also (I suspect that strictly speaking those links should not be >> functioning as links inside an example block). > > > >> Feel free to add useful tricks like this to the babel R page: > >> http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-R.html > > If you tell me how, I could do it. Found it - thanks. Rainer > > Cheers, > > Rainer > >> Dan > >>> >>> Cheers, >>> >>> Rainer > > >> ___ >> Emacs-orgmode mailing list >> Please use `Reply All' to send replies to the list. >> Emacs-orgmode@gnu.org >> http://lists.gnu.org/mailman/listinfo/emacs-orgmode > > - -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Natural Sciences Building Office Suite 2039 Stellenbosch University Main Campus, Merriman Avenue Stellenbosch South Africa Tel:+33 - (0)9 53 10 27 44 Cell: +27 - (0)8 39 47 90 42 Fax (SA): +27 - (0)8 65 16 27 82 Fax (D) : +49 - (0)3 21 21 25 22 44 Fax (FR): +33 - (0)9 58 10 27 44 email: rai...@krugs.de Skype: RMkrug -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk05naIACgkQoYgNqgF2egqchwCeLW/iAphr0SeLBgftepYKugEW JE0An3Ia+AReoQLTHNqb4C4bEGN7lCkx =9RMw -END PGP SIGNATURE- ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Using R in Org mode with several sourced files
Hi Following a discussion about how one could create a TODO list in ESS (see below), Thomas Dye and Dan Davison suggested to look into org-mode and org-babel and it looks really interesting. I just have one aspect, which would be more difficult with my workflow. Let me explain. I am writing fairly complex simulations, and I prefer to keep functions for different aspects of the simulation in different files. Therefore I have several files, each one containing R code, which is sourced from a main file, which then sets the simulation up, which I then can start with calling simulateIt() in R. I could use .org files and tangle the code, but, as I am not that organised, I even forget sometimes to save before I source the file and therefore still work with the old version - this would be more difficult, if I had to tangle each file in addition to the saving (Ctrl-x s saves all files - very useful for me!). One option would be to combine all actual files into a single one, and then tangle in different .R files, but I somehow do not like the idea of having one HUGE file, with all the code, which then will be tangled into several .R files. So I would like to have several .org files, where each one will be tangled into a separate .R file, which then will be sourced from a final main file. As I understand org-mode, I could still have a single TODO list, based on the agenda in org-mode. So my question is, if this process could be automated. One idea was a kind of a "make file", in which I specify: tangle file1.org tangle file2.org tangle file3.org tangle fileAll.org These would then result in the files attached, which then can be used from fileAll.R Another idea was to have emacs automatically tangle the file after saving. But I am sure there are also other possibilities. I have to say, I am absolutely new to org-mode, and know nearly nothing about lisp. Cheers, Rainer -- Forwarded message -- From: Dan Davison Date: Mon, Feb 1, 2010 at 9:59 PM Subject: Re: Fwd: [ESS] generating TODO list? To: Rainer M Krug Cc: "Thomas S. Dye" [...] > Sure, when you change the code in the org file, you have to re-run > org-babel-tangle before you run your new R code. > > > Ant this is the critical point: I can save all files which need to be saved in > ESS by Ctrl-x s (or was it Ctrl-x Ctrl-s ? I always do both). But having > manually to go through all files, is something I am likely to forget. If I > could tangle all files with one command, that wouls work (I have about 10 files > for the project which are then sourced...). Could I combine the save-all with a > tangle-all, or have the saving action automatically followed by a tangling (if > it is an org file)? > > > But that's just one possibility. Another would be simply to tangle all > the blocks of R code to the same file. Then when you run that file, you > know that your function definitions will be up to date. > > > It is quite strange, that there is no possibility to script emacs from org mode > like all the other languages? because that would be perfect for this. I am certain that there is going to be a good solution for all your concerns! I think you want to be thinking along the lines of maintaining a _single_ org file for your project, and either including the code in different subtrees of that file, or referring to external files from within that file. But if the right solution doesn't doesn't already exist, and it's a good idea, then someone will cook it up in elisp. Could we move this discussion to the org-mode list? If you describe what you want to do, with a toy example if that's helpful, then I believe you will see that problems do not remain without solution for very long on emacs-orgm...@gnu.org. Meanwhile, have a look at this http://doc.norang.ca/org-mode.html to see some of what org-mode can do (the website itself is made in org-mode of course). Dan > > > > By the way, have you tried out the export facilities of org-mode? Have a > look at the html export of the above org file [C-c C-e (org-export) > brings up the export options]. You can create links in the org file to > graphical output from R and these graphs will be included in the > exported HTML/LaTeX. > > > No - I just discovered the org-mode yesterday. > > Cheers, > > Rainer > > > > Dan > > > > > If that could be done, it would be a perfect example, how one could use > > org-babel in real R programming. The other option, would be a "make file" > > equivalent, which contains all the "tangle file ..." commands, and which > could > > be executed in the block above. > > > > > > > > And it's also worth looking at the noweb-style references
[Orgmode] Re: Using R in Org mode with several sourced files
On Tue, Feb 2, 2010 at 8:03 PM, Thomas S. Dye wrote: > > On Feb 2, 2010, at 3:35 AM, Rainer M Krug wrote: > > Hi > > Following a discussion about how one could create a TODO list in ESS (see > below), Thomas Dye and Dan Davison suggested to look into org-mode and > org-babel and it looks really interesting. I just have one aspect, which > would be more difficult with my workflow. Let me explain. I am writing > fairly complex simulations, and I prefer to keep functions for different > aspects of the simulation in different files. Therefore I have several > files, each one containing R code, which is sourced from a main file, which > then sets the simulation up, which I then can start with calling > simulateIt() in R. I could use .org files and tangle the code, but, as I am > not that organised, I even forget sometimes to save before I source the file > and therefore still work with the old version - this would be more > difficult, if I had to tangle each file in addition to the saving (Ctrl-x s > saves all files - very useful for me!). > > One option would be to combine all actual files into a single one, and then > tangle in different .R files, but I somehow do not like the idea of having > one HUGE file, with all the code, which then will be tangled into several .R > files. > So I would like to have several .org files, where each one will be tangled > into a separate .R file, which then will be sourced from a final main file. > As I understand org-mode, I could still have a single TODO list, based on > the agenda in org-mode. > > So my question is, if this process could be automated. One idea was a kind > of a "make file", in which I specify: > tangle file1.org > tangle file2.org > tangle file3.org > tangle fileAll.org > > These would then result in the files attached, which then can be used from > fileAll.R > > Another idea was to have emacs automatically tangle the file after saving. > > But I am sure there are also other possibilities. > > I have to say, I am absolutely new to org-mode, and know nearly nothing > about lisp. > > Cheers, > > Rainer > > > -- Forwarded message -- > From: Dan Davison > Date: Mon, Feb 1, 2010 at 9:59 PM > Subject: Re: Fwd: [ESS] generating TODO list? > To: Rainer M Krug > Cc: "Thomas S. Dye" > > > [...] > > Sure, when you change the code in the org file, you have to re-run > > org-babel-tangle before you run your new R code. > > > > > > Ant this is the critical point: I can save all files which need to be > saved in > > ESS by Ctrl-x s (or was it Ctrl-x Ctrl-s ? I always do both). But having > > manually to go through all files, is something I am likely to forget. If > I > > could tangle all files with one command, that wouls work (I have about 10 > files > > for the project which are then sourced...). Could I combine the save-all > with a > > tangle-all, or have the saving action automatically followed by a > tangling (if > > it is an org file)? > > > > > > But that's just one possibility. Another would be simply to tangle > all > > the blocks of R code to the same file. Then when you run that file, > you > > know that your function definitions will be up to date. > > > > > > It is quite strange, that there is no possibility to script emacs from > org mode > > like all the other languages? because that would be perfect for this. > > > I am certain that there is going to be a good solution for all your > concerns! I think you want to be thinking along the lines of maintaining > a _single_ org file for your project, and either including the code in > different subtrees of that file, or referring to external files from > within that file. But if the right solution doesn't doesn't already > exist, and it's a good idea, then someone will cook it up in > elisp. Could we move this discussion to the org-mode list? If you > describe what you want to do, with a toy example if that's helpful, then > I believe you will see that problems do not remain without solution for > very long on emacs-orgm...@gnu.org. > > Meanwhile, have a look at this > > http://doc.norang.ca/org-mode.html > > to see some of what org-mode can do (the website itself is made in > org-mode of course). > > Dan > > > > > > > > > > By the way, have you tried out the export facilities of org-mode? > Have a > > look at the html export of the above org file [C-c C-e (org-export) > > brings up the export options]. You can create links in the org file > to > > graphical output from R and t
Re: [Orgmode] interacting with word processors (opeonffice, word)
Hi Matt try latex2rtf: export org-mode to LaTeX and use latex2rtf to convert it to rtf. I am using latex2rtf to convert LaTeX code (generated by LyX) into rtf for exactly the same purpose. Cheers, Rainer On Tue, Feb 2, 2010 at 8:34 PM, Matt Price wrote: > Hi, > > I;m getting more and more used to using org for my own writing purposes, > and love it. But I still find it pretty difficult to work with > word-processor users whoexpect to get a doument in .doc or .odt formats. > I've just found odt2org (http://mantiel.wikidot.com/os:odt2org) which > looks great for importing odt files into org; but my main concern right > now is getting things from org-mode out into odt or doc. May i ask what > other people tend to do in this situation? I I guess I could export to > html, then import in Openoffice, then edit & save as odf, but this seems > a little cumbersome. If someone has a better solution I'd love to hear > it. > > Thanks much, > > Matt > > -- > Matt Price > matt.pr...@utoronto.ca > > ___ > Emacs-orgmode mailing list > Please use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode > > -- NEW GERMAN FAX NUMBER!!! Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Natural Sciences Building Office Suite 2039 Stellenbosch University Main Campus, Merriman Avenue Stellenbosch South Africa Cell: +27 - (0)83 9479 042 Fax:+27 - (0)86 516 2782 Fax:+49 - (0)321 2125 2244 email: rai...@krugs.de Skype: RMkrug Google: r.m.k...@gmail.com ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] interacting with word processors (opeonffice, word)
On Tue, Feb 2, 2010 at 8:55 PM, Russell Adams wrote: > On Tue, Feb 02, 2010 at 08:44:54PM +0200, Rainer M Krug wrote: > > Hi Matt > > > > try latex2rtf: export org-mode to LaTeX and use latex2rtf to convert it > to > > rtf. > > I am using latex2rtf to convert LaTeX code (generated by LyX) into rtf > for > > exactly the same purpose. > > That's a great idea! > > Currently I export to HTML and then let Word users import that. It > preserves most of the formatting that is important to me, though > external files have to be manually inserted in Word. > > Does RTF help with external references? (ie: embedded images?) > I think it embeds the picture and does not preserve the link. But the might be a way of keeping the links. Rainer > > Thanks. > > > > -- > Russell Adamsrlad...@adamsinfoserv.com > > PGP Key ID: 0x1160DCB3 http://www.adamsinfoserv.com/ > > Fingerprint:1723 D8CA 4280 1EC9 557F 66E8 1154 E018 1160 DCB3 > > > ___ > Emacs-orgmode mailing list > Please use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode > -- NEW GERMAN FAX NUMBER!!! Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Natural Sciences Building Office Suite 2039 Stellenbosch University Main Campus, Merriman Avenue Stellenbosch South Africa Cell: +27 - (0)83 9479 042 Fax:+27 - (0)86 516 2782 Fax:+49 - (0)321 2125 2244 email: rai...@krugs.de Skype: RMkrug Google: r.m.k...@gmail.com ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] interacting with word processors (opeonffice, word)
On Tue, Feb 2, 2010 at 8:34 PM, Matt Price wrote: > Hi, > > I;m getting more and more used to using org for my own writing purposes, > and love it. But I still find it pretty difficult to work with > word-processor users whoexpect to get a doument in .doc or .odt formats. > I've just found odt2org (http://mantiel.wikidot.com/os:odt2org) which > looks great for importing odt files into org; but my main concern right > now is getting things from org-mode out into odt or doc. May i ask what > other people tend to do in this situation? I I guess I could export to > html, then import in Openoffice, then edit & save as odf, but this seems > a little cumbersome. If someone has a better solution I'd love to hear > it. > Oh - and ther is also: mk4ht oolatex which converts LaTeX to odt. Cheers, Rainer > > Thanks much, > > Matt > > -- > Matt Price > matt.pr...@utoronto.ca > > ___ > Emacs-orgmode mailing list > Please use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode > > -- NEW GERMAN FAX NUMBER!!! Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Natural Sciences Building Office Suite 2039 Stellenbosch University Main Campus, Merriman Avenue Stellenbosch South Africa Cell: +27 - (0)83 9479 042 Fax:+27 - (0)86 516 2782 Fax:+49 - (0)321 2125 2244 email: rai...@krugs.de Skype: RMkrug Google: r.m.k...@gmail.com ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] org-babel - First line of file created by tangle
Hi I am sure I can customize it, but I could not find it. When tangling R code, I would like to skip (or customize) the first line of the resulting R file. It reads "#!/usr/bin/env Rscript" and I would either like to exclude it completely, or replace it with e.g. "## R" I am sourcing the files anyway from a different R session and I don't need to execute them directly. Cheers, Rainer -- NEW GERMAN FAX NUMBER!!! Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Natural Sciences Building Office Suite 2039 Stellenbosch University Main Campus, Merriman Avenue Stellenbosch South Africa Cell: +27 - (0)83 9479 042 Fax:+27 - (0)86 516 2782 Fax:+49 - (0)321 2125 2244 email: rai...@krugs.de Skype: RMkrug Google: r.m.k...@gmail.com ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] [babel] Need different beginning for tangled script
Hi I want to use org-mode to create a submit script for a cluster, and would need the first lines to be as follow: #!/bin/bash #$ -cwd -j y #$ -t 1-5 #$ -l mem_free=4G at the moment I get: #!/usr/bin/env sh # generated by org-babel-tangle # [[file:~/Documents/Projects/BiocontrolAndAlienDynamics/HakeaLandscape/trunc/R/spreadSim.org::*submit%20scripts][block-19]] #$ -cwd -j y #$ -t 1-5 #$ -l mem_free=4G 1) Is the first line customizable, or do I have to change org-babel-sh.el to use #!/bin/bash instead? 2) Can I ommit the second and third line (the comments added by tangle)? Thanks, and I must say org-mode is getting better and better Cheers, Rainer -- NEW GERMAN FAX NUMBER!!! Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Natural Sciences Building Office Suite 2039 Stellenbosch University Main Campus, Merriman Avenue Stellenbosch South Africa Cell: +27 - (0)83 9479 042 Fax:+27 - (0)86 516 2782 Fax:+49 - (0)321 2125 2244 email: rai...@krugs.de Skype: RMkrug Google: r.m.k...@gmail.com ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] org-babel - First line of file created by tangle
Hi Eric On Wed, Feb 3, 2010 at 7:22 PM, Eric Schulte wrote: > Hi Rainer, > > I just responded to your other email with a global solution to this > problem. Thanks - I'll look at it in detail tomorrow. > Do you think this is the sort of thing that would need to be > customized on a per-block or per-file/subtree basis? > Yes, I think it would be useful. An example would be if I want to create two scripts, where one is running on my local computer, and the other on a cluster, in which the paths might be different. Also: there is, in addition to R, also Ra, with Just-In-Time compiling functionality. It might be useful to be able to have two R scripts, one using R, the other Ra, for e.g. profiling. Another example would be to try different versions of e.g. R. So yes, I think it would be very useful to define the two additional header arguments for each block: :shebang NIL for default, other string for the shebang line :headers NIL for default, NONE for no headers, other string for custom headers > > If so we may want to move this customization behind a header argument. > That would be great Cheers, Rainer > > Thanks -- Eric > > Rainer M Krug writes: > > > Hi > > > > I am sure I can customize it, but I could not find it. > > When tangling R code, I would like to skip (or customize) the first line > of the resulting R file. It > > reads "#!/usr/bin/env Rscript" and I would either like to exclude it > completely, or replace it with > > e.g. "## R" > > > > I am sourcing the files anyway from a different R session and I don't > need to execute them directly. > > > > Cheers, > > > > Rainer > > > > -- > > NEW GERMAN FAX NUMBER!!! > > > > Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation > Biology, UCT), Dipl. Phys. > > (Germany) > > > > Centre of Excellence for Invasion Biology > > Natural Sciences Building > > Office Suite 2039 > > Stellenbosch University > > Main Campus, Merriman Avenue > > Stellenbosch > > South Africa > > > > Cell: +27 - (0)83 9479 042 > > Fax:+27 - (0)86 516 2782 > > Fax:+49 - (0)321 2125 2244 > > email: rai...@krugs.de > > > > Skype: RMkrug > > Google: r.m.k...@gmail.com > > > > ___ > > Emacs-orgmode mailing list > > Please use `Reply All' to send replies to the list. > > Emacs-orgmode@gnu.org > > http://lists.gnu.org/mailman/listinfo/emacs-orgmode > -- NEW GERMAN FAX NUMBER!!! Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Natural Sciences Building Office Suite 2039 Stellenbosch University Main Campus, Merriman Avenue Stellenbosch South Africa Cell: +27 - (0)83 9479 042 Fax:+27 - (0)86 516 2782 Fax:+49 - (0)321 2125 2244 email: rai...@krugs.de Skype: RMkrug Google: r.m.k...@gmail.com ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] org-babel - First line of file created by tangle
On Wed, Feb 3, 2010 at 10:15 PM, Eric Schulte wrote: > Hi Rainer, > > Rainer M Krug writes: > > > Hi Eric > > [...] > > > So yes, I think it would be very useful to define the two additional > header arguments for each > > block: > > > > :shebang NIL for default, other string for the shebang line > > :headers NIL for default, NONE for no headers, other string for custom > headers > > > > Noted: I've added this to the Org-babel development TODO list > > http://eschulte.github.com/babel-dev/TODO-allow-customization-of-shebang-lines-and-commenting-through-header-argument.html > > Thanks for the ideas! -- Eric > I have to thank you, Eric, for putting it on the TODO list. I agree - :comments is better. Cheers, Rainer -- NEW GERMAN FAX NUMBER!!! Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Natural Sciences Building Office Suite 2039 Stellenbosch University Main Campus, Merriman Avenue Stellenbosch South Africa Cell: +27 - (0)83 9479 042 Fax:+27 - (0)86 516 2782 Fax:+49 - (0)321 2125 2244 email: rai...@krugs.de Skype: RMkrug Google: r.m.k...@gmail.com ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Adding code blocks from different files
Hi I discussed it already with Dan, and he suggested to post the question here: is it possible to have different org files, which then can be combined to a single output (pdf, latex, ...) and, more important, tangled together from a master document? I could imagine something (as suggested by Dan): <> and this code block in the external remote_file would be treated as part of the master-document. So tagling of several external files would be dealt with by tangling the master-document. Thanks, Rainer -- NEW GERMAN FAX NUMBER!!! Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Natural Sciences Building Office Suite 2039 Stellenbosch University Main Campus, Merriman Avenue Stellenbosch South Africa Cell: +27 - (0)83 9479 042 Fax:+27 - (0)86 516 2782 Fax:+49 - (0)321 2125 2244 email: rai...@krugs.de Skype: RMkrug Google: r.m.k...@gmail.com ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] [babel] Tangle multiple sections source blocks into single file without #+source: ...
Hi I am using org-babel to write a simulation model and the accompanying documentation and it works as expected. But I have many source blocks which I want to tangle into the same source file. At the moment, I am using "#+source: BLOCKNAME" (see below). But it is easy to forget to add the block name to the actual tangle block at the bottom. Is there a way of: 1) tangle all source blocks into the same file? As far as I am aware, a new tangle to the same file name, overwrites the already existing file --- I would like to append the new code block to the existing file. or 2) is there a keyboard shortcut, that I can add the name of the block to the actual tangle block automatically, when the e.g. block name is selected? Thanks, Rainer * Here I am doing this #+source: Block1 #+begin_src R some code #+end_src * Here I am doing that #+source: Block2 #+begin_src R some code #+end_src * Creation of Source.R #+begin_src R :tangle source.R <> <> #+end_src -- NEW GERMAN FAX NUMBER!!! Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Natural Sciences Building Office Suite 2039 Stellenbosch University Main Campus, Merriman Avenue Stellenbosch South Africa Cell: +27 - (0)83 9479 042 Fax:+27 - (0)86 516 2782 Fax:+49 - (0)321 2125 2244 email: rai...@krugs.de Skype: RMkrug Google: r.m.k...@gmail.com ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] [babel] Tangle multiple sections source blocks into single file without #+source: ...
On Fri, May 28, 2010 at 3:05 PM, Eric Schulte wrote: > Hi Rainer, > > The first option you suggested below should already be supported. For > example the following org-mode text > > Thanks Eric, this is working as expected. Cheers, Rainer > --8<---cut here---start->8--- > * appending tangle > :PROPERTIES: > :tangle: appended.el > :END: > append all these block > > #+begin_src emacs-lisp > (message "block %d" 1) > #+end_src > > #+begin_src emacs-lisp > (message "block %d" 2) > #+end_src > > #+begin_src emacs-lisp > (message "block %d" 3) > #+end_src > --8<---cut here---end--->8--- > > tangles all three blocks to the file append.el. Please try something > analogous and let me know if it doesn't work. > > Best -- Eric > > Rainer M Krug writes: > > > Hi > > > > I am using org-babel to write a simulation model and the accompanying > > documentation and it works as expected. But I have many source blocks > which > > I want to tangle into the same source file. At the moment, I am using > > "#+source: BLOCKNAME" (see below). But it is easy to forget to add the > block > > name to the actual tangle block at the bottom. Is there a way of: > > > > 1) tangle all source blocks into the same file? As far as I am aware, a > new > > tangle to the same file name, overwrites the already existing file --- I > > would like to append the new code block to the existing file. > > > > or > > > > 2) is there a keyboard shortcut, that I can add the name of the block to > the > > actual tangle block automatically, when the e.g. block name is selected? > > > > Thanks, > > > > Rainer > > * Here I am doing this > > #+source: Block1 > > #+begin_src R > > some code > > #+end_src > > > > * Here I am doing that > > #+source: Block2 > > #+begin_src R > > some code > > #+end_src > > > > * Creation of Source.R > > #+begin_src R :tangle source.R > > <> > > <> > > #+end_src > -- NEW GERMAN FAX NUMBER!!! Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Natural Sciences Building Office Suite 2039 Stellenbosch University Main Campus, Merriman Avenue Stellenbosch South Africa Cell: +27 - (0)83 9479 042 Fax:+27 - (0)86 516 2782 Fax:+49 - (0)321 2125 2244 email: rai...@krugs.de Skype: RMkrug Google: r.m.k...@gmail.com ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Re: [ANN] Org-babel integrated into Org-mode
--8<---cut here---start->8--- > ;; Org-babel now needs less hand-holding :) however it could be > ;; useful to know extensions for some languages > (add-to-list 'org-babel-tangle-lang-exts '("fortran" . "f")) > > ;; mapping between languages (listings in LaTeX) and their major mode > ;; (in Emacs) > (setq org-src-lang-modes >'(("ocaml" . tuareg) > ("elisp" . emacs-lisp) > ;; ("Delphi" . perl) > ("ditaa" . artist) > ("asymptote" . asy) > ("dot" . fundamental))) > ;; ) > --8<---cut here---end--->8--- > > Cheers -- Eric > > > > > Best regards, > > Seb > > ___ > Emacs-orgmode mailing list > Please use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode > -- NEW GERMAN FAX NUMBER!!! Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Natural Sciences Building Office Suite 2039 Stellenbosch University Main Campus, Merriman Avenue Stellenbosch South Africa Cell: +27 - (0)83 9479 042 Fax:+27 - (0)86 516 2782 Fax:+49 - (0)321 2125 2244 email: rai...@krugs.de Skype: RMkrug Google: r.m.k...@gmail.com ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Re: [ANN] Org-babel integrated into Org-mode
On Fri, Jun 25, 2010 at 5:37 PM, Eric Schulte wrote: > Hi Rainer, > Hi Eric > > First I'll give some expanded instructions in the hopes of helping out > anyone else affected by my lack of good instructions in the announcement > email. Then I'll provide a re-write of your config below as an example. > Sounds perfect. > > Babel took the integration into Org-mode as an opportunity to do some > much needed house cleaning. Most importantly we have cleared out > unnecessary configuration variables -- which is great unless you already > have these variables set. > > We have eliminated the two main internal lists of languages, namely > - org-babel-interpreters and > - org-babel-tangle-langs > so any config lines which mention those variables, can/should be > stripped out in their entirety. This includes any calls to the > `org-babl-add-interpreter' function, whose sole purpose was to add > languages to the org-babel-interpreters variable. > OK - I understand that and it makes perfect sense. > alright, so with those calls stripped out, we may still in some cases > want to associate a file name extension with certain languages, for > example we want all of our emacs-lisp files to end in a ".el", we can do > this will the `org-babel-tangle-lang-exts' variable. In general you > shouldn't need to touch this as it already has defaults for most common > languages, and if a language is not present in org-babel-tangle-langs, > then babel will just use the language name, so for example a file of c > code will have a ".c" extension by default, sh code will have a ".sh" > extension ect... > Perfect. > > You also mentioned shebang lines. This configuration now lives in > header arguments. So the shebang for a single file can be set at the > code block level, e.g. > > #+begin_src clojure :shebang #!/usr/bin/env clj > (println "with a shebang line, I can be run as a script!") > #+end_src > That's perfect - it adds much flexibility, and to do it via header arguments is absolutely perfect for me. > > note that whenever a file is tangled which includes a shebang line, > org-babel will make the file executable, so there is good reason to only > Wow - even better! > add shebangs at the source-code level. However if you're sure that you > want all of your code in some language (say shell scripts) to tangle out > with shebang lines, then you can customize the default header arguments > for that language, e.g. > > ;; ensure this variable is defined defined > (unless (boundp 'org-babel-default-header-args:sh) > (setq org-babel-default-header-args:sh '())) > > ;; add a default shebang header argument > (add-to-list 'org-babel-default-header-args:sh > '(:shebang . "#!/bin/bash")) > Good to know, but in general I am perfectly happy without shebang lines. But there are cases, where they are necessary. > > The final change, is that to conform to Emacs guidelines, the prefix > org-babel-* in all require lines, has been changed to ob-*, also, since > Babel now loads by default with Org-mode you can remove any > (require 'org-babel) > or > (require 'org-babel-init) > that may by lying around your configuration. > OK - understood. > > Whew! that was alot of writing for a /simplification/ of configuration. > Well - but it made many things much clearer for me. It is often more difficult to explain the changes which need to be made then to explain to a new user how it should be done. > Hopefully the example of your configuration below will be a more > succinct demonstration of the needed transformations. > > Rainer M Krug writes: > > > Hi > > > > First of all thanks for integrating Org-babel into Org-mode. > > > > But for the less fluent elisp and org-mode users, I am slightly confused > in > > the changes necessary on my side. > > > > I have the following in my emacs.org file: > > > > > > #+begin_src emacs-lisp > > (require 'org-babel-R) ;; requires R and ess-mode > > ;; (require 'org-babel-ruby) ;; requires ruby, irb, ruby-mode, and > > inf-ruby > > (require 'org-babel-python);; requires python, and python-mode > > ;; (require 'org-babel-clojure) ;; requires clojure, clojure-mode, > > swank-clojure and slime > > #+end_src > > the above becomes > > #+begin_src emacs-lisp > (require 'ob-R) > ;; (require 'ob-ruby) > (require 'ob-python) > ;; (require 'ob-clojure) > #+end_src > OK - done. > > > > > *** Start babel > > #+begin_src emacs-
[Orgmode] Re: [ANN] Org-babel integrated into Org-mode
On Mon, Jun 28, 2010 at 1:53 PM, Štěpán Němec wrote: > Rainer M Krug writes: > > > Just one additional question: When I go on the menu to Org -- > Documentation > > -- Info Documentation, I still get the info help from version 6.21b, > > although I installed the version from git, and under Org -- Documentation > -- > > Show Version it gives me "Org-mode version 6.36trans > > (release_6.36.408.g7f21f)". > > > > Can I change this somehow? It seems that the Info Documentation is the > one > > which is part of emacs. > > That depends on your Emacs installation specifics. In short, the problem > is that the directory containing the older Org documentation comes first > in `Info-directory-list'. Reading the docstrings for this variable as > well as `Info-default-directory-list' should give you enough information > to come up with a solution suitable for your configuration. > Thanks - I think I just have to add the directory in which the info files reside from the currently used org mode. Am I correct in assuming that is ~/.emacs.d/org-mode/doc ? > HTH, > > Štěpán > -- NEW GERMAN FAX NUMBER!!! Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Natural Sciences Building Office Suite 2039 Stellenbosch University Main Campus, Merriman Avenue Stellenbosch South Africa Cell: +27 - (0)83 9479 042 Fax:+27 - (0)86 516 2782 Fax:+49 - (0)321 2125 2244 email: rai...@krugs.de Skype: RMkrug Google: r.m.k...@gmail.com ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Re: [ANN] Org-babel integrated into Org-mode
2010/6/28 Bernt Hansen > Rainer M Krug writes: > > > On Mon, Jun 28, 2010 at 1:53 PM, Štěpán Němec wrote: > > > > Rainer M Krug writes: > > > > > Just one additional question: When I go on the menu to Org -- > Documentation > > > -- Info Documentation, I still get the info help from version > 6.21b, > > > although I installed the version from git, and under Org -- > Documentation -- > > > Show Version it gives me "Org-mode version 6.36trans > > > (release_6.36.408.g7f21f)". > > > > > > Can I change this somehow? It seems that the Info Documentation is > the one > > > which is part of emacs. > > > > That depends on your Emacs installation specifics. In short, the > problem > > is that the directory containing the older Org documentation comes > first > > in `Info-directory-list'. Reading the docstrings for this variable as > > well as `Info-default-directory-list' should give you enough > information > > to come up with a solution suitable for your configuration. > > > > Thanks - I think I just have to add the directory in which the info > > files reside from the currently used org mode. Am I correct in > > assuming that is ~/.emacs.d/org-mode/doc ? > > This is how I did it. It requires an emacs restart to pick up the new > directory. > > http://doc.norang.ca/org-mode.html#InfoDocumentation Thanks - that is adding the path to the variable Info-default-directory-list It is working now: I updated my org-mode directory with the following script: rk...@ecolmod:~/.emacs.d$ cat update_org-mode-git #!/bin/sh cd ./org-mode-git cd org-mode # git clone git://repo.or.cz/org-mode.git git pull git gc make clean make make doc after adding make info to the script, it is working now nicely. Is there any other make I should do? Thanks a lot, Rainer > > -Bernt > -- NEW GERMAN FAX NUMBER!!! Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Natural Sciences Building Office Suite 2039 Stellenbosch University Main Campus, Merriman Avenue Stellenbosch South Africa Cell: +27 - (0)83 9479 042 Fax:+27 - (0)86 516 2782 Fax:+49 - (0)321 2125 2244 email: rai...@krugs.de Skype: RMkrug Google: r.m.k...@gmail.com ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Re: [ANN] Org-babel integrated into Org-mode
2010/6/28 Bernt Hansen > Rainer M Krug writes: > > > I updated my org-mode directory with the following script: > > > > rk...@ecolmod:~/.emacs.d$ cat update_org-mode-git > > #!/bin/sh > > cd ./org-mode-git > > cd org-mode > > > > # git clone git://repo.or.cz/org-mode.git > > git pull > > git gc > > > > make clean > > make > > make doc > > > > after adding > > > > make info > > > > to the script, it is working now nicely. > > > > Is there any other make I should do? > > > > Thanks a lot, > > Hi Rainer, > > Short version: I don't think so. > > Longer version: > > I only do > >make doc/org.info > > occasionally. I don't bother with any other make targets -- I run > org-mode directly from the sources. > > I used to compile all of the files but found it more tedious to do > updates (I update almost every day) and I didn't notice any speed > difference in my use of emacs and org-mode between the compiled and > uncompiled versions. I normally leave my emacs session running for > days. > I don't know if it is a speed differences - I just followed the infos on the org-mode website. Asnd as I have a script which is doing everything (and I close my emacs sessions in the evenings), it is no problem for me. Thanks for the help and Cheers, Rainer > > Regards, > Bernt > -- NEW GERMAN FAX NUMBER!!! Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Natural Sciences Building Office Suite 2039 Stellenbosch University Main Campus, Merriman Avenue Stellenbosch South Africa Cell: +27 - (0)83 9479 042 Fax:+27 - (0)86 516 2782 Fax:+49 - (0)321 2125 2244 email: rai...@krugs.de Skype: RMkrug Google: r.m.k...@gmail.com ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Re: [ANN] Org-babel integrated into Org-mode
On Mon, Jun 28, 2010 at 6:03 PM, Eric Schulte wrote: > Hi Rainer, > > I'm happy this was useful > > Rainer M Krug writes: > > > On Fri, Jun 25, 2010 at 5:37 PM, Eric Schulte >wrote: > > [...] > >> > > >> > *** Start babel > >> > #+begin_src emacs-lisp > >> > (org-babel-load-library-of-babel) > >> > #+end_src > >> > >> the above becomes > >> > >> #+begin_src emacs-lisp > >> (org-babel-lob-ingest "~/path/to/org/contrib/babel/ > library-of-babel.org") > >> #+end_src > >> > > > > I don't seem to need this line anymore - it is working without. Also, I > > don't remember why I put it in... > > > > The `org-babel-lob-ingest' function is used to load the source-code > blocks defined in an Org-mode file into the global > `org-babel-library-of-babel' variable. The functions defined in this > variable can be called from any Org-mode file. This makes it possible > to build a set of often-used generally applicable source-code blocks. > > The idea behind the library-of-babel.org file distributed with Org-mode > is to share such functions throughout the entire Org-mode community. > Thanks - now I understand it, Rainer > > Best -- Eric > -- NEW GERMAN FAX NUMBER!!! Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Natural Sciences Building Office Suite 2039 Stellenbosch University Main Campus, Merriman Avenue Stellenbosch South Africa Cell: +27 - (0)83 9479 042 Fax:+27 - (0)86 516 2782 Fax:+49 - (0)321 2125 2244 email: rai...@krugs.de Skype: RMkrug Google: r.m.k...@gmail.com ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] indent source blocks automatically when using "indent"
Hi I just discovered some of the #+STARTUP: options, and I like particularly the combination of "hidestarts" and "indent" options. But I have one question: I am using org-babel and I would like to know if it is possible to indent the source code in the source blocks as well automatically? Thanks, Rainer -- NEW GERMAN FAX NUMBER!!! Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Natural Sciences Building Office Suite 2039 Stellenbosch University Main Campus, Merriman Avenue Stellenbosch South Africa Cell: +27 - (0)83 9479 042 Fax:+27 - (0)86 516 2782 Fax:+49 - (0)321 2125 2244 email: rai...@krugs.de Skype: RMkrug Google: r.m.k...@gmail.com ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Problem export to html
Hi I am using the newest git version of org-mode, and have problems exporting to html. The attached org file produces, when exporting to html, the following error messages and no html file: Select command: Exporting... org-babel-exp processing... Fontifying *temp*... (regexps.) org-babel-exp processing... font-lock-fontify-keywords-region: Invalid regexp: "Regular expression too big" In contrast, export to pdf works fine. Is this a bug or a problem with my settings? Thanks, Rainer -- NEW GERMAN FAX NUMBER!!! Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Natural Sciences Building Office Suite 2039 Stellenbosch University Main Campus, Merriman Avenue Stellenbosch South Africa Cell: +27 - (0)83 9479 042 Fax:+27 - (0)86 516 2782 Fax:+49 - (0)321 2125 2244 email: rai...@krugs.de Skype: RMkrug Google: r.m.k...@gmail.com test.org Description: Binary data test.pdf Description: Adobe PDF document ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode