Re: [O] [PATCH] latex export - title placement
At Fri, 03 Jun 2011 00:23:25 -0400, Nick Dokos wrote: > > Sebastian Hofer wrote: > > > At Thu, 02 Jun 2011 11:57:07 -0400, > > Nick Dokos wrote: > > > > > > > At Wed, 01 Jun 2011 18:05:28 -0400, > > > > Nick Dokos wrote: > > > > > > > > > > An empty > > > > > > > > > > #+AUTHOR: > > > > > > > > > > disables the insertion of author (assuming that TITLE is not empty - > > > > > see below.) > > > > > > > > > > > > > > > > > - with-date (wdate) > > > > > > > > > > An empty > > > > > > > > > > #+DATE: > > > > > > > > > > disables the insertion of date (same assumption.) > > > > > > > > > > > > - with-maketitle (wmtitle) > > > > > > > > > > An empty > > > > > > > > > > #+TITLE: > > > > > > > > > > disables the insertion of \maketitle. > > > > > > > > To be honest, I didn't try setting empty author and date (which of > > > > course makes sense) I just tried not setting them at all, which gives > > > > default values. The main reason I submitted this patch, however, is > > > > having better control of \maketitle. Personally I would like to be > > > > able to have the title and author at the beginning of the file, just > > > > for the looks, and still be able to produce a customized title. Of > > > > course it is highly debatable if this is a sound reason to introduce > > > > new options (I would argue yes). > > > > > > > > > > Before anybody else wastes their time on this: I'm not sure whether I > > > was in an alternative universe yesterday, or I am in one today, but > > > I can't even reproduce my own results. I'll start again and try to get it > > > right this time, but I'm not going to be able to do that immediately. > > > > > > Apologies for the confusion. > > > > Concerning confusion: What I actually wanted to say above was that the > > main focus of the patch was to provide means for controlling the > > placement of \author, \date, \email etc., not \maketitle. > > > > Apologies for the confusion :) > > > > OK, let me restate my current conclusions (or confusions, as the case may be). > First, I have to correct the empty cases: > > o an empty #+TITLE: generates a \title{} (in the preamble currently) > but does not generate a \maketitle. > > o an empty #+AUTHOR generates an \author{}. > > o an empty #+DATE generates a \date{}. > > I don't know what I was smoking yesterday, but I was definitely hallucinating. > > Then the absent cases: > > o an absent #+TITLE: generates a \title{foo} where "foo" is > heuristically obtained either from the buffer (it grabs the first > "text" (i.e. not starting with | or #) line before the first > headline - this seems a somewhat random heuristic to me) or from the > filename. > > o an absent #+AUTHOR generates an \author{foo} where foo is generated > from the user-full-name variable (and optionally additional email info). > > o an absent #+DATE: generates a \date{\today}. > > The author info can be suppressed by using > > #+OPTIONS: author:nil > > but the other two cannot - if Sebastian wants to modify his patch, > suppressing these two might be useful. For a model to imitate, look > for :auth-info in org-exp.el and org-latex.el, and add e.g. :title-info > and :date-info. I would make them generic, not specific to latex. Only > the latex exporter will use them to begin with, but the other exporters > can do so in the future. > > I hope that I have described things correctly, but I'd be happy to > get corrections. > > OTOH, none of this is necessary for revtex4-1. The main constituent of > the solution to that problem is that \maketitle is not hardcoded into > the latex exporter: it is instead the value of the variable > org-export-latex-title-command. By redefining this variable, you can put > all the frontmatter stuff where revtex wants it. That does not solve the > whole problem since the exporter puts frontmatter stuff in the preamble as > well and revtex chokes on that. So here's the plan: > > - you have a file, ff2.tex, with the front page stuff: \title, \author, > \affiliation etc. > > - you have a file, abstract2.tex, with the abstract - this is not > strictly necessary, but I like the separation of the two files > and it's as easy to deal with two files as it is to deal with one. > > - you redefine the above variable to be > "\\input{ff2}\\input{abstract2}\\maketitle", so that they all end up > inside the document body and revtex is happy - well, almost. > > - there is still the matter of all the stuff (\title, \author, \date) > that the exporter puts in the preamble. But since they are all > redefined later, they don't matter. > > - except that revtex still chokes on them because they are in the > "wrong" place. But that is easily dealt with, with the revtexbug.sty > trick I sent out yesterday. > > Originally, I had the two files above (then named ff.tex and abstract.tex) > as separate files, but since you mentioned that you were tangling them, I > assume
Re: [O] [PATCH 2/2] lisp/ob.el: Don't modify babel info when hashing it
Eric Schulte wrote: > Hi Lawrence, > Is there a reason to make this copy? Given that params is used like a > hash/dictionary the order of it's elements should not matter. Is there > a case where this patch is necessary to avoid buggy behavior? Ah, but the sorting is happening so that the hashing function is stable to changes in the order of the arguments, no? So I think sorting is necessary. At least, the sort was already there, I've just added the copy-sequence. > If so then I'm happy to apply the patch, but if there is no need then > I'd rather avoid the (admittedly small) overhead of making a copy of the > params list. [...] It seems to be necessary to correctly link to the produced graphics output from (say) R plotting if :cache yes is specified. Try this without the patch: * header #+begin_src R :cache yes :exports results :file plot.png :results graphics curve(1*x, from=1, to=10, lwd=2) #+end_src #+results: and evaluate the code block, we get: #+results[4d3e7ef5e40f7b608d400c310401c15e913a22c0]: : plot.png Rather than the (correct): #+results[4d3e7ef5e40f7b608d400c310401c15e913a22c0]: [[file:plot.png]] The problem is that (sort v 'string<) destructively modifies v, and in this case, that means that the "file" argument to :result-params in thrown away. Lawrence -- Lawrence Mitchell
Re: [O] [Orgmode] S5 export
Hello Eric, This is amazing, actual emacs lisp code from my explanations, thanks a lot! If welcomed, I have a few comments related to how I currently use this function (I have a talk coming soon :-) ) - If all "star" headlines become slides, it quickly leads to awkward layouts with empty slides below one star headings. I made a modification to the code to choose only one star headings as slides. This way, level 2 headings can be used as "in slide" headings. I used an (if (looking-at "^\\* ") XXX) in the preprocess hook for that. - An actual "title page" seems more appropriate, so I added one with "title author date" as h1,h2 and h3 headings. The css need to be tweaked a little bit to get nice results. My modified org-export-as-s5 function is attached. org-export-as-s5.el Description: Binary data I also posted an example online. It it exported from the file s5- test.org with the function defined in the attached file. The css is very slightly modified. The "scientific content" of the talk is incomplete, this is normal :-/ http://homepages.ulb.ac.be/~pdebuyl/lectures/s5-test.html http://homepages.ulb.ac.be/~pdebuyl/lectures/s5-test.org For those reading, I'll mention that using the html export, as done here, allows to include syntax-highlighted code and LaTeX equations very easily. Regards, Pierre Le 1 juin 11 à 18:41, Eric Schulte a écrit : Hi Pierre, I've taken your very thorough S5 instructions and converted them into a single `org-export-as-s5' function. The attached archive file holds an s5.org Org-mode file which defines this function, as well as the ui directory required for S5, and an html file which results from calling the `org-export-as-s5' function in the s5.org file. For now the results are also posted up at http://cs.unm.edu/~eschulte/notes/s5/s5.org http://cs.unm.edu/~eschulte/notes/s5/s5.html Thanks for the clear explanation which lead to such an easy translation into elisp. Please let me know if you think this should be augmented in any way, or if the defined function throws any errors on your system. Best -- Eric Pierre de Buyl writes: Hello, After a lot a reading of org-exp.el and org-html.el I finally figured out the existence of the "HTML_CONTAINER_CLASS" property. I could then figure a minimal way to make a s5 presentation. Minimal in the sens of minimum difference with the html exporter. After setting a few STYLE and OPTIONS lines in an org file, three steps are needed: 1. Set the HTML_CONTAINER_CLASS to "slide" on level 1 headings 2. Set org-export-html-toplevel-hlevel to "1", so that slide titles behave properly 3. Replace in the html output by Interactive Python plotting You need the "ui" directory from the S5 archive to make it work indeed, http://meyerweb.com/eric/tools/s5/ . I attach an example org file and the resulting html (which was tweaked according to step 3). Pierre Le 3 févr. 11 à 12:23, Bastien a écrit : Hi Pierre, Pierre de Buyl writes: S5 allows one to present a slideshow in a web browser, even full screen for some browsers. I know that the topic has come here already, but I actually hacked the excellent org-html.el export file to produde a S5 slideshow with org. This looks useful. By reading your code, I see org-export-as-s5 is a variation over org-export-as-html. I would welcome an approach where we factor out some elements of org-export-as-html, so that exporting to s5 would just require the user to customize those elements. Does that seem reasonable to you? Would you volunteer to make org-export-as-html a bit more general? Even a precise comparison of org-export-as-s5 against org-export-as-html would be helpful at this point. Thanks! -- Bastien -- Eric Schulte http://cs.unm.edu/~eschulte/
Re: [O] [Orgmode] S5 export
Hi Pierre, Pierre de Buyl writes: > Hello Eric, > > This is amazing, actual emacs lisp code from my explanations, thanks a > lot! > I'm happy to share it, thanks for the idea and the thorough explanation. > > If welcomed, I have a few comments related to how I currently use this > function (I have a talk coming soon :-) ) > Certainly, I'm happy to hear your feedback. I have the most recent version of my code up in a git repository available at [1], with the file defining the `org-export-as-s5' function up at [2]. > > - If all "star" headlines become slides, it quickly leads to > awkward layouts with empty slides below one star headings. Agreed, for this reason `org-export-headline-levels' is set to 1. > > I made a modification to the code to choose only one star > headings as slides. This way, level 2 headings can be used as "in > slide" headings. > I used an (if (looking-at "^\\* ") XXX) in the preprocess hook > for that. I think using the `org-export-headline-levels' variable should be an easier way to implement this. See line 29 of the current code where this variable is set. Oh, looking more closely, I see why you've made this change. Even though it shouldn't affect the output it seems wasteful to add the 'html-container-class property to non-top-level headlines. I've added a slight modification of your change to my code. > > - An actual "title page" seems more appropriate, so I added one > with "title author date" as h1,h2 and h3 headings. > Great idea. I've updated my code to include two customizable format strings (`org-s5-title-string-fmt' and `org-s5-title-page-fmt') which can be used to specify the title string shown at the bottom of each page, and the title page respectively. > > The css need to be tweaked a little bit to get nice results. > My modified org-export-as-s5 function is attached. > > > > I also posted an example online. It it exported from the file s5- > test.org with the function defined in the attached file. The css is > very slightly modified. > The "scientific content" of the talk is incomplete, this is normal :-/ > > http://homepages.ulb.ac.be/~pdebuyl/lectures/s5-test.html > http://homepages.ulb.ac.be/~pdebuyl/lectures/s5-test.org > Very nice, I really like the title page addition, and it's great to see pictures, code and latex equations in a single example presentation. I have an example with a simple theme I wrote available online [3]. Just yesterday I added a page to Worg [4] with instructions for using this new function which links to my simple example presentation. If you don't mind sharing your example publicly I think it would make a great addition to this worg page. In general, I think this new S5 export option is turning into a very useful addition to Org-mode. Cheers -- Eric > > For those reading, I'll mention that using the html export, as done > here, allows to include syntax-highlighted code and LaTeX equations > very easily. > > Regards, > > Pierre > > Le 1 juin 11 à 18:41, Eric Schulte a écrit : > >> Hi Pierre, >> >> I've taken your very thorough S5 instructions and converted them >> into a >> single `org-export-as-s5' function. The attached archive file holds >> an >> s5.org Org-mode file which defines this function, as well as the ui >> directory required for S5, and an html file which results from calling >> the `org-export-as-s5' function in the s5.org file. >> >> For now the results are also posted up at >> http://cs.unm.edu/~eschulte/notes/s5/s5.org >> http://cs.unm.edu/~eschulte/notes/s5/s5.html >> >> Thanks for the clear explanation which lead to such an easy >> translation >> into elisp. Please let me know if you think this should be >> augmented in >> any way, or if the defined function throws any errors on your system. >> >> Best -- Eric >> >> >> Pierre de Buyl writes: >> >>> Hello, >>> >>> After a lot a reading of org-exp.el and org-html.el I finally figured >>> out the >>> existence of the "HTML_CONTAINER_CLASS" property. >>> >>> I could then figure a minimal way to make a s5 presentation. >>> Minimal in the sens of minimum difference with the html exporter. >>> >>> After setting a few STYLE and OPTIONS lines in an org file, >>> three steps are needed: >>> 1. Set the HTML_CONTAINER_CLASS to "slide" on level 1 headings >>> 2. Set org-export-html-toplevel-hlevel to "1", so that slide titles >>> behave properly >>> 3. Replace in the html output >>> >>> by >>> >>> >>> >>> >>> >>> Interactive Python plotting >>> >>> >>> >>> >>> >>> You need the "ui" directory from the S5 archive to make it work >>> indeed, http://meyerweb.com/eric/tools/s5/ . >>> I attach an example org file and the resulting html (which was >>> tweaked >>> according to step 3). >>> >>> Pierre >>> >>> >>> >>> >>> >>> Le 3 févr. 11 à 12:23, Bastien a écrit : >>> Hi Pierre, Pierre de Buyl writes: > S5 allows one to present a slideshow in a web browser, even full > screen for > some browsers. >
Re: [O] [Orgmode] S5 export
Hi, I haven't had time to test Eric's solution yet, but I look forward to it. Have you also tried Yann Hodique's s5 solution for Org? It has some Org setup but depends on Javascript to tweak the exported HTML. http://www.hodique.info/blog/2009/11/14/s5_presentation_from_org-mode To me, an ideal solution would "know" how to make a sensible s5 presentation from an ordinary multi-level outline, with occasional TOC slides. Yours, Christian On 6/3/11 1:38 PM, Pierre de Buyl wrote: Hello Eric, This is amazing, actual emacs lisp code from my explanations, thanks a lot! If welcomed, I have a few comments related to how I currently use this function (I have a talk coming soon :-) ) - If all "star" headlines become slides, it quickly leads to awkward layouts with empty slides below one star headings. I made a modification to the code to choose only one star headings as slides. This way, level 2 headings can be used as "in slide" headings. I used an (if (looking-at "^\\* ") XXX) in the preprocess hook for that. - An actual "title page" seems more appropriate, so I added one with "title author date" as h1,h2 and h3 headings. The css need to be tweaked a little bit to get nice results. My modified org-export-as-s5 function is attached. I also posted an example online. It it exported from the file s5-test.org with the function defined in the attached file. The css is very slightly modified. The "scientific content" of the talk is incomplete, this is normal :-/ http://homepages.ulb.ac.be/~pdebuyl/lectures/s5-test.html http://homepages.ulb.ac.be/~pdebuyl/lectures/s5-test.org For those reading, I'll mention that using the html export, as done here, allows to include syntax-highlighted code and LaTeX equations very easily. Regards, Pierre Le 1 juin 11 à 18:41, Eric Schulte a écrit : Hi Pierre, I've taken your very thorough S5 instructions and converted them into a single `org-export-as-s5' function. The attached archive file holds an s5.org Org-mode file which defines this function, as well as the ui directory required for S5, and an html file which results from calling the `org-export-as-s5' function in the s5.org file. For now the results are also posted up at http://cs.unm.edu/~eschulte/notes/s5/s5.org http://cs.unm.edu/~eschulte/notes/s5/s5.html Thanks for the clear explanation which lead to such an easy translation into elisp. Please let me know if you think this should be augmented in any way, or if the defined function throws any errors on your system. Best -- Eric Pierre de Buyl writes: Hello, After a lot a reading of org-exp.el and org-html.el I finally figured out the existence of the "HTML_CONTAINER_CLASS" property. I could then figure a minimal way to make a s5 presentation. Minimal in the sens of minimum difference with the html exporter. After setting a few STYLE and OPTIONS lines in an org file, three steps are needed: 1. Set the HTML_CONTAINER_CLASS to "slide" on level 1 headings 2. Set org-export-html-toplevel-hlevel to "1", so that slide titles behave properly 3. Replace in the html output by Interactive Python plotting You need the "ui" directory from the S5 archive to make it work indeed, http://meyerweb.com/eric/tools/s5/ . I attach an example org file and the resulting html (which was tweaked according to step 3). Pierre Le 3 févr. 11 à 12:23, Bastien a écrit : Hi Pierre, Pierre de Buyl writes: S5 allows one to present a slideshow in a web browser, even full screen for some browsers. I know that the topic has come here already, but I actually hacked the excellent org-html.el export file to produde a S5 slideshow with org. This looks useful. By reading your code, I see org-export-as-s5 is a variation over org-export-as-html. I would welcome an approach where we factor out some elements of org-export-as-html, so that exporting to s5 would just require the user to customize those elements. Does that seem reasonable to you? Would you volunteer to make org-export-as-html a bit more general? Even a precise comparison of org-export-as-s5 against org-export-as-html would be helpful at this point. Thanks! -- Bastien -- Eric Schulte http://cs.unm.edu/~eschulte/
Re: [O] [Orgmode] S5 export
If welcomed, I have a few comments related to how I currently use this function (I have a talk coming soon :-) ) Certainly, I'm happy to hear your feedback. I have the most recent version of my code up in a git repository available at [1], with the file defining the `org-export-as-s5' function up at [2]. I can't clone the repository. $ git clone http://gitweb.adaptive.cs.unm.edu/org-S5.git Cloning into org-S5... warning: remote HEAD refers to nonexistent ref, unable to checkout. I could get a snapshot however, from the web interface. - If all "star" headlines become slides, it quickly leads to awkward layouts with empty slides below one star headings. Agreed, for this reason `org-export-headline-levels' is set to 1. I made a modification to the code to choose only one star headings as slides. This way, level 2 headings can be used as "in slide" headings. I used an (if (looking-at "^\\* ") XXX) in the preprocess hook for that. I think using the `org-export-headline-levels' variable should be an easier way to implement this. See line 29 of the current code where this variable is set. Oh, looking more closely, I see why you've made this change. Even though it shouldn't affect the output it seems wasteful to add the 'html-container-class property to non-top-level headlines. I've added a slight modification of your change to my code. Also, you cannot CSS properties for level 2 headlines, for instance. With your modification, it is still not possible to use level 2 headings in a slide with proper CSS formatting. - An actual "title page" seems more appropriate, so I added one with "title author date" as h1,h2 and h3 headings. Great idea. I've updated my code to include two customizable format strings (`org-s5-title-string-fmt' and `org-s5-title-page-fmt') which can be used to specify the title string shown at the bottom of each page, and the title page respectively. Ok, but how should one set that ? I have the feeling that defining variables is not an easy approach. For instance, can it be set as a text field in the file ? Ok, I just read it and they are taken from the regular title author and date variables. The css need to be tweaked a little bit to get nice results. My modified org-export-as-s5 function is attached. I also posted an example online. It it exported from the file s5- test.org with the function defined in the attached file. The css is very slightly modified. The "scientific content" of the talk is incomplete, this is normal :-/ http://homepages.ulb.ac.be/~pdebuyl/lectures/s5-test.html http://homepages.ulb.ac.be/~pdebuyl/lectures/s5-test.org Very nice, I really like the title page addition, and it's great to see pictures, code and latex equations in a single example presentation. I have an example with a simple theme I wrote available online [3]. Just yesterday I added a page to Worg [4] with instructions for using this new function which links to my simple example presentation. If you don't mind sharing your example publicly I think it would make a great addition to this worg page. You can post all of that, source and everything, on worg. It should just not rely on links to my page for the pictures, if possible. In general, I think this new S5 export option is turning into a very useful addition to Org-mode. Cheers -- Eric It is especially useful for presentations with source code, in my opinion. Regards, Pierre For those reading, I'll mention that using the html export, as done here, allows to include syntax-highlighted code and LaTeX equations very easily. Regards, Pierre Le 1 juin 11 à 18:41, Eric Schulte a écrit : Hi Pierre, I've taken your very thorough S5 instructions and converted them into a single `org-export-as-s5' function. The attached archive file holds an s5.org Org-mode file which defines this function, as well as the ui directory required for S5, and an html file which results from calling the `org-export-as-s5' function in the s5.org file. For now the results are also posted up at http://cs.unm.edu/~eschulte/notes/s5/s5.org http://cs.unm.edu/~eschulte/notes/s5/s5.html Thanks for the clear explanation which lead to such an easy translation into elisp. Please let me know if you think this should be augmented in any way, or if the defined function throws any errors on your system. Best -- Eric Pierre de Buyl writes: Hello, After a lot a reading of org-exp.el and org-html.el I finally figured out the existence of the "HTML_CONTAINER_CLASS" property. I could then figure a minimal way to make a s5 presentation. Minimal in the sens of minimum difference with the html exporter. After setting a few STYLE and OPTIONS lines in an org file, three steps are needed: 1. Set the HTML_CONTAINER_CLASS to "slide" on level 1 headings 2. Set org-export-html-toplevel-hlevel to "1", so that slide titles behave properly 3. Replace in the html output by Interactive Python plo
Re: [O] export problems
Noorul Islam writes: > On Tue, May 31, 2011 at 9:32 AM, Eric Abrahamsen > wrote: >> Export has recently stopped working for me: any C-c C-e gives me: >> >> org-export: Symbol's function definition is void: >> internal-temp-output-buffer-show >> >> Instead of an export menu. Org is up to date git, and I get this even >> starting with emacs -Q. I haven't seen a chorus of complaints here, so I >> assume it still has to be me, somehow, but does anyone know why this >> would be happening? I'm on Ubuntu Natty, running: >> >> GNU Emacs 23.2.1 (i686-pc-linux-gnu, GTK+ Version 2.24.4) of 2011-04-04 >> on rothera, modified by Debian >> > > No issues on > > GNU Emacs 24.0.50.1 (i686-pc-linux-gnu, GTK+ Version 2.20.1) > of 2011-04-30 on noorul > > Org-mode version 7.5 (release_7.5.321.g363a) Thanks Noorul, I went to do some debugging, and discovered that re-evaluating the org-export function fixes everything. I don't understand what's happening -- I've done "make clean/make all" cycles, reloaded org code, restarted emacs, deleted byte-compiled files, all several times over, and yet on each restart of emacs, org export gives me the above error until I open org-exp.el and re-evaluate the org-export function. Does that make sense to anyone? An autoload problem, perhaps? Any advice would be much appreciated, though at least now I can export again… Thanks, Eric
Re: [O] Links and visual-line-mode
On 06/02/2011 04:20 PM, Sebastien Vauban wrote: > Hi all, > > Scott Randby wrote: One reason I want pop-up-windows to be set to nil is because I frequently use C-x C-b to look at the buffer list. If pop-up-windows is set to t, then C-x C-b opens the buffer list in a pop-up window while the active cursor is in the other window. This is ridiculous. > > Just on that one point, a trick read in "Emacs Lisp programming" IIRC: > > #+begin_src emacs-lisp > ;; rebind `C-x C-b' > (global-set-key (kbd "C-x C-b") 'buffer-menu) > ;; `buffer-menu' moves point in the window which lists your buffers > #+end_src Thanks for this. I've never wanted to eliminate all pop-up windows, and this allows me to keep them and have C-x C-b work like I want it to work. Emacs, org-mode, and the org-mode community are the best! This is off-topic and it is certainly not new to long-time users of Emacs, but I found the following discussion of the buffer menu on EmacsWiki to be most enlightening. http://www.emacswiki.org/emacs/BufferMenu Scott
Re: [O] export problems
Noorul Islam wrote: > On Tue, May 31, 2011 at 9:32 AM, Eric Abrahamsen > wrote: > > Export has recently stopped working for me: any C-c C-e gives me: > > > > org-export: Symbol's function definition is void: > > internal-temp-output-buffer-show > > > > Instead of an export menu. Org is up to date git, and I get this even > > starting with emacs -Q. I haven't seen a chorus of complaints here, so I > > assume it still has to be me, somehow, but does anyone know why this > > would be happening? I'm on Ubuntu Natty, running: > > > > GNU Emacs 23.2.1 (i686-pc-linux-gnu, GTK+ Version 2.24.4) of 2011-04-04 > > on rothera, modified by Debian > > > > No issues on > > GNU Emacs 24.0.50.1 (i686-pc-linux-gnu, GTK+ Version 2.20.1) > of 2011-04-30 on noorul > > Org-mode version 7.5 (release_7.5.321.g363a) > Assuming that the problem is still present, a backtrace might help. Nick
[O] [babel] [PATCH] Fix sh block execution in session
Hi, When evaluating shell code blocks in org-babel, the execution seems to hang indefinitely. The following patch is trying to fix this problem by modifying the way shell code is send to comint and the way the end-of-evaluation indicator is looking for. As I am far from an emacs lisp expert and as the patch modifies the widely use org-babel-comint-with-output function, it certainly needs some testing. I've made some tests with shell and R code blocks, but I'm not sure it's enough. Thanks ! Julien Fix sh block execution in a session * lisp/ob-sh.el (org-babel-sh-evaluate) : when sending input to comint, wait until previous line execution is finished * lisp/ob-comint.el (org-babel-comint-with-output) : when looking for end-of-evaluation indicator, search forward for the indicator before searching forward for the prompt --- lisp/ob-comint.el |4 ++-- lisp/ob-sh.el |8 +++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/lisp/ob-comint.el b/lisp/ob-comint.el index d12ed47..21ff0f6 100644 --- a/lisp/ob-comint.el +++ b/lisp/ob-comint.el @@ -93,9 +93,9 @@ or user `keyboard-quit' during execution of body." (goto-char comint-last-input-end) (not (save-excursion (and (re-search-forward - comint-prompt-regexp nil t) + (regexp-quote ,eoe-indicator) nil t) (re-search-forward - (regexp-quote ,eoe-indicator) nil t) + comint-prompt-regexp nil t) (accept-process-output (get-buffer-process (current-buffer))) ;; thought the following this would allow async ;; background running, but I was wrong... diff --git a/lisp/ob-sh.el b/lisp/ob-sh.el index 10c08d4..b2d1591 100644 --- a/lisp/ob-sh.el +++ b/lisp/ob-sh.el @@ -170,7 +170,13 @@ return the value of the last statement in BODY." (session org-babel-sh-eoe-output t body) (mapc (lambda (line) -(insert line) (comint-send-input nil t) (sleep-for 0.25)) +(insert line) +(comint-send-input nil t) +(while (save-excursion + (goto-char comint-last-input-end) + (not (re-search-forward + comint-prompt-regexp nil t))) + (accept-process-output (get-buffer-process (current-buffer) (append (split-string (org-babel-trim body) "\n") (list org-babel-sh-eoe-indicator -- 1.7.5.1
[O] [OT] Deactivate flyspell on a file by file basis
Hello list, I use flyspell-mode for writing articles, but I don't need it for my gtd.orgfile. Is there a way to exclude it (flyspell) from acting based on the filename of the buffer? Regards, Marcelo.
Re: [O] export problems
Nick Dokos writes: > Noorul Islam wrote: > >> On Tue, May 31, 2011 at 9:32 AM, Eric Abrahamsen >> wrote: >> > Export has recently stopped working for me: any C-c C-e gives me: >> > >> > org-export: Symbol's function definition is void: >> > internal-temp-output-buffer-show >> > >> > Instead of an export menu. Org is up to date git, and I get this even >> > starting with emacs -Q. I haven't seen a chorus of complaints here, so I >> > assume it still has to be me, somehow, but does anyone know why this >> > would be happening? I'm on Ubuntu Natty, running: >> > >> > GNU Emacs 23.2.1 (i686-pc-linux-gnu, GTK+ Version 2.24.4) of 2011-04-04 >> > on rothera, modified by Debian >> > >> >> No issues on >> >> GNU Emacs 24.0.50.1 (i686-pc-linux-gnu, GTK+ Version 2.20.1) >> of 2011-04-30 on noorul >> >> Org-mode version 7.5 (release_7.5.321.g363a) >> > > Assuming that the problem is still present, a backtrace might help. It was while trying to produce a backtrace (with edebug) that I discovered that re-evaluating the code fixed the problem. I set debug-on-error to t and reproduced the error, which gave me this: Debugger entered--Lisp error: (error "Cannot return from the debugger in an error") internal-temp-output-buffer-show(#) org-export(nil) call-interactively(org-export nil nil) Presumably this isn't really what's needed -- can you provide a pointer to producing a more useful backtrace? Thanks! Eric
Re: [O] [Orgmode] S5 export
Pierre de Buyl writes: >>> If welcomed, I have a few comments related to how I currently use >>> this >>> function (I have a talk coming soon :-) ) >> >> Certainly, I'm happy to hear your feedback. >> >> I have the most recent version of my code up in a git repository >> available at [1], with the file defining the `org-export-as-s5' >> function >> up at [2]. > > I can't clone the repository. > $ git clone http://gitweb.adaptive.cs.unm.edu/org-S5.git > Cloning into org-S5... > warning: remote HEAD refers to nonexistent ref, unable to checkout. > > I could get a snapshot however, from the web interface. > Try cloning using the git:// protocol, rather than http:// git clone git://gitweb.adaptive.cs.unm.edu/org-S5.git > >>> - If all "star" headlines become slides, it quickly leads to >>> awkward layouts with empty slides below one star headings. >> >> Agreed, for this reason `org-export-headline-levels' is set to 1. >> >>> >>> I made a modification to the code to choose only one star >>> headings as slides. This way, level 2 headings can be used as "in >>> slide" headings. >>> I used an (if (looking-at "^\\* ") XXX) in the preprocess hook >>> for that. >> >> I think using the `org-export-headline-levels' variable should be an >> easier way to implement this. See line 29 of the current code where >> this variable is set. >> >> Oh, looking more closely, I see why you've made this change. Even >> though it shouldn't affect the output it seems wasteful to add the >> 'html-container-class property to non-top-level headlines. I've >> added a >> slight modification of your change to my code. > Also, you cannot CSS properties for level 2 headlines, for instance. > > With your modification, it is still not possible to use level 2 > headings in a slide with proper CSS formatting. > Ah, because they become formatted as list elements. This makes sense, I've reverted this part of my changes. Thanks for clarifying. > >>> - An actual "title page" seems more appropriate, so I added one >>> with "title author date" as h1,h2 and h3 headings. >> >> Great idea. I've updated my code to include two customizable format >> strings (`org-s5-title-string-fmt' and `org-s5-title-page-fmt') which >> can be used to specify the title string shown at the bottom of each >> page, and the title page respectively. > Ok, but how should one set that ? > I have the feeling that defining variables is not an easy approach. > For instance, can it be set as a text field in the file ? > Ok, I just read it and they are taken from the regular title author > and date variables. > Yes, these variables are bound by Org-mode during export. The `org-s5-title-string-fmt' and `org-s5-title-page-fmt' variables can be set in a user's .emacs or as file local variables. > >>> The css need to be tweaked a little bit to get nice results. >>> My modified org-export-as-s5 function is attached. >>> >>> I also posted an example online. It it exported from the file s5- >>> test.org with the function defined in the attached file. The css is >>> very slightly modified. >>> The "scientific content" of the talk is incomplete, this is normal >>> :-/ >>> >>> http://homepages.ulb.ac.be/~pdebuyl/lectures/s5-test.html >>> http://homepages.ulb.ac.be/~pdebuyl/lectures/s5-test.org >>> >> >> Very nice, I really like the title page addition, and it's great to >> see >> pictures, code and latex equations in a single example presentation. >> >> I have an example with a simple theme I wrote available online [3]. >> Just yesterday I added a page to Worg [4] with instructions for using >> this new function which links to my simple example presentation. If >> you >> don't mind sharing your example publicly I think it would make a great >> addition to this worg page. > > You can post all of that, source and everything, on worg. It should > just not rely on links to my page for the pictures, if possible. > Great, If I find the time I'll copy this example somewhere and link to it from the worg page. > >> In general, I think this new S5 export option is turning into a very >> useful addition to Org-mode. >> >> Cheers -- Eric > > It is especially useful for presentations with source code, in my > opinion. Agreed, I personally like it as a way to publish or distribute quick presentation I've give with epresent [1]. Thanks -- Eric > > Regards, > > Pierre > > >>> >>> For those reading, I'll mention that using the html export, as done >>> here, allows to include syntax-highlighted code and LaTeX equations >>> very easily. >>> >>> Regards, >>> >>> Pierre >>> >>> Le 1 juin 11 à 18:41, Eric Schulte a écrit : >>> Hi Pierre, I've taken your very thorough S5 instructions and converted them into a single `org-export-as-s5' function. The attached archive file holds an s5.org Org-mode file which defines this function, as well as the ui directory required for S5, and an html file which results from calling the `org-
Re: [O] [Orgmode] S5 export
Hi Christian, Thanks for sharing the link to Yann Hodique's solution, I was not aware that this existed. I've just added this to the worg page on non-beamer export options. Cheers -- Eric Christian Moe writes: > Hi, > > I haven't had time to test Eric's solution yet, but I look forward to it. > > Have you also tried Yann Hodique's s5 solution for Org? It has some > Org setup but depends on Javascript to tweak the exported HTML. > > http://www.hodique.info/blog/2009/11/14/s5_presentation_from_org-mode > > To me, an ideal solution would "know" how to make a sensible s5 > presentation from an ordinary multi-level outline, with occasional TOC > slides. > > Yours, > Christian > > On 6/3/11 1:38 PM, Pierre de Buyl wrote: >> Hello Eric, >> >> This is amazing, actual emacs lisp code from my explanations, thanks a >> lot! >> >> If welcomed, I have a few comments related to how I currently use this >> function (I have a talk coming soon :-) ) >> >> - If all "star" headlines become slides, it quickly leads to awkward >> layouts with empty slides below one star headings. >> I made a modification to the code to choose only one star headings as >> slides. This way, level 2 headings can be used as "in slide" headings. >> I used an (if (looking-at "^\\* ") XXX) in the preprocess hook for that. >> - An actual "title page" seems more appropriate, so I added one with >> "title author date" as h1,h2 and h3 headings. >> >> The css need to be tweaked a little bit to get nice results. >> My modified org-export-as-s5 function is attached. >> >> >> I also posted an example online. It it exported from the file >> s5-test.org with the function defined in the attached file. The css is >> very slightly modified. >> The "scientific content" of the talk is incomplete, this is normal :-/ >> >> http://homepages.ulb.ac.be/~pdebuyl/lectures/s5-test.html >> http://homepages.ulb.ac.be/~pdebuyl/lectures/s5-test.org >> >> For those reading, I'll mention that using the html export, as done >> here, allows to include syntax-highlighted code and LaTeX equations >> very easily. >> >> Regards, >> >> Pierre >> >> Le 1 juin 11 à 18:41, Eric Schulte a écrit : >> >>> Hi Pierre, >>> >>> I've taken your very thorough S5 instructions and converted them into a >>> single `org-export-as-s5' function. The attached archive file holds an >>> s5.org Org-mode file which defines this function, as well as the ui >>> directory required for S5, and an html file which results from calling >>> the `org-export-as-s5' function in the s5.org file. >>> >>> For now the results are also posted up at >>> http://cs.unm.edu/~eschulte/notes/s5/s5.org >>> http://cs.unm.edu/~eschulte/notes/s5/s5.html >>> >>> Thanks for the clear explanation which lead to such an easy translation >>> into elisp. Please let me know if you think this should be augmented in >>> any way, or if the defined function throws any errors on your system. >>> >>> Best -- Eric >>> >>> >>> Pierre de Buyl writes: >>> Hello, After a lot a reading of org-exp.el and org-html.el I finally figured out the existence of the "HTML_CONTAINER_CLASS" property. I could then figure a minimal way to make a s5 presentation. Minimal in the sens of minimum difference with the html exporter. After setting a few STYLE and OPTIONS lines in an org file, three steps are needed: 1. Set the HTML_CONTAINER_CLASS to "slide" on level 1 headings 2. Set org-export-html-toplevel-hlevel to "1", so that slide titles behave properly 3. Replace in the html output by Interactive Python plotting You need the "ui" directory from the S5 archive to make it work indeed, http://meyerweb.com/eric/tools/s5/ . I attach an example org file and the resulting html (which was tweaked according to step 3). Pierre Le 3 févr. 11 à 12:23, Bastien a écrit : > Hi Pierre, > > Pierre de Buyl writes: > >> S5 allows one to present a slideshow in a web browser, even full >> screen for >> some browsers. >> I know that the topic has come here already, but I actually hacked >> the >> excellent org-html.el export file to produde a S5 slideshow with >> org. > > This looks useful. > > By reading your code, I see org-export-as-s5 is a variation over > org-export-as-html. > > I would welcome an approach where we factor out some elements of > org-export-as-html, so that exporting to s5 would just require the > user to customize those elements. > > Does that seem reasonable to you? Would you volunteer to make > org-export-as-html a bit more general? Even a precise comparison > of org-export-as-s5 against org-export-as-html would be helpful at > this point. > > Thanks! > > -- > Bastien >>> >>> -- >>> Eric Schulte >>> http://cs.unm.edu/~esch
Re: [O] [OT] Deactivate flyspell on a file by file basis
Marcelo de Moraes Serpa wrote: > I use flyspell-mode for writing articles, but I don't need it for my gtd.org > file. Is there a way to > exclude it (flyspell) from acting based on the filename of the buffer? > You can use file local variables for things like this. There is an ``eval'' pseudo-variable to allow you to execute code. See the emacs manual for details, but it would look something like this (untested and you have to put it at the end of the file): ... # Local Variables: # eval: (flyspell-mode 0) # End: Nick
Re: [O] export problems
Eric Abrahamsen wrote: > It was while trying to produce a backtrace (with edebug) that I > discovered that re-evaluating the code fixed the problem. I set > debug-on-error to t and reproduced the error, which gave me this: > > Debugger entered--Lisp error: (error "Cannot return from the debugger in an > error") > internal-temp-output-buffer-show(#) > org-export(nil) > call-interactively(org-export nil nil) > > Presumably this isn't really what's needed -- can you provide a pointer > to producing a more useful backtrace? > Only the usual suspects: you are loading uncompiled code I hope? I don't even have the function in either of my emacsen (24.0.50 and 23.1.1): does C-h f internal-temp-output-buffer-show RET show anything in yours? Nick
Re: [O] export problems
Nick Dokos wrote: > Eric Abrahamsen wrote: > > > It was while trying to produce a backtrace (with edebug) that I > > discovered that re-evaluating the code fixed the problem. I set > > debug-on-error to t and reproduced the error, which gave me this: > > > > Debugger entered--Lisp error: (error "Cannot return from the debugger in an > > error") > > internal-temp-output-buffer-show(#) > > org-export(nil) > > call-interactively(org-export nil nil) > > > > Presumably this isn't really what's needed -- can you provide a pointer > > to producing a more useful backtrace? > > > > Only the usual suspects: you are loading uncompiled code I hope? I don't > even have the function in either of my emacsen (24.0.50 and 23.1.1): > does C-h f internal-temp-output-buffer-show RET show anything in yours? > Duh - of course not: that's the error you get. Never mind. Nick
Re: [O] [OT] Deactivate flyspell on a file by file basis
On Fri, 03 Jun 2011 17:44:26 +0200, Pieter Praet wrote: > On Fri, 03 Jun 2011 11:18:54 -0400, Nick Dokos wrote: > > Marcelo de Moraes Serpa wrote: > > > > > > > I use flyspell-mode for writing articles, but I don't need it for my > > > gtd.org file. Is there a way to > > > exclude it (flyspell) from acting based on the filename of the buffer? > > > > > > > You can use file local variables for things like this. There is an > > ``eval'' pseudo-variable to allow you to execute code. See the emacs > > manual for details, but it would look something like this (untested and > > you have to put it at the end of the file): > > > > ... > > # Local Variables: > > # eval: (flyspell-mode 0) > > # End: > > Although this can get rather annoying due to > enable-local-variables related popups. s/enable-local-variables/enable-local-eval ... though enable-local-variables applies as well. Sorry for the noise. > > I use something similar to this: > > (add-hook 'find-file-hook > (lambda () > (or (member (buffer-file-name) > '("/path/to/some/file" > "/path/to/other/file")) > (flyspell-mode 1 > > > Nick > > > > Peace > > -- > Pieter Peace -- Pieter
Re: [O] [OT] Deactivate flyspell on a file by file basis
On Fri, 03 Jun 2011 11:18:54 -0400, Nick Dokos wrote: > Marcelo de Moraes Serpa wrote: > > > > I use flyspell-mode for writing articles, but I don't need it for my > > gtd.org file. Is there a way to > > exclude it (flyspell) from acting based on the filename of the buffer? > > > > You can use file local variables for things like this. There is an > ``eval'' pseudo-variable to allow you to execute code. See the emacs > manual for details, but it would look something like this (untested and > you have to put it at the end of the file): > > ... > # Local Variables: > # eval: (flyspell-mode 0) > # End: Although this can get rather annoying due to enable-local-variables related popups. I use something similar to this: (add-hook 'find-file-hook (lambda () (or (member (buffer-file-name) '("/path/to/some/file" "/path/to/other/file")) (flyspell-mode 1 > Nick > Peace -- Pieter
Re: [O] export problems
Nick Dokos wrote: > Eric Abrahamsen wrote: > > > It was while trying to produce a backtrace (with edebug) that I > > discovered that re-evaluating the code fixed the problem. I set > > debug-on-error to t and reproduced the error, which gave me this: > > > > Debugger entered--Lisp error: (error "Cannot return from the debugger in an > > error") > > internal-temp-output-buffer-show(#) > > org-export(nil) > > call-interactively(org-export nil nil) > > > > Presumably this isn't really what's needed -- can you provide a pointer > > to producing a more useful backtrace? > > > > Only the usual suspects: you are loading uncompiled code I hope? I don't > even have the function in either of my emacsen (24.0.50 and 23.1.1): > does C-h f internal-temp-output-buffer-show RET show anything in yours? > I see some messages about internal-temp-output-buffer-show when googling: they seem related to Stefan Monnier's effort to make with-output-to-temp-buffer a Lisp macro (rather than a special form in C code, IIUC) - but this seems to be bleeding edge stuff, not 23.2. Are you perhaps picking up emacs bits and pieces from places you shouldn't? Maybe Stefan (cc:ed) has some ideas. Nick
Re: [O] [OT] Deactivate flyspell on a file by file basis
Pieter Praet wrote: > On Fri, 03 Jun 2011 17:44:26 +0200, Pieter Praet wrote: > > On Fri, 03 Jun 2011 11:18:54 -0400, Nick Dokos > > wrote: > > > Marcelo de Moraes Serpa wrote: > > > > > > > > > > I use flyspell-mode for writing articles, but I don't need it for my > > > > gtd.org file. Is there a way to > > > > exclude it (flyspell) from acting based on the filename of the buffer? > > > > > > > > > > You can use file local variables for things like this. There is an > > > ``eval'' pseudo-variable to allow you to execute code. See the emacs > > > manual for details, but it would look something like this (untested and > > > you have to put it at the end of the file): > > > > > > ... > > > # Local Variables: > > > # eval: (flyspell-mode 0) > > > # End: > > > > Although this can get rather annoying due to > > enable-local-variables related popups. > You can save the eval setting in your custom file by saying ! to the nag question the first time it is asked. As long as you load the custom file, it won't nag you again. Nick > s/enable-local-variables/enable-local-eval > > ... though enable-local-variables applies as well. > > Sorry for the noise. > > > > > I use something similar to this: > > > > (add-hook 'find-file-hook > > (lambda () > > (or (member (buffer-file-name) > > '("/path/to/some/file" > > "/path/to/other/file")) > > (flyspell-mode 1 > >
Re: [O] Orgmode LaTeX export special character in Title
Hi Nick, I saw there is no problem in the tex file. It's some other problem with my tex files which seems not happy with that one in title. I tried on a simple version, it works. Thank you! Xin On Fri, Jun 3, 2011 at 1:32 PM, Nick Dokos wrote: > Xin Shi wrote: > > > > Thanks for your reply. I updated my org to 7.5 and the $D$ worked in > > the title. However, if I use \(D\) in the title, it says: undefined > > control sequence > > > > I tried \( ... \) in body, its OK. > > > > Works fine here: > > --8<---cut here---start->8--- > #+TITLE: This is a test for \(D\) > > * foo > bar > --8<---cut here---end--->8--- > > What does the \title in the produced tex file look like? Mine looks > like this: > > \title{This is a test for \(D\)} > > and it compiles fine. > > Nick >
Re: [O] Orgmode LaTeX export special character in Title
Hi Nick, Thanks for your reply. I updated my org to 7.5 and the $D$ worked in the title. However, if I use \(D\) in the title, it says: undefined control sequence I tried \( ... \) in body, its OK. Xin On Thu, Jun 2, 2011 at 10:55 PM, Nick Dokos wrote: > Xin Shi wrote: > > > If I want to export to LaTeX with the math symbols in the title: > > > > #+TITLE: This is a test for $D$ > > > > I get the $D$ in the PDF. Are there any way to let it behave the same as > in > > the body for the title? > > > > This works fine here: > > GNU Emacs 24.0.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.22.0) > Org-mode version 7.5 (baseline.263.gcf708) > > Carsten pushed a fix back in November of last year. If your org-mode is > older, > it's time to upgrade. > > NB: it's probably a better practice to use the \(...\) inline math > delimiters instead > of $...$ > > Nick >
Re: [O] Orgmode LaTeX export special character in Title
Xin Shi wrote: > Thanks for your reply. I updated my org to 7.5 and the $D$ worked in > the title. However, if I use \(D\) in the title, it says: undefined > control sequence > > I tried \( ... \) in body, its OK. > Works fine here: --8<---cut here---start->8--- #+TITLE: This is a test for \(D\) * foo bar --8<---cut here---end--->8--- What does the \title in the produced tex file look like? Mine looks like this: \title{This is a test for \(D\)} and it compiles fine. Nick
[O] Org-Drill first interval
The first interval for my first question is always 4 whether I mark it as a 3, 4, or 5. When I change org-drill-learn-factor it doesn't appear to change the first interval. I would like to reduce the first interval and I assume that the learn-factor will allow me to control subsequent intervals. Anki has an option to select the first interval for each of its answer qualities. If there is no option and you can send me a patch I'd be happy to try that as well. I look forward to this as it would be great to keep my questions grouped with the notes from which the questions are based. Thanks for contributing. I'm using org-drill version 2.3.3.
[O] [PATCH] Allow to disable the agenda block separator per block
* org-agenda.el (org-agenda-compact-blocks): Improve docstring. (org-agenda-block-separator): Add nil to docstring and customization. (org-prepare-agenda): Skip agenda block separator additionally if org-agenda-block-separator is nil. (org-agenda-overriding-header): Improve docstring. This change allows to disable the agenda block separator only and also per block only. (The variable org-agenda-compact-blocks non-nil disables agenda block separators together with the line containing the agenda span name and week number and does this globally for all blocks and all custom agenda commands.) Michael 0001-Allow-to-disable-the-agenda-block-separator-per-bloc.patch Description: Binary data
Re: [O] export problems
Nick Dokos writes: > Nick Dokos wrote: > >> Eric Abrahamsen wrote: >> >> > It was while trying to produce a backtrace (with edebug) that I >> > discovered that re-evaluating the code fixed the problem. I set >> > debug-on-error to t and reproduced the error, which gave me this: >> > >> > Debugger entered--Lisp error: (error "Cannot return from the debugger in >> > an error") >> > internal-temp-output-buffer-show(#) >> > org-export(nil) >> > call-interactively(org-export nil nil) >> > >> > Presumably this isn't really what's needed -- can you provide a pointer >> > to producing a more useful backtrace? >> > >> >> Only the usual suspects: you are loading uncompiled code I hope? I don't >> even have the function in either of my emacsen (24.0.50 and 23.1.1): >> does C-h f internal-temp-output-buffer-show RET show anything in yours? >> > > I see some messages about internal-temp-output-buffer-show when > googling: they seem related to Stefan Monnier's effort to make > with-output-to-temp-buffer a Lisp macro (rather than a special form in C > code, IIUC) - but this seems to be bleeding edge stuff, not 23.2. Are > you perhaps picking up emacs bits and pieces from places you shouldn't? > > Maybe Stefan (cc:ed) has some ideas. > > Nick Aha, I did once try building emacs 24 on this machine, for the heck of it, and it's still hanging around under /usr/local/bin. I'm not sure how much work would be required to uproot it entirely, but I can give it a shot, particularly with the lisp libraries, and see if that makes a difference. Thanks for the hint, Eric
[O] help on sorting agendas
Hi all, I have a block agenda, one element of which is (todo "REVIEW|ACTIVE|WIP" ((org-agenda-sorting-strategy '(priority-down time-up And I have tasks with their SCHEDULED dates set, but no deadlines. However, the agenda seems to NOT sort by the SCHEDULED date. Is that what's supposed to happen? Any way I can get it to sort on SCHEDULED dates? Cheers. Fil -- \V/_ Filippo A. Salustri, Ph.D., P.Eng. Mechanical and Industrial Engineering Ryerson University 350 Victoria St, Toronto, ON M5B 2K3, Canada Tel: 416/979-5000 ext 7749 Fax: 416/979-5265 Email: salus...@ryerson.ca http://deseng.ryerson.ca/~fil/
[O] Academic Reference Workflows and recommendation of Bibdesk
Dear All, Here I'd like to discuss my workflow for Academic reference and recommend you Bibdesk. I use iTune to manage all my mp3 files. Mp3 format has the ability to store all the metadata into the file itself, and iTune offers a way to modify and display certain kind of music according to the metadata. Inspired by this, I was looking for similar way to organize all the academic references and even to build a personal digital library. I've tried a lot of softwares, Mendeley, Zotero, Papers, Endnote, Org-mode, Yep, BibDesk... My feeling is that, Org could get this done, but BibDesk does a better job. * 1. The Org-mode Way.* Learned from this mailing list, I think one of the ways to organize academic references is like below: Directory structure: +LibraryRoot `--- Library.org `--- Culture/ `--- Mathematics/ `--- Unix/ `-Emacs/ `--- others To check in an entry such as "org-manual-7.5.pdf" to the library, one could do: Library.org - #+LINK: pdf file:./Emacs/%s.pdf #+LINK: txt file:./Emacs/%s.txt * Emacs ** Org-mode *** Manual of version 7.5 :Emacs:Org:Manual: :PROPRIETIES: :Title: :Author: :Subject: :Keywords: :Comments: :END: Location: [[pdf:org-manual-7.5]] Then use org-attach to get the file settle down in the right place. To search all the Emacs entries, one could add Library.org to org-agenda files, then define a related org-agenda command. (It's kind like the smart group concept in iTune) However this process is quite time consuming, and non-intuitive. I prefer the features provided in iTune, Papers2, Bibtex, which could provide thumbnail and quicklooks of the files. *2. the Bibdesk way:* Now I'd like to recommend BibDesk here. First of all it's free, open resource. Its database file is just an bibtex file, so all the records is in plain text, even the thumbnails are stored inside this bibtex file. like below, === Bdsk-File-1 = {YnBsaXN0MDDUAQIDBAUIJidUJHRvcFgkb2JqZWN0c1gk(It's very long png source code, so I abridged here)} === Second, Bibdesk has a much more intuitive UI, and thumbnails are provided. It also support keywords, smart groups... Moreover, Bibdesk has a great feature called autofile, which could attach the file to certain directories (and build the directories structures you want as well!) Here is the example: Again, I want to put our org-manual-7.5.pdf into LibraryRoot/Unix/Emacs/ I just have this Bibtex entry ready: @article{OrgManual:7.5, Author = {Org-Mode}, Date-Added = {2011-06-03 16:07:44 -0400}, Date-Modified = {2011-06-03 16:14:54 -0400}, Keywords = {/Unix/Emacs, Emacs}, Title = {Org-mode Manual},} Here notice the first keywords is the directory structure I want to have. Then I set up a template of autofile, (%k[/]1/%l%n0%e), telling BibDesk to "Build the directory structure based on my first keyword and rename it as what I want, then check it in". To me, this workflow for organizing digital references is complete now. I do think that BibDesk has great features to investigate, such as create the record from the bibtex and embed the picture inside the bibtex itself. Maybe we could also use the *.org as a database file and develop a framework to have our entries displayed in more intuitive way, maybe by using smart group, tag(keywords). Sorry for this such a long post, and looking forward to comments. Best, Chao
[O] org-emphasis-regexp-components and headline bolding
I've twiddled my org-emphasis-regexp-components variable to allow emphasis next to a wider array of characters, with the result that the first headline of one particular file is interpreted as emphasized (presumably the headline stars are read as bold emphasis markers). This means the text of the first two headlines is not exported when the file is exported (though the following text appears normally). This is the top of the file (only including the last line of the export options block): --8<---cut here---start->8--- #+EXPORT_EXCLUDE_TAGS: noexport * Chapter 1 ** 我是处长:noexport: "每个人都想上天堂,但是天堂的门不像地狱之门那样一推就开,我是将地狱 之门误当天堂之门的人。”这是我从今天报纸上关于一位高官堕落的报道中看 --8<---cut here---end--->8--- The first headline is bold, as are the two stars of the second headline (not the text of the second headline). The bold remains until I edit the second-level headline somewhere before the start of the text: ie, delete and re-insert one of the two stars, or the space between the stars and the text. I guess that re-scans for emphasis, and the bolding goes away. My value for org-emphasis-regexp-components: (" ('\"{…—-" " …—- .,:!?;'\")}\\" " ,\"'" "." 10) And the default: (" ('\"{" "- .,:!?;'\")}\\" " ,\"'" "." 1) There seems to be an unprintable ^M character before the newline in the default value which might not come through in this email. Otherwise I think the only difference is some added unicode characters… Thanks in advance for any help! Hope this is a real bug… Eric
Re: [O] export problems
Eric Abrahamsen writes: > Nick Dokos writes: > >> Nick Dokos wrote: >> >>> Eric Abrahamsen wrote: >>> >>> > It was while trying to produce a backtrace (with edebug) that I >>> > discovered that re-evaluating the code fixed the problem. I set >>> > debug-on-error to t and reproduced the error, which gave me this: >>> > >>> > Debugger entered--Lisp error: (error "Cannot return from the debugger in >>> > an error") >>> > internal-temp-output-buffer-show(#) >>> > org-export(nil) >>> > call-interactively(org-export nil nil) >>> > >>> > Presumably this isn't really what's needed -- can you provide a pointer >>> > to producing a more useful backtrace? >>> > >>> >>> Only the usual suspects: you are loading uncompiled code I hope? I don't >>> even have the function in either of my emacsen (24.0.50 and 23.1.1): >>> does C-h f internal-temp-output-buffer-show RET show anything in yours? >>> >> >> I see some messages about internal-temp-output-buffer-show when >> googling: they seem related to Stefan Monnier's effort to make >> with-output-to-temp-buffer a Lisp macro (rather than a special form in C >> code, IIUC) - but this seems to be bleeding edge stuff, not 23.2. Are >> you perhaps picking up emacs bits and pieces from places you shouldn't? >> >> Maybe Stefan (cc:ed) has some ideas. >> >> Nick > > Aha, I did once try building emacs 24 on this machine, for the heck of > it, and it's still hanging around under /usr/local/bin. I'm not sure how > much work would be required to uproot it entirely, but I can give it a > shot, particularly with the lisp libraries, and see if that makes a > difference. > > Thanks for the hint, > > Eric Nope, pretty sure I got it all out of there, and I'm still getting the same error, and =with-output-to-temp-buffer= is definitely still a c-source code function. I re-installed emacs from the Ubuntu repositories for good measure, to no avail. If I run emacs -Q so that the org code base that's loaded is the default, the error disappears. Adding git org to the load path, reloading org and trying again is enough to make the error return. Running emacs -Q from the command line produces: Warning: Lisp directory `/usr/local/share/emacs/23.2/site-lisp' does not exist. Warning: Lisp directory `/usr/local/share/emacs/site-lisp' does not exist. Which I've never seen before, and which seems like a warning sign. I'm quite prepared to believe that I've somehow got tangled codebases, but I really don't know where to look next… Thanks, Eric
[O] Agenda Bulk Scatter bug
for a few weeks now, and including the git commit af677f6d0667bacba72defeaee7e76557e68f8c8 that I last tested, the Agenda Bulk Scatter (BS) has had a bug whereby items it reschedules have the DATE lost. As an example SCHEDULED 2011-12-12 ends up as SCHEDULED after BS org-mode 7.5 did not have the problem Cheers, RJ Cunningham
[O] possible typo in org manual
The manual I'm using is here: http://orgmode.org/org.html#Working-With-Source-Code See item 14.2.8.1 sub-heading: Emacs Lisp evaluation of variables in the sample code, #+begin_src sh :var file-name=(buffer-file-name) :exports both wc -w $file #+end_src shouldn't file-name=(buffer-file-name) be file=(buffer-file-name) --Skip.