Re: [O] GFDL
Hi Alan, thanks for chiming in. As Achim quoted, the GFLD says that the license should be in the document, but that makes the GFDL almost unfit for anything below a book. I have asked RMS about this, and he says that the license should be present in printed versions of the document. I find it very hard to believe that this must be the case. It bothers me mostly for the guide, where I did spend a lot of time to make it compact, and now something like one fifth of it is license text. We may actually consider to re-release the guide under a different license. Will try to find a solution here. - Carsten On 10.3.2013, at 01:43, Alan L Tyree alanty...@gmail.com wrote: On 10/03/13 02:11, Carsten Dominik wrote: On 9.3.2013, at 16:02, Achim Gratz strom...@nexgo.de wrote: Carsten Dominik writes: I am wondering, are we required to include the full text of the GFDL in the manual? I find it a big waste of space and feed that a link should do. But I have not been able to find the rules that say what needs to be included in a document distributed under GFDL? http://www.gnu.org/licenses/fdl-howto http://www.gnu.org/licenses/fdl-1.3.html To use this License in a document you have written, include a copy of the License in the document and put the following copyright and license notices just after the title page:[…] I read this: If there's just one document, it must contain the license in full, if there are several that reference each other, it is enough to include it in the top-level document. Yes it sounds like it. Thank you for the link. I still think it is crazy to add these 8 pages to each time someone prints it Regards - Carsten I also think it is crazy, and I don't think it is necessary. Although the FSF might prefer you to include the whole licence, in my opinion there is no need to do so. The manual is released under the GFDL and so is subject to the terms of the license. In my view, this statement from Creative Commons is accurate: How can I license my work? There is no registration to use the Creative Commons licenses. Licensing a work is as simple as selecting which of the six licenses best meets your goals, and then marking your work in some way so that others know that you have chosen to release the work under the terms of that license. The important part here is that others know, that is, it must be very clear that the manual is released subject to the GFDL. As a courtesy, a link to the GFDL or including a copy as part of the package might be nice. Alan -- Alan L Tyreehttp://www2.austlii.edu.au/~alan Tel: 04 2748 6206sip:172...@iptel.org
Re: [O] [Out-of-Thread] Re: [RFC] Org syntax (draft)
Carsten Dominik carsten.domi...@gmail.com writes: Another example is the emphasis stuff. There are no in-buffer settings for it, and they would be pretty hard to make. An in-buffer way of doing elisp is File Local Variables ; or is that not appropriate ? Maybe the question I'm askign is : why were #+KEYWORD lines favored over emacs' own mechanism of file local variables ? (I did google on this a bit, but no success.) -- Nico.
[O] Open PDF under Windows on specific page using PDF-XChange Viewer
Dear all, under Windows 7, Emacs 24.2 and orgmode 7.9.4 I would like to have a hyperlink to an external pdf. The pdf should be opened by a software called PDVXchange viewer /at a certain page/. The command on the command line in windows is: PDFXCview /A page=10 filename.pdf This works on the command line: The pdf is opened on page 10. But how do I implement that in orgmode? Which lines to add to my .emacs file? I found an example for evince here: http://emacswiki.org/emacs/OrgMode #+begin_source lisp (delete '(\\.pdf\\' . default) org-file-apps) (add-to-list 'org-file-apps '(\\.pdf::\\([0-9]+\\)\\' . evince \%s\ -p %1)) #+end_source I tried in vain to adapt it: #+begin_source lisp (delete '(\\.pdf\\' . default) org-file-apps) (add-to-list 'org-file-apps '(\\.pdf::\\([0-9]+\\)\\' . PDFXCview /A 'page'=%1 \%s\ )) #+end_source The hyperlink in org looks like this: [[file:filename.pdf::10][link to my file]] Could anybody provide a working solution? Emacs simply not reacts with my adaption. Thank you! Alexander
Re: [O] Open PDF under Windows on specific page using PDF-XChange Viewer
Hello Alexander, · AW alexander.will...@t-online.de wrote: [... snip ...] #+begin_source lisp (delete '(\\.pdf\\' . default) org-file-apps) (add-to-list 'org-file-apps '(\\.pdf::\\([0-9]+\\)\\' . PDFXCview /A 'page'=%1 \%s\ )) #+end_source for me the following works under Win7: #+begin_src emacs-lisp (add-to-list 'org-file-apps '(\\.pdf::\\([0-9]+\\)\\' . \C:/Program Files (x86)/Adobe/Acrobat 10.0/Acrobat/Acrobat.exe\ /A page=%1 %s) #+end_src (Without line break in the string) I think Win7 chokes on single quotes. HTH -- Bis neulich ... Thomas
[O] Changing '_archive' extension to allow Easy PG encryption: _archive.gpg?
Morning, I wanted to know how I would change the default '_archive' extension? I work with encrypted org files foo.gpg with Easy PG and the added header... # -*- mode: org; epa-file-encrypt-to: (mash...@toshine.net) -*- But today I discovered that when I archive my TODO items they are of course saved unencrypted to the archive file foo.gpg_archive. This really is not ideal situation! I tried adding my header to the _archive file but this doesn't work, I assume because the extension is not .gpg. Any ideas how would I change the default _archive extension to _archive.gpg or better setup a case where it would change the extension only if the org file is .gpg to begin with? I suppose could also look to setup a case for Easy PG to work with a different extension, but would prefer to define the change for org-mode instead. Many thanks, 'Mash
Re: [O] Changing '_archive' extension to allow Easy PG encryption: _archive.gpg?
'Mash (Thomas Herbert) mash...@toshine.net wrote: Morning, I wanted to know how I would change the default '_archive' extension? I work with encrypted org files foo.gpg with Easy PG and the added header... # -*- mode: org; epa-file-encrypt-to: (mash...@toshine.net) -*- But today I discovered that when I archive my TODO items they are of course saved unencrypted to the archive file foo.gpg_archive. This really is not ideal situation! I tried adding my header to the _archive file but this doesn't work, I assume because the extension is not .gpg. Any ideas how would I change the default _archive extension to _archive.gpg or better setup a case where it would change the extension only if the org file is .gpg to begin with? I suppose could also look to setup a case for Easy PG to work with a different extension, but would prefer to define the change for org-mode instead. C-h v org-archive-TAB gives some idea of the variables that are there. org-archive-location is what you need to change in order to add the .gpg suffix. I have no idea however, whether that's enough to allow you to do what you want to do. Nick
[O] latex figure scaling question, backward compatibility and outdated manual
the following page from the official manual http://orgmode.org/manual/Images-in-LaTeX-export.html says #+ATTR_LaTeX: width=5cm,angle=90 however, the new exporter does not recognize this syntax. instead the following works: #+ATTR_LaTeX: :width 5cm I was learning about this by guessing around for some time ... it is surprisingly hard to edebug the export process (any hints?). next, the following educated guess does not work: #+ATTR_LaTeX: :width 5cm :angle 90 instead one needs to say #+ATTR_LaTeX: :width 5cm,angle 90 I am not sure whether these changes are very intuitive, or more intuitive than the old style. but, the changes interfere with the aim to have reproducible documents. now, I am ready to convert all my old documents to the new syntax. Would someone share a (elisp/sed/perl/other) macro that reliably goes through old org-mode files and converts the part of the syntax which is not compatible with the new exporter? [it is easy to convert (width=) to (:width) in lines that start with #+ATTR_LaTeX: but this is not the full story. Such a macro could then be applied to update the manual ... cheers Thomas
Re: [O] Basic beamer export
On Sun, Mar 17, 2013 at 11:17 AM, Suvayu Ali fatkasuvayu+li...@gmail.comwrote: On Fri, Mar 15, 2013 at 10:59:22AM -0400, JBash wrote: M-x list-load-path-shadows output [...] ~/emacs/lisp/org-mode/lisp/org-list hides /usr/share/emacs/23.4/lisp/org/org-list ~/emacs/lisp/org-mode/lisp/org-plot hides /usr/share/emacs/23.4/lisp/org/org-plot [...] Looks okay to me. Are you sure your org directory is clean? What does `git status' and `git describe' say in your org directory? -- Suvayu Open source is the future. It sets us free. (Sorry for the delay in responding. I was called away from town on a family matter over the weekend. I VERY MUCH appreciate all the help) Here is 'git status' and 'git describe' jlb@debian64tu01:~/emacs/lisp/org-mode$ git status # On branch master nothing to commit (working directory clean) jlb@debian64tu01:~/emacs/lisp/org-mode$ git describe release_8.0-pre-54-gb5a8538 I've also tried to *not* escaping the curly braces as Eric suggested, but that resulted in no change in my output. I have essentially performed steps 1 and 3, as Feng shu suggested: Your can try like this: 1. Install emacs 24 deb package 2. remove org directory in /use/share/**/org 3. install org from org-mode.git I have not yet tried removing the org directory in /use/share/**/org (step 2). I'll try that next... But so that I understand, if the files are not hidden by that directory (as shown by 'list-load-path-shadows'), I would also not expect any impact from them (unless of course there is still something in my installation that is fouled up). Is that correct? Thanks again, Jerry
Re: [O] Confusion about attr_latex and new exporter
On Tue, Mar 19, 2013 at 12:07 AM, Aaron Ecay aarone...@gmail.com wrote: Hi again, 2013ko martxoak 19an, Aaron Ecay-ek idatzi zuen: I’m sorry, that was a mistake. I sent a patch to the HTML backend to enable this behavior, but forgot all about it. Then when I checked the code, it looked like the functionality was already there! I’ll follow up with Bastien about the patch, and see what its status is... I was very confused when I wrote this. The patches I had in mind were for a different issue. If #+ATTR_HTML: :width 200 ever worked for me, it was only because of me hacking org into a chimeric state. I guess you should continue to use #+ATTR_HTML: width=200 or whatever the working incantation for HTML has traditionally been. Thanks for the clarification, though regardless of the current state... what is the consensus on what it *should* be? The old lingo was: - #+attr_latex: width=Xcm - #+attr_html: width=Xpx That made sense to me since that's how they appear in \blah[width=Xcm]{file.png} or img src= width=Xpx /. With the move to :width value, I guess I'd rather see them work the same or have it be obviously backend-specific vs. having :width Xcm for LaTeX, and width=200 for html. At least make it identical to the actual backend syntax (quotes around the 200 for html) or in pure babel-esque language to unify (:width value, no quotes) for all. At least that's my thought from a user's perspective. Thanks! John Sorry for the noise, -- Aaron Ecay
Re: [O] Automatically escaping single spaces
Oops, forgot to reply to the list. On Mar 18, 2013, at 9:59 PM, Aaron Ecay aarone...@gmail.com wrote: Hi Suvayu, I’ve had on my list of rainy day ideas for a while writing a function for org-export-filter-plain-text-functions that would implement something like this. It should be as simple as doing a text replace, either on “. [^ ]” sequences in general or only spaces after a given list of abbreviations. The advantage of the second approach is that it could catch the case where “e.g.” is at the end of a line in the org document. (You’d also have to remove the newline: translate “e.g.\nfoo” into “e.g.\ foo”). Another advantage to pre-specifying is that you might want a non-breaking space in “Fig.~1” but a breakable space in “e.g.\ foo”; so you could keep two lists. FWIW, You shouldn't have to worry about newlines. If Emacs is setup properly they should never appear except at sentence boundaries. Which is to say, autofill and fill-paragraph know not to break lines in the middle of a sentence after punctuation. If the user adds a newline manually you can assume they meant it to be a new sentence. IIRC the variable at play is `sentence-end-double-space'. -Ivan
[O] [babel] var with result from shell script?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi I want to define two variables in org: #+PROPERTY: var+ GITHASH= #+PROPERTY: var+ GITCOMMITDATE= I can get them via the following code blocks: src_sh{git rev-parse HEAD} src_sh{git show -s --format=%ci HEAD} but how can I get the results into the variables? Thanks, Rainer - -- 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 : +33 - (0)9 58 10 27 44 Fax (D):+49 - (0)3 21 21 25 22 44 email: rai...@krugs.de Skype: RMkrug -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBAgAGBQJRSIZ0AAoJENvXNx4PUvmCClkH/26K6EB8Cj1JUIYZM/uoeHbu 4qGGBvuAzesyUo9ETw/frO/nRxYflkX2T5enR9rpGV5UahGwN7rCR+IJkO2Zwvf/ 0J6o9QMzYjlSldBI5n0Smtw4UN2G8oUhIbgSyYJkUUodYqp6rh5n04x5nWUubrwr hg8s/1F5eUiC5he8B6dCwinzWyAs+LIxKrva3yHx+YDMDlTe1fxgy86qjCWiaKQd A60MNb4vPeBO2iCE+bhrwClAfttpQ1lrppYo6v8M1WkQZML4Qzf2L42Qjn0+nija FviWR1BuzNLF3tac0QyaGncfKcKb6fNJqMXWxXwYhUX+YUCKB5YqNHjYQOOlM+U= =QQIQ -END PGP SIGNATURE-
Re: [O] Spelled out example of org-latex-format-headline-function customization?
Hi John, John Hendy jw.he...@gmail.com writes: Am I missing the docstring (not sure what that is). The docstring is the documentation string attached to a function/command or a variable/option. C-h v org-latex-format-headline-function RET will show you the docstring of the variable. C-h f org-latex-format-headline-default-function RET will show you the docstring of the function. I think it would be wonderful to simply spell out what =org-latex-format-headline-default-function= *is* in plain language, in the customize buffer. ETA: perhaps the plain language docstring used to be there, but was then replaced with a function? - http://lists.gnu.org/archive/html/emacs-orgmode/2013-02/msg01306.html Yes, that's the case. In looking through ox-latex.el, I found this: #+begin_src ox-latex.el (concat (and todo (format {\\bfseries\\sffamily %s} todo)) (and priority (format \\framebox{\\#%c} priority)) text (and tags (format \\hfill{}\\textsc{%s} (mapconcat 'identity tags :) #+end_src For myself, not being familiar with elisp, it's unclear how to translate that to a variable setting. I'm thinking at least some of that is unnecessary for actually setting the variable. If not, my best guess was: #+begin_src .emacs (setq org-latex-format-headline-function (concat (and todo (format {\\bfseries\\sffamily %s} todo)) (and priority (format \\framebox{\\#%c} priority)) text (and tags (format \\hfill{}\\textsc{%s} (mapconcat 'identity tags :) #+end_src That didn't work. You need to 1) define a new function (defun john-org-latex-headline-function (todo todo-type priority text tags) The docstring of my function. (concat (and todo (format {\\bfseries\\sffamily %s} todo)) (and priority (format \\framebox{\\#%c} priority)) text (and tags (format \\hfill{}\\textsc{%s} (mapconcat 'identity tags :) The function has 5 arguments : todo todo-type priority text tags All these arguments are strings that you can manipulate in your own function. E.g., (and todo (format {\\bfseries\\sffamily %s} todo)) translates If the todo argument has a value, then let's format the string {\\bfseries\\sffamily %s} by replacing %s with the todo string. Which results in e.g. {\bfseries\sffamily TODO} Inside formatting strings, you need to escape the \ character, i.e. to prepend it with another \ char. Thanks for enduring those of us with no elisp background knowledge. That's actually an area where I think we should make things simple. Nicolas and I have been exchanging a few ideas, but nothing stable emerges yet. Best, -- Bastien
Re: [O] Automatically escaping single spaces
Ivan Andrus darthand...@gmail.com writes: Oops, forgot to reply to the list. On Mar 18, 2013, at 9:59 PM, Aaron Ecay aarone...@gmail.com wrote: Hi Suvayu, I’ve had on my list of rainy day ideas for a while writing a function for org-export-filter-plain-text-functions that would implement something like this. It should be as simple as doing a text replace, either on “. [^ ]” sequences in general or only spaces after a given list of abbreviations. The advantage of the second approach is that it could catch the case where “e.g.” is at the end of a line in the org document. (You’d also have to remove the newline: translate “e.g.\nfoo” into “e.g.\ foo”). Another advantage to pre-specifying is that you might want a non-breaking space in “Fig.~1” but a breakable space in “e.g.\ foo”; so you could keep two lists. FWIW, You shouldn't have to worry about newlines. If Emacs is setup properly they should never appear except at sentence boundaries. Which is to say, autofill and fill-paragraph know not to break lines in the middle of a sentence after punctuation. If the user adds a newline manually you can assume they meant it to be a new sentence. IIRC the variable at play is `sentence-end-double-space'. I use something like this: #+BEGIN_SRC emacs-lisp (defun rasmus/latex-filter-double-space (text backend info) Tries to export \S1. S2\ as \S1.~S2\, while letting \S1. S2\ be exported without tilde (when (memq backend '(beamer latex)) (replace-regexp-in-string \\(\\. \\)\\{1\\}\\([^ ]\\) .~\\2 text))) (add-to-list 'org-export-filter-final-output-functions 'rasmus/latex-filter-double-space) #+END_SRC The list approach sounds better, I guess. . . Indeed it does not catch end of line stuff. Here's a test case #+BEGIN_SRC org #+NAME:ref #+BEGIN_SRC emacs-lisp (replace-regexp \\(\\. \\)\\{1\\}\\([^ ]\\) .~\\2) #+END_SRC * Test fig. 1 isn't here. Here is double space. Fig. 2 does not work fig. [[ref]] is also works #+END_SRC which translate to #+BEGIN_SRC latex \section[Test]{Test} \label{sec-1} fig.~1 isn't here. Here is double space. Fig. 2 does not work fig.~\ref{ref} is also works #+END_SRC –Rasmus -- Hvor meget poesi tror De kommer ud af et glas isvand?
Re: [O] Spelled out example of org-latex-format-headline-function customization?
On Tue, Mar 19, 2013 at 10:51 AM, Bastien b...@altern.org wrote: Hi John, John Hendy jw.he...@gmail.com writes: Am I missing the docstring (not sure what that is). The docstring is the documentation string attached to a function/command or a variable/option. C-h v org-latex-format-headline-function RET will show you the docstring of the variable. So the docstring is just the documentation definition? (In this case Documentation: Function for formatting the headline's text...?) C-h f org-latex-format-headline-default-function RET will show you the docstring of the function. And in this case: (org-latex-format-headline-default-function TODO TODO-TYPE PRIORITY TEXT TAGS)? I think it would be wonderful to simply spell out what =org-latex-format-headline-default-function= *is* in plain language, in the customize buffer. ETA: perhaps the plain language docstring used to be there, but was then replaced with a function? - http://lists.gnu.org/archive/html/emacs-orgmode/2013-02/msg01306.html Yes, that's the case. Got it. So the docstring is of no use unless you know how to write the function from scratch. snip That didn't work. You need to 1) define a new function snip Sounds good and this was Nick's instruction as well. Thanks for the assistance! That's actually an area where I think we should make things simple. Nicolas and I have been exchanging a few ideas, but nothing stable emerges yet. Good to know. It seems that variables *could* be passed to the format function. After all, the function takes five arguments which are all either strings or nil... so it would seem that one could have a variable like: (setq org-latex-headline-format (string string string string string)) which would feed into the default-headline-function function. Or splitting out into separate variables. Seems like the tension is between minimizing locations to make all of these settings and ease of use (for noobs). Thanks for all the efforts! John Best, -- Bastien
Re: [O] Spelled out example of org-latex-format-headline-function customization?
John Hendy jw.hendy at gmail.com writes: On Tue, Mar 19, 2013 at 10:51 AM, Bastien bzg at altern.org wrote: Hi John, John Hendy jw.hendy at gmail.com writes: Am I missing the docstring (not sure what that is). THAT docstring was removed when Bastien revised ox-latex.el on Feb 23. So follow what Bastien posts in this thread to do the customization. I'll add a note to my earlier post to point here. The docstring is the documentation string attached to a function/command or a variable/option. C-h v org-latex-format-headline-function RET will show you the docstring of the variable. HTH, Chuck
Re: [O] Spelled out example of org-latex-format-headline-function customization?
John Hendy jw.he...@gmail.com writes: So the docstring is just the documentation definition? (In this case Documentation: Function for formatting the headline's text...?) Yes. C-h f org-latex-format-headline-default-function RET will show you the docstring of the function. And in this case: (org-latex-format-headline-default-function TODO TODO-TYPE PRIORITY TEXT TAGS)? Not exactly... Emacs display the documentation after the definition of the function and its arguments. The definition here is: Default format function for a headline. See `org-latex-format-headline-function' for details. Good to know. It seems that variables *could* be passed to the format function. After all, the function takes five arguments which are all either strings or nil... so it would seem that one could have a variable like: (setq org-latex-headline-format (string string string string string)) which would feed into the default-headline-function function. Or splitting out into separate variables. Seems like the tension is between minimizing locations to make all of these settings and ease of use (for noobs). This is what our discussion with Nicolas is really about. There are problems with tags, though: you need to handle them one by one, not as a string. I'll send news if any! -- Bastien
Re: [O] [New exporter] Org LaTeX markup
Charles Berry ccberry at ucsd.edu writes: [snip] Can you give me a hint? M-x customize-variable RET org-latex-format-headline-function RET then copy and paste the last part of the docstring into the window - add a closing parenthesis at the end - and then modify it to your taste. UPDATE: See http://thread.gmane.org/gmane.emacs.orgmode/68691/focus=68713 for advice on this matter as this behavior was changed around Feb 23, 2013 HTH, Chuck
[O] Problems exporting LaTeX source code
Using org mode version 8.0-pre (release_8.0-pre-91-g437c62), I'm having trouble exporting LaTeX lists (itemize, description). Here's a sample file: #+title: Sample org file * Section 1 Some LaTeX source: #+begin_src latex :exports source \begin{itemize} \item Item 1 \item Item 2 \end{itemize} #+end_src 1) When I export this to HTML, I get a box showing \begin{itemize} but the rest of the box is blank. 2) When I export to LaTeX/PDF, I get something like (this is cut and pasted from the PDF file): Some LATEX source: [frame=lines,fontsize=,linenos]latex € Item 1 € Item 2 In other words, it looks like the LaTeX source is actually being compiled, and some internal org-mode exporter options look like they're being exported to the PDF file. Am I doing something wrong here? Thanks. Richard Stanton
Re: [O] org-caldav will cease to work with Google Calendar
Hi list, Agreed. Now to look for a replacement ... For what it's worth: org-caldav works very well with iCloud, but finding the correct server settings is a bit non-trivial - which is certainly deliberate of Apple. Apple's support for CalDAV is not likely to go away soon AFAICT, so it might serve ... Cheers, /v
Re: [O] Problems exporting LaTeX source code
Richard Stanton stan...@haas.berkeley.edu writes: Using org mode version 8.0-pre (release_8.0-pre-91-g437c62), I'm having trouble exporting LaTeX lists (itemize, description). Here's a sample file: #+title: Sample org file * Section 1 Some LaTeX source: #+begin_src latex :exports source \begin{itemize} \item Item 1 \item Item 2 \end{itemize} #+end_src 1) When I export this to HTML, I get a box showing \begin{itemize} but the rest of the box is blank. 2) When I export to LaTeX/PDF, I get something like (this is cut and pasted from the PDF file): Some LATEX source: [frame=lines,fontsize=,linenos]latex € Item 1 € Item 2 In other words, it looks like the LaTeX source is actually being compiled, and some internal org-mode exporter options look like they're being exported to the PDF file. Am I doing something wrong here? Perhaps. I don't see =source= on the list of :exports header arguments. If you change =source= to =code= does it work? hth, Tom -- Thomas S. Dye http://www.tsdye.com
Re: [O] Problems exporting LaTeX source code
Thanks for the suggestion, Thomas. I changed source to code and tried again. The results were exactly the same as with source. Best, Richard Stanton On 3/19/13 10:04 AM, Thomas S. Dye t...@tsdye.com wrote: Richard Stanton stan...@haas.berkeley.edu writes: Using org mode version 8.0-pre (release_8.0-pre-91-g437c62), I'm having trouble exporting LaTeX lists (itemize, description). Here's a sample file: #+title: Sample org file * Section 1 Some LaTeX source: #+begin_src latex :exports source \begin{itemize} \item Item 1 \item Item 2 \end{itemize} #+end_src 1) When I export this to HTML, I get a box showing \begin{itemize} but the rest of the box is blank. 2) When I export to LaTeX/PDF, I get something like (this is cut and pasted from the PDF file): Some LATEX source: [frame=lines,fontsize=,linenos]latex € Item 1 € Item 2 In other words, it looks like the LaTeX source is actually being compiled, and some internal org-mode exporter options look like they're being exported to the PDF file. Am I doing something wrong here? Perhaps. I don't see =source= on the list of :exports header arguments. If you change =source= to =code= does it work? hth, Tom -- Thomas S. Dye http://www.tsdye.com
[O] tangle files from non-code blocks?
Hi org-mode experts, I am wondering, is there anyway to tangle contents inside #+begin_example ... #+end_example in a similar way to tangle a code block? It doesn't work now (or do I miss anything?). IMHO, it would be a useful feature, isn't it? Thanks, Zech
[O] Include today's date in title?
I'm primarily publishing to LaTeX/PDF from org. I have a title: #+TITLE: Weekly Status TODAYS_DATE_HERE How can I get it to automatically export with today's date? Hopefully without a full babel elisp code block? Any ideas? BTW, converted to new exporter today. Pretty painless. -- Gary
Re: [O] Spreadsheet calculations (24.3/8.0-pre)
Hi Oliver, Oliver Večerník o...@vecernik.at writes: If I use `M-x org-table-recalculate-buffer-tables' even the headlines get screwed up. Am I doing something wrong or are there severe problems in the spreadsheet mode? #+CONSTANTS is meant to be used only once on the file, not per table. When used several times, `org-table-formula-constants-local' was defining the same constant several times, which is wrong. I fixed this. Let's take other problems one by one if you have time. Thanks, -- Bastien
Re: [O] two-way sync org agenda/ical
Hi Rasmus, Rasmus ras...@gmx.us writes: Here's a start: Feel free to start this on Worg! Worg is (truly) yours. -- Bastien
Re: [O] Bug with automatic alignment of table columns in HTML export
Hi Kodi, Kodi Arfer k...@arfer.net writes: Consider an Org file with the following content: | a | b | |-+---| | 100 | 1 | | 1 | 1 | | | 1 | | | 1 | | | 1 | | | 1 | | | 1 | | | 1 | Within Emacs, Org right-aligns the left column, as it should, since most nonempty cells in the column are numeric. In HTML export, though (starting from emacs -Q -l /tmp/minimal-org.el), the column comes out left-aligned. The problem seems to be with how the exporter treats empty cells, since if you put numbers in all the empty cells above, the column comes out right-aligned in HTML export. Fixed, thanks. -- Bastien
Re: [O] Confusion about attr_latex and new exporter
Hi John, John Hendy jw.he...@gmail.com writes: Thanks for the clarification, though regardless of the current state... what is the consensus on what it *should* be? The old lingo was: - #+attr_latex: width=Xcm - #+attr_html: width=Xpx ... and the new lingo is #+attr_latex: :width Xcm #+attr_html: :width Xpx for images. Images allow :width :height :alt attributes, while other elements like links and tables allow only the :options attribute. I updated ox-html.el so that it respects this syntax. Nicolas, would it be okay to make (org-export-read-attribute :attr_html element) return title=\Title\ instead of nil when the element's attributes are like this #+attr_html: title=Title ? Thanks, -- Bastien
Re: [O] GFDL
Hi Carsten, Carsten Dominik carsten.domi...@gmail.com writes: I find it very hard to believe that this must be the case. It bothers me mostly for the guide, where I did spend a lot of time to make it compact, and now something like one fifth of it is license text. We may actually consider to re-release the guide under a different license. It has to be noted that this policy has only been recently observed for Emacs manuals... before I asked about the GPL licensing of Org's manual on emacs-devel, there were a few manuals that still didn't embed the license. Also, I don't think this policy needs to be applied to orgguide.texi since it is not distributed with GNU Emacs. A simple sentence like You should have received a version of the GNU FDL license with GNU Emacs should be okay IMO. Best, -- Bastien
Re: [O] Fixing footnote HTML
Hi Samuel, Samuel Wales samolog...@gmail.com writes: It might be good to add a blank line after the Footnotes section. The default is fine IMHO. You'd need to define the #footnotes css id for this. HTH, -- Bastien
Re: [O] [PATCH] Enable appending to multivalued-property
Hi Thorsten, Thorsten Jolitz tjol...@gmail.com writes: sometimes it make more sense to append a new value to a multivalued-property than putting it in front of the old values, so here is a patch that enables this: I actually think this should be the default, it feels more natural. I applied this change. Also, I don't want to change the signature of this function as it is the same than other related functions (see the section in the manual about it.) Thanks for the patch anyway! -- Bastien
Re: [O] Block agendas and filtering
Hi Thomas, Thomas Moyer tommo...@gmail.com writes: What I want is a block agenda, using two agenda blocks. The first will *exclude* the entrys tagged as :chores: and the second will *include* any entry that is tagged with :chores:. Is there a way to accomplish this with tags, or maybe properties? In your agenda custom command first block: ... (org-agenda-tag-filter (+Tag)) ... In your agenda custom command second block: ... (org-agenda-tag-filter (-Tag)) ... Not tested, but it should work -- not the -/+ before the tag itself, that's what conditions tag filtering out/in. HTH, -- Bastien
Re: [O] Build fail with emacs 24.3.1
Hi Achim, Achim Gratz strom...@nexgo.de writes: Aside from the issue of whether using macros here is needed or appropriate, I can't find anything wrong with the macros or their use so far. If that upholds, the test not working points to a rather substantial bug in either the test framework or Emacs 24.3. It's not too late to explore this. I'm not sure if there's a way to circumvent eager macroexpansion to test how it gets involved. Some further testing seems to point to the let clause that produces the contents list: it never seems to be adding anything coming from the parent. Yeah... I've dugg quite far in many directions here, but I'm stuck. Anyway, `org-export-define-backend' and its friends are now defuns, since there is no good reason for them to be macros. Thanks, -- Bastien
Re: [O] Confusion with :PROPERTIES: insertion
Hi Lawrence, Lawrence Bottorff galaxybeinglam...@gmail.com writes: I've got a header, after which I want to insert * Header :PROPERTIES: :CUSTOM_ID: [2013-03-15 Fri 11:22] :END: I've tried C-c C-x d and C-u M-x org-insert-drawer. Sometimes C-c C-x d works (offering only [RESULTS] which creates empty :: ... :END:), sometime it does nothing. C-u M-x org-insert-drawer sometimes offers me choices, sometimes doesn't telling me I should use C-c C-x d. Once I do get :PROPERTIES: :END: C-c C-x p offers me choices `C-c C-x p' is the right thing to use for inserting properties. `C-c C-x d' is for inserting custom drawers. (I choose :CUSTOM_ID:) and seems to work properly, but again, sometimes does nothing after affirming prompting, What am I doing wrong. I simply want to have a timestamp property for each header. Can anyone advise me how to create this :PROPERTIES: insertion behavior consistently? Mhh.. I can't reproduce the problem. Can you provide a recipe with emacs -Q on how to reproduce this consistently? Thanks in advance, -- Bastien
Re: [O] links in orgtbl-to-html
Hi Luca, Luca Sabbatini sabbatini.l...@gmail.com writes: In an html file, using orgtbl-mode, I am trying to use install/send a table that has hyperlinks inside it. I've tried using org-mode syntax: [[www.google.com]], and I've tried using html syntax a href:www.google.commylink/a. Neither works as desired. This works fine with the current beta version. Please try it if you can: http://orgmode.org/org.html#Installation It didn't work for `orgtbl-to-latex' and `orgtbl-to-texinfo' though, so I fixed this. Thanks! HTH, -- Bastien
Re: [O] Org documentation patches party next week on IRC?
Hi Eric, Eric S Fraga e.fr...@ucl.ac.uk writes: my schedule is such that I would find it difficult to commit to any specific time. However, I will strive to update the beamer example and tutorial for the new exporter by mid next week; I had already started on it but got sidetracked by my recent move back from Australia to the UK... If I get a chance, I will join in on IRC when you have all chosen a time slot. well, there were not enough people replying on the doodle to make it useful and I'm a bit late behind my scheduled with respect to updating the manual :/ I'll send a note when I've done some progress that deserves a close proof-reading. Thanks! -- Bastien
Re: [O] LaTeX with embedded in-line code blocks and AucTeX
Hi Liam, Liam Healy l...@healy.washington.dc.us writes: The only way I can see to get AUCTeX is to use a LaTeX source code block; this does what I want, but now the inline code blocks are not expanded; instead, they are exported literally to the LaTeX. yes, as expected. Is there a way to have an exportable LaTeX source code block that expands in-line code blocks on export, I don't think so... Maybe others may help. Best, -- Bastien
Re: [O] exporting says OVERVIEW
Hi Samuel, Samuel Wales samolog...@gmail.com writes: Is there a possible speedup in export by not making it do some startup operations on temporary buffers? Yes, indeed. That's now implemented. Thanks! -- Bastien
Re: [O] [new-exporter] org-export-before-parsing-hook GOTCHA
Hi Charles, Charles Berry ccbe...@ucsd.edu writes: Is this a feature or a bug? A bug: the user is not supposed to be so careful. This should be fixed now, thanks! -- Bastien
Re: [O] Confusion about attr_latex and new exporter
Hi John, John Hendy jw.he...@gmail.com writes: I also tried =:width 5cm= for images. Despite this being options and sounding like it needs to be in the :options string instead of :width, it still works but quoted parts still get quotes =[width=5cm]= in the resultant .tex file. If I remove quotes, it works. I removed the quotes in http://orgmode.org/worg/org-8.0.html Thanks for reporting this, -- Bastien
Re: [O] org for screenwriting
Rustom Mody rustompm...@gmail.com writes: Something like http://fountain.io/ for org available? I don't think so. Btw, the output of fountain is very fluid (as expected), thanks for the link! -- Bastien
Re: [O] New Exporter html - latex - beamer
Eric S Fraga e.fr...@ucl.ac.uk writes: Robert Eckl eck...@gmx.de writes: I have to provide weekly newsletters in the format pdf and html. Up to now i did this with exporting to scrartcl, known as koma-script. Including images is a bit booring because i handle two formats, for example I am not sure what your latex bits are trying to accomplish so it's difficult to advise on how to achieve what you want. Maybe wrapfigure, which org export supports (float option, I believe, but I am not sure), is what you need instead of window? The latex bits are doing what they should. |-| I don't want the image floating, because | | the text regularly is small. The image | | will be placed how you can see here. |-| Here the text goes over the complete line - If I'm using a list i have to put it in a parbox. The environment window is provided by package picinpar, seems that it not works within beamer. Perhaps for this yasnippet as recommended from Marcin would be usefull. OTOH i would like to use beamer in future, Beamer_Col does a similar job, except of surrounding the image with text. Does Beamer provide something like this? But, if i write the text for Beamer-Output, i have to handle html-output extra. The LaTeX-package comment isn't provided by beamer, I don't know neither how to comment out the HTML-Code for LaTeX-Beamer-fragments nor how to comment out Beamer-Fragments für HTML-Export. Seems, Beamer+html is much more complicate than Beamer+scrartcl/article. Thanks, Robert
Re: [O] Bug with automatic alignment of table columns in HTML export
On 2013 Mar 19 Tue 1:26:13 PM -0400, Bastien b...@altern.org wrote: Hi Kodi, Kodi Arfer k...@arfer.net writes: Consider an Org file with the following content: | a | b | |-+---| | 100 | 1 | | 1 | 1 | | | 1 | | | 1 | | | 1 | | | 1 | | | 1 | | | 1 | Within Emacs, Org right-aligns the left column, as it should, since most nonempty cells in the column are numeric. In HTML export, though (starting from emacs -Q -l /tmp/minimal-org.el), the column comes out left-aligned. The problem seems to be with how the exporter treats empty cells, since if you put numbers in all the empty cells above, the column comes out right-aligned in HTML export. Fixed, thanks. You're quite welcome. That was prompt! I see this case now works in master. The catch is that there are still some cases which give inconsistent alignment between Emacs and HTML export, such as: | a | b | |-+---| | 100 | 1 | | 1 | 1 | | 1 | 1 | | 1 | 1 | | a | 1 | | | 1 | | | 1 | | | 1 | | | 1 | | | 1 | | | 1 | I believe the heuristic used for in-buffer display is that empty cells are ignored entirely when doing the comparison against org-table-number-fraction.
Re: [O] GFDL
Dnia 2013-03-19, o godz. 07:44:51 Carsten Dominik carsten.domi...@gmail.com napisał(a): Hi Alan, thanks for chiming in. As Achim quoted, the GFLD says that the license should be in the document, but that makes the GFDL almost unfit for anything below a book. I have asked RMS about this, and he says that the license should be present in printed versions of the document. I find it very hard to believe that this must be the case. It bothers me mostly for the guide, where I did spend a lot of time to make it compact, and now something like one fifth of it is license text. We may actually consider to re-release the guide under a different license. Just a n00b's (and IANAL's) 2cents here: what about including the GFDL in, say 5pt font? Yes, it is awful, but at least does not take up dozens of pages... Will try to find a solution here. - Carsten Best, -- Marcin Borkowski http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski Adam Mickiewicz University
[O] Bug formatting source code in new latex exporter
pgpGMFm_GispR.pgp Description: PGP message
[O] Bug formatting source code in new latex exporter
Sorry, previous mail seems to have gotten munged, lets' try again. There is a bug with ox-latex and long listings. If the listing has a label (name) or caption, it is wrapped in a '\begin{listing}[H]' block. This causes listings longer than one page to be truncated if they have labels, which means you can't have callable code longer than one page (~40 lines for US Letter paper) and print it with minted. The problem is on line 2178 of ox-latex: (when (or label caption) should probably be: (when caption An example document is below. rick --- #+TITLE:Test #+OPTIONS: H:3 num:nil toc:nil \n:nil @:t ::t |:t ^:{} -:t f:t *:t :t * Setup and short examples :PROPERTIES: :EXPORTS: code :END: *NOTE:* Run this section to generate the long examples before generating the latex/pdf output. ** latex listing options #+BEGIN_SRC elisp :results silent (setq org-latex-listings 'minted org-latex-minted-options '((linenos true) (stepnumber 5) (numbersep 0.25em) (frame leftline) (framerule 1pt) (rulecolor \\color{framecolor}))) #+END_SRC ** source w/ no label #+BEGIN_SRC perl :eval never foreach my $i qw(with without) { print join( \n, sprintf(* Long listing %s label, $i), ($i eq 'with' ? '#+name: long-listing' : ''), #+BEGIN_SRC perl :exports code, (map { print '$_' } 1..60), #+END_SRC\n, ); } #+END_SRC ** src w/ with label #+name: generate-listing #+BEGIN_SRC perl :results raw foreach my $i qw(with without) { print join( \n, sprintf(* Long listing %s label, $i), ($i eq 'with' ? '#+name: long-listing' : ''), #+BEGIN_SRC perl :exports code, (map { print '$_' } 1..60), #+END_SRC\n, ); } #+END_SRC
Re: [O] GFDL
Hi Marcin, Marcin Borkowski mb...@wmi.amu.edu.pl writes: Just a n00b's (and IANAL's) 2cents here: what about including the GFDL in, say 5pt font? Yes, it is awful, but at least does not take up dozens of pages... Yes -- but I don't know how to set the font to 5pt in .texi files. AFAIK, you can change the font _globally_ to @fonttextsize 10 or 11, but not for one section only and not below 10pt... I'd be glad to be wrong of course ! -- Bastien
[O] python sessions
I must be failing to understand something. I'm running Emacs 24.3 on Windows, with latest trunk org-mode. I can't get python functions to persist across blocks in session mode. Here's my foo.org: === * My Document #+BEGIN_SRC python :exports results :results output :session def foo(x): return x+1 print hi #+END_SRC #+RESULTS: : hi #+BEGIN_SRC python :exports results :results output :session print foo(100) print bye #+END_SRC In session mode, shouldn't foo be defined in the second python block? When I export this, I get NameError: name 'foo' is not defined I may be doing something wrong, because if I name my python session, I never see a buffer of that name, and I expected to. Any help? -- Gary
Re: [O] Errors on start up when loading ox-md and ox-beamer (seems caused by recent commit)
Hi John, how did you pull? by using git pull or make update? Also, after pulling, did you run on of these? ~$ make ~$ make autoloads I miss the simplicity of having Org up and running after a simple pull... -- Bastien
Re: [O] New Exporter html - latex - beamer
Robert Eckl eck...@gmx.de writes: Eric S Fraga e.fr...@ucl.ac.uk writes: Robert Eckl eck...@gmx.de writes: I have to provide weekly newsletters in the format pdf and html. Up to now i did this with exporting to scrartcl, known as koma-script. Including images is a bit booring because i handle two formats, for example I am not sure what your latex bits are trying to accomplish so it's difficult to advise on how to achieve what you want. Maybe wrapfigure, which org export supports (float option, I believe, but I am not sure), is what you need instead of window? The latex bits are doing what they should. |-| I don't want the image floating, because | | the text regularly is small. The image | | will be placed how you can see here. |-| Here the text goes over the complete line - If I'm using a list i have to put it in a parbox. The environment window is provided by package picinpar, seems that it not works within beamer. Perhaps for this yasnippet as recommended from Marcin would be usefull. OTOH i would like to use beamer in future, Beamer_Col does a similar job, except of surrounding the image with text. Does Beamer provide something like this? But, if i write the text for Beamer-Output, i have to handle html-output extra. The LaTeX-package comment isn't provided by beamer, I don't know neither how to comment out the HTML-Code for LaTeX-Beamer-fragments nor how to comment out Beamer-Fragments für HTML-Export. Seems, Beamer+html is much more complicate than Beamer+scrartcl/article. You might be able to do what you want with filter functions. Suppose you start with this: (Note: long lines might have been wrapped.) , | #+ATTR_HTML: alt=my altname title=my full title align=right width=30% padding=0em padding-top=0em |[[http://my.com][my place.jpg:windowenv:]] | More stuff | - item 1 | - item 1.1 | - item 1.2 | #+LATEX: } \end(window} ` and want to get this from latex export: , | \begin{window}[0,r,\href{http://my.com}{\includegraphics[width=0.28\textwidth]{my place}},{}] | \parbox{0.7\textwidth}{ | More stuff | \begin{itemize} | \item item 1 | \begin{itemize} | \item item 1.1 | \item item 1.2 | \end{itemize} | \end{itemize} | } \end(window} ` and this from html , | p | a href=http://my.com; alt=my altname title=my full title align=right width=30% padding=0em padding-top=0emmy place.jpg/a | More stuff | /p | ul class=org-ul | liitem 1 | ul class=org-ul | liitem 1.1 | /li | liitem 1.2 | /li | /ul | /li | /ul ` You can do that with this filter: , | #+BEGIN_SRC emacs-lisp | (defun filter-links-windowized (link backend info) | Rid :windowenv: from LINK desc and format per BACKEND. Ignore INFO. | (let ((clean-string (replace-regexp-in-string :windowenv: link))) | (if (eq backend 'latex) | (let ((wprefix \\begin{window}[0,r,) | (wpostfix}},{}]\n\\parbox{0.7\\textwidth}{) | (repstrng | \\1{includegraphics[width=0.28textwidth]\\2})) | (concat wprefix | (file-name-sans-extension | (replace-regexp-in-string | \\([^}]*}\\)\\({.*}\\) | repstrng | clean-string)) | wpostfix)) | clean-string))) | #+end_src ` which you install with this line: , | #+begin_src emacs-lisp :eval never | (add-to-list 'org-export-filter-link-functions 'filter-links-windowized) | #+END_SRC ` Then run the new exporter. What you want yas to provide is something like , | #+ATTR_HTML: alt= title= align= ... | | #+LATEX: } \end(window} ` if you like to use C-c C-l to enter the link - just remember to add the :windowenv: after the link description. or , | #+ATTR_HTML: alt=my altname title=my full title align= ... | [[ ][ :windowenv:]] | | #+LATEX: } \end(window} ` if you don't use C-c C-l. HTH, Chuck
Re: [O] Errors on start up when loading ox-md and ox-beamer (seems caused by recent commit)
On Tue, Mar 19, 2013 at 6:48 PM, Bastien b...@altern.org wrote: Hi John, how did you pull? by using git pull or make update? - git pull - make clean make make doc I'm kind of glad you asked, as this used to (I think) be the right method, but I have a vague notion that there's some built-in-org way now? I don't install to anywhere, so I'm only interested in compiling and loading right from the git repo vs. scattering files all over. All ears to documentation about a proper way, if there is one that's now recommended. Also, after pulling, did you run on of these? ~$ make ~$ make autoloads I miss the simplicity of having Org up and running after a simple pull... -- Bastien John
Re: [O] Errors on start up when loading ox-md and ox-beamer (seems caused by recent commit)
John Hendy jw.he...@gmail.com writes: On Tue, Mar 19, 2013 at 6:48 PM, Bastien b...@altern.org wrote: Hi John, how did you pull? by using git pull or make update? - git pull - make clean make make doc I'm kind of glad you asked, as this used to (I think) be the right method, but I have a vague notion that there's some built-in-org way now? ~$ make update will pull and make for you... ~$ make help ~$ make helpall are useful too. I don't install to anywhere, so I'm only interested in compiling and loading right from the git repo vs. scattering files all over. All ears to documentation about a proper way, if there is one that's now recommended. I'd recommend ~$ make update Oh, btw, I fixed the problem in master, was my fault, not the installation fault... thanks for reporting this! -- Bastien
Re: [O] python sessions
On Tue, Mar 19, 2013 at 4:40 PM, Gary Oberbrunner ga...@oberbrunner.com wrote: I must be failing to understand something. I'm running Emacs 24.3 on Windows, with latest trunk org-mode. I can't get python functions to persist across blocks in session mode. Here's my foo.org: === * My Document #+BEGIN_SRC python :exports results :results output :session def foo(x): return x+1 print hi #+END_SRC #+RESULTS: : hi #+BEGIN_SRC python :exports results :results output :session print foo(100) print bye #+END_SRC In session mode, shouldn't foo be defined in the second python block? When I export this, I get NameError: name 'foo' is not defined I may be doing something wrong, because if I name my python session, I never see a buffer of that name, and I expected to. Any help? -- Gary You should probably post your babel configuration from .emacs. This works for me (mostly). I'm using python 3.3 and so the print function has changed to requiring parentheses. I can switch to a buffer called *Python*, however, and =print(hi)= works fine. If I change to =print(foo(100))=, I get 101 in the #+RESULTS block. It's probably got something to do with your setup; taking a look at your config should help others help you out. Best regards, John
[O] Creating live elisp link
I'm trying to create a link that takes an elisp expression and evaluates it in another buffer. Here's what I've come up with 1. C-c C-l 2. choose elisp: 3. In the mini buffer: Link: elisp:(with-output-to-temp-buffer scratch (print 20)) Description: Print 20 Okay, this calls up the scratch buffer and prints out 20. But how would I call up scratch and, say, change its mode to lisp with (lisp-interaction-mode)? I can try: Link: elisp:(with-output-to-temp-buffer scratch (eval '(lisp-interaction-mode))) but this only seems to change my active org file's org-mode to lisp-interaction-mode. Not a pretty sight. My Messages says: Execute (with-output-to-temp-buffer scratch (eval '(lisp-interaction-mode))) as elisp? y (with-output-to-temp-buffer scratch (eval '(lisp-interaction-mode))) = nil But of course [[elisp:(zone)][zone]] is kinda exciting... What am I doing wrong? LB
[O] [BUG] ob-sql.el: probably an extra paren
Compiling it I get , | Compiling /home/nick/src/emacs/org/org-mode/lisp/ob-sql.el... | | In org-babel-execute:sql: | ob-sql.el:143:10:Warning: reference to free variable `cond' | ob-sql.el:170:26:Warning: `t' called as a function | ob-sql.el:181:66:Error: Invalid read syntax: ) ` I don't know what the reference to free variable `cond' is all about (sounds bogus to me), but the invalid read syntax is real. Can we please make it an invariable practice to run `make test' before every push? Thanks, Nick Org-mode version 8.0-pre (release_8.0-pre-144-g855dcf.dirty @ /home/nick/elisp/org-mode/lisp/)
Re: [O] GFDL
Dnia 2013-03-19, o godz. 22:35:59 Bastien b...@altern.org napisał(a): Hi Marcin, Marcin Borkowski mb...@wmi.amu.edu.pl writes: Just a n00b's (and IANAL's) 2cents here: what about including the GFDL in, say 5pt font? Yes, it is awful, but at least does not take up dozens of pages... Yes -- but I don't know how to set the font to 5pt in .texi files. AFAIK, you can change the font _globally_ to @fonttextsize 10 or 11, but not for one section only and not below 10pt... I'd be glad to be wrong of course ! What about @tex \global\font\legalese=cmr5\global\legalese @end tex ... @tex \global\rm @end tex ? (Note: I'm not a TeXinfo expert - just skimmed through the manual and used my plain TeX powah from the old times I didn't use LaTeX;).) Best, -- Marcin Borkowski http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski Adam Mickiewicz University
Re: [O] python sessions
John Hendy jw.he...@gmail.com wrote: On Tue, Mar 19, 2013 at 4:40 PM, Gary Oberbrunner ga...@oberbrunner.com wrote: I must be failing to understand something. I'm running Emacs 24.3 on Windows, with latest trunk org-mode. I can't get python functions to persist across blocks in session mode. Here's my foo.org: === * My Document #+BEGIN_SRC python :exports results :results output :session def foo(x): return x+1 print hi #+END_SRC #+RESULTS: : hi #+BEGIN_SRC python :exports results :results output :session print foo(100) print bye #+END_SRC In session mode, shouldn't foo be defined in the second python block? When I export this, I get NameError: name 'foo' is not defined I may be doing something wrong, because if I name my python session, I never see a buffer of that name, and I expected to. Any help? -- Gary You should probably post your babel configuration from .emacs. This works for me (mostly). I'm using python 3.3 and so the print function has changed to requiring parentheses. I can switch to a buffer called *Python*, however, and =print(hi)= works fine. If I change to =print(foo(100))=, I get 101 in the #+RESULTS block. I don't - I get the same error as Gary. And looking at the code of org-babel-python-initiate-session-by-key, I don't understand how it's supposed to work: python-buffer is nil to begin with; the cond takes the first branch and starts a python session. When we come to (setq org-babel-python-buffers (cons (cons session python-buffer) (assq-delete-all session org-babel-python-buffers))) python-buffer is still nil, so we are cooked. Maybe python-buffer was set as a side-effect of run-python in earlier versions of emacs? If so, it does not seem to be the case now. Nick Org-mode version 8.0-pre (release_8.0-pre-144-g855dcf.dirty @ /home/nick/elisp/org-mode/lisp/) GNU Emacs 24.3.50.2 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.4) of 2012-12-29 on alphaville
Re: [O] [html] nil getting inserted
On 19 March 2013 20:24, Samuel Wales samolog...@gmail.com wrote: I am getting this diff in HTML output in recent git master. I don't think I changed anything and I have no filters for links. I haven't tried it in emacs -Q though. Note the nil before the . === -severe to any person who is not a href=http://thekafkapandemic.blogspot.com/2012/04/misopathy.html;misopathic/a, but they are +severe to any person who is not a href=http://thekafkapandemic.blogspot.com/2012/04/misopathy.htmlnilmisopathic/a, but they are === Thanks. Samuel Samuel, Did you see the recent thread http://article.gmane.org/gmane.emacs.orgmode/68325? I don't export so I don't claim to know, but that suggests a pull might contain a fix. Best, Brian vdB
Re: [O] Spreadsheet calculations (24.3/8.0-pre)
Hi Bastien, #+CONSTANTS is meant to be used only once on the file, not per table. that's how I understood it. When used several times, `org-table-formula-constants-local' was defining the same constant several times, which is wrong. I fixed this. I can confirm this is working now. Let's take other problems one by one if you have time. Sure. Let's start with following tables and Org-mode version 8.0-pre (release_8.0-pre-144-g855dcf @ /home/ov/p/org-mode/lisp/): #+TITLE: Nutrition Facts #+CONSTANTS: b=100.0 j=4.182 #+TBLNAME: nf | Product | kJ | kcal | |---+--+--| | Bread | 1372 | 328 | | Butter| 3054 | 730 | | Marmalade | 926 | 221 | #+TBLFM: $3=$2/$j;%.0f | Product |g | kJ | kcal | |---+--+--+--| | Bread | 50.6 | 658 | 157 | | Butter| 11.5 | 150 | 36 | | Marmalade | 19.7 | 256 | 61 | |---+--+--+--| | | | 1064 | 254 | #+TBLFM: $3='(* $2 (/ (org-lookup-first $1 '(remote(nf,@I$1..@II$1)) '(remote(nf,@I$2..@II$2))) $b));N%.0f::$4=$3/$j;%.0f::@$3..$4=vsum(@I..II) I'm reapplying formulas by pressing `C-c C-c' on the hash mark of the format line. The expected results are: | Product |g | kJ | kcal | |---+--+--+--| | Bread | 50.6 | 694 | 166 | | Butter| 11.5 | 351 | 84 | | Marmalade | 19.7 | 182 | 44 | |---+--+--+--| | | | 1227 | 294 | Let's take this apart: #+BEGIN_SRC emacs-lisp (values (* 50.6 (/ 1372 100.0)) (* 11.5 (/ 3054 100.0)) (* 19.7 (/ 926 100.0))) #+END_SRC #+RESULTS: | 694.23201 | 351.21 | 182.422 | I was bitten myself by setting `b=100', which is an integer and led to the wrong result. But Org-mode still calculates as if `b' were an integer. But even replacing `$b' with `100.0' still gives wrong results (second and third line): | Product |g | kJ | kcal | |---+--+--+--| | Bread | 50.6 | 694 | 166 | | Butter| 11.5 | 158 | 38 | | Marmalade | 19.7 | 270 | 65 | |---+--+--+--| | | | 1122 | 269 | #+TBLFM: $3='(* $2 (/ (org-lookup-first $1 '(remote(nf,@I$1..@II$1)) '(remote(nf,@I$2..@II$2))) 100.0));N%.0f::$4=$3/$j;%.0f::@$3..$4=vsum(@I..II) -- Oliver