[O] Beamer export: Are handout notes possible?
Hi all, I'm a big fan of the LaTeX beamer export. However, now I've hit a problem that I don't know how to solve. In plain LaTeX beamer, every text I write between \begin{frame} ... \end{frame} is of course not in a frame but will be there if I compile the tex file in beamer's handout mode. That's very convenient for putting notes there that you want to mention only in the "audio track" of a presentation. Because the frames are written as org outlines, there's no explicit \end{frame}, but everything up to the next outline is put into a frame. Is there still some way to what I want? Bye, Tassilo
[O] Bug: org-table latex export does not honour alignment [7.5]
When exporting a file to latex, the alignment of tables within that file specified via the in-table , or fields are not honoured. For example: |-+--+--+--+--| |-+--+--+--+--| | long header | header a | header b | header c | header d | |-+--+--+--+--| | | | | | | | 1 | 2|3 |4 |5 | | 6 | 7|8 |9 | 10 | | / | >| | | | should have the first two columns left-aligned and the last three right aligned. The vertical line in the table above is present. This also is the case when forcing a table environment via #+CAPTION. The table above generates the tabular command: \begin{tabular}{rr|rrr} Where it should generate: \begin{tabular}{ll|rrr} Interestingly, when doing a M-x org-table-export The alignment is find, but the vertical line is present. Also, it appears that ASCII also does not honour the alignment but HTML export does (including the ). Thanks, -Arik Emacs : GNU Emacs 23.3.1 (x86_64-apple-darwin10.5.0, GTK+ Version 2.18.9) of 2011-06-07 on nobunaga.local Package: Org-mode version 7.5 current state: == (setq org-log-done t org-export-latex-default-class "simple" org-file-apps '((auto-mode . emacs) ("\\.mm\\'" . default) ("\\.x?html'" . system) ("pdf" . system)) org-export-with-LaTeX-fragments 'dvipng org-export-latex-after-initial-vars-hook '(org-beamer-after-initial-vars) org-hide-block-startup t org-speed-command-hook '(org-speed-command-default-hook org-babel-speed-command-hook) org-agenda-custom-commands '(("l" "Reading list" tags-todo "L/TODO" nil) ("t" "todo items" tags-todo "-L-P/TODO" nil) ("p" "Project todo items" tags "P/TODO" nil) ("A" "All APPTs" todo "APPT" nil) ("i" "INIT items" todo "INIT" nil)) org-agenda-files '("~/org/") org-agenda-tags-column 95 org-babel-load-languages '((emacs-lisp . t) (python . t) (ditaa \.t) (R . t) (sh . t)) org-clock-into-drawer t org-metaup-hook '(org-babel-load-in-session-maybe) org-capture-templates '(("l" "add to reading list" entry (file+headline "~/org/main.org" "Reading list") "* TODO READ: [[%^{Article URL}]] :L:" :immediate-finish t) ("a" "appointment" entry (file+headline "~/org/main.org" "TASKS") "* APPT %^{Task description} %^g\n %^t\n Location: %^{Location}" :immediate-finish t) ("r" "reminder (no time)" entry (file+headline "~/org/main.org" "TASKS") "* TODO %^{Task description}" :immediate-finish t) ("n" "README note" entry (function awm-org-capture-get-readme-note) "* %U\n %?")) org-after-todo-state-change-hook '(org-clock-out-if-current awm-org-agenda-to-appt-activate) org-babel-tangle-lang-exts '(("python" . "py") ("emacs-lisp" . "el")) org-capture-after-finalize-hook '(awm-org-agenda-to-appt-activate) org-export-blocks-postblock-hook '(org-exp-res/src-name-cleanup) org-export-html-postamble t org-export-html-style "" org-export-latex-format-toc-function 'org-export-latex-format-toc-default org-latex-to-pdf-process '("latex -interaction nonstopmode -output-directory %o %f" "bibtex %b" "latex -interaction nonstopmode -output-directory %o %f" "latex -interaction nonstopmode -output-directory %o %f" "dvipdf %b.dvi" "rm %b.bbl %b.blg %b.tex %b.dvi") org-tab-first-hook '(org-hide-block-toggle-maybe org-src-native-tab-command-maybe org-babel-hide-result-toggle-maybe) org-src-mode-hook '(org-src-babel-configure-edit-buffer org-src-mode-configure-edit-buffer) org-confirm-shell-link-function 'yes-or-no-p org-export-first-hook '(org-beamer-initialize-open-trackers) org-export-with-toc nil org-highlight-sparse-tree-matches nil org-todo-keywords '((sequence "TODO(t)" "APPT(a)" "WAIT(w@)" "PROJ(p)" "INIT(i!)" "|" "DONE(d)" "CNCL(c@)")) org-agenda-before-write-hook '(org-agenda-add-entry-text) org-export-html-postamble-format '(("en" "Author: %a\nDate: %d")) org-n-level-faces 4 org-babel-pre-tangle-hook '(save-buffer) org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers org-cycle-show-empty-lines org-optimize-window-after-visibility-change) org-export-latex-classes '(("article" "\\documentclass[11pt]{article}" ("\\section{%s}" . "\\section*{%s}") ("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}") ("\\paragraph{%s}" . "\\paragraph*{%s}") ("\\subparagraph{%s}" . "\\subparagraph*{%s}")) ("report" "\\documentclass[11pt]{report}" ("\\part{%s}" . "\\part*{%s}") ("\\chapter{%s}" . "\\chapter*{%s}") ("\\section{%s}" . "\\section*{%s}") ("\\subsection{%s}" . "\\subsecti
Re: [O] Non-leading commas removed from src blocks
On Tue, Sep 6, 2011 at 9:00 PM, Eric Schulte wrote: > Hsiu-Khuern Tang writes: > >> Hi Eric, >> >> I think your commit 20044297 caused non-leading commas to be removed >> from src blocks. Example: >> ... >> My original email about this is here: >> http://article.gmane.org/gmane.emacs.orgmode/44977. >> > > Hi Hsiu-Khuern, > > Thanks for pointing out this behavior. I've just pushed up a change to > the git repository which should fix this behavior. Please let me know > if the problem persists. > > Best -- Eric I tested the latest version and it now works as I would like it to -- thanks for the change! Best, Hsiu-Khuern.
[O] Reminders with alarms
Hi there, I'm just starting to explore orgmode. I'm an experienced GTD-er (6 yrs) and have looked with interest at a few articles on using orgmode for this. The one area I can't seem to work out is how to set a reminder with an alarm and attach it to an entry. Suppose I have an entry like: ** My project *** My action 1 :home: *** My action 2 :follow up: I would like to be able to set a reminder that makes a visible (and maybe audible) alert - in say 4 hrs, 2 days, at 1530 next wednesday etc. I see that I can set schedules for when to start work, but I've been unable to get it to remind me at all. Any suggestions? S.
Re: [O] Non-leading commas removed from src blocks
Hsiu-Khuern Tang writes: > Hi Eric, > > I think your commit 20044297 caused non-leading commas to be removed > from src blocks. Example: > > = > * test > > #+begin_src r > a <- c(1 >, 2 >, 3) > #+end_src > = > > But I could be misunderstanding what "non-leading" means. > > My original email about this is here: > http://article.gmane.org/gmane.emacs.orgmode/44977. > Hi Hsiu-Khuern, Thanks for pointing out this behavior. I've just pushed up a change to the git repository which should fix this behavior. Please let me know if the problem persists. Best -- Eric > > Thanks! > > Hsiu-Khuern. -- Eric Schulte http://cs.unm.edu/~eschulte/
Re: [O] Date-centric Clocktable
Rasmus writes: > Bernt Hansen writes: > >> Rasmus writes: >> >>> Hi, >>> >>> Is is possible to have a clocktabke with times in the left-most column? >>> The people I am doing some work for now prefer it that way for unknown >>> reasons. >>> >>> This is an example >>> >>> | date | Headline| total | >>> |+-+---| >>> | [2011-08-19 Fri 00:28]--[2011-08-19 Fri 00:51] | Writing mails | 0:23 | >>> | [2011-06-22 Wed 17:00]--[2011-06-22 Wed 17:45] | Data processing | 0:45 | >>> >>> And so forth. >> >> Hi Rasmus, >> >> I'm not aware of any way to automatically get the clock report in that >> format using existing org-mode functions but you can just manually move >> the column before you publish it to whomever wants it in column 1. Just >> put point in the total column and M- to shift the column >> where you want it. > > Well, this would require me to collect some 40 logbook entries myself > and associate them with a headline. What I need is a summary showing > what I did when. In other words, the default clock table summarizes too > much. > > It might be easier to process the file with some other tool and extract > logbook entries with a regexp. Are there any specialized > Org/Emacs-command I could use for generating a custom clock table? Hi Rasmus, Sorry I think I totally missed your point earlier - I thought all you wanted was to move the total column, not get time detail in column 1. As Carsten mentioned, the agenda view with logging enabled (and appropriate tag filters) may get you closer to what you are looking for. I use a combination of that and C-u R in the daily / weekly agenda to get a summary of clock detail lines. Regards, Bernt
[O] Non-leading commas removed from src blocks
Hi Eric, I think your commit 20044297 caused non-leading commas to be removed from src blocks. Example: = * test #+begin_src r a <- c(1 , 2 , 3) #+end_src = But I could be misunderstanding what "non-leading" means. My original email about this is here: http://article.gmane.org/gmane.emacs.orgmode/44977. Thanks! Hsiu-Khuern.
Re: [O] Filtering in export hooks
Hi Carsten, On Tue, Sep 6, 2011 at 11:49 AM, Carsten Dominik wrote: > > Which of the preprocessing hooks are you using? I am still confused > by your description, maybe you can make a small example and show > exactly what works and what does not work? I finally managed to isolate the issue and construct a working example. To replicate, in a minimal session evaluating the code blocks in the attached org file should be sufficient. The issue is described in the org file. Thanks a lot, -- Suvayu Open source is the future. It sets us free. #+OPTIONS: H:4 num:nil toc:t \n:nil @:nil ::t |:t ^:t -:t f:t *:t <:nil #+OPTIONS: TeX:t LaTeX:t skip:nil d:nil todo:t pri:nil tags:nil #+LaTeX_HEADER: \usepackage[backgroundcolor=green!40]{todonotes} #+LaTeX_HEADER: \usepackage{makerobust} #+LaTeX_HEADER: \MakeRobustCommand\begin #+LaTeX_HEADER: \MakeRobustCommand\end #+LaTeX_HEADER: \MakeRobustCommand\item * COMMENT Setup The following code is supposed to wrap the headlines matched by the tags search "QnA|Qn" with a =\todo[inline]{..}= Latex macro. I am using the tags to determine the colour of the todo block. ** Case 1 This gets exported for all values of the =tags:= option. But markup like /italics/, *bold* or +strikethrough+ are not translated to Latex. Links are also not translated properly. #+begin_src emacs-lisp ;; org export hooks (defun my-org-export-latex-wrap-todo () "Wrap heading with arbitrary latex environment." (interactive) (let* ((tags (org-get-tags-string)) (heading (org-get-heading t)) ; heading with todo (content (org-get-entry)) (color (cond ((string-match ":QnA:" tags) "color=blue!40") ((string-match ":Qn:" tags) "color=yellow!40" (when color (org-mark-subtree) (delete-region (region-beginning) (region-end)) (insert (concat (format "\\todo[inline,%s]{\\textbf{%s}\\protect\\linebreak{}%%\n" color heading) (format "%s\n}%%\n" content)) ;; FIXME: doesn't export markup like /italics/ or *bold* and links properly (add-hook 'org-export-preprocess-hook (lambda () (let ((match "QnA|Qn")) (org-map-entries (lambda () (my-org-export-latex-wrap-todo)) match #+end_src ** Case 2 The wrapping fails when the tags option is =tags:nil= but everything gets translated to Latex properly. However when the =tags:= option is non-nil, the wrapping works but the latex translation fails. #+begin_src emacs-lisp ;; org export hooks (defun my-org-export-latex-wrap-todo () "Wrap heading with arbitrary latex environment." (interactive) (let* ((tags (org-get-tags-string)) (heading (org-get-heading t)) ; heading with todo (content (org-get-entry)) (color (cond ((string-match ":QnA:" tags) "color=blue!40") ((string-match ":Qn:" tags) "color=yellow!40" (when color (org-mark-subtree) (delete-region (region-beginning) (region-end)) (insert (concat (format "\\todo[inline,%s]{\\textbf{%s}\\protect\\linebreak{}%%\n" color heading) (format "%s\n}%%\n" content)) ;; FIXME: doesn't work with tags:nil (add-hook 'org-export-preprocess-after-blockquote-hook (lambda () (let ((match "QnA|Qn")) (org-map-entries (lambda () (my-org-export-latex-wrap-todo)) match #+end_src * Bs⁰ decay ** Regular tree Some text 1. maybe a list 2. with 2 items and some *bold text* ** Decay model :Qn: 1. Justify neglecting CP violation - in decay for the DsK channel - in Bs mixing for both DsK and Dsπ channels 3. Verify master equations ** Mass hypothesis :QnA: 1. Why do we need mass hypothesis? - /Energy resolution/ of the *HCAL* is not good. - +General purpose experiments don't care about jet constituents+. 2. Some link to [[*Regular%20tree][Regular tree]] that fails to export properly.
Re: [O] Date-centric Clocktable
On 6.9.2011, at 23:36, Rasmus wrote: > Bernt Hansen writes: > >> Rasmus writes: >> >>> Hi, >>> >>> Is is possible to have a clocktabke with times in the left-most column? >>> The people I am doing some work for now prefer it that way for unknown >>> reasons. >>> >>> This is an example >>> >>> | date | Headline| total | >>> |+-+---| >>> | [2011-08-19 Fri 00:28]--[2011-08-19 Fri 00:51] | Writing mails | 0:23 | >>> | [2011-06-22 Wed 17:00]--[2011-06-22 Wed 17:45] | Data processing | 0:45 | >>> >>> And so forth. >> >> Hi Rasmus, >> >> I'm not aware of any way to automatically get the clock report in that >> format using existing org-mode functions but you can just manually move >> the column before you publish it to whomever wants it in column 1. Just >> put point in the total column and M- to shift the column >> where you want it. > > Well, this would require me to collect some 40 logbook entries myself > and associate them with a headline. What I need is a summary showing > what I did when. In other words, the default clock table summarizes too > much. > > It might be easier to process the file with some other tool and extract > logbook entries with a regexp. Are there any specialized > Org/Emacs-command I could use for generating a custom clock table? Have you tried log mode in the agenda: Make an agenda for the time intervar you are interested in, day week month, or so. Then press `C-u C-u v L'. Maybe you can work from there? - Carsten
Re: [O] Date-centric Clocktable
Bernt Hansen writes: > Rasmus writes: > >> Hi, >> >> Is is possible to have a clocktabke with times in the left-most column? >> The people I am doing some work for now prefer it that way for unknown >> reasons. >> >> This is an example >> >> | date | Headline| total | >> |+-+---| >> | [2011-08-19 Fri 00:28]--[2011-08-19 Fri 00:51] | Writing mails | 0:23 | >> | [2011-06-22 Wed 17:00]--[2011-06-22 Wed 17:45] | Data processing | 0:45 | >> >> And so forth. > > Hi Rasmus, > > I'm not aware of any way to automatically get the clock report in that > format using existing org-mode functions but you can just manually move > the column before you publish it to whomever wants it in column 1. Just > put point in the total column and M- to shift the column > where you want it. Well, this would require me to collect some 40 logbook entries myself and associate them with a headline. What I need is a summary showing what I did when. In other words, the default clock table summarizes too much. It might be easier to process the file with some other tool and extract logbook entries with a regexp. Are there any specialized Org/Emacs-command I could use for generating a custom clock table? –Rasmus -- Sent from my Emacs
Re: [O] wrong python version with :session
Just ignore this thread, the issue was dealt with in an identical one, also started by me! >> On Mon, 05 Sep 2011 17:00:13 +0100, Myles English said: > Hello, When a python source block has a :session header argument, > the python version selected does not appear to respect the value of > the variable org-babel-python-command. > In my .emacs: > (require 'org-install) > (org-babel-do-load-languages 'org-babel-load-languages '((python > . t) )) > (setq org-babel-python-command "python2") > In my org file: > #+begin_src python :results output import sys print(sys.version) > #+end_src > #+results: : 2.7.2 (default, Jun 29 2011, 11:10:00) : [GCC 4.6.1] > Now exactly the same but with ":session x" header argument: > #+begin_src python :results output :session x import sys > print(sys.version) #+end_src > #+results: : : 3.2.1 (default, Jul 11 2011, 12:37:47) : [GCC 4.6.1] > So babel has chosen to use Python 3.2 When I wanted to use Python > 2.7, as in the first block, and the value of > org-babel-python-command is still "python2". > Versions: > orgmode commit cae9f947be (Aug 30th) GNU Emacs 23.3.1 > (x86_64-unknown-linux-gnu, GTK+ Version 2.22.1) of 2011-03-10 on > bitzer.hoetzel.info > $ ls -l `which python{2,3,}` /usr/bin/python -> python3 > /usr/bin/python2 -> python2.7 /usr/bin/python3 > Am I doing something wrong or is this a bug? > Thanks, > Myles > -- The University of Edinburgh is a charitable body, registered in > Scotland, with registration number SC005336.
Re: [O] [babel] Silent output in Org, but verbose export
"Sebastien Vauban" writes: > Hi Eric, > > Currently, the following does not seem possible: > > #+begin_src sh :results silent :exports results > echo "I want to see this in HTML/PDF, but not in Org" > #+end_src > > Is there a way to do so? That is: > - have no results inserted in the Org file > - well inserted when exporting the Org file > > Best regards, > Seb Hi Seb, While this functionality isn't explicitly built into Org-mode the following should work... #+begin_src sh :results (if org-current-export-file "replace" "silent") :exports both echo "I want to see this in HTML/PDF, but not in Org" #+end_src Best -- Eric -- Eric Schulte http://cs.unm.edu/~eschulte/
Re: [O] [babel] Collection of code block snippets
Hi Martyn, Martyn Jago writes: > Hi > > Rainer M Krug writes: > > [...] > >> >>> >>> > And if this could be done by the user to test .emacs configuration >>> > settings, that would be really great. >>> > >>> >>> That's a good idea. Simply running the Org-mode test suite is a good >>> way for users to test the sanity of their local config. >>> >> >> Yes - I have a few times run into problems due to my configuration file and >> only realized it later - if there would be ab org file which I could use to >> test easily my configuration directly after making the changes, life would >> have been much easier for me. This would also be useful for questions on the >> mailing list and for a kind of "quality control" for published configs on >> the web. > > In terms of running all the tests in 'batch mode' i.e. loading no > personal configuration files (for development purposes), I have put > together a small 'test-init.el' file to do that. > I just made three small changes to the testing framework so it is now possible to run the test suite in batch mode with the following. emacs -Q --batch -l path/to/org/testing/org-test.el --eval "(setq org-confirm-babel-evaluate nil)" -f org-test-run-all-tests Best -- Eric -- Eric Schulte http://cs.unm.edu/~eschulte/
Re: [O] [bug] [odt] OpenDocument Text export produces corrupted files
Hello Anton Thanks for reporting this problem and suggesting a workaround/solution. Can tey some alternative solutions than the one suggested in the stackoverflow thread. Please read on. > Hello! > > Org-mode produces corrupted ODT files (date format does not pass the > validation). Details and patch: With the development version this is what I see in my "meta.xml". , | 2011-09-06T20:23:59+05:30 ` and I have confirmed that there are no errors reported by the Emacs's rng or online validators. > stackoverflow dot > com/questions/7299979/org-modes-odt-export-produces-corrupted-files/7304042 > With kindahero's hint the reason was found (odt validator): > , > | upload:///test.odt/meta.xml[13,42]:Error:"2011-09-04T16:30:23%:z" does > | not satisfy the "dateTime" type > ` > %:z is a typo in defun org-odt-format-date that produces wrong meta.xml. Atleast on my machine, I don't see %:z reproduced verbatim in the ouptut. I stole the "%:z" from the below thread in emacs-devel. http://lists.gnu.org/archive/html/emacs-devel/2009-08/msg00262.html There is a mention that "%:z" is a "GNU extension". It looks like it is a portability issue. May I know what OS and what distribution of Emacs you are using? > Anyway, ODT standard requires another dateFormat: > 2011-09-04T16:30:23.12, i.e. including milliseconds and excluding > timezone offset. Well, actually the milliseconds portion is optional and timezone offset is definitely permitted. This is what 1.1 spec says , | 3.1.9 Creation Date and Time | | The element specifies the date and time when the | document was created initially. | | To conform with [xmlschema-2], the date and time format is | -MM-DDThh:mm:ss. | | 3.1.10 Modification Date and Time | | The element specifies the date and time when the document was | last modified. | | To conform with [xmlschema-2], the date and time format is -MM-DDThh:mm:ss. | | The name of this element was chosen for compatibility with the Dublin | Core. ` , http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/#dateTime | | 3.2.7.1 Lexical representation | | The ·lexical space· of dateTime consists of finite-length sequences of | characters of the form: | '-'? '-' mm '-' dd 'T' hh ':' mm ':' ss ('.' s+)? (zz)?, where | [snip] | | '.' s+ (if present) represents the fractional seconds; | zz (if present) represents the timezone (as described below). | ` > The following patch can be applied: > ...\org\contrib\lisp\org-odt.el, line 1576 (may differ), inside defun > org-odt-format-date (date): > (format-time-string "%Y-%m-%dT%T%:z") > Replace with: > (format-time-string "%Y-%m-%dT%T.00") I am able to see valid meta.xml with this change. But ... > Well, we've lost milliseconds (they aren't documented in > format-time-string) but passed the validation. Well if it is not documented then relying on it may not be a good idea. For example, I went with "%;z" which worked for me (and may be other users who are on GNU systems) but was broken for you. Does replacing (format-time-string "%Y-%m-%dT%T%:z") with (let ((stamp (format-time-string "%Y-%m-%dT%H:%M:%S%z"))) ;; no %z here (format "%s:%s" (substring stamp 0 -2) (substring stamp -2))) work for you. This is suggestion is from http://lists.gnu.org/archive/html/emacs-devel/2009-08/msg00257.html Or Does replacing (format-time-string "%Y-%m-%dT%T%:z") with (format-time-string "%Y-%m-%dT%T") ;; no %:z here produce valid documents for you. > Word will still be unhappy with a new file, but after the online > validation and validation within Emacs, that's Word's problem. :-). Well, I have no access to Word. ps: Org permits #+DATE: declaration to contain either a user-provided date string or a format specifier. The use of these options is not recommended at (this point in time). For better portability, it is better that #+DATE is not-specified at all or if it is specified, the user has to be aware of the notes made above. There is a warning message that org-odt.el emits if user forces a date string. I am not sure how best this warning has attracted attention to itself. Jambunathan K. > Regards, > Anton > > --
Re: [O] orgmode 7.7 broke latex beamer export
Hi Bernt, On Tue, Sep 6, 2011 at 6:09 PM, Bernt Hansen wrote: > Hi suvayu, > > pdflatex -interaction=nonstopmode > ^ > maybe? > I think the '=' sign is optional (which is often the case for most *nix utilities). In any case the OP responded later that upgrading resolved the original issue. Probably the issue was some stale byte-compiled file. :-/ > -Bernt Cheers, -- Suvayu Open source is the future. It sets us free.
Re: [O] Bug: agenda generation failed if there is a blank title with a timestamp [7.7]
Nicolas Goaziou writes: > Hello, > > Meng Wu writes: > >> if the agenda file contains the following title, >> >> >> <2011-08-30 Tue 11:26> >> >> >> which has blank title and a timestamp, then the C-c a a will fail with >> message like this: >> >> org-agenda-highlight-todo: Args out of range: #(" newgtd: " 0 14 (org-= >> category "newgtd" tags nil org-highest-priority 65 org-lowest-priority 67 t= >> ime-of-day nil ...)), 27, 31 >> >> >> if the title is not blank, then everything is alright. > > As far as I know, blank headlines are not officially supported. You have > to write something which isn't a space on that headline. It still shouldn't break the agenda... You're probably dead in the water until you find and fix this heading line (ie. you can't display any agendas) I can't reproduce this with my version of org-mode Org-mode version 7.7 (release_7.7.205.gce02a) so maybe it's already fixed? -Bernt
Re: [O] [PATCH] Small fix for contrib/lisp/org-elisp-symbol.el
David Maus writes: > Attached patch fixes a small issue with > contrib/lisp/org-elisp-symbol.el, a contributed package that defines a > link type for elisp symbols. Applied, thanks! -- Bastien
Re: [O] orgmode 7.7 broke latex beamer export
suvayu ali writes: > Hi Aaron, > > On Fri, Sep 2, 2011 at 2:01 PM, Aaron Hammitt wrote: >> After some poking around I found that the default value of >> org-latex-to-pdf-process was the problem. Placing the following in my .emacs >> fixed the problem: >> >> (setq org-latex-to-pdf-process >> '("pdflatex -interaction=nonstopmode %f" "pdflatex >> -interaction=nonstopmode %f")) >> > > How is that different from the default? Hi suvayu, pdflatex -interaction=nonstopmode ^ maybe? -Bernt > > ("pdflatex -interaction nonstopmode -output-directory %o %f" > "pdflatex -interaction nonstopmode -output-directory %o %f" > "pdflatex -interaction nonstopmode -output-directory %o %f")
Re: [O] Google Tasks integration
On 9/3/11 Sep 3 -12:44 PM, Sven Bretfeld wrote: > Hi Brad > > I don't know anything about your question proper, but ... > > Brad Collette writes: > >> I've also been using mobileorg to get my stuff on my iphone. However, I'm >> less >> satisfied with that. Having to both push and pull from both ends to keep >> things >> in sync is a pain and I often forget. > > This is absolutely automatized on my system. I don't have to do anything > except keep the computer running. As an Android user I don't know if > MobileOrg on iPhone can sync automatically, the Android app can. I have > configured it to sync every 30 min. on my phone and pad. My computer > runs a cronjob every 20 minutes that pulls and pushes. Here is the > script that does the job: > > #!/bin/bash > > emacs --batch --load ~/.emacs --eval "(gtd)" --eval "(org-mobile-pull)" > --eval "(org-save-all-org-buffers)" --eval "(org-mobile-push)" > > If you are on Linux or Mac the script should work as a cronjob. I don't > know about Windows. > Could you amplify a little on how this works? I believe that org-mobile-push is a side-effecting operation (among other things it adds ID properties). So how can you run this cron job all the time? Doesn't it interact badly with running your own interactive emacs job? thanks, r
[O] [babel] Silent output in Org, but verbose export
Hi Eric, Currently, the following does not seem possible: #+begin_src sh :results silent :exports results echo "I want to see this in HTML/PDF, but not in Org" #+end_src Is there a way to do so? That is: - have no results inserted in the Org file - well inserted when exporting the Org file Best regards, Seb -- Sebastien Vauban
Re: [O] [babel] Collection of code block snippets
Hi Rainer M Krug writes: [...] > >> >> > And if this could be done by the user to test .emacs configuration >> > settings, that would be really great. >> > >> >> That's a good idea. Simply running the Org-mode test suite is a good >> way for users to test the sanity of their local config. >> > > Yes - I have a few times run into problems due to my configuration file and > only realized it later - if there would be ab org file which I could use to > test easily my configuration directly after making the changes, life would > have been much easier for me. This would also be useful for questions on the > mailing list and for a kind of "quality control" for published configs on > the web. In terms of running all the tests in 'batch mode' i.e. loading no personal configuration files (for development purposes), I have put together a small 'test-init.el' file to do that. The emacs command is: --8<---cut here---start->8--- $ /path/to/emacs/Emacs -batch -l /path/to/org/testing/test-init.el --8<---cut here---end--->8--- The test-init.el file should be in the testing directory which should also be the local directory. Below are the test-init.el file and the generated results. All tests are currently passing. Regards Martyn test-init.el Description: test-init.el Loading vc-git... 21 src blocks added to Library of Babel Loading /Users/martyn/org-mode/testing/lisp/test-org.el (source)... Loading /Users/martyn/org-mode/testing/lisp/test-org-table.el (source)... Loading /Users/martyn/org-mode/testing/lisp/test-org-html.el (source)... Loading /Users/martyn/org-mode/testing/lisp/test-ob.el (source)... Loading /Users/martyn/org-mode/testing/lisp/test-ob-tangle.el (source)... Loading /Users/martyn/org-mode/testing/lisp/test-ob-table.el (source)... Loading /Users/martyn/org-mode/testing/lisp/test-ob-sh.el (source)... Loading /Users/martyn/org-mode/testing/lisp/test-ob-lob.el (source)... Loading /Users/martyn/org-mode/testing/lisp/test-ob-lilypond.el (source)... Loading /Users/martyn/org-mode/testing/lisp/test-ob-fortran.el (source)... Loading /Users/martyn/org-mode/testing/lisp/test-ob-exp.el (source)... Loading /Users/martyn/org-mode/testing/lisp/test-ob-awk.el (source)... - Test start -- GNU Emacs 24.0.50.1 (x86_64-apple-darwin, NS apple-appkit-1038.35) of 2011-08-21 on virtualmac.porkrind.org Org-mode version 7.7 (release_7.7.246.g3dac.dirty) Running 101 tests (2011-09-06 16:10:49+0100) OVERVIEW executing Awk code block... executing Awk source code block "42" passed1/101 ob-awk/input-none executing Awk code block (genfile)... executing Awk source code block "150" passed2/101 ob-awk/input-src-block passed3/101 ob-fortran/assert OVERVIEW executing Fortran code block... "word" passed4/101 ob-fortran/character-var executing Fortran code block... "23" passed5/101 ob-fortran/command-arguments executing Fortran code block (fortran_parameter)... "10" passed6/101 ob-fortran/fortran-var-program executing Fortran code block... "15" passed7/101 ob-fortran/input-var executing Fortran code block... "1.00 2.00 3.00" passed8/101 ob-fortran/list-var executing Fortran code block... "1.00 2.00" passed9/101 ob-fortran/list-var-from-table executing Fortran code block... passed 10/101 ob-fortran/no-variables-with-main executing Fortran code block... "42" passed 11/101 ob-fortran/preprosessor-var executing Fortran code block (hello)... "Hello world" passed 12/101 ob-fortran/simple-program passed 13/101 ob-lilypond/assert passed 14/101 ob-lilypond/check-lilypond-alias passed 15/101 ob-lilypond/feature-provision passed 16/101 ob-lilypond/ly-OSX-ly-path passed 17/101 ob-lilypond/ly-OSX-midi-path passed 18/101 ob-lilypond/ly-OSX-pdf-path passed 19/101 ob-lilypond/ly-arrange-mode Saving file /Users/martyn/org-mode/testing/examples/ob-lilypond-test.pdf... Wrote /Users/martyn/org-mode/testing/examples/ob-lilypond-test.pdf No pdf file generated so can't display! passed 20/101 ob-lilypond/ly-attempt-to-open-pdf Saving file /Users/martyn/org-mode/testing/examples/ob-lilypond-test.midi... Wrote /Users/martyn/org-mode/testing/examples/ob-lilypond-test.midi No midi file generated so can't play! passed 21/101 ob-lilypond/ly-attempt-to-play-midi passed 22/101 ob-lilypond/ly-check-for-compile-error Compiling LilyPond... passed 23/101 ob-lilypond/ly-compile-lilyfile passed 24/101 ob-lilypond/ly-compile-post-tangle passed 25/101 ob-lilypond/ly-determine-ly-path passed 26/101 ob-lilypond/ly-determine-midi-path passed 27/101 ob-lilypond/ly-determine-pdf-path passed 28/101 ob-lilypond/ly-display-pdf-post-tangle passed 29/101 ob-lilypond/ly-gen-html passed 30/101 ob-lilypond/ly-gen-png passed 31/101 ob-lilypond/ly-
Re: [O] Org-babel and LaTeX letter
Hi Ben, It looks to me like you need to install the wrapfig.sty LaTeX file locally. I'm not sure how this would be done on OSX, but as a quick test you could just find a copy of wrapfig.sty online and copy it to the directory holding your .org file. Best -- Eric Ben Alexander writes: > Hello orgmode and latex users! > > I'm trying to use a latex to write a letter, and I'm using an org > babel block to hold the original source. I've whittled down my latex > code to one word and it still isn't working for me. I've included the > code block and the pdflatex output buffer. I notice that the default > style is 'article'. Is there some way to remove the article style and > use a letter instead? > > The funny thing is, if I run pdflatex from the command line, it works > fine. Though it doesn't have as many lines of diagnostic output. I > think the wrapping code for babel execution of latex code is the > issue. I'd be happy to install more tex files. I use MacPorts to > maintain my system; perhaps I am missing a tex package that is needed? > > Any pointers would be helpful. > > -Ben > > ORG file > * trial of latex > #+begin_src latex :file letter.pdf > Hello > #+end_src > > BUFFER *Org PDF LaTeX Output* shows the following (first and last few > lines only) > > This is pdfTeX, Version 3.1415926-2.3-1.40.12 (TeX Live 2011/MacPorts > 2011_1) > restricted \write18 enabled. > entering extended mode > > (/var/folders/pC/pCO-RjsoEHGUcvQ-+Z3F2U+++TI/-Tmp-/babel-58334TCg/ > latex-58334gM > m.tex > LaTeX2e <2009/09/24> > Babel and hyphenation patterns for english, dumylang, > nohyphenation, lo > aded. > (/opt/local/share/texmf-texlive-dist/tex/latex/base/article.cls > Document Class: article 2007/10/19 v1.4h Standard LaTeX document class > > .lines of output omitted.. > > ! LaTeX Error: File `wrapfig.sty' not found. > > Type X to quit or to proceed, > or enter new name. (Default extension: sty) > > Enter file name: > ! Emergency stop. > > > l.13 \usepackage > {soul}^^M > ! ==> Fatal error occurred, no output PDF file produced! > Transcript written on /var/folders/pC/pCO-RjsoEHGUcvQ-+Z3F2U+++TI/- > Tmp-/babel-5 > 8334TCg//latex-58334gMm.log. > > Xander$ port list installed and texlive* > texlive-basic @23152 tex/texlive-basic > texlive-basic @23152 tex/texlive-basic > texlive-bin@2011 tex/texlive-bin > texlive-bin@2011 tex/texlive-bin > texlive-common @2011 tex/texlive-common > texlive-common @2011 tex/texlive-common > texlive-documentation-base @23160 tex/texlive- > documentation-base > texlive-documentation-base @23160 tex/texlive- > documentation-base > texlive-generic-recommended@23088 tex/texlive-generic- > recommended > texlive-generic-recommended@23088 tex/texlive-generic- > recommended > texlive-latex @23089 tex/texlive-latex > texlive-latex @23089 tex/texlive-latex > texlive-latex-recommended @23089 tex/texlive-latex- > recommended > texlive-latex3 @19447 tex/texlive-latex3 > texlive-xetex @23080 tex/texlive-xetex > > -- Eric Schulte http://cs.unm.edu/~eschulte/
Re: [O] [PATCH] Fixes to inline src block execution
Hi Martyn, Martyn Jago writes: > Eric Schulte writes: > > Hi Eric > >> Martyn Jago writes: >> >>> Hi >>> >>> Some fixes to inline src block execution via org-ctrl-c-ctrl-c >>> where point is beyond white-space in the inline src block body... >>> >>> * Start Pomodoro >>> src_emacs-lisp[:results silent]{( org-timer-set-timer 25 )} > > [...] > >> This looks great. I would like to apply this patch but it breaks unit >> tests at least one of which existed previously and was passing. Would >> you mind taking a look at these unit tests to see if your patch breaks >> existing behavior? > > Yes my bad - even my supplied tests failed (it was very late). I've fixed > my code and fixed a failing test due to a previous regression. > > All tests now pass here on Mac OSX > Confirmed, everything is passing for me as well on Ubuntu. Thanks for the contribution and thanks for the unit tests. These patches have now been applied. Cheers -- Eric > > [...] > > Regards > > Martyn > > From 3dacd351550ec691beb49c1560ce247033711a76 Mon Sep 17 00:00:00 2001 > From: Martyn Jago > Date: Tue, 6 Sep 2011 09:00:24 +0100 > Subject: [PATCH] Inline source block and test fixes > * lisp/ob.el: Fixed late night refactoring error > * testing/examples/babel.org: whitespace > * testing/lisp/test-ob.el: > Fixed test-org-babel/inline-src-block-regexp (regression error) > Renamed test-org-babel/parse-header-args2 since duplicate test heading > Made test-org-babel/parse-header-args less brittle > > --- > lisp/ob.el |8 +++--- > testing/examples/babel.org |1 + > testing/lisp/test-ob.el| 45 ++- > 3 files changed, 28 insertions(+), 26 deletions(-) > > diff --git a/lisp/ob.el b/lisp/ob.el > index 2964f82..d6b0ba3 100644 > --- a/lisp/ob.el > +++ b/lisp/ob.el > @@ -166,11 +166,11 @@ Returns non-nil if match-data set" > (beginning-of-line 1) > (string= "src" (thing-at-point 'word > (first-line-p (= 1 (line-number-at-pos))) > - (orig (point))) > -(let ((search-for (cond (src-at-0-p "src_") > - (first-line-p " src_") > + (orig (point))) > +(let ((search-for (cond ((and src-at-0-p first-line-p "src_")) > + (first-line-p "[ \t]src_") > (t "[ \f\t\n\r\v]src_"))) > - (lower-limit (if (= 1 (line-number-at-pos)) > + (lower-limit (if first-line-p > nil >(- (point-at-bol) 1 >(save-excursion > diff --git a/testing/examples/babel.org b/testing/examples/babel.org > index f85e1f0..5b7f2ef 100644 > --- a/testing/examples/babel.org > +++ b/testing/examples/babel.org > @@ -279,6 +279,7 @@ this is simple > :ID: d4faa7b3-072b-4dcf-813c-dd7141c633f3 > :END: > has length 14 > + > * org-babel-get-inline-src-block-matches >:PROPERTIES: >:results: silent > diff --git a/testing/lisp/test-ob.el b/testing/lisp/test-ob.el > index 71ea7e2..f9884dd 100644 > --- a/testing/lisp/test-ob.el > +++ b/testing/lisp/test-ob.el > @@ -108,7 +108,7 @@ > > > (ert-deftest test-org-babel/inline-src-block-regexp () > - (should(equal (concat "[^-[:alnum:]]\\(src_\\([^ \f\t\n\r\v]+\\)" > + (should(equal (concat "\\(?:^\\|[^-[:alnum:]]\\)\\(src_\\([^ > \f\t\n\r\v]+\\)" > "\\(\\|\\[\\(.*?\\)\\]\\)" > "{\\([^\f\n\r\v]+?\\)}\\)") > org-babel-inline-src-block-regexp)) > @@ -206,7 +206,7 @@ >(should(equal '(:result-type . output) (assoc :result-type params))) >(should(equal '(num . 9) (cdr (assoc :var params))) > > -(ert-deftest test-org-babel/parse-header-args () > +(ert-deftest test-org-babel/parse-header-args2 () >(org-test-at-id "2409e8ba-7b5f-4678--e48aa02d8cb4" > (should (string-match (regexp-quote "this is simple") > (org-babel-ref-resolve "simple-subtree"))) > @@ -225,26 +225,27 @@ > > (ert-deftest test-org-babel/org-babel-get-inline-src-block-matches () >(org-test-at-id "0D0983D4-DE33-400A-8A05-A225A567BC74" > -(should (fboundp 'org-babel-get-inline-src-block-matches)) > -(should (re-search-forward "src_" nil t)) ;; 1 > -(should (= 6132 (match-end 0))) > -(should (org-babel-get-inline-src-block-matches)) > -(should (re-search-forward "}" nil (point-at-bol))) ;; 1 > -(should-not (org-babel-get-inline-src-block-matches)) > -(should (re-search-forward "in" nil t)) ;; 2 > -(should-not (org-babel-get-inline-src-block-matches)) > -(should (re-search-forward "echo" nil t)) ;; 2 > -(should (org-babel-get-inline-src-block-matches)) > -(should (re-search-forward "blocks" nil t)) ;; 3 > -(left-char 8) ;; 3 > -(should (org-babel-get-inline-src-block-matches)) > -(right-char 1) ;;3 > -(should-not (org-babel-get-inline-src-block-matches)) > -(should (re-search-forward ":results" nil t)) ;; 4
Re: [O] [babel] Collection of code block snippets
Hi Rainer, > >> - exporting to some backend and checking the resulting export file >> would either leave out some results or possibly be very brittle to >> small changes (e.g., changes in the exporter backend) >> > > This might be actually be an advantage - if changes are detected, the > exported file can be evaluated visually and added to the "aceptable > results", either generally or for a user. > Makes sense. Well, this process shouldn't be difficult, you could simply export scraps.org to say scraps.html at a time when you know that your config is working (you may have to edit parts of scraps.org). You can then save the resulting scraps.html file, and in the future you can re-export scraps.org and compare the results with your reserved scraps.html using the diff utility. If you see more differences than simply the date you may have problems. > > Yes - I have a few times run into problems due to my configuration file and > only realized it later - if there would be ab org file which I could use to > test easily my configuration directly after making the changes, life would > have been much easier for me. This would also be useful for questions on the > mailing list and for a kind of "quality control" for published configs on > the web. > Is there a reason that you can't just use the existing test suite for this purpose? Running the test suite should be as simple as loading the org-test.el file in org/testing/lisp/org-test.el and then calling the `org-test-run-all-tests' function. Best -- Eric -- Eric Schulte http://cs.unm.edu/~eschulte/
[O] wrong python version with :session
Hello, When a python source block has a :session header argument, the python version selected does not appear to respect the value of the variable org-babel-python-command. In my .emacs: (require 'org-install) (org-babel-do-load-languages 'org-babel-load-languages '((python . t) )) (setq org-babel-python-command "python2") In my org file: #+begin_src python :results output import sys print(sys.version) #+end_src #+results: : 2.7.2 (default, Jun 29 2011, 11:10:00) : [GCC 4.6.1] Now exactly the same but with ":session x" header argument: #+begin_src python :results output :session x import sys print(sys.version) #+end_src #+results: : : 3.2.1 (default, Jul 11 2011, 12:37:47) : [GCC 4.6.1] So babel has chosen to use Python 3.2 When I wanted to use Python 2.7, as in the first block, and the value of org-babel-python-command is still "python2". Versions: orgmode commit cae9f947be (Aug 30th) GNU Emacs 23.3.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.22.1) of 2011-03-10 on bitzer.hoetzel.info $ ls -l `which python{2,3,}` /usr/bin/python -> python3 /usr/bin/python2 -> python2.7 /usr/bin/python3 Am I doing something wrong or is this a bug? Thanks, Myles -- The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336.
[O] Org-babel and LaTeX letter
Hello orgmode and latex users! I'm trying to use a latex to write a letter, and I'm using an org babel block to hold the original source. I've whittled down my latex code to one word and it still isn't working for me. I've included the code block and the pdflatex output buffer. I notice that the default style is 'article'. Is there some way to remove the article style and use a letter instead? The funny thing is, if I run pdflatex from the command line, it works fine. Though it doesn't have as many lines of diagnostic output. I think the wrapping code for babel execution of latex code is the issue. I'd be happy to install more tex files. I use MacPorts to maintain my system; perhaps I am missing a tex package that is needed? Any pointers would be helpful. -Ben ORG file * trial of latex #+begin_src latex :file letter.pdf Hello #+end_src BUFFER *Org PDF LaTeX Output* shows the following (first and last few lines only) This is pdfTeX, Version 3.1415926-2.3-1.40.12 (TeX Live 2011/MacPorts 2011_1) restricted \write18 enabled. entering extended mode (/var/folders/pC/pCO-RjsoEHGUcvQ-+Z3F2U+++TI/-Tmp-/babel-58334TCg/ latex-58334gM m.tex LaTeX2e <2009/09/24> Babel and hyphenation patterns for english, dumylang, nohyphenation, lo aded. (/opt/local/share/texmf-texlive-dist/tex/latex/base/article.cls Document Class: article 2007/10/19 v1.4h Standard LaTeX document class .lines of output omitted.. ! LaTeX Error: File `wrapfig.sty' not found. Type X to quit or to proceed, or enter new name. (Default extension: sty) Enter file name: ! Emergency stop. l.13 \usepackage {soul}^^M ! ==> Fatal error occurred, no output PDF file produced! Transcript written on /var/folders/pC/pCO-RjsoEHGUcvQ-+Z3F2U+++TI/- Tmp-/babel-5 8334TCg//latex-58334gMm.log. Xander$ port list installed and texlive* texlive-basic @23152 tex/texlive-basic texlive-basic @23152 tex/texlive-basic texlive-bin@2011 tex/texlive-bin texlive-bin@2011 tex/texlive-bin texlive-common @2011 tex/texlive-common texlive-common @2011 tex/texlive-common texlive-documentation-base @23160 tex/texlive- documentation-base texlive-documentation-base @23160 tex/texlive- documentation-base texlive-generic-recommended@23088 tex/texlive-generic- recommended texlive-generic-recommended@23088 tex/texlive-generic- recommended texlive-latex @23089 tex/texlive-latex texlive-latex @23089 tex/texlive-latex texlive-latex-recommended @23089 tex/texlive-latex- recommended texlive-latex3 @19447 tex/texlive-latex3 texlive-xetex @23080 tex/texlive-xetex
[O] [Bug] Corrupted odt output
Hello! Org-mode produces corrupted ODT files (date format does not pass the validation). Details and patch: http://stackoverflow.com/questions/7299979/org-modes-odt-export-produces-corrupted-files/7304042#7304042 Regards, Anton
Re: [O] Filtering in export hooks
On Tue, Sep 6, 2011 at 12:16 PM, suvayu ali wrote: > I am not using org-export-preprocess-hook > because some of the latex gets escaped during the export (e.g. {..} > becomes \{..}). > Sorry I confused this with an old issue, the problem here is org markup like /italics/ or *bold* and links don't get translated. -- Suvayu Open source is the future. It sets us free.
Re: [O] Date-centric Clocktable
Rasmus writes: > Hi, > > Is is possible to have a clocktabke with times in the left-most column? > The people I am doing some work for now prefer it that way for unknown > reasons. > > This is an example > > | date | Headline| total | > |+-+---| > | [2011-08-19 Fri 00:28]--[2011-08-19 Fri 00:51] | Writing mails | 0:23 | > | [2011-06-22 Wed 17:00]--[2011-06-22 Wed 17:45] | Data processing | 0:45 | > > And so forth. Hi Rasmus, I'm not aware of any way to automatically get the clock report in that format using existing org-mode functions but you can just manually move the column before you publish it to whomever wants it in column 1. Just put point in the total column and M- to shift the column where you want it. You can automate this table change with elisp if you're doing it often. HTH, Bernt
Re: [O] Filtering in export hooks
Hi Carsten, On Tue, Sep 6, 2011 at 11:49 AM, Carsten Dominik wrote: > Which of the preprocessing hooks are you using? I am still confused > by your description, maybe you can make a small example and show exactly what > works and what does not work? > This is what I am using at the moment: (defun my-org-export-latex-wrap-todo () "Wrap heading with arbitrary latex environment." (interactive) (let* ((tags (org-get-tags-string)) (heading (org-get-heading t)) ; heading with todo (content (org-get-entry)) (color (cond ((string-match ":QnA:" tags) "color=blue!40") ((string-match ":Qn:" tags) "color=yellow!40" (when color (org-mark-subtree) (delete-region (region-beginning) (region-end)) (insert (concat (format "\\todo[inline,%s]{\\textbf{%s}%%\n" color heading) (format "%s\n}%%\n" content)) (add-hook 'org-export-preprocess-after-blockquote-hook (lambda () (let ((match "QnA|Qn")) (org-map-entries (lambda () (my-org-export-latex-wrap-todo)) match This works great as long as the tags: option is non-nil (t or not-in-toc). Setting it to nil just ignores it and everything gets like a regular headline. I am not using org-export-preprocess-hook because some of the latex gets escaped during the export (e.g. {..} becomes \{..}). I hope this is clearer. -- Suvayu Open source is the future. It sets us free.
Re: [O] Filtering in export hooks
On Sep 6, 2011, at 11:08 AM, suvayu ali wrote: > Hi Carsten, > > On Tue, Sep 6, 2011 at 10:58 AM, Carsten Dominik > wrote: >>> >>> But this only works when tags: is non-nil. Any hints on how I could >>> achieve something that "works always"? >> >> May be I do not understand, but how about >> >> (let ((match "tag1|tag2")) >> (when match >> (org-map-entries (lambda () (my-preprocess-function)) >> match))) >> > > Sorry after going through my email again I realised it was ambiguous. > When I say it doesn't work, I don't mean Org throws an error when > tags:nil is set. The preprocessing gets skipped. Which of the preprocessing hooks are you using? I am still confused by your description, maybe you can make a small example and show exactly what works and what does not work? - Carsten > > To restate my intentions more clearly; I want to preprocess headlines > that match the tags list "tag1|tag2" during latex export irrespective > of how the tags: option is setup. If this is not possible by a tags > match, what are my alternatives? > >> - Carsten > > Thanks a lot. :) > > -- > Suvayu > > Open source is the future. It sets us free. - Carsten
Re: [O] Filtering in export hooks
Hi Carsten, On Tue, Sep 6, 2011 at 10:58 AM, Carsten Dominik wrote: >> >> But this only works when tags: is non-nil. Any hints on how I could >> achieve something that "works always"? > > May be I do not understand, but how about > > (let ((match "tag1|tag2")) > (when match > (org-map-entries (lambda () (my-preprocess-function)) > match))) > Sorry after going through my email again I realised it was ambiguous. When I say it doesn't work, I don't mean Org throws an error when tags:nil is set. The preprocessing gets skipped. To restate my intentions more clearly; I want to preprocess headlines that match the tags list "tag1|tag2" during latex export irrespective of how the tags: option is setup. If this is not possible by a tags match, what are my alternatives? > - Carsten Thanks a lot. :) -- Suvayu Open source is the future. It sets us free.
Re: [O] Filtering in export hooks
On Sep 6, 2011, at 10:49 AM, suvayu ali wrote: > Hi Orgers, > > What is the recommended way to filter/select headlines I want to > preprocess in any of the export hooks? I have tried using tags like > this: > > (let ((match "tag1|tag2")) > (org-map-entries (lambda () (my-preprocess-function)) > match)) > > But this only works when tags: is non-nil. Any hints on how I could > achieve something that "works always"? May be I do not understand, but how about (let ((match "tag1|tag2")) (when match (org-map-entries (lambda () (my-preprocess-function)) match))) - Carsten
[O] Filtering in export hooks
Hi Orgers, What is the recommended way to filter/select headlines I want to preprocess in any of the export hooks? I have tried using tags like this: (let ((match "tag1|tag2")) (org-map-entries (lambda () (my-preprocess-function)) match)) But this only works when tags: is non-nil. Any hints on how I could achieve something that "works always"? Thanks for any response. -- Suvayu Open source is the future. It sets us free.
Re: [O] [babel] Collection of code block snippets
On Mon, Sep 5, 2011 at 6:54 PM, Eric Schulte wrote: > Hi Rainer, > > > Just as a sideline: would it be possible, to use this file to test babel > (on > > a high level)?, i.e. collect all results and compare them with previous > sets > > of results? > > > > Two problems I see with running these examples in a single large block > > 1. I'm not sure how to collect all of the results, both of the two > options that occur to me > - mapping over each example and evaluating the first code block or > Probably would be the better solution, and also just skip tests for which the languages are not installed. > - exporting to some backend and checking the resulting export file > would either leave out some results or possibly be very brittle to > small changes (e.g., changes in the exporter backend) > This might be actually be an advantage - if changes are detected, the exported file can be evaluated visually and added to the "aceptable results", either generally or for a user. > > 2. executing the whole set would require a wide range of languages be > installed on the users system many of which most people would never > use > Point taken - I haven't considered that. > > > > > Especially, as this file is high-level and contains a whole range of > > "examples for the real world", I think that might be useful. It would > > definitely not be usable t pinpoint errors, but at identify unintended > side > > effects. > > I do agree that this collection holds great promise as fodder for Babel > unit tests (unit tests which are sorely needed). Each example could be > wrapped in an ert test method and then one-by-one copied over into the > Org-mode test suite. This should be a fairly easy way to greatly > increase Babel's test suite coverage -- and most importantly it would be > explicitly testing topics that have arisen previously on the mailing > list so are of importance to users. > Exactly. > > > And if this could be done by the user to test .emacs configuration > > settings, that would be really great. > > > > That's a good idea. Simply running the Org-mode test suite is a good > way for users to test the sanity of their local config. > Yes - I have a few times run into problems due to my configuration file and only realized it later - if there would be ab org file which I could use to test easily my configuration directly after making the changes, life would have been much easier for me. This would also be useful for questions on the mailing list and for a kind of "quality control" for published configs on the web. > Best -- Eric > Cheers, Rainer > > > > > Thanks, > > > > Rainer > > > > > > > >> > >> Hope this is useful and or fun, I will continue to update it as the > >> scraps.org file grows. > >> > >> Cheers -- Eric > >> > >> -- > >> Eric Schulte > >> http://cs.unm.edu/~eschulte/ > >> > >> > > -- > Eric Schulte > http://cs.unm.edu/~eschulte/ > -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Stellenbosch University South Africa Tel : +33 - (0)9 53 10 27 44 Cell: +33 - (0)6 85 62 59 98 Fax (F): +33 - (0)9 58 10 27 44 Fax (D):+49 - (0)3 21 21 25 22 44 email: rai...@krugs.de Skype: RMkrug
Re: [O] [PATCH] Fixes to inline src block execution
Eric Schulte writes: Hi Eric > Martyn Jago writes: > >> Hi >> >> Some fixes to inline src block execution via org-ctrl-c-ctrl-c >> where point is beyond white-space in the inline src block body... >> >> * Start Pomodoro >> src_emacs-lisp[:results silent]{( org-timer-set-timer 25 )} [...] > This looks great. I would like to apply this patch but it breaks unit > tests at least one of which existed previously and was passing. Would > you mind taking a look at these unit tests to see if your patch breaks > existing behavior? Yes my bad - even my supplied tests failed (it was very late). I've fixed my code and fixed a failing test due to a previous regression. All tests now pass here on Mac OSX [...] Regards Martyn >From 3dacd351550ec691beb49c1560ce247033711a76 Mon Sep 17 00:00:00 2001 From: Martyn Jago Date: Tue, 6 Sep 2011 09:00:24 +0100 Subject: [PATCH] Inline source block and test fixes * lisp/ob.el: Fixed late night refactoring error * testing/examples/babel.org: whitespace * testing/lisp/test-ob.el: Fixed test-org-babel/inline-src-block-regexp (regression error) Renamed test-org-babel/parse-header-args2 since duplicate test heading Made test-org-babel/parse-header-args less brittle --- lisp/ob.el |8 +++--- testing/examples/babel.org |1 + testing/lisp/test-ob.el| 45 ++- 3 files changed, 28 insertions(+), 26 deletions(-) diff --git a/lisp/ob.el b/lisp/ob.el index 2964f82..d6b0ba3 100644 --- a/lisp/ob.el +++ b/lisp/ob.el @@ -166,11 +166,11 @@ Returns non-nil if match-data set" (beginning-of-line 1) (string= "src" (thing-at-point 'word (first-line-p (= 1 (line-number-at-pos))) - (orig (point))) -(let ((search-for (cond (src-at-0-p "src_") - (first-line-p " src_") + (orig (point))) +(let ((search-for (cond ((and src-at-0-p first-line-p "src_")) + (first-line-p "[ \t]src_") (t "[ \f\t\n\r\v]src_"))) - (lower-limit (if (= 1 (line-number-at-pos)) + (lower-limit (if first-line-p nil (- (point-at-bol) 1 (save-excursion diff --git a/testing/examples/babel.org b/testing/examples/babel.org index f85e1f0..5b7f2ef 100644 --- a/testing/examples/babel.org +++ b/testing/examples/babel.org @@ -279,6 +279,7 @@ this is simple :ID: d4faa7b3-072b-4dcf-813c-dd7141c633f3 :END: has length 14 + * org-babel-get-inline-src-block-matches :PROPERTIES: :results: silent diff --git a/testing/lisp/test-ob.el b/testing/lisp/test-ob.el index 71ea7e2..f9884dd 100644 --- a/testing/lisp/test-ob.el +++ b/testing/lisp/test-ob.el @@ -108,7 +108,7 @@ (ert-deftest test-org-babel/inline-src-block-regexp () - (should(equal (concat "[^-[:alnum:]]\\(src_\\([^ \f\t\n\r\v]+\\)" + (should(equal (concat "\\(?:^\\|[^-[:alnum:]]\\)\\(src_\\([^ \f\t\n\r\v]+\\)" "\\(\\|\\[\\(.*?\\)\\]\\)" "{\\([^\f\n\r\v]+?\\)}\\)") org-babel-inline-src-block-regexp)) @@ -206,7 +206,7 @@ (should(equal '(:result-type . output) (assoc :result-type params))) (should(equal '(num . 9) (cdr (assoc :var params))) -(ert-deftest test-org-babel/parse-header-args () +(ert-deftest test-org-babel/parse-header-args2 () (org-test-at-id "2409e8ba-7b5f-4678--e48aa02d8cb4" (should (string-match (regexp-quote "this is simple") (org-babel-ref-resolve "simple-subtree"))) @@ -225,26 +225,27 @@ (ert-deftest test-org-babel/org-babel-get-inline-src-block-matches () (org-test-at-id "0D0983D4-DE33-400A-8A05-A225A567BC74" -(should (fboundp 'org-babel-get-inline-src-block-matches)) -(should (re-search-forward "src_" nil t)) ;; 1 -(should (= 6132 (match-end 0))) -(should (org-babel-get-inline-src-block-matches)) -(should (re-search-forward "}" nil (point-at-bol))) ;; 1 -(should-not (org-babel-get-inline-src-block-matches)) -(should (re-search-forward "in" nil t)) ;; 2 -(should-not (org-babel-get-inline-src-block-matches)) -(should (re-search-forward "echo" nil t)) ;; 2 -(should (org-babel-get-inline-src-block-matches)) -(should (re-search-forward "blocks" nil t)) ;; 3 -(left-char 8) ;; 3 -(should (org-babel-get-inline-src-block-matches)) -(right-char 1) ;;3 -(should-not (org-babel-get-inline-src-block-matches)) -(should (re-search-forward ":results" nil t)) ;; 4 -(should (org-babel-get-inline-src-block-matches)) -(end-of-line) -(should-not (org-babel-get-inline-src-block-matches)) -)) +(let ((test-point (point))) + (should (fboundp 'org-babel-get-inline-src-block-matches)) + (should (re-search-forward "src_" nil t)) ;; 1 + (should (= (+ test-point 140) (match-end 0))) + (should (org-babel-get-inline-src-block-matches)) + (should (re-search-forward "}" nil (point-at-bol))) ;; 1 + (should-not (org-babel-get-inline-src-block-matches)) + (should (re-search-forward "in" nil t)) ;; 2 + (should-not (org-babel-get-inline-src-b