[O] words starting with call_ confuse C-c C-c and export
Hi, with org-mode from today on Emacs 23.4.1 and with this 2-line file: - [ ] call_me - [ ] try funcall_lambda (maybe) 1. Go to the „me“ and press C-c C-c. You get „C-c C-c can do nothing useful at this location“. I expected to switch the checkbox. 2. Go to the „maybe“ and press C-c C-c. I got: Debugger entered--Lisp error: (void-function maybe) (maybe) eval((maybe)) org-babel-read("(maybe)") org-babel-ref-parse("results=(maybe)") #[(el) … mapcar(#[(el) … org-babel-process-params(((:comments . "") (:shebang . "") (:cache . "no") (:padline . "") (:noweb . "no") (:tangle . "no") (:exports . "code") (:results . "replace") (:var . "results=(maybe)") (:hlines . "no") (:session . "none"))) org-babel-lob-execute(("lambda (maybe)" nil 13 nil)) org-babel-lob-execute-maybe() org-babel-execute-maybe() org-babel-execute-safely-maybe() run-hook-with-args-until-success(org-babel-execute-safely-maybe) org-ctrl-c-ctrl-c(nil) 3. Similar confusions happen on export; the word Fcall_interactively which appeared in a gdb backtrace was crashing the HTML exportation. I think something similar happened to me years ago, and I had to avoid all call_ words!
[O] Babel python question: use of ipython and %cpaste
Hi being able to use python as a source block is great, but I often stumble over the fact that when using sessions you have to treat empty lines in a special way (i.e. as the end of an indentation block). I was wondering if it would be easy to create an ipython mode, something like #+BEGIN_SRC ipython ... where the content for a session is copied over to an ipython buffer using the ipython magic %cpaste. This way empty lines should be treated correctly. It would also have the nice side effect of giving access to other magic commands within org-babel, such as %timeit or profiling. Unfortunately, I don't know how to modify ob-python.el to achieve this. Apart from setting py-shell, I'm not sure how to copy the body of the source block over to use %cpaste and also how to create a trigger for BEGIN_SRC ipython... Would this work? Any idea on how to implement this? Thanks Arun
Re: [O] Getting checkboxes in HTML output?
Peter Davis writes: > I've now changed ox-html.el to include this: > As an FYI: you don't need to change ox-html.el. You can just load a file containing the redefinition *after* you've loaded ox-html. Something like this (untested): (eval-after-load "ox-html" (defun org-html-checkbox (checkbox) )) That way, you have pristine sources *and* you get the redefined function. > (defun org-html-checkbox (checkbox) > "Format CHECKBOX into HTML." > (case checkbox (on "☒") > (off "☐") > (trans "☑") > (t ""))) > > > This is sort of close to using > [ ] for unchecked > [/] for partially checked > [X] for checked > > To my aging eyes, the check in U#9745 looks almost like a forward > slash. Certainly, though, this would be potentially confusing, > especially if no [X] boxes were present, so that only [ ] or [/] were > visible. > > -pd -- Nick
Re: [O] Bug: Bad ODT files when including multiple images [7.9.3f (release_7.9.3f-17-g7524ef @ /usr/share/emacs/24.3/lisp/org/)]
Jambunathan K writes: >M-x list-packages > > and install the org package. this seems to be completely broken: export by C-c C-e o o fails with | OpenDocument export failed: Invalid function: org-with-silent-modifications > If problem persists with new exporter, let me know. I will be happy to > share a fix. >From reading ox-odt.el, it is very likely that it still exists. There is no place except with short-caption where 'draw:name' will be set. Enrico
[O] Search to show only trees with no recent clock entries
Looking for a search to show only first-level trees that meet the following criteria: all clock entries under the heading are older than a given date (IE 2 weeks ago) clock entries may be under several different sub-headings, at levels ranging from * to ONLY level-1 entries meeting this criteria should be returned. I'm at a bit of a loss. Thanks! Subhan -- Subhan Michael Tindall | Software Developer | s...@rentrakmail.com RENTRAK | www.rentrak.com | NASDAQ: RENT
Re: [O] [babel] Output table
Hi Eric, Eric Schulte wrote: > "Sebastien Vauban" writes: >> I'm trying to generate R graphs from lines found in the *Messages* buffer >> with >> the following code of mine: >> >> #+begin_src emacs-lisp :results output table >> (setq txt nil) >> (with-current-buffer "*Messages*" >> (goto-char (point-min)) >> (while (re-search-forward >> "^Retrieving newsgroup: \\(.+\\)" >> nil t) >> (setq txt (concat txt (format "%s" (match-string 1)) "\n")) >> (princ txt))) >> #+end_src >> >> However, the results is always an example block, NEVER in an Org _table_ -- >> and >> I don't understand why. Does anybody? > > I bet because ":results output" in Emacs Lisp is only interpreted as a > string. You're better off just returning a list with something like the > following. > > #+begin_src emacs-lisp :results output table > (let (txts) > (with-current-buffer "*Messages*" > (goto-char (point-min)) > (while (re-search-forward > "^Retrieving newsgroup: \\(.+\\)" > nil t) > (push (match-string 1) txts))) > txts) > #+end_src I guess you meant ":results value", then? Because "output" does not return anything with your code. As you can imagine, though the list could be processed by R, the fact it's not a table makes it unreadable as is in the Org buffer and in a generated PDF (at least, without extra conversion blocks). See http://screencast.com/t/QVd0VDLYE1. Would there be a way to get a proper table more directly? Best regards, Seb -- Sebastien Vauban
[O] How to export all content of a sparse tree to a separate buffer/file?
I'm looking for a relatively straightforward way to export content from one org file to a separate org file or org-mode buffer. I've got the org exporter bit working I can create the sparse tree based on a given tag with no problem. But, when I export it using 'visible only' what I get is headlines only. There are a fair number of headlines with content below the headline like this: ** NOTES a whole buch of stuff here that I would like to export as well as well as a lot of clocking information. Any ideas? Example process C-c / <- create sparse tree C-c C-e <-bring up dispatcher C-v <-export visible only, if I don't do this I get the whole file, not the sparse tree O O <-export to org buffer Thanks! Subhan -- Subhan Michael Tindall | Software Developer | s...@rentrakmail.com RENTRAK | www.rentrak.com | NASDAQ: RENT
Re: [O] Bug: Bad ODT files when including multiple images [7.9.3f (release_7.9.3f-17-g7524ef @ /usr/share/emacs/24.3/lisp/org/)]
> 7.9.3f (release_7.9.3f-17-g7524ef @ /usr/share/emacs/24.3/lisp/org/)] The exporter(s) are re-written. You should be using Org-8.*. Use Elpa M-x list-packages and install the org package. or install from tar file or git. orgmode.org/worg has instructions on how to use the "new exporters". If problem persists with new exporter, let me know. I will be happy to share a fix. Enrico Scholz writes: > Hi, > > org-mode generates ODT files which can not be opened by libreoffice-4.1.3.2 > when more than one image is included. E.g. running (org-export-as-odt) on > > test.org --- > * Test > > [[file:s01.png]] > > [[file:s01.png]] > - > > and trying to open it with 'oowrite test.odt' gives a "Read-Error/Error > reading file" message. ODT created after removing one of the images is > ok. > > It seems that libreoffice requires an unique 'draw:name' attribute for > 'draw:frame' tags. This can be set by '#+CAPTION' (and the resulting > ODT is working) but this option is not suitable for inline images. > > > > Enrico > > > Emacs : GNU Emacs 24.3.1 (x86_64-redhat-linux-gnu, GTK+ Version 2.24.19) > of 2013-08-19 on koji-builder0.intern.sigma-chemnitz.de > Package: Org-mode version 7.9.3f (release_7.9.3f-17-g7524ef @ > /usr/share/emacs/24.3/lisp/org/)
Re: [O] org habit consistency graph
Tried that and it didn't work. Here's my agenda view (still no graph) by doing C-a a a: Week-agenda (W49): Monday 2 December 2013 W49 Tuesday 3 December 2013 Wednesday 4 December 2013 Thursday5 December 2013 Friday 6 December 2013 Saturday7 December 2013 Sunday 8 December 2013 These things are enabled: Org-Agenda Week Ddl Grid Habit vl Wrap I have also added this line in my .emacs: (require 'org-habit) Emacs version 24.3.1. Thanks. On Tue, Dec 3, 2013 at 12:16 AM, Alan Schmitt < alan.schm...@polytechnique.org> wrote: > henders...@gmail.com writes: > > > I'm trying to setup habit tracking on org but can't see any consistency > > graph. > > > > I have setup a simple TODO item and set the style as habit by using C-c > C-x > > p (org-set-property). > > > > * TODO exercise > > SCHEDULED: <2013-12-03 Tue .+1d> > > - State "DONE" from "TODO" [2013-12-02 Mon 17:31] > > - State "DONE" from "TODO" [2013-12-02 Mon 17:30] > > :PROPERTIES: > > :LAST_REPEAT: [2013-12-02 Mon 17:31] > > :STYLE:habit > > :END: > > Looking at one of my habits, I see I have a "/3d" at the end of the > schedule marker: > > SCHEDULED: <2013-12-03 Tue .+1d/3d> > > Maybe it is required for the style to be in effect? > > Alan >
[O] Exporting to HTML, LaTeX header is not recovered in the Org buffer
Hi folks, in order to export to HTML LaTeX fragments (not necessarily math fragments) as PNG pictures, I set --8<---cut here---start->8--- #+LATEX_HEADER: \newenvironment{dummy}{}{} #+OPTIONS: tex:dvipng --8<---cut here---end--->8--- and insert LaTeX fragments in `dummy' environments. This is useful for showing the aspect of a LaTeX fragment without compiling, cropping, and converting to PNG an external LaTeX file. Are there better ways to do that? For example --8<---cut here---start->8--- #+TITLE: foo #+LATEX_HEADER: \usepackage{lipsum} \newenvironment{dummy}{}{} #+OPTIONS: tex:dvipng \begin{dummy} \lipsum[1] \end{dummy} --8<---cut here---end--->8--- used to work until Org < 8 (of course with `LaTeX:dvipng' instead of `tex:dvipng'), but with the new HTML exporter the LaTeX header is recovered inside the `org-create-formula-image-with-dvipng' function while being in the ` *temp*' buffer, so the LATEX_HEADER option set in the Org file is discarded. Is it an intended behavior? Or is it a bug? I'm running Org 8.2.3c (20131125) from Elpa. Thank you, bye, Mosè P.S.: please keep me in CC, I'm not subscribed to the list.
[O] Bug: Bad ODT files when including multiple images [7.9.3f (release_7.9.3f-17-g7524ef @ /usr/share/emacs/24.3/lisp/org/)]
Hi, org-mode generates ODT files which can not be opened by libreoffice-4.1.3.2 when more than one image is included. E.g. running (org-export-as-odt) on test.org --- * Test [[file:s01.png]] [[file:s01.png]] - and trying to open it with 'oowrite test.odt' gives a "Read-Error/Error reading file" message. ODT created after removing one of the images is ok. It seems that libreoffice requires an unique 'draw:name' attribute for 'draw:frame' tags. This can be set by '#+CAPTION' (and the resulting ODT is working) but this option is not suitable for inline images. Enrico Emacs : GNU Emacs 24.3.1 (x86_64-redhat-linux-gnu, GTK+ Version 2.24.19) of 2013-08-19 on koji-builder0.intern.sigma-chemnitz.de Package: Org-mode version 7.9.3f (release_7.9.3f-17-g7524ef @ /usr/share/emacs/24.3/lisp/org/)
Re: [O] Bugs in org-drill
Hi, On Mon, May 20, 2013 at 8:53 PM, Lukas Fuernkranz wrote: > On Tue, May 14, 2013 at 5:19 PM, Ivan Kanis wrote: >> I tried 1.8 two weeks ago. I got two bugs in org-drill: [...] > I also encountered problem 1 and opened a bug report: > https://bitbucket.org/eeeickythump/org-drill/issue/9/org-drill-doesnt-accept-near-miss-and the mentioned problem was fixed quite some time ago in org-drill's repository (see the link above). However org-plus-contrib on ELPA apparently still comes with an old version of org-drill. What needs to be done to fix this? Regards, Lukas PS: I'm currently not subscribed to the list so if you answer I urge you to send that e-mail to my adress as well.
Re: [O] org-indent-mode corrupted most of a big org file
Alexander Baier writes: > (setq backup-by-copying t ; don't use symlinks Thanks for sharing your setup, I think I'll use a similar one. Just a comment though on the above line : that comment is misleading because emacs is not going to make a backup by making a symlink anyway. (the full story is in the docstring.) Nico.
Re: [O] [babel] Output table
"Sebastien Vauban" writes: > Hello, > > I'm trying to generate R graphs from lines found in the *Messages* buffer with > the following code of mine: > > #+begin_src emacs-lisp :results output table > (setq txt nil) > (with-current-buffer "*Messages*" > (goto-char (point-min)) > (while (re-search-forward > "^Retrieving newsgroup: \\(.+\\)" > nil t) > (setq txt (concat txt (format "%s" (match-string 1)) "\n")) > (princ txt))) > #+end_src > > However, the results is always an example block, NEVER in an Org _table_ -- > and > I don't understand why. Does anybody? > > Best regards, > Seb I bet because ":results output" in Emacs Lisp is only interpreted as a string. You're better off just returning a list with something like the following. #+begin_src emacs-lisp :results output table (let (txts) (with-current-buffer "*Messages*" (goto-char (point-min)) (while (re-search-forward "^Retrieving newsgroup: \\(.+\\)" nil t) (push (match-string 1) txts))) txts) #+end_src -- Eric Schulte https://cs.unm.edu/~eschulte PGP: 0x614CA05D
Re: [O] How do I specify the language for a :results code block
Hi, Taking a slightly different approach, you could use the :post header argument to wrap the results in a source block. See http://orgmode.org/org.html#post (from which the example below is derived). For example, you could use something like this: #+OPTIONS: d:RESULTS * Example #+name: eg-1 #+begin_src sh :results replace drawer :exports results :post wrap-src(text=*this*) head -n 3 demo.v #+end_src Output #+results: eg-1 * Utils :noexport: #+name: wrap-src #+begin_src emacs-lisp :var text="" :results raw (concat "#+BEGIN_SRC coq\n" text "\n#+END_SRC") #+end_src BTW I answered a question similar to this on Stack Overflow recently (http://stackoverflow.com/questions/20194347/org-mode-with-code-example-as-html/20232922#20232922) - must be something in the air. Regards, Sean On Mon, Dec 2, 2013 at 1:04 PM, Alan Schmitt wrote: > Hi Sébastien, > > sva-n...@mygooglest.com writes: > >>> Exporting if the result is not in the buffer is fine. I tried adding a >>> ":results replace" as inner header argument to the call line and to the >>> fetchcoq block, but it does not change anything. >>> >>> How can I tell the call line to replace the results when exporting? >> >> The syntax of the call line is: >> >> #+call: []() >> >> >> So, you should add your option either in [] after the name, or at the end of >> the line -- I'm always hesitating about where to put the right stuff (not so >> enough clear yet in my mind)... > > I tried both, and neither works. Here is an org file showing the > problem: > > --8<---cut here---start->8--- > #+name: testcall > #+BEGIN_SRC sh :exports none :results raw > echo "#+BEGIN_SRC emacs-lisp" > echo "(+ 1 2)" > echo "#+END_SRC" > #+END_SRC > > Test fails: > #+call: testcall() :results raw > > #+RESULTS: > #+BEGIN_SRC emacs-lisp > (+ 1 2) > #+END_SRC > > Test fails: > #+call: testcall[:results replace]() :results raw > > #+RESULTS: > #+BEGIN_SRC emacs-lisp > (+ 1 2) > #+END_SRC > > Test fails: > #+call: testcall() :results raw replace > > #+RESULTS: > #+BEGIN_SRC emacs-lisp > (+ 1 2) > #+END_SRC > > Test succeeds (results not already in the file): > #+call: testcall() :results raw > --8<---cut here---end--->8--- > > If you export this, you'll see that only the last call generates the > expected output. > > Alan >
Re: [O] How do I specify the language for a :results code block
Aloha Alan, Alan Schmitt writes: > Unfortunately, if I export this, the code is duplicated. Here is the > generated html, for instance: Yes, the code is partially duplicated when I run it. It looks to me as if the problem stems from :results raw and the fact that results is itself a source code block that includes lines like #+BEGIN_SRC and #+END_SRC. Perhaps the same confusion shows if you change the :results raw header argument for the call line to :results org, evaluate, change back to :results raw, and then evaluate again. You should find an extra #+END_SRC in the buffer. IIUC, your goal is to export the coq source code blocks. Does the following, which uses :results org, do what you want? It seems to work for me. #+name: fetchcoq2 #+BEGIN_SRC sh :exports none :results raw :var f="demo.v" echo "#+BEGIN_SRC coq" echo $f echo "#+END_SRC" #+END_SRC #+results: fetchcoq2 #+BEGIN_SRC coq demo.v #+END_SRC #+name: fetchcoq-call #+call: fetchcoq2("demo.v") :results org #+results: fetchcoq-call #+BEGIN_SRC org ,#+BEGIN_SRC coq demo.v ,#+END_SRC #+END_SRC hth, Tom P.S. I remembered :wrap just now. This doesn't export well, though. #+call: fetchcoq2("demo.v") :wrap src coq #+results: #+BEGIN_src coq demo.v #+END_src Tom -- T.S. Dye & Colleagues, Archaeologists 735 Bishop St, Suite 315, Honolulu, HI 96813 Tel: 808-529-0866, Fax: 808-529-0884 http://www.tsdye.com
Re: [O] Getting checkboxes in HTML output?
I've now changed ox-html.el to include this: (defun org-html-checkbox (checkbox) "Format CHECKBOX into HTML." (case checkbox (on "☒") (off "☐") (trans "☑") (t ""))) This is sort of close to using [ ] for unchecked [/] for partially checked [X] for checked To my aging eyes, the check in U#9745 looks almost like a forward slash. Certainly, though, this would be potentially confusing, especially if no [X] boxes were present, so that only [ ] or [/] were visible. -pd -- Peter Davis The Tech Curmudgeon www.techcurmudgeon.com
Re: [O] Export issues
M-x locate-library org-loaddefs M-x locate-library ox M-x org-version M-x list-load-path-shadows (and check for org.el and ox.el) and output. All those commands will tell you that something is wrong in your setup. Sam Flint writes: > When I go to export a document to pdf, using C-c C-e, I get an error: > Symbol's function definition is void: org-export-dispatch > This diff should fix it: > diff --git a/lisp/org.el b/lisp/org.el > index c0c51c4..888478a 100644 > --- a/lisp/org.el > +++ b/lisp/org.el > @@ -19231,7 +19231,7 @@ boundaries." >(org-defkey org-mode-map "\C-c\C-a" 'org-attach) >(org-defkey org-mode-map "\C-c}"'org-table-toggle-coordinate-overlays) >(org-defkey org-mode-map "\C-c{"'org-table-toggle-formula-debugger) > -(org-defkey org-mode-map "\C-c\C-e" 'org-export-dispatch) > +(org-defkey org-mode-map "\C-c\C-e" 'org-export) >(org-defkey org-mode-map "\C-c:"'org-toggle-fixed-width-section) >(org-defkey org-mode-map "\C-c\C-x\C-f" 'org-emphasize) >(org-defkey org-mode-map "\C-c\C-xf"'org-footnote-action) > > Thanks
[O] Export issues
When I go to export a document to pdf, using C-c C-e, I get an error: Symbol's function definition is void: org-export-dispatch This diff should fix it: diff --git a/lisp/org.el b/lisp/org.el index c0c51c4..888478a 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -19231,7 +19231,7 @@ boundaries." (org-defkey org-mode-map "\C-c\C-a" 'org-attach) (org-defkey org-mode-map "\C-c}"'org-table-toggle-coordinate-overlays) (org-defkey org-mode-map "\C-c{"'org-table-toggle-formula-debugger) -(org-defkey org-mode-map "\C-c\C-e" 'org-export-dispatch) +(org-defkey org-mode-map "\C-c\C-e" 'org-export) (org-defkey org-mode-map "\C-c:"'org-toggle-fixed-width-section) (org-defkey org-mode-map "\C-c\C-x\C-f" 'org-emphasize) (org-defkey org-mode-map "\C-c\C-xf"'org-footnote-action) Thanks -- Sam Flint swfl...@flintfam.org freenode: swflint (402) 517-8468 http://flintfam.org/~swflint BAFBF3FF
[O] [babel] Output table
Hello, I'm trying to generate R graphs from lines found in the *Messages* buffer with the following code of mine: #+begin_src emacs-lisp :results output table (setq txt nil) (with-current-buffer "*Messages*" (goto-char (point-min)) (while (re-search-forward "^Retrieving newsgroup: \\(.+\\)" nil t) (setq txt (concat txt (format "%s" (match-string 1)) "\n")) (princ txt))) #+end_src However, the results is always an example block, NEVER in an Org _table_ -- and I don't understand why. Does anybody? Best regards, Seb -- Sebastien Vauban
Re: [O] [Babel] [Bug] Cache
Hi Eric, Eric Schulte wrote: > "Sebastien Vauban" writes: >> >> IIRC, some time ago, a bug involving the computation of the hash (when >> option cache is enabled) and NoWeb code blocks. I remember that it had been >> fixed. >> >> However, the following example shows it's not (true anymore): >> >> --8<---cut here---start->8--- >> #+PROPERTY: cache yes >> >> #+name: common-code >> #+begin_src R :eval no >> s <- "Hello" >> #+end_src >> >> #+begin_src R :noweb yes >> <> >> >> print(s) >> #+end_src >> >> #+results[f472c44e64e310a6d06544dbdfba558a709873a7]: >> : Hello >> --8<---cut here---end--->8--- >> >> Change the "common code" block: edit "Hello", for example, and you'll see >> that the evaluation of the other code block is not redone (like if the NoWeb >> code was not expanded for computing the hash). It stays printing "Hello". > > Could you git bisect this breakage to isolate the offending commit? I couldn't find any version where my ECM would work. Though, I was sure to have read comments about that problem -- I never used that situation myself in the past, so I just assumed it had been fixed in the meanwhile. It seems not. And here the post of Achim where he explains that problem: ╭ │ From: Achim Gratz │ Subject: Re: [PATCH] * lisp/ob-core.el (org-babel-execute-src-block): │ insert hash for silent results │ Date: Sun, 10 Mar 2013 09:52:10 +0100 (38 weeks, 1 day, 6 hours ago) │ │ [...] │ │ But back to my earlier remark about the hash value actually being a │ signature of the source block and not the result. If I use noweb │ references, the reference text is cached, not its expansion. ╰ Best regards, Seb -- Sebastien Vauban
Re: [O] org-indent-mode corrupted most of a big org file
On 13-12-02 12:21 Rainer Stengele wrote: > All, > > last week I played around with org-indent-mode in my biggest (37.000 lines) > org file. > 3 days later I detected that most of the file was corrupted. > WHy so late? Using the agenda I only saw the todos and did not recognise the > corrupted structures. > Most "*" items had been placed at the beginning of the line and therefore now > became headlines. > I do not know how this happened. I am not sure if I myself was the reason > somehow. > Anyway I had to spend a fair amount of work to get the old file format from > subversion and insert the changes since the corruption. > > This is just a warning to have backups at hand before changing to org-indent > mode. > Then immediately and check often the contents of the file until you are sure > all is running well. > > Maybe someone has an idea. > > I will try to convert again later but then be much more careful. > > Rainer > > FWIW, I have the following snippet in my init file, that uses emacs' build-in backup machanism to save me from such things. As emacs stuffs them all in one central location, I do not have to worry about polluting my filesystem. #+begin_src emacs-lisp (setq make-backup-files t) (setq backup-directory-alist '(("/home/delexi/*" . "/home/delexi/.emacs.d/backup"))) (setq backup-by-copying t ; don't use symlinks delete-old-versions t; don't ask me about deleting backups kept-new-versions 20 kept-old-versions 5 version-control t) ; use versioned backups #+end_src If you want to make backups from files under version control, you also have to set the following: #+begin_src emacs-lisp (setq vc-make-backup-files t) #+end_src This already saved me a couple of times. Regards, -- Alexander Baier
Re: [O] Latex "Missing number, treated as zero."
sva-n...@mygooglest.com writes: > Alan Schmitt wrote: >> I think this letter class is wrong. Here is mine for beamer (note the >> "\[" before the options to be substituted by the export process): >> >> (add-to-list 'org-latex-classes >> '("beamer" >>"\\documentclass[presentation]{beamer} >> \[DEFAULT-PACKAGES] >> \[PACKAGES] >> \[EXTRA]" >>("\\section{%s}" . "\\section*{%s}") >>("\\subsection{%s}" . "\\subsection*{%s}") >>("\\subsubsection{%s}" . "\\subsubsection*{%s}"))) > > Note that you don't need to escape the `[' with `\': it's not a regexp simply > a string; hence, `[' does not need to be escaped. Ah, good to know, thanks for the information. I forgot were I copied this snippet, but I see that the example at http://orgmode.org/worg/exporters/beamer/ox-beamer.html also escapes many things. Alan
[O] Org-mode in windows fires Tramp without any intervention
Hi, I have my own complex Emacs configuration files developed over time when working in a Linux environment. You can see that https://github.com/tonicebrian/emacsconfig in case you are curious. It works seamlessly in Linux and I tried to use that as-is when working in Windows. Emacs in Windows reads that configuration and fires up also without any warning. The problem comes when I try to open a complex Org file, with some links in it. I don't know why, but Tramp is fired and tries to ssh to the machines in one URL within a link element that has the form " http://machine:8080/more/levels";. I don't even have the (require 'tramp) in my init.el file so this is something the Org mode plugging is doing by itself. By the way, the org mode version I have is org-20131202 from elpa and Emacs is 24.3.1 for Windows. Do you know where to look or what to try? This same Org file, the same init.el and the same emacs version work without any problem in Linux. Any clues?
Re: [O] Latex "Missing number, treated as zero."
Alan Schmitt wrote: > I think this letter class is wrong. Here is mine for beamer (note the > "\[" before the options to be substituted by the export process): > > (add-to-list 'org-latex-classes > '("beamer" >"\\documentclass[presentation]{beamer} > \[DEFAULT-PACKAGES] > \[PACKAGES] > \[EXTRA]" >("\\section{%s}" . "\\section*{%s}") >("\\subsection{%s}" . "\\subsection*{%s}") >("\\subsubsection{%s}" . "\\subsubsection*{%s}"))) Note that you don't need to escape the `[' with `\': it's not a regexp simply a string; hence, `[' does not need to be escaped. Best regards, Seb -- Sebastien Vauban
Re: [O] How do I specify the language for a :results code block
Hi Sébastien, sva-n...@mygooglest.com writes: >> Exporting if the result is not in the buffer is fine. I tried adding a >> ":results replace" as inner header argument to the call line and to the >> fetchcoq block, but it does not change anything. >> >> How can I tell the call line to replace the results when exporting? > > The syntax of the call line is: > > #+call: []() > > > So, you should add your option either in [] after the name, or at the end of > the line -- I'm always hesitating about where to put the right stuff (not so > enough clear yet in my mind)... I tried both, and neither works. Here is an org file showing the problem: --8<---cut here---start->8--- #+name: testcall #+BEGIN_SRC sh :exports none :results raw echo "#+BEGIN_SRC emacs-lisp" echo "(+ 1 2)" echo "#+END_SRC" #+END_SRC Test fails: #+call: testcall() :results raw #+RESULTS: #+BEGIN_SRC emacs-lisp (+ 1 2) #+END_SRC Test fails: #+call: testcall[:results replace]() :results raw #+RESULTS: #+BEGIN_SRC emacs-lisp (+ 1 2) #+END_SRC Test fails: #+call: testcall() :results raw replace #+RESULTS: #+BEGIN_SRC emacs-lisp (+ 1 2) #+END_SRC Test succeeds (results not already in the file): #+call: testcall() :results raw --8<---cut here---end--->8--- If you export this, you'll see that only the last call generates the expected output. Alan
Re: [O] org habit consistency graph
henders...@gmail.com writes: > I'm trying to setup habit tracking on org but can't see any consistency > graph. > > I have setup a simple TODO item and set the style as habit by using C-c C-x > p (org-set-property). > > * TODO exercise > SCHEDULED: <2013-12-03 Tue .+1d> > - State "DONE" from "TODO" [2013-12-02 Mon 17:31] > - State "DONE" from "TODO" [2013-12-02 Mon 17:30] > :PROPERTIES: > :LAST_REPEAT: [2013-12-02 Mon 17:31] > :STYLE:habit > :END: Looking at one of my habits, I see I have a "/3d" at the end of the schedule marker: SCHEDULED: <2013-12-03 Tue .+1d/3d> Maybe it is required for the style to be in effect? Alan
Re: [O] Latex "Missing number, treated as zero."
li...@wilkesley.net writes: >> Here is what I have in this variable for my letter class: >> >> , >> | ("letter_private" >> "\\documentclass[fontsize=11pt,strey_privat]{scrlttr2}\n\\LoadLetterOption{DIN}\n[NO-DEFAULT-PACKAGES]\n[PACKAGES]\n[EXTRA]" >> | ("\\section{%s}" . "\\section*{%s}") >> | ("\\subsection{%s}" . "\\subsection*{%s}") >> | ("\\subsubsection{%s}" . "\\subsubsection*{%s}")) >> ` I think this letter class is wrong. Here is mine for beamer (note the "\[" before the options to be substituted by the export process): --8<---cut here---start->8--- (add-to-list 'org-latex-classes '("beamer" "\\documentclass[presentation]{beamer} \[DEFAULT-PACKAGES] \[PACKAGES] \[EXTRA]" ("\\section{%s}" . "\\section*{%s}") ("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}"))) --8<---cut here---end--->8--- > Looking at how org produces the pdf file it uses the "nonstopmode" in > the command line arguments to pdflatex. So when I used xelatex with this > option: > > xelatex -interaction=nonstopmode test.tex This tell latex to continue compiling even if there are errors. I'm not sure you want to rely on this. Alan
Re: [O] org-indent-mode corrupted most of a big org file
On Dec 2, 2013, at 12:31 PM, Sebastien Vauban wrote: > Rainer Stengele wrote: >> last week I played around with org-indent-mode in my biggest (37.000 lines) >> org file. >> 3 days later I detected that most of the file was corrupted. >> WHy so late? Using the agenda I only saw the todos and did not recognise the >> corrupted structures. >> Most "*" items had been placed at the beginning of the line and therefore >> now became headlines. >> I do not know how this happened. I am not sure if I myself was the reason >> somehow. >> Anyway I had to spend a fair amount of work to get the old file format from >> subversion and insert the changes since the corruption. >> >> This is just a warning to have backups at hand before changing to org-indent >> mode. >> Then immediately and check often the contents of the file until you are sure >> all is running well. >> >> Maybe someone has an idea. >> >> I will try to convert again later but then be much more careful. > > Last week, I also "lost" contents in the file I worked a lot in (R code, > published to slides). In fact, I did not really lose it, thanks to SVN... > > That seems to have been a nasty bug in the caching. I should be fixed AFAICT. > But, yes, this can always happen. Better to have fallback mechanisms when it > occurs -- even if we've to admit it is very, very seldsom, and only with the > dev trunk. This is great advice, in particular while testing fundamental changes like the caching mechanism. git-up everybody! - Carsten > > Best regards, > Seb > > -- > Sebastien Vauban >
Re: [O] How do I specify the language for a :results code block
Alan Schmitt wrote: > t...@tsdye.com writes: >> Alan Schmitt writes: >> >>> I tried this alternate approach, to directly generate the block: >>> >>> #+name: fetchcoq2 >>> #+BEGIN_SRC sh :exports none :results raw :var f="demo.v" >>> echo "#+BEGIN_SRC coq" >>> head $f >>> echo >>> echo "#+END_SRC" >>> #+END_SRC >>> >>> #+call: fetchcoq2("demo.v") >>> >>> But then I get a result like this, with extra quoting: >>> >>> #+RESULTS: >>> : #+BEGIN_SRC coq >>> : Definition toto : forall x, exists y, x = y. >>> : >>> : Lemma foo: forall x, x=x. >>> : #+END_SRC >>> >>> I feel like I'm missing something obvious. ":results code" is exactly >>> what I want (put the results in a SRC block), but I don't know how to >>> specify the headers of the generated code block. >> >> You need :results raw at the end of the call line. >> >> #+name: fetchcoq2 >> #+BEGIN_SRC sh :exports none :results raw :var f="demo.v" >> echo "#+BEGIN_SRC coq" >> echo $f >> echo "#+END_SRC" >> #+END_SRC >> >> #+results: fetchcoq2 >> #+BEGIN_SRC coq >> demo.v >> #+END_SRC >> >> #+call: fetchcoq2("demo.v") :results raw >> >> #+results: >> #+BEGIN_SRC coq >> demo.v >> #+END_SRC > > Thanks, this is helping me much. > > There are still one thing that I don't understand: I cannot make this > work when I have already evaluated the call in the buffer. More > precisely, if I have the following: > > #+name: fetchcoq > #+BEGIN_SRC sh :exports none :results raw :var f="foo.v" > echo "#+BEGIN_SRC coq" > head $f > echo > echo "#+END_SRC" > #+END_SRC > > #+call: fetchcoq(f="demo.v") :results raw > > when I evaluate the call line, I get this (as expected): > > #+name: fetchcoq > #+BEGIN_SRC sh :exports none :results raw :var f="foo.v" > echo "#+BEGIN_SRC coq" > head $f > echo > echo "#+END_SRC" > #+END_SRC > > #+call: fetchcoq(f="demo.v") :results raw > > #+RESULTS: > #+BEGIN_SRC coq > Definition toto : forall x, exists y, x = y. > > Lemma foo: forall x, x=x. > #+END_SRC > > Unfortunately, if I export this, the code is duplicated. Here is the > generated html, for instance: > > , > | Definition > | toto : forall x, | style="color: #9370db;">exists y, x = y. > | > | Lemma foo: forall style="color: #D8FA3C;">x, x=x. > | #+END_SRC#+BEGIN_SRC coq > | Definition toto : forall | style="color: #D8FA3C;">x, exists > | y, x = y. > | > | Lemma foo: forall style="color: #D8FA3C;">x, x=x. > | > ` > > Exporting if the result is not in the buffer is fine. I tried adding a > ":results replace" as inner header argument to the call line and to the > fetchcoq block, but it does not change anything. > > How can I tell the call line to replace the results when exporting? The syntax of the call line is: #+call: []() So, you should add your option either in [] after the name, or at the end of the line -- I'm always hesitating about where to put the right stuff (not so enough clear yet in my mind)... Best regards, Seb -- Sebastien Vauban
Re: [O] Latex "Missing number, treated as zero."
On 01/12/13 20:23, Michael Strey wrote: Hi Ian, li...@wilkesley.net writes: This is a Latex problem, but I am hoping someone here can trow some light on it. No, it's not a LaTeX problem. \documentclass{scrlttr2} \usepackage[english]{babel} [NO-DEFAULT-PACKAGES] This line is no valid LaTeX code. As you already mentioned, if you remove `[NO-DEFAULT-PACKAGES]', the pdflatex run works. Please check your Emacs variable org-latex-classes. Here is what I have in this variable for my letter class: , | ("letter_private" "\\documentclass[fontsize=11pt,strey_privat]{scrlttr2}\n\\LoadLetterOption{DIN}\n[NO-DEFAULT-PACKAGES]\n[PACKAGES]\n[EXTRA]" | ("\\section{%s}" . "\\section*{%s}") | ("\\subsection{%s}" . "\\subsection*{%s}") | ("\\subsubsection{%s}" . "\\subsubsection*{%s}")) ` Hi Michael, Thanks for the help. I did have org-latex-classes set correctly. I discovered the cause of the problem when I found that if I let org generate the pdf file it worked correctly. However, if I used pdflatex, or xelatex from the command line on the generated tex file, I still got the error. Looking at how org produces the pdf file it uses the "nonstopmode" in the command line arguments to pdflatex. So when I used xelatex with this option: xelatex -interaction=nonstopmode test.tex The pdf file was generated correctly. I don't think this actually fixes the error, but the sledgehammer approach seems to work in this case:) Ian.
Re: [O] org-indent-mode corrupted most of a big org file
Rainer Stengele wrote: > last week I played around with org-indent-mode in my biggest (37.000 lines) > org file. > 3 days later I detected that most of the file was corrupted. > WHy so late? Using the agenda I only saw the todos and did not recognise the > corrupted structures. > Most "*" items had been placed at the beginning of the line and therefore now > became headlines. > I do not know how this happened. I am not sure if I myself was the reason > somehow. > Anyway I had to spend a fair amount of work to get the old file format from > subversion and insert the changes since the corruption. > > This is just a warning to have backups at hand before changing to org-indent > mode. > Then immediately and check often the contents of the file until you are sure > all is running well. > > Maybe someone has an idea. > > I will try to convert again later but then be much more careful. Last week, I also "lost" contents in the file I worked a lot in (R code, published to slides). In fact, I did not really lose it, thanks to SVN... That seems to have been a nasty bug in the caching. I should be fixed AFAICT. But, yes, this can always happen. Better to have fallback mechanisms when it occurs -- even if we've to admit it is very, very seldsom, and only with the dev trunk. Best regards, Seb -- Sebastien Vauban
[O] org-indent-mode corrupted most of a big org file
All, last week I played around with org-indent-mode in my biggest (37.000 lines) org file. 3 days later I detected that most of the file was corrupted. WHy so late? Using the agenda I only saw the todos and did not recognise the corrupted structures. Most "*" items had been placed at the beginning of the line and therefore now became headlines. I do not know how this happened. I am not sure if I myself was the reason somehow. Anyway I had to spend a fair amount of work to get the old file format from subversion and insert the changes since the corruption. This is just a warning to have backups at hand before changing to org-indent mode. Then immediately and check often the contents of the file until you are sure all is running well. Maybe someone has an idea. I will try to convert again later but then be much more careful. Rainer
Re: [O] Cannot generate latex preview images
n.goaz...@gmail.com writes: > Hello, > > Alan Schmitt writes: > >> The reason I have xltxtra is because I add it to the latex packages to >> use for export: >> >> (add-to-list 'org-latex-packages-alist '("" "xltxtra" t)) > ^^^ > > With this t, you are asking to use it also for snippets. See > `org-latex-packages-alist' for more information. Thanks a lot, it's working great now. Alan
Re: [O] How do I specify the language for a :results code block
t...@tsdye.com writes: > Alan Schmitt writes: > >> I tried this alternate approach, to directly generate the block: >> >> #+name: fetchcoq2 >> #+BEGIN_SRC sh :exports none :results raw :var f="demo.v" >> echo "#+BEGIN_SRC coq" >> head $f >> echo >> echo "#+END_SRC" >> #+END_SRC >> >> #+call: fetchcoq2("demo.v") >> >> But then I get a result like this, with extra quoting: >> >> #+RESULTS: >> : #+BEGIN_SRC coq >> : Definition toto : forall x, exists y, x = y. >> : >> : Lemma foo: forall x, x=x. >> : #+END_SRC >> >> I feel like I'm missing something obvious. ":results code" is exactly >> what I want (put the results in a SRC block), but I don't know how to >> specify the headers of the generated code block. > > You need :results raw at the end of the call line. > > #+name: fetchcoq2 > #+BEGIN_SRC sh :exports none :results raw :var f="demo.v" > echo "#+BEGIN_SRC coq" > echo $f > echo "#+END_SRC" > #+END_SRC > > #+results: fetchcoq2 > #+BEGIN_SRC coq > demo.v > #+END_SRC > > #+call: fetchcoq2("demo.v") :results raw > > #+results: > #+BEGIN_SRC coq > demo.v > #+END_SRC Thanks, this is helping me much. There are still one thing that I don't understand: I cannot make this work when I have already evaluated the call in the buffer. More precisely, if I have the following: --8<---cut here---start->8--- #+name: fetchcoq #+BEGIN_SRC sh :exports none :results raw :var f="foo.v" echo "#+BEGIN_SRC coq" head $f echo echo "#+END_SRC" #+END_SRC #+call: fetchcoq(f="demo.v") :results raw --8<---cut here---end--->8--- when I evaluate the call line, I get this (as expected): --8<---cut here---start->8--- #+name: fetchcoq #+BEGIN_SRC sh :exports none :results raw :var f="foo.v" echo "#+BEGIN_SRC coq" head $f echo echo "#+END_SRC" #+END_SRC #+call: fetchcoq(f="demo.v") :results raw #+RESULTS: #+BEGIN_SRC coq Definition toto : forall x, exists y, x = y. Lemma foo: forall x, x=x. #+END_SRC --8<---cut here---end--->8--- Unfortunately, if I export this, the code is duplicated. Here is the generated html, for instance: , | Definition toto : forall x, exists y, x = y. | | Lemma foo: forall x, x=x. | #+END_SRC#+BEGIN_SRC coq | Definition toto : forall x, exists y, x = y. | | Lemma foo: forall x, x=x. | ` Exporting if the result is not in the buffer is fine. I tried adding a ":results replace" as inner header argument to the call line and to the fetchcoq block, but it does not change anything. How can I tell the call line to replace the results when exporting? Thanks, Alan
Re: [O] Getting checkboxes in HTML output?
Hello, Carsten Dominik wrote: >> I agree, but couldn't think of any other way. There are 3 other >> unicode options: >> >> 1. A box with an X (☒ U+2612 BALLOT BOX WITH X) >> 2. A bare (unboxed) X (✗ U+2717 BALLOT X) >> 3 A bare checkmark (✓ U+2713 CHECK MARK) >> >> I also found this character: >> >> U+237B ⍻ not check mark >> >> If you think one of those would work we could use it instead. > > No, I don't think any of them does it. >From http://en.wikipedia.org/wiki/Checkbox: ╭ Tri-state checkbox │ │ Some applications use checkboxes that allow an indeterminate state in │ addition to the two provided by a normal checkbox. This third state is │ shown as a square or dash in the checkbox, and indicates that its state │ is neither checked nor unchecked. This is most often used when the │ checkbox is tied to a collection of items in mixed states. ╰ Something like [-] could be nice, then, as corresponds to the Org look and feel. Best regards, Seb -- Sebastien Vauban