Re: [O] odt-Export and #+CAPTION: [reference text]{caption text}
Hi Jambunathan, thanks for the quick help. Am Freitag, den 30.03.2012, 01:04 +0530 schrieb Jambunathan K: May be you are trying to build an index out of object names... Or pick and choose objects of interest. Please upgrade to the following commit and report back any problems or suggestions. I have pushed the commit to master branch. If you are quick enough with your feedback, I can commit this change to hotfix-7.8.06 branch so that it can reach Emacs-24.1. I just pulled from orgmode.org. It does what I want. Unless there is some formatting in the caption. Then you get an invalid content.xml, even if you don't use the new feature (ie with a simple '#+CAPTION: a_i'). minimal example: #+CAPTION: [*a_i*]{a_i is named =A\_i=} #+LABEL: tab:referenced table | a | b | c | |---+---+---| | 1 | 2 | 3 | Best regards, Martin , | commit 67694297fa0f9b32cf4bfe812ba8a5c5cf4a0859 | Author: Jambunathan K kjambunat...@gmail.com | Date: Fri Mar 30 00:30:46 2012 +0530 | | org-odt.el: Honor short caption for table, figure etc ` Btw, any feedback on these two fixes? http://lists.gnu.org/archive/html/emacs-orgmode/2012-03/msg00798.html http://lists.gnu.org/archive/html/emacs-orgmode/2012-03/msg00797.html Regards, Martin
[O] odt-export: localisation of table and figure captions and references to chapter numbers
Am Freitag, den 30.03.2012, 01:04 +0530 schrieb Jambunathan K: Btw, any feedback on these two fixes? http://lists.gnu.org/archive/html/emacs-orgmode/2012-03/msg00798.html http://lists.gnu.org/archive/html/emacs-orgmode/2012-03/msg00797.html I am just using both, localisation and the numbering. No problems so far. What might be confusing is the different syntax/appearance of references in the org file. Figures and tables in my documents look \ref{fig:some_figure}, while references to sections appear as id:12adea34-13124123-12341234. Or can headlines also carry #+LABEL:s? Best regards, Martin Regards, Martin
Re: [O] problems with LaTex/BibTex
Hey Julian, On Fri, Mar 30, 2012 at 03:41, Julian Burgos jul...@hafro.is wrote: The References.bib is a BibTex file in the same folder as the test file. The citations were entered using RefTex with no problem. But when exporting to pdf, I get the following message in the minibuffer: Exporting to PDF...done, with some errors: [undefined citations]. The pdf produced had, of course, question marks where the citations should be. Did you customise your org-latex-to-pdf-process to include bibtex? I use something like this: (setq org-latex-to-pdf-process '(pdflatex -interaction nonstopmode %b /usr/bin/bibtex %b pdflatex -interaction nonstopmode %b pdflatex -interaction nonstopmode %b)) -- Suvayu Open source is the future. It sets us free.
Re: [O] Org Babel C/C++
Michael Hannon jm_han...@yahoo.com writes: On Wednesday, March 28, 2012 at 4:01 PM Daimrod wrote: Eric Schulte eric.schu...@gmx.com writes: Applied, Thanks! Daimrod daim...@gmail.com writes: Hi, I've made a small patch to ob-C.el so it now includes the current directory to the list of directories to be searched for header files. Without this, I cannot include a local header file because the compilation happens in /tmp and thus gcc or g++ doesn't search for header files in the directory I currently work. diff --git a/lisp/ob-C.el b/lisp/ob-C.el index f1525aa..4f33fc4 100644 --- a/lisp/ob-C.el +++ b/lisp/ob-C.el @@ -96,15 +96,14 @@ or `org-babel-execute:C++'. (progn (with-temp-file tmp-src-file (insert full-body)) (org-babel-eval - (format %s -o %s %s %s -I \%s\ + (format %s -o %s %s %s (cond ((equal org-babel-c-variant 'c) org-babel-C-compiler) ((equal org-babel-c-variant 'cpp) org-babel-C++-compiler)) (org-babel-process-file-name tmp-bin-file) (mapconcat 'identity (if (listp flags) flags (list flags)) ) - (org-babel-process-file-name tmp-src-file) - (file-name-directory (expand-file-name (buffer-file-name + (org-babel-process-file-name tmp-src-file)) ((lambda (results) (org-babel-reassemble-table (if (member vector (cdr (assoc :result-params params))) Hum, I'm quite embarrassed, this doesn't work when the block is executed during an export. I didn't track it down yet, but (buffer-file-name) returns nil during the export probably because the buffer changes. A workaround would be to use the :flags header argument though it's a bit tedious because it doesn't seem possible to eval elisp during the export. i.e. #+BEGIN_SRC cpp :flags -I (file-name-directory (buffer-file-name)) ... #+END_SRC I ran into this problem a few months ago. I don't have the elisp skills to patch Org mode, but I found something that worked for me: http://article.gmane.org/gmane.emacs.orgmode/49356/ -- Mike This won't work if you use different directories, you'll have to set the variable org-babel-C++-compiler every time. IMHO a good solution would be to be able to specify the directory used to compile, or maybe I should just use a Makefile.
Re: [O] problems with LaTex/BibTex
Yes! That was it. Thanks!! On fös 30.mar 2012 08:05, suvayu ali wrote: Hey Julian, On Fri, Mar 30, 2012 at 03:41, Julian Burgosjul...@hafro.is wrote: The References.bib is a BibTex file in the same folder as the test file. The citations were entered using RefTex with no problem. But when exporting to pdf, I get the following message in the minibuffer: Exporting to PDF...done, with some errors: [undefined citations]. The pdf produced had, of course, question marks where the citations should be. Did you customise your org-latex-to-pdf-process to include bibtex? I use something like this: (setq org-latex-to-pdf-process '(pdflatex -interaction nonstopmode %b /usr/bin/bibtex %b pdflatex -interaction nonstopmode %b pdflatex -interaction nonstopmode %b)) -- Julian Mariano Burgos, PhD Hafrannsóknastofnunin/Marine Research Institute Skúlagata 4, 121 Reykjavík, Iceland Sími/Telephone : +354-5752037 Bréfsími/Telefax: +354-5752001 Netfang/Email: jul...@hafro.is
Re: [O] odt-Export and #+CAPTION: [reference text]{caption text}
It does what I want. I have applied my patch to the hotfix branch. Unless there is some formatting in the caption. This is a limitation that we need to live with. That said, if you want the short captions in bold, then the right thing to do would be to apply the style to the index entry and not to individual captions. Have you experimented with the styles tab in the Index creator...I haven't checked it myself though. Then you get an invalid content.xml, even if you don't use the new feature (ie with a simple '#+CAPTION: a_i'). minimal example: #+CAPTION: [*a_i*]{a_i is named =A\_i=} #+LABEL: tab:referenced table | a | b | c | |---+---+---| | 1 | 2 | 3 | If you unzip the file you will see that the short caption goes as an attribute while long caption goes as body text. LibreOffice doesn't even allow entering space in the object names. If you know of any workarounds that will help mimic short captions, I can add it.
[O] [PATCH] Separate file time from its tasks times
2012-03-30 Sebastien Vauban wxhgmqzgw...@spammotel.com * org-clock.el (org-clocktable-write-default): Make the sum appear visually correct by not mixing the total time per file and sub-totals. From 148cdf141add43798e21925ca852587017f6312a Mon Sep 17 00:00:00 2001 From: Sebastien Vauban s...@mygooglest.com Date: Fri, 30 Mar 2012 15:07:01 +0200 Subject: [PATCH] Separate file time from its tasks times --- lisp/org-clock.el |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/lisp/org-clock.el b/lisp/org-clock.el index 7c2c2ab..b7351a7 100644 --- a/lisp/org-clock.el +++ b/lisp/org-clock.el @@ -2293,7 +2293,7 @@ from the dynamic block definition. properties |) |) ) ;properties columns, maybe (if indent (org-clocktable-indent-string level) ) ; indentation hlc headline hlc |; headline - (make-string (min (1- ntcol) (or (- level 1))) ?|) + (make-string (min (1- ntcol) (or level)) ?|) ; empty fields for higher levels hlc (org-minutes-to-hh:mm-string (nth 3 entry)) hlc ; time |\n ; close line -- 1.7.9 Best regards, Seb -- Sebastien Vauban
[O] [bug] (org-todo-list ) causes exception with sticky agenda buffers.
Hi I've noticed that if (org-todo-list ) is called programatically where `org-agenda-sticky' is set to t, an exception is caused: The exception happens in (org-prepare-agenda ): --8---cut here---start-8--- (defun org-prepare-agenda (optional name) (if (org-agenda-use-sticky-p) (progn ;; Popup existing buffer (org-prepare-agenda-window (get-buffer org-agenda-buffer-name)) (message Sticky Agenda buffer, use `r' to refresh) (throw 'exit nil)) --8---cut here---end---8--- This looks somewhat intentional. Unfortunately this kills further execution of the calling script. NOTE: This only appears to happen once the agenda buffer exists (and is buried). The debug trace follows: --8---cut here---start-8--- Debugger entered--Lisp error: (no-catch exit nil) throw(exit nil) (progn (org-prepare-agenda-window (get-buffer org-agenda-buffer-name)) (message Sticky Agenda buffer, use `r' to refresh) (throw (quote exit) nil)) (if (org-agenda-use-sticky-p) (progn (org-prepare-agenda-window (get-buffer org-agenda-buffer-name)) (message Sticky Agenda buffer, use `r' to refresh) (throw (quote exit) nil)) (setq org-todo-keywords-for-agenda nil) ... --8---cut here---end---8--- Calling (org-todo-list ) interactively appears to exhibit the same behavior. Best, Martyn --- Org-mode version 7.8.06 (release_7.8.03.594.g013d) GNU Emacs 24.0.94.1 (x86_64-apple-darwin, NS apple-appkit-1038.36) of 2012-02-28 on bob.porkrind.org
Re: [O] [PATCH] Separate file time from its tasks times
Hello, Sebastien Vauban wrote: 2012-03-30 Sebastien Vauban wxhgmqzgw...@spammotel.com * org-clock.el (org-clocktable-write-default): Make the sum appear visually correct by not mixing the total time per file and sub-totals. This can be best understood with an example... Before: #+BEGIN: clocktable :maxlevel 4 :scope (file-abc-tom.org file-abc-ann.org) :block 2012-02 Clock summary at [2012-03-30 Fri 15:12], for February 2012. | File | Headline | Time | | |--+--+---+---| | | ALL Total time | 19:15 | | |--+--+---+---| | file-abc-tom.org | File time| 17:15 | | | | Task A | 17:15 | | | | TODO Subtask A1 | | 17:15 | |--+--+---+---| | file-abc-ann.org | File time| 2:00 | | | | Task B | 2:00 | | | | TODO Subtask B2 | | 2:00 | #+END: Now: #+BEGIN: clocktable :maxlevel 4 :scope (file-abc-tom.org file-abc-ann.org) :block 2012-02 Clock summary at [2012-03-30 Fri 15:13], for February 2012. | File | Headline | Time | | | |--+--+---+---+---| | | ALL Total time | 19:15 | | | |--+--+---+---+---| | file-abc-tom.org | File time| 17:15 | | | | | Task A | | 17:15 | | | | TODO Subtask A1 | | | 17:15 | |--+--+---+---+---| | file-abc-ann.org | File time| 2:00 | | | | | Task B | | 2:00 | | | | TODO Subtask B2 | | | 2:00 | #+END: Best regards, Seb -- Sebastien Vauban
Re: [O] odt-Export and #+CAPTION: [reference text]{caption text}
Hi Jambunathan, Am Freitag, den 30.03.2012, 18:38 +0530 schrieb Jambunathan K: It does what I want. I have applied my patch to the hotfix branch. Unless there is some formatting in the caption. This is a limitation that we need to live with. (Unfortunately, this seems to be so for super/subscripts as well.) I just found out that now the exporter depends on supplying a short caption, if the caption contains formatting (which also means subscripts). If you just give it one version (ala #+CAPTION: a_i), and the caption contains ,say, a subscript, content.xml becomes invalid. It works only, if you supply it in the form #+CAPTION: []{a_i}. (Probably, you take the long versionalso for the short one, if only one is supplied.) I think this should be fixed as it could break existing documents. Regards, Martin
Re: [O] odt-Export and #+CAPTION: [reference text]{caption text}
I have applied my patch to the hotfix branch. I am having second thoughts. I will slightly re-work the patch so it doesn't bomb the ODT file in unexpected ways. I will drop a note once I am done with it.
Re: [O] odt-Export and #+CAPTION: [reference text]{caption text}
Martin Gürtler martin.guert...@gmx.de writes: (Probably, you take the long versionalso for the short one, if only one is supplied.) I think this should be fixed as it could break existing documents. Our mails crossed and we have arrived at the same conclusion. Give me few hours to fix it.
Re: [O] Feature request for noweb mode that strips references on export
Hi, I've tried to use the new :noweb strip-export feature but I can't work out the magic combination of headers (working with git head, i.e. commit 67694297fa0f9b32cf4bfe812ba8a5c5cf4a0859). Here is a stripped down example: START OF EXAMPLE * Example Define method #+name: boilerplate #+begin_src ruby def hello Hello World end #+end_src Use it #+name: example #+begin_src ruby :exports both :noweb strip-export «boilerplate» hello #+end_src And here is the result: #+RESULTS: example : Hello World END OF EXAMPLE On export, I expect this to display the result string Hello World after the code hello but get nothing. If I change the :noweb strip-export to :noweb yes, I do get the output (but also the boilerplate of course). Is strip-export meant to work like this? If so, could someone please post a working example? Thanks, Sean
Re: [O] Feature request for noweb mode that strips references on export
Sean O'Halpin sean.ohal...@gmail.com wrote: #+name: example #+begin_src ruby :exports both :noweb strip-export =ABboilerplate=BB hello #+end_src This may have nothing to do with anything (it may even be an artifact of mailer misbehavior) but is this supposed to be boilerplate? These are supposed to be ASCII chars, so if you are using some sort of extended charset, try changing them and see if that works. Nick
Re: [O] Feature request for noweb mode that strips references on export
Sean O'Halpin sean.ohal...@gmail.com writes: Hi, I've tried to use the new :noweb strip-export feature but I can't work out the magic combination of headers (working with git head, i.e. commit 67694297fa0f9b32cf4bfe812ba8a5c5cf4a0859). Here is a stripped down example: START OF EXAMPLE * Example Define method #+name: boilerplate #+begin_src ruby def hello Hello World end #+end_src Use it #+name: example #+begin_src ruby :exports both :noweb strip-export «boilerplate» hello #+end_src And here is the result: #+RESULTS: example : Hello World END OF EXAMPLE On export, I expect this to display the result string Hello World after the code hello but get nothing. If I change the :noweb strip-export to :noweb yes, I do get the output (but also the boilerplate of course). Is strip-export meant to work like this? If so, could someone please post a working example? Thanks, Sean If you don't want to export boilerplate you've to use :exports none in it. #+name: boilerplate #+begin_src ruby :exports none def hello Hello World end #+end_src Use it #+name: example #+begin_src ruby :exports both :noweb strip-export boilerplate hello #+end_src
Re: [O] [babwel] Simplify graph generation and copying?
Rainer M Krug r.m.k...@gmail.com writes: Hi I do the following to create a graph in R and then convert / copy / do other stuff with it in the bash shell: #+header: :results graphics #+header: :file Test.pdf #+header: :width 4 #+header: :height 8 #+header: :pointsize 8 #+begin_src R plot(runif(100)) #+end_src #+BEGIN_SRC sh :session shell cp Test.pdf Test2.pdf #+END_SRC Is there a way of automatically giving the ffile name from the :file parameter tio the second code block, so that I just have to change the :file argument when I want a different name for the graph? Thanks, Rainer Hi Rainer, I am not aware of any possibility to pass the :file parameter from one code block to another. But for your use case, the file name is also the return value of the R code block. So, you can do: #+name: mypdfplot #+header: :results graphics #+header: :file Test.pdf #+header: :width 4 #+header: :height 8 #+header: :pointsize 8 #+begin_src R plot(runif(100)) #+end_src #+BEGIN_SRC sh :session shell :var mypdf=mypdfplot() cp $mypdf Test2.pdf #+END_SRC Best, Andreas
Re: [O] [babel] file header argument includes other variable
Rainer M Krug r.m.k...@gmail.com writes: Hi I would like to do make the file header argument to be concatenated of a constant string and another variable, so effectively: #+header: :var+ ConNum=10 #+header: :results graphics #+header: :file SA_VALUEOFConNum.pdf #+header: :width 8 #+header: :height 8 #+header: :pointsize 8 #+begin_src R plot(runif(100)) #+end_src #+RESULTS: [[file:SA_10.pdf]] Is this possible? Thanks, Rainer Hi Rainer, I am not aware of any method that directly does what you want. But depending on where the value of your variable ConNum is coming from, the following might be a start for you. It is based on the possibility to insert elisp in the header arguments: #+name: myconnum - 19 #+header: :var ConNum=myconnum #+header: :results graphics #+header: :file (concat SA_ (sbe myconnum) .pdf) #+header: :width 8 #+header: :height 8 #+header: :pointsize 8 #+begin_src R plot(runif(100), main=ConNum) #+end_src #+RESULTS: [[file:SA_(19).pdf]] Best, Andreas
[O] [PATCH] Allow org-collector to display heading indentation
Hi all, attached is a patch which adds a new parameter indent to the propview dynamic bloc, with the following behaviour: #+BEGIN_SRC org ,* Tree ,:PROPERTIES: ,:COLUMNS: %8ITEM %4prop1 %5prop2 ,:ID: tree ,:END: ,** A ,:PROPERTIES: ,:prop1: 10 ,:prop2: 20 ,:END: ,*** A1 ,:PROPERTIES: ,:prop1: 15 ,:prop2: 19 ,:END: ,*** A2 ,:PROPERTIES: ,:prop1: 20 ,:prop2: 18 ,:END: ,** B ,:PROPERTIES: ,:prop1: 25 ,:prop2: 10 ,:END: ,*** B1 ,:PROPERTIES: ,:prop1: 2 ,:prop2: 4 ,:END: ,*** B2 ,:PROPERTIES: ,:prop1: 3 ,:prop2: 5 ,:END: #+END_SRC #+BEGIN: propview :id tree :cols (ITEM prop1) :noquote t :indent t | ITEM | prop1 | |+---| | Tree | 0 | | \- A |10 | | \-- A1 |15 | | \-- A2 |20 | | \- B |25 | | \-- B1 | 2 | | \-- B2 | 3 | |+---| || | #+END I wish the indentation to be displayed with nothing but spaces, but they would be trimmed by org-table guts ; so that's middly satisfying, but better than nothing :-) Cheers, Nicolas org-collector.el.diff Description: Binary data
Re: [O] [PATCH] Allow org-collector to display heading indentation
Nicolas Girard writes: I wish the indentation to be displayed with nothing but spaces, but they would be trimmed by org-table guts ; so that's middly satisfying, but better than nothing :-) Then use a non-breaking space and be fully satisfied. Regards, Achim. -- +[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]+ Waldorf MIDI Implementation additional documentation: http://Synth.Stromeko.net/Downloads.html#WaldorfDocs
Re: [O] [PATCH] Allow org-collector to display heading indentation
Nicolas Girard girard.nico...@gmail.com wrote: Hi all, attached is a patch ... Attachments with mime type application/octet-stream are *not* caught by patchwork. Please resubmit the patch in a proper attachment: see http://orgmode.org/worg/org-contribute.html#sec-4-3 for details. Nick
Re: [O] odt-Export and #+CAPTION: [reference text]{caption text}
Jambunathan K kjambunat...@gmail.com writes: I have applied my patch to the hotfix branch. I am having second thoughts. I will slightly re-work the patch so it doesn't bomb the ODT file in unexpected ways. I will drop a note once I am done with it. Short captions if not provided will take their values from long caption. See the commit message for more information. I am not checking in this change to hotfix-7.8.06 branch. If it bombs again and someone else complains, I will revoke the fix. If you need index entries to be in bold, fix the paragraph style. Btw, I wonder why LibreOffice UI doesn't allow space (apart from other characters) in the object names. The OpenDocument v1.1 explicitly has the following example and as you can see the table name has spaces. Anyways, looks like LibreOffice behaviour is buggy. , | table:table table:name=Table 1 table:style-name=Table 1 | ... | /table:table ` , | commit 8a02f48547df4f11b0402aa0a4fe339e3b85c608 | Author: Jambunathan K kjambunat...@gmail.com | Date: Sat Mar 31 02:03:10 2012 +0530 | | org-odt.el: Consider short captions not as org text but as plain text | | * lisp/org-lparse.el (org-lparse-insert-org-table): Consider | short caption as plain text and not as org text. | * lisp/org-odt.el (org-export-odt-format-formula) | (org-export-odt-format-image): ditto. | | Fixes earlier checkin. See | http://lists.gnu.org/archive/html/emacs-orgmode/2012-03/msg01212.html | | Handling of short captions is only a convenience feature. | | From within LibreOffice one can always create an unprotected | editable index and later manually delete unwanted index entries (for | example, delete uncaptioned entries which are given automatic names) | or modify existing entries (for example, fix long captions to their | short versions). `
Re: [O] [PATCH] Allow org-collector to display heading indentation
From eaf9e5f06279069ed1072425fd020d8f0442d04f Mon Sep 17 00:00:00 2001 From: Nicolas Girard girard.nico...@gmail.com Date: Fri, 30 Mar 2012 22:53:13 +0200 Subject: [PATCH] Allow org-collector to display heading indentation --- contrib/lisp/org-collector.el | 12 +--- 1 files changed, 9 insertions(+), 3 deletions(-) diff --git a/contrib/lisp/org-collector.el b/contrib/lisp/org-collector.el index da612e9..2476d62 100644 --- a/contrib/lisp/org-collector.el +++ b/contrib/lisp/org-collector.el @@ -121,6 +121,7 @@ preceeding the dblock, then update the contents of the dblock. (scope (plist-get params :scope)) (noquote (plist-get params :noquote)) (colnames (plist-get params :colnames)) + (indent (plist-get params :indent)) (content-lines (org-split-string (plist-get params :content) \n)) id table line pos) (save-excursion @@ -135,7 +136,7 @@ preceeding the dblock, then update the contents of the dblock. (setq stringformat (if noquote %s %S)) (setq table (org-propview-to-table (org-propview-collect cols stringformat conds match scope inherit -(if colnames colnames cols)) stringformat)) +(if colnames colnames cols) indent) stringformat)) (widen)) (setq pos (point)) (when content-lines @@ -171,13 +172,18 @@ variables and values specified in props (when p (cons n p inherit -(defun org-propview-collect (cols stringformat optional conds match scope inherit colnames) +(defun org-propview-collect (cols stringformat optional conds match scope inherit colnames indent) (interactive) ;; collect the properties from every header (let* ((header-props (let ((org-trust-scanner-tags t) alst) (org-map-entries -(quote (cons (cons ITEM (org-get-heading t)) +(quote (cons (cons ITEM + (let ((item (org-get-heading t)) + (level (- (org-current-level) 1))) + (if (and indent ( level 0)) + (format \\%s %s + (make-string level ?- ) item) item))) (org-propview-get-with-inherited inherit))) match scope))) ;; read property values -- 1.7.8.rc1
Re: [O] [PATCH] Separate file time from its tasks times
Hi Seb, I think this detail should be part of the commit message text. Regards, Bernt Sebastien Vauban wxhgmqzgwmuf-genee64ty+gs+fvcfc7...@public.gmane.org writes: Hello, Sebastien Vauban wrote: 2012-03-30 Sebastien Vauban wxhgmqzgwmuf-genee64ty+gs+fvcfc7...@public.gmane.org * org-clock.el (org-clocktable-write-default): Make the sum appear visually correct by not mixing the total time per file and sub-totals. This can be best understood with an example... Before: #+BEGIN: clocktable :maxlevel 4 :scope (file-abc-tom.org file-abc-ann.org) :block 2012-02 Clock summary at [2012-03-30 Fri 15:12], for February 2012. | File | Headline | Time | | |--+--+---+---| | | ALL Total time | 19:15 | | |--+--+---+---| | file-abc-tom.org | File time| 17:15 | | | | Task A | 17:15 | | | | TODO Subtask A1 | | 17:15 | |--+--+---+---| | file-abc-ann.org | File time| 2:00 | | | | Task B | 2:00 | | | | TODO Subtask B2 | | 2:00 | #+END: Now: #+BEGIN: clocktable :maxlevel 4 :scope (file-abc-tom.org file-abc-ann.org) :block 2012-02 Clock summary at [2012-03-30 Fri 15:13], for February 2012. | File | Headline | Time | | | |--+--+---+---+---| | | ALL Total time | 19:15 | | | |--+--+---+---+---| | file-abc-tom.org | File time| 17:15 | | | | | Task A | | 17:15 | | | | TODO Subtask A1 | | | 17:15 | |--+--+---+---+---| | file-abc-ann.org | File time| 2:00 | | | | | Task B | | 2:00 | | | | TODO Subtask B2 | | | 2:00 | #+END: Best regards, Seb
[O] Please test: Fix global variables names
Here is a patch against hotfix to fix warnings about wrong variables names (with Emacs 24). Please test it heavily. Thanks a lot to Martyn Jago for a preliminary set of patches for this! diff --git a/lisp/ob-maxima.el b/lisp/ob-maxima.el index 63f1e32..8da20af 100644 --- a/lisp/ob-maxima.el +++ b/lisp/ob-maxima.el @@ -42,7 +42,8 @@ (defcustom org-babel-maxima-command (if (boundp 'maxima-command) maxima-command maxima) - Command used to call maxima on the shell.) + Command used to call maxima on the shell. + :group 'org-babel) (defun org-babel-maxima-expand (body params) Expand a block of Maxima code according to its header arguments. diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index 81377ca..f706050 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -91,7 +91,7 @@ (defvar org-agenda-buffer-name) (defvar org-agenda-overriding-header) (defvar org-agenda-title-append nil) -(defvar entry) +(defvar org-entry) (defvar date) (defvar org-agenda-undo-list) (defvar org-agenda-pending-undo-list) @@ -4530,8 +4530,8 @@ function from a program - use `org-agenda-get-day-entries' instead. (org-compile-prefix-format 'agenda) (org-set-sorting-strategy 'agenda) (setq args (or args '(:deadline :scheduled :timestamp :sexp))) - (let* ((files (if (and entry (stringp entry) (string-match \\S- entry)) - (list entry) + (let* ((files (if (and org-entry (stringp org-entry) (string-match \\S- org-entry)) + (list org-entry) (org-agenda-files t))) (time (org-float-time)) file rtn results) @@ -4936,7 +4936,7 @@ holiday will also be skipped. (not (member (car (calendar-iso-from-absolute d)) skip-weeks (not (and (memq 'holidays skip-weeks) (calendar-check-holidays date))) - entry))) + org-entry))) (defun org-diary-class (m1 d1 y1 m2 d2 y2 dayname rest skip-weeks) Like `org-class', but honor `calendar-date-style'. diff --git a/lisp/org-beamer.el b/lisp/org-beamer.el index e6084d2..7882b27 100644 --- a/lisp/org-beamer.el +++ b/lisp/org-beamer.el @@ -235,7 +235,7 @@ in org-export-latex-classes. (envs (append org-beamer-environments-extra org-beamer-environments-default)) (props (org-get-text-property-any 0 'org-props text)) - (in ) (out ) option action defaction environment extra + (in ) (out ) org-beamer-option org-beamer-action org-beamer-defaction org-beamer-environment org-beamer-extra columns-option column-option env have-text ass tmp) (if (= frame-level 0) (setq frame-level nil)) @@ -266,10 +266,10 @@ in org-export-latex-classes. (setq in (org-fill-template \\begin{frame}%a%A%o%T%S%x - (list (cons a (or action )) - (cons A (or defaction )) - (cons o (or option org-beamer-frame-default-options )) - (cons x (if extra (concat \n extra) )) + (list (cons a (or org-beamer-action )) + (cons A (or org-beamer-defaction )) + (cons o (or org-beamer-option org-beamer-frame-default-options )) + (cons x (if org-beamer-extra (concat \n org-beamer-extra) )) (cons h %s) (cons T (if (string-match \\S- text) \n\\frametitle{%s} )) @@ -294,10 +294,10 @@ in org-export-latex-classes. (setq have-text (string-match \\S- text)) (setq in (org-fill-template (nth 2 ass) - (list (cons a (or action )) - (cons A (or defaction )) - (cons o (or option )) - (cons x (if extra (concat \n extra) )) + (list (cons a (or org-beamer-action )) + (cons A (or org-beamer-defaction )) + (cons o (or org-beamer-option )) + (cons x (if org-beamer-extra (concat \n org-beamer-extra) )) (cons h %s) (cons H (if have-text (concat { text }) )) (cons U (if have-text (concat [ text ]) @@ -321,31 +321,31 @@ in org-export-latex-classes. (cons text (cdr (assoc level default (t nil -(defvar extra) -(defvar option) -(defvar action) -(defvar defaction) -(defvar environment) +(defvar org-beamer-extra) +(defvar org-beamer-option) +(defvar org-beamer-action) +(defvar org-beamer-defaction) +(defvar org-beamer-environment) (defun org-beamer-get-special (props) Extract an option, action, and default action string from text. -The variables option, action, defaction, extra are all scoped into -this function dynamically. +The variables org-beamer-option, org-beamer-action, org-beamer-defaction, +org-beamer-extra are all scoped into this function dynamically. (let (tmp) -(setq environment (org-beamer-assoc-not-empty BEAMER_env props)) -(setq extra (org-beamer-assoc-not-empty BEAMER_extra props)) -(when extra - (setq extra (replace-regexp-in-string n \n extra))) +(setq org-beamer-environment (org-beamer-assoc-not-empty BEAMER_env props)) +(setq org-beamer-extra (org-beamer-assoc-not-empty BEAMER_extra props)) +(when org-beamer-extra + (setq org-beamer-extra (replace-regexp-in-string n \n org-beamer-extra))) (setq tmp
Re: [O] problems with LaTex/BibTex
I would have a use for this. I am curious, though... Suppose I use this as a standard init-file declaration for org-latex-to-pdf-process . Does that mean that bibtex will always be run, every time, during the generation of PDFs via LaTex export? Alan On Fri, Mar 30, 2012 at 4:54 AM, Julian Burgos jul...@hafro.is wrote: Yes! That was it. Thanks!! On fös 30.mar 2012 08:05, suvayu ali wrote: Hey Julian, On Fri, Mar 30, 2012 at 03:41, Julian Burgosjul...@hafro.is wrote: The References.bib is a BibTex file in the same folder as the test file. The citations were entered using RefTex with no problem. But when exporting to pdf, I get the following message in the minibuffer: Exporting to PDF...done, with some errors: [undefined citations]. The pdf produced had, of course, question marks where the citations should be. Did you customise your org-latex-to-pdf-process to include bibtex? I use something like this: (setq org-latex-to-pdf-process '(pdflatex -interaction nonstopmode %b /usr/bin/bibtex %b pdflatex -interaction nonstopmode %b pdflatex -interaction nonstopmode %b)) -- Julian Mariano Burgos, PhD Hafrannsóknastofnunin/Marine Research Institute Skúlagata 4, 121 Reykjavík, Iceland Sími/Telephone : +354-5752037 Bréfsími/Telefax: +354-5752001 Netfang/Email: jul...@hafro.is
[O] [PATCH] Time specifications: Allow specifying relative times
When specifying times in the tags/properties matcher you can use relative time notation, such as yesterday or -1w. This patch allows this to be used in other places, such as the :tstart and :tend parameters of clocktable. Btw, I couldn't quite understand the exact meaning of :block, :tstart and :tend as decribed in the manual. Is there a better explanation somewhere? thanks, ilya From d19778b3fc624e14237d69cc76a4aa9cb8450697 Mon Sep 17 00:00:00 2001 From: Ilya Shlyakhter ilya_...@alum.mit.edu Date: Fri, 30 Mar 2012 21:19:12 -0400 Subject: [PATCH] Time specifications: Allow specifying relative times * org.el (org-parse-time-string): Allow strings supported by tags/properties matcher (eg now, yesterday, -7d) if the time starts with and ends with . This means that e.g. in the clocktable parameters you can specify :tstart -1w :tend now. TINYCHANGE --- lisp/org.el | 23 +-- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index 4d2ae87..995dffd 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -16016,16 +16016,19 @@ When SHOW-ALL is nil, only return the current occurrence of a time stamp. This should be a lot faster than the normal `parse-time-string'. If time is not given, defaults to 0:00. However, with optional NODEFAULT, hour and minute fields will be nil if not given. - (if (string-match org-ts-regexp0 s) - (list 0 - (if (or (match-beginning 8) (not nodefault)) - (string-to-number (or (match-string 8 s) 0))) - (if (or (match-beginning 7) (not nodefault)) - (string-to-number (or (match-string 7 s) 0))) - (string-to-number (match-string 4 s)) - (string-to-number (match-string 3 s)) - (string-to-number (match-string 2 s)) - nil nil nil) + (cond + ((string-match ^.+$ s) +(decode-time (seconds-to-time (org-matcher-time s + ((string-match org-ts-regexp0 s) +(list 0 + (if (or (match-beginning 8) (not nodefault)) + (string-to-number (or (match-string 8 s) 0))) + (if (or (match-beginning 7) (not nodefault)) + (string-to-number (or (match-string 7 s) 0))) + (string-to-number (match-string 4 s)) + (string-to-number (match-string 3 s)) + (string-to-number (match-string 2 s)) + nil nil nil)) (error Not a standard Org-mode time string: %s s))) (defun org-timestamp-up (optional arg) -- 1.7.9.3
[O] [PATCH] Testing: Corrected the command to run batch tests given in testing/README
Added some details for how to run the test suite in batch mode. From 2cf6b6f529748a2a39927ccfdfa583d7f00cc9df Mon Sep 17 00:00:00 2001 From: Ilya Shlyakhter ilya_...@alum.mit.edu Date: Fri, 30 Mar 2012 22:11:22 -0400 Subject: [PATCH] Testing: Corrected the command to run batch tests given in README testing/README (running batch tests): Added missing paths to the command. Make sure to load the org-mode code from the git checkout rather than whatever Org is installed in Emacs directories. TINYCHANGE --- testing/README | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/testing/README b/testing/README index 4a68174..f4253c7 100644 --- a/testing/README +++ b/testing/README @@ -12,10 +12,13 @@ repository]]. The simplest way to run the Org-mode test suite is from the command line with the following invocation. Note that the paths below are relative to the base of the Org-mode directory. -#+BEGIN_SRC sh - emacs -Q --batch -l lisp/org.el -l testing/org-test.el \ - --eval (progn (org-reload) (setq org-confirm-babel-evaluate nil)) \ - -f org-test-run-batch-tests +#+BEGIN_SRC sh :dir (expand-file-name ..) + # For Emacs earlier than 24, add -L /path/to/ert + emacs -Q --batch \ +-L lisp/ -L testing/ -L testing/lisp -l lisp/org.el \ +-l lisp/org-id.el -l testing/org-test.el \ +--eval (progn (org-reload) (setq org-confirm-babel-evaluate nil)) \ +-f org-test-run-batch-tests #+END_SRC The options in the above command are explained below. -- 1.7.9.3
Re: [O] problems with LaTex/BibTex
Alan E. Davis lngn...@gmail.com wrote: I would have a use for this. I am curious, though... Suppose I use this as a standard init-file declaration for org-latex-to-pdf-process . Does that mean that bibtex will always be run, every time, during the generation of PDFs via LaTex export? I believe so. I think the best way to deal with the mess of programs that you have to run for complicated latex productions (at least on linux) is to use texi2dvi, which is supposed to figure out these dependencies and run the correct sequence of programs the correct number of times (it does this by parsing error messages in the log file, I believe). The trouble is that, as currently distributed, texi2dvi has a bug that causes an error with recent versions of egrep. That's why the default value of org-latex-to-pdf-process is not texi2dvi. C-h v org-latex-to-pdf-process RET for more details. You might try it and see if you get the error: try ``texi2dvi --pdf somefile.tex'' The symptom is the message egrep: Invalid range end If you get the error, then you can forget about texi2dvi for now. OTOH, if you are willing to live with the consequences of actually fixing the bug in your version of texi2dvi, that's pretty easy. The danger is that you are going to pull an update which might revert texi2dvi to its unpatched state. But if you have patched it once, it's easy to patch it again. The change is around line 1713 of /usr/bin/texi2dvi. The original says echo $command_line_filename | $EGREP '^(/|[A-z]:/)' 6 \ || command_line_filename=./$command_line_filename and the fixed version is echo $command_line_filename | $EGREP '^(/|[A-Za-z]:/)' 6 \ || command_line_filename=./$command_line_filename just changing the egrep pattern. The fixed version is not exactly equivalent to the original version but the difference is academic, unless you run Windows and you have lots of drives. FWIW, I've fixed my texi2dvi as above, and have set org-latex-to-pdf-process to a custom shell command: texi2dvi --pdf --batch %f. Org provides a texi2dvi customize option for org-latex-to-pdf-process that also sets the build mode to ``clean'' which gets rid of the extra files that a latex run produces, but I prefer leaving all the junk files around and clean them up once at the end. Nick Alan On Fri, Mar 30, 2012 at 4:54 AM, Julian Burgos jul...@hafro.is wrote: Yes! That was it. Thanks!! On fös 30.mar 2012 08:05, suvayu ali wrote: Hey Julian, On Fri, Mar 30, 2012 at 03:41, Julian Burgosjul...@hafro.is wrote: The References.bib is a BibTex file in the same folder as the test file. The citations were entered using RefTex with no problem. But when exporting to pdf, I get the following message in the minibuffer: Exporting to PDF...done, with some errors: [undefined citations]. The pdf produced had, of course, question marks where the citations should be. Did you customise your org-latex-to-pdf-process to include bibtex? I use something like this: (setq org-latex-to-pdf-process '(pdflatex -interaction nonstopmode %b /usr/bin/bibtex %b pdflatex -interaction nonstopmode %b pdflatex -interaction nonstopmode %b)) -- Julian Mariano Burgos, PhD Hafrannsóknastofnunin/Marine Research Institute Skúlagata 4, 121 Reykjavík, Iceland Sími/Telephone : +354-5752037 Bréfsími/Telefax: +354-5752001 Netfang/Email: jul...@hafro.is Alternatives:
Re: [O] About org-babel menu
My menus are hidden too. However, if I need them for some reasons there is some key mouse combo. Can't remember exactly. Shift right click or C- right click.. something along this. The menu will pop up as a context menu close to the mouse cursor location. Be aware there is a customization menu too. Just in case you look for a quick way to use the menu. Torsten On Mar 19, 2012 11:53 PM, Eric Schulte eric.schu...@gmx.com wrote: Rainer M Krug r.m.k...@gmail.com writes: On 19/03/12 15:22, Eric Schulte wrote: Hi FengShu, I don't know much about the Emacs customization interface, but it is certainly the solution to this issue. There does currently exist a Babel specific customization group, the nesting is orgbabel. Through this interface there are menus like the one you mention below available. One way to access these menus is through the help interface, with M-x describe-variable RET org-babel-load-languages RET and then select the customize link. Agreed on this point, but I am with FengShu regarding a babel menu. I likely would not use it that often (I know the shortcuts relevant to me right now), but 1) it would advertise the babel functionality a little bit more if it is shown in the org menu 2) for a beginner, it would be much easier to use org-babel if commands like execute source block or section, tangle, un-tangle, ... would be in the menu. So I would see it as a useful way of promoting babel (and therefore org-mode) and also as a nice reminder of less frequently (but nevertheless usefull) functionality. I've had (setq menu-bar-mode nil) in my .emacs for years now and forget that Emacs even has support for menus. I don't know anything about how Emacs implements menus, but if anyone is interested in taking on this development I'm very happy to consult in the development of and to apply contributed patches which add Babel menu support. Best, Cheers, Rainer Best, FengShu tuma...@gmail.com writes: Hi: Could we add some org-babel menu items ,so using them we can enable and disable the computer languages ? for example: #+begin_example org = org-babel = * emacs-lisp sh * R ... * screen #+end_example -- Eric Schulte http://cs.unm.edu/~eschulte/