Re: [O] Multiple (natural) languages in a single org-file
Hi François, pin...@iro.umontreal.ca (François Pinard) writes: Nicolas Goaziou n.goaz...@gmail.com writes: Just use two different drawer names, and select which one to actually export through i.e. #+OPTIONS: d:(EN). No need for extra syntax. Well, the manual says, in node Export options: d: turn on/off inclusion of drawers So one would never guess from the manual that d: may accept drawer names. If what Nicolas suggests is real, the documentation should be adjusted. I do not find any other explanation in the manual about values for the d: option. I committed this patch to org.texi: -d: @r{turn on/off inclusion of drawers} +d: @r{turn on/off inclusion of drawers, or list drawers to include} Thanks, -- Bastien
Re: [O] Worg = Ikiwiki + Org? (was Re: Usage of disqus instead of mailinglist considered harmful)
On Wed, Apr 11, 2012 at 03:10:33AM +0530, Jambunathan K wrote: Samuel Wales samolog...@gmail.com writes: Long shot: is making worg more wiki-like practical? Worg = Ikiwiki + Org? http://lists.gnu.org/archive/html/emacs-orgmode/2011-12/msg00431.html It wouldn't be a bad idea to ask Ikiwiki folks to support Org-mode natively. I dropped a note to them a few weeks ago, btw. -- I'm a quasi-active user of Ikiwiki, so will opine without invitation on the subject: There is a way to parse org-files using the org perl module (which may have been written for this purpose in ikiwiki. Getting this setup wouldn't be hard and I could pretty easily get this running/setup (and I'd be willing to host it.) The major limitation with using non-markdown text in Ikiwiki is that ikiwiki is built with the assumption that html can be injected into the _source_ material before the markup processor runs, and the markup processor will ignore the html. (This is how the wiki links work in ikiwiki.) Now it's possible to run ikiwiki without the link plugin, to disable this behavior, but then you're left without much of a wiki. I'm not sure what other kinds of generated content is broken if you can't inject HTML, but I'd guess most of it. Once you start cutting I think you basically end up with a web-based editor, and a half decent incremental rebuild system. (but only half decent.) Therefore, if having Worg built using org-mode syntax/files is important to you, the current solution or some variant thereon is probably the best bet... Cheers, sam -- Sam Kleinman (tychoish): - ga...@tychoish.com - tychoish http://tychoish.com/ don't get it right, get it written -- james thurber pgp90le6VgmON.pgp Description: PGP signature
Re: [O] org-mime-htmlize: visual representation (thunderbird)
Uwe Brauer o...@mat.ucm.es writes: On Sun, 01 Apr 2012 12:38:12 -0400, Eric Schulte eric.schu...@gmx.com wrote: I'm not clear on how this differs from the messages produced using org-mime-htmlize, and it has been a while since I've looked into email mime mechanics. However, since the emails generated using org-mime-htmlize display correctly in Gmail and in gnus I'm inclined to say that this is a Thunderbird issue and leave it for them to debug. I send a bug report to the Thunderbird developer and the answer was that *one* source of the problem is , | Here, the message has a multipart/mixed structure at the top | with cid: references to the image/png part which is inside | that structure (the text/html part is correctly in a | multipart/alternative but there is no multipart/related; | both images are in the multipart/mixed context). Also, the | images have a Content-Disposition: attachment, both | reasons to show them as attachment as Thunderbird does it. | | Now it seems that Gmail completely ignores multipart/related | vs. mixed and simply takes the reference regardless of that | context, which would explain what you see. Strictly | speaking, the message is incorrectly formed. Please file a | bug with Emacs, the latexit structure appears to be correct. ` So how could Content-Disposition: attachment be changed to Content-Disposition: inline in your code? I can't find the relevant piece of code. Thanks Uwe Hi Uwe, Thanks for sending along this helpful review. I've just pushed two changes to org-mime so that it now (1) wraps html and images in a multipart/related mime structure and (2) marks images as disposition inline so that they don't show up as attachments. I can confirm this new version works in gnus and in the gmx webmail client as expected, but I don't have access to Thunderbird to check the behavior there. Please let me know if this fixes the problem. Thanks, -- Eric Schulte http://cs.unm.edu/~eschulte/
Re: [O] Multiple (natural) languages in a single org-file
Hi Nicholas, (btw, do you prefer Nick or Nicholas?) Nick Dokos nicholas.do...@hp.com writes: None of this is an argument for leaving the manual as is: if you had a problem finding the information, then others will too, so the manual should be improved. Done. But the information is there, and moreover, learning how to find it in this instance has the huge advantage of teaching one how to find it for all the other options as well. The question as always is how far to go in documenting all the options: it would be good to document them all (as Bastien would say: patches are welcome), but is it better to learn searching tricks or to submit patches to improve the doc? Each one of us would probably answer that question differently (we have different breaking points). The how far question is related to the where question. - The Org compact guide: vital options should be there. This guide should also point to the manual for further exploration. - The Org manual: the most used/useful options should be there. The manual should point to a specific Worg page for more. - Worg: anything else. Of course, vital and used/useful are moving targets, but that's why we have the mailing list and the discussions. To shoot them together. What we really *really* is a good tutorial on how to digg all the documentation aspects of Emacs. Basically, how to go from checking the manual to checking with C-h v and other functions. Any taker? So you might prepare a doc patch (please do!) - I might go on a searching expedition and find things you didn't [fn:1]. The first one benefits everybody, the second one benefits mainly me, but sometimes I can find a teaching moment and tell other people how to do something: which is why I spent a half-hour writing this :-) [fn:2] I hope the community realizes how precious are all these hours that you spent in patiently fighting with everyone issues... at least here, this is immensely appreciated! So, thanks again for this. -- Bastien
Re: [O] org-yank improvement?
Hi François, pin...@iro.umontreal.ca (François Pinard) writes: pin...@iro.umontreal.ca (François Pinard) writes: [...] so what I usually do is position the cursor at the beginning of the /next/ heading and yank the list item there. [...] However, by mistake, it happens that the cursor is on the only visible bullet star of the next heading (I'm using org-indent-mode instead of really being at the start of the line. It never really make sense, in my opinion, to yank in the middle of an invisible string. Luckily enough, yanking is done through a special org-yank function, so it is at least theoretically possible to prevent this. My suggestion would be that whenever yanking into a start string, that the yanking really occurs at the beginning of it. While revising old email, I'm stumbling on this, and just got a small idea. I do not know if it would work. While playing with the visibility of the stars, maybe that the text between the beginning of the line up to the last and only visible star in a header could be given the intangible attribute. I did not play with this in a very long while, but if I remember well, this would prevent inserting in the middle of this region. If you play with this idea, make sure basic commands like `org-demote' are still working. -- Bastien
Re: [O] org-yank improvement?
Hi Thorsten, Thorsten quintf...@googlemail.com writes: Memnon Anon gegendosenflei...@googlemail.com writes: pin...@iro.umontreal.ca (François Pinard) writes: However, by mistake, it happens that the cursor is on the only visible bullet star of the next heading instead of really being at the start of the line. I recently edited some org files in clean mode for the first time (It might be the default mode on Worg?) and was surprised and a bit confused that my cursor(point) was invisible when on the invisible bullet stars at the beginning of the line. I had to move point to the (only) visible bullet star on the line to find out where I am in the buffer. Maybe only a peculiarity of my color-settings, but nevertheless convincing me not to use clean mode. Then we should fix org-indent.el accordingly. (Please avoid Clean mode as a way to refer to org-indent, it suggests other views are not clean! Maybe the doc should be updated wrt this.) I must confess I'm not a user of org-indent. I have been testing it a few times and always had the feeling it goes against Org's What You See is What You Have core principle. But let's fix bugs in it anyway. Thanks, -- Bastien
Re: [O] Bug: 3 bugs and 2 proposals on ascii/html export [7.8.03]
Ivy Foster joyfulg...@archlinux.us writes: On 09 Mar 2012, at 3:09 am +0100, Bastien wrote: Mathias Bauer mba...@gmx.org writes: As default, all level 1 headlines are underlined by - characters and level 2 headlines with =. Wouldn't it be more logical the other way round Unless many users think this is illogical, I won't change the default. Personally, I tend to agree with Mathias here. Maybe it's just because I like Markdown, but the `=' underline just feels like stronger emphasis to me. (Of course, I keep meaning to write a Markdown exporter, but also keep putting it off, so there you go.) This is what is now in the master branch (org-ascii.el): (defcustom org-export-ascii-underline '(?\= ?\- ?\~ ?\^ ?\. ?\# ?\$) Thanks to all for the feedback, and to Mathias for the initial suggestion! -- Bastien
Re: [O] org-yank improvement?
On 11.4.2012, at 08:38, Bastien wrote: Hi Thorsten, Thorsten quintf...@googlemail.com writes: Memnon Anon gegendosenflei...@googlemail.com writes: pin...@iro.umontreal.ca (François Pinard) writes: However, by mistake, it happens that the cursor is on the only visible bullet star of the next heading instead of really being at the start of the line. I recently edited some org files in clean mode for the first time (It might be the default mode on Worg?) and was surprised and a bit confused that my cursor(point) was invisible when on the invisible bullet stars at the beginning of the line. I had to move point to the (only) visible bullet star on the line to find out where I am in the buffer. Maybe only a peculiarity of my color-settings, but nevertheless convincing me not to use clean mode. Then we should fix org-indent.el accordingly. (Please avoid Clean mode as a way to refer to org-indent, it suggests other views are not clean! Maybe the doc should be updated wrt this.) I must confess I'm not a user of org-indent. I have been testing it a few times and always had the feeling it goes against Org's What You See is What You Have core principle. But let's fix bugs in it anyway. For what it is worth, I constantly use it. - Carsten Thanks, -- Bastien
Re: [O] layout org-babel menu WAS: About org-babel menu
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 10/04/12 22:35, Bastien wrote: Guys, let me know when you have a first stable draft for the structure of the Babel menu and I'll implement it. Thanks Bastien - here is my suggestion and if no objections are raised, I would suggest to implement it: OK - here it is: Org | + Babel | + edit | | | + open surce buffer (that C-c ') | + insert source block skeleton for | + R | + sh | + ... all languages supported | + header arguments | | | + general | | + export ... | | + ... | | | | | + Language specific | | + R | | |+ file ... | | |+ ... | | |+ ... | | + Python | | |+ ... | | |+ ... | | | | | + ... | | | + Show | |+ Header arguments for code block | |+ Header arguments for all code block in buffer | |+ ... | + tangle | | | + tangle buffer | + tangle subtree (I think this is implemented - isn't it? | + inverse tangle | + evaluate | | | + evaluate code block | + evaluate subtree | + Library of BABEL | | | + ... functions in the library - is this feasible? | + help | | | + Link to info help on header arguments | + Link to info help on how to enable languages | + URL to language specific help on worg | + ... | + ... I think that is it for the moment - the header arguments section, specifically the language specific one, should possibly be left out as Eric is working on the autocomplete feature, which could possibly be called from the menu as well when implemented? Cheers and thanks, Rainer Thanks, - -- 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 Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk+FLlQACgkQoYgNqgF2egqSJQCePvBoq1tw/4c2I6J/sfOHA9TP rRUAnAnWSeuz04zbfpAhmbe9PmuKE6Rw =Jjyu -END PGP SIGNATURE-
Re: [O] layout org-babel menu WAS: About org-babel menu
Rainer M Krug r.m.k...@gmail.com writes: On 10/04/12 22:35, Bastien wrote: Guys, let me know when you have a first stable draft for the structure of the Babel menu and I'll implement it. Thanks Bastien - here is my suggestion and if no objections are raised, I would suggest to implement it: FWIW, I am working on this, I hope to submit initial patch in the coming weekend. I am kinda slow with my Elisp. Thanks -- YYR
Re: [O] layout org-babel menu WAS: About org-babel menu
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 11/04/12 03:40, Eric Schulte wrote: t...@tsdye.com (Thomas S. Dye) writes: Eric Schulte eric.schu...@gmx.com writes: Torsten Wagner torsten.wag...@gmail.com writes: Hi, for me the biggest trouble with babel is to remember the possible keywords in the header for different languages. There were a lot of ongoing syntax change which did not make it easier for me to remember all this. Thus a menu which is organised by languages offering all possible settings for each language would be very helpful. | Python || | export - code - result - both - none || | tangle - no - yes- filename | | | result - value - output | | | ... | ... Not sure how effectual this would be in a main menu. It would be definitely awesome in a context menu That would be (copied from worg) [*] indicates cursor position #+NAME: factorial #+BEGIN_SRC haskell [*] :results silent :exports code :var n=0 a context menu would appear presenting all possible header arguments for haskell #+NAME: factorial #+BEGIN_SRC haskell :results [*] :exports code :var n=0 a context menu presenting all possible values for the header argument :results in haskell I guess that together with the possibility to call this menu by keyboard strokes or alternatively show the same infos in the minibuffer would be a great win for babel and it would make many questions here on the list unnecessary. Furthermore, any change or extension in the syntax for a certain language would be directly reflected to the end-user. E.g., If I suddenly see the menu entry :exports 3dprint, I would be curious and check it out on worg and the manual ;) Totti Hi, I've put together a first pass at such support for interactive header argument look up. Please evaluate this elisp code [1] in your *scratch* buffer, then in an Org-mode buffer insert a code block like the following with the point at [*], and press tab. #+begin_src R :[*] :foo #+end_src You should see an auto-completion list showing which header arguments are available and (for those with known arguments) which arguments may be specified. This includes language specific header arguments, i.e., the R code block above suggests about twice as many possible header arguments as an elisp block. Note this expand on tab after : behavior is active on #+headers: lines as well. This makes use of the `org-babel-common-header-args-w-values' variable which holds header argument names and completions, as well as the org-babel-header-arg-names:lang variables. Does this seem like a good interface? Is it missing any important functionality? Best, Footnotes: [1] ;; Add support for completing-read insertion of header arguments after : (defun org-babel-header-arg-expand () Call `org-babel-enter-header-arg-w-completion' in appropriate contexts. (when (and (= (char-before) ?\:) (org-babel-where-is-src-block-head)) (org-babel-enter-header-arg-w-completion (match-string 2 (defun org-babel-enter-header-arg-w-completion (optional lang) Insert header argument appropriate for LANG with completion. (let* ((lang-headers-var (intern (concat org-babel-header-arg-names: lang))) (lang-headers (when (boundp lang-headers-var) (mapcar #'symbol-name (eval lang-headers-var (headers (append (mapcar #'symbol-name org-babel-header-arg-names) lang-headers)) (header (org-completing-read Header Arg: headers)) (args (cdr (assoc (intern header) org-babel-common-header-args-w-values))) (arg (when (and args (listp args)) (org-completing-read (format %s: header) (mapcar #'symbol-name (car args)) (insert (concat header (or arg ))) (cons header arg))) (add-hook 'org-tab-first-hook 'org-babel-header-arg-expand) Hi Eric, This is potentially much nicer than a function template. I tried filling out an R source code block's header arguments, but I couldn't find a way to get :results output graphics, which I use frequently for ggplot2 graphics. With TAB I could see type arguments, but not collection or handling arguments. Is there some way to cycle through the various completion lists? All the best, Tom Hi Tom, Currently language specific arguments for header arguments are not stored in any elisp variables so there is no way to provide this information to the auto completion function. I'm adding a new suite of language-specific variables which may be customized by each language to provide information on language-specific header-argument arguments. I've just put together this new code into a patch. I'm not currently able to run the test suite without massive failures (with or without this patch), so I'm just attaching the patch here rather than pushing it up directly. If it works well on other people's systems I think it should be committed. Hi I applied the patch and it seems to be working when
Re: [O] Scientific papers related to Org-mode
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 10/04/12 22:34, Bastien wrote: Hi Rainer, Rainer M Krug r.m.k...@gmail.com writes: It just returns the citation. Okay. I've added this to the Worg FAQ: * Is there a bibtex entry for the Org manual? I would actually suggest: * How can I cite org when I am using it for a publication? Yes. Please cite the manual. Evaluate this function and run =M-x org-insert-manual-bitex-citation-at-point RET=. Yes. Please evaluate this function and run =M-x org-insert-manual-bitex-citation-at-point RET=. #+begin_src emacs-lisp (defun org-insert-manual-bitex-citation-at-point () Insert a Bibtex citation of the Org manual at point. (interactive) (insert @book{dominik10:_org_mode_refer_manual, author = {Carsten Dominik}, title ={The \pkg{Org-Mode} 7 Reference Manual: Organize Your Life with GNU Emacs}, publisher ={Network Theory}, year = 2010, address = {UK}, note = {with contributions by David O`Toole, Bastien Guerry, Philip Rooke, Dan Davison, Eric Schulte, and Thomas Dye} } (message Thanks for quoting the Org manual!))) #+end_src Looks good. I don't think we need this in Org's core, but it's good to have it somewhere. I would actually put it into Org's core and also add it to the org - documentation menu, so that it is easy to find and can easily be updated. In addition, a function in the FAQ needs to be added manually, and I think a way to cite the manual should be in the product itself. Cheers, Rainer Thanks! - -- 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 Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk+FNJcACgkQoYgNqgF2egpkfgCfVB5yH+gKdafHKvhXvbJV62zR DqcAn1YCCMyKlk303lri+e4nF7d+UMF2 =XXIV -END PGP SIGNATURE-
Re: [O] Scientific papers related to Org-mode
Rainer M Krug r.m.k...@gmail.com writes: I would actually suggest: * How can I cite org when I am using it for a publication? Yes. Please cite the manual. Evaluate this function and run =M-x org-insert-manual-bitex-citation-at-point RET=. Please submit a patch for this. (Clone Worg, edit it, then `C-x v =' to see the diff.) I don't think we need this in Org's core, but it's good to have it somewhere. I would actually put it into Org's core and also add it to the org - documentation menu, so that it is easy to find and can easily be updated. In addition, a function in the FAQ needs to be added manually, and I think a way to cite the manual should be in the product itself. Adding it to org.texi would be okay, please submit a patch. Thanks, -- Bastien
Re: [O] Worg = Ikiwiki + Org? (was Re: Usage of disqus instead of mailinglist considered harmful)
Hi Sam, thanks for the feedback. sam kleinman s...@tychoish.com writes: Therefore, if having Worg built using org-mode syntax/files is important to you, the current solution or some variant thereon is probably the best bet... Yes, having Worg built using org-mode files *is* important. Best, -- Bastien
Re: [O] Bug: Tag Completion Not Prompting for all tags
Hi Mike, Mike McLean mike.mcl...@pobox.com writes: The bug was after shifting to free tag selection mode, the tags defined in org-tag-alist are not available for completion. Not sure I understand. Do you suggest there is still a bug, considering that we want to skip to Matt's quote about historical behavior? Please let me know if so. -- Bastien
Re: [O] layout org-babel menu WAS: About org-babel menu
Yagnesh Raghava Yakkala yagn...@live.com writes: Rainer M Krug r.m.k...@gmail.com writes: On 10/04/12 22:35, Bastien wrote: Guys, let me know when you have a first stable draft for the structure of the Babel menu and I'll implement it. Thanks Bastien - here is my suggestion and if no objections are raised, I would suggest to implement it: FWIW, I am working on this, I hope to submit initial patch in the coming weekend. I am kinda slow with my Elisp. Great, looking forward your patch then. Please double-check http://orgmode.org/worg/org-contribute.html#sec-5 on how to submit it in a way that makes it easy for us to apply it. Best, -- Bastien
Re: [O] layout org-babel menu WAS: About org-babel menu
Hi Rainer, Rainer M Krug r.m.k...@gmail.com writes: Thanks Bastien - here is my suggestion and if no objections are raised, I would suggest to implement it: I don't understand the ... parts in your example. I think that is it for the moment - the header arguments section, specifically the language specific one, should possibly be left out as Eric is working on the autocomplete feature, which could possibly be called from the menu as well when implemented? Eric's take. Thanks! -- Bastien
Re: [O] ATTR_HTML for a clickable image, howto?
Hi again, On 4/11/12 1:53 AM, Samuel Wales wrote: Will CSS solutions described in this thread work if you always export subtrees (not entire .org files) and never include style files? Yes, CSS styles apply to exported subtrees as well, whether from the default stylesheet, linked external stylesheets, or #+STYLE headers. Hmm, I think I should have specified further. I mean org-export-region-as-html. The raw HTML without any head section, files, stylesheets, or anything else. Are those two separate questions, perhaps? I tried with org-export-as-region, and I still got the full HEAD section. So the solutions I posted to François should still work with that function. However, they would not work when the exported HTML is stripped of the HEAD section. So for example, could the OP and I use styles that are specified with div style= wrapping the entire output? Seems a simple addition to the exporter or even a defadvice, but I don't know if it would work as I don't know what the CSS would look like well enough to try it. No doubt there's some way you could wrap everything inside the BODY section in a DIV, but any CSS in its STYLE attribute would apply to that div element as a whole, i.e. to all the contents, not selectively to bits and parts inside it. That's probably not what you want. The critical thing is to avoid all dependency on anything external like a stylesheet. The goal is to keep all information in your file under Org control, including style. Maybe it's the wrong goal. :-) But if that's what you want to do, the current options for doing local STYLE= formatting that I can think of are the same as for setting classes or ids: 1. #+attr_html on some elements, and 2. verbatim HTML with #+HTML or with the `@' notation; repeated use of which could be simplified with (a mix of) 3. macros; 4. org-exp-blocks.el; 5. custom link types (didn't mention that yet, see: http://orgmode.org/worg/org-tutorials/org-latex-export.html#sec-10-3); or even 6. Babel src and call commands (very exotic for the purpose of formatting a bit of html). Beyond that, we'd need something like the extensible syntax you have proposed previously. Personally, I'm looking forward to Nicolas Gouaziou's exporter, which I believe will handle ATTR commands in a more systematic way. (...) Then these solutions won't work without modifying CSS in your CMS. Not even with wrapping the entire output in a div? I don't think so. You can edit the CSS template of your CMS to take advantage of the classes and ids Org applies to its HTML exports. The idea is to avoid a dependency like that if possible. OK. Even so, though, the CMS will probably apply its own stylesheet by default, and there's a small but non-zero chance it will interact with your local formatting in ways you don't want; e.g., the orange text background you specify clashes horribly with off-peach surroundings... So you may end up having to edit stylesheets anyway. - You can use #+ATTR_HTML to add class, id or style attributes to /some/ elements, and my understanding is that the new exporter that is in the works will help do this more systematically. Wondering if you can control this under my additional requirements using inheritance from higher-level constructs like a div wrapper around the whole export. Not quite sure what you have in mind, but I don't think so. - You can enclose blocks in custom block classes (DIV CLASS=foo) with org-special-blocks (#+BEGIN_FOO), or with verbatim HTML. Yes, this is where I was leading. But it's no good for my purposes if you can't use CSS directly in your Org file without any header or external files. No, not if you can't or won't control what stylesheets will be applied. [...] - You can simplify repeated use with macros. [...] For paragraphs and sections and quotes and so on, the #+ blocks would work better. Not sure if {{{}}} would nest? Yes, macros will nest. (As opposed to custom links.) E.g.: #+MACRO: mycolor @span style=background-color: #f4a460$1@/span #+MACRO: blue @span style=background-color: blue$1@/span #+MACRO: red @span style=background-color: red$1@/span {{{mycolor(This is a single paragraph where I'd like text on an orange background\, {{{blue(except where I want a blue blackground and some {{{red(red)}}} in between)}}}.)}}} Or be noticeable. That seems much better for spans of text, not so much for standalone images and sections with more than one paragraph, lists, etc. You may be right. I have had success adding a block-level element (DIV) with a macro, but I had to take special care to close the preceding P tag to get valid xhtml. That's why in the example I gave, I used the macro to wrap the whole text content of the block in a SPAN, rather than a DIV. There are other drawbacks, such as needing to backslash-escape any commas (as in the above example). And extensive use of macros looks terribly messy in Org source, though the same is
Re: [O] layout org-babel menu WAS: About org-babel menu
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Wed 11 Apr 2012 10:11:01 CEST, Bastien wrote: Hi Rainer, Rainer M Krug r.m.k...@gmail.com writes: Thanks Bastien - here is my suggestion and if no objections are raised, I would suggest to implement it: I don't understand the ... parts in your example. e.g. ... all languages supported means a menu entry should be added for each language. Similar in the header menu, all headers should be filled in, although I would leave the header section out at the moment. Hope this helps, Rainer I think that is it for the moment - the header arguments section, specifically the language specific one, should possibly be left out as Eric is working on the autocomplete feature, which could possibly be called from the menu as well when implemented? Eric's take. Thanks! - -- 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 Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk+FPR0ACgkQoYgNqgF2egrpJgCcDu6B6WyKWtos4I5RA04qXqFx XccAnilifrh3wgKadPJUO6VtIYfBowsh =SvP2 -END PGP SIGNATURE-
[O] Updating BibTex file
Dear list, How can I made org mode / reftex to recognize changes in my BibTex file? Here is the scenario. I have my default BibTex file defined with the reftex-default-bibliography variable. While working on my org mode document I am adding references and everything is working fine. The problem occurs when I edit my BibTex file to add new references (using JabRef), but the new references do not show up when I call 'reftex-citation. Any ideas? Thanks, Julian -- Julian Mariano Burgos, PhD Hafrannsóknastofnunin/Marine Research Institute Skúlagata 4, 121 Reykjavík, Iceland Sími/Telephone : +354-5752037 Bréfsími/Telefax: +354-5752001 Netfang/Email: jul...@hafro.is
Re: [O] org-mime-htmlize: visual representation (thunderbird)
On Wed, 11 Apr 2012 00:23:54 -0400, Eric Schulte eric.schu...@gmx.com wrote: Uwe Brauer o...@mat.ucm.es writes: Uwe Hi Uwe, Thanks for sending along this helpful review. I've just pushed two changes to org-mime so that it now (1) wraps html and images in a multipart/related mime structure and (2) marks images as disposition inline so that they don't show up as attachments. Hi Eric, Thanks for your efforts. I have good and bad news. The bad news is your changes make things worse in Thunderbird, for reasons I don't understand the header of the resulting messages reads: Content-type: text/plain; charset=us-ascii which is wrong and now png are displayed! Which brings me to the good news. After I wrote to you I received a message from the TB developers which emphasised that, besides the information I have gave you, the main point is the header, which should be Content-type: multipart/related; boundary==-=-= and the thunderbird developers insist that this is the RFC 2387 standard. Gnus actually generate via the mml-generate-mime function the header Content-type: multipart/mixed; boundary==-=-= which is wrong. I brought up the issue in the gnus mailing list and the developers agreed that in the case of a html message with png the Content-type should follow the RFC standard. I checked this explicitly: your old code but with a different mml-generate-mime function generates a message which is correctly displayed in thunderbird and GMail and Ipod for that manner. BTW I don't know how this issue, of the Content-type in the header, is treated in VM or Wanderlust. Now the question is how to proceed: I had the idea of introducing a new variable mml-mime-use-related and wrap it into the mml-generate-mime code. Then org-mime-htmlize should set this variable to t, and later a different function should be added to the mail-send-hook setting the variable to nil again. Lars didn't like the idea and came up with a different implementation. However I don't see how to use it easily. So I include both solutions and let you decide which fits best for org-mime-htmlize. But as it is now you should undo your recent changes because even with the *new* mml-generate-mime function and your *new* code the resulting mail is not displayed correctly in TB. I have now added lars and the ding mailing list to the CC. Regards Uwe My solution: , | (defvar mml-mime-use-related t | *Variable to control whether to use `multipart/mixed' or `multipart/related'.) | | (defun mml-generate-mime () | Generate a MIME message based on the current MML document. | (let ((cont (mml-parse)) | (mml-multipart-number mml-multipart-number)) | (if (not cont) | nil | (mm-with-multibyte-buffer | (if (and (consp (car cont)) |(= (length cont) 1)) | (mml-generate-mime-1 (car cont)) | (if mml-mime-use-related | (mml-generate-mime-1 (nconc (list 'multipart '(type . related)) | cont)) | (mml-generate-mime-1 (nconc (list 'multipart '(type . mixed)) | cont))) | (buffer-string)) ` Lars solution , | (defun mml-generate-mime (optional multipart-type) | Generate a MIME message based on the current MML document. | MULTIPART-TYPE defaults to \mixed\, but can also | be \related\ or \alternate\. | (let ((cont (mml-parse)) | (mml-multipart-number mml-multipart-number) | (options message-options)) | (if (not cont) | nil | (prog1 | (mm-with-multibyte-buffer | (setq message-options options) | (if (and (consp (car cont)) |(= (length cont) 1)) | (mml-generate-mime-1 (car cont)) | (mml-generate-mime-1 | (nconc (list 'multipart (cons 'type (or multipart-type mixed))) | cont))) | (setq options message-options) | (buffer-string)) | (setq message-options options) `
Re: [O] orgweb/Changes: broken formatting of code blocks
Hi Julian, Julian Gehring julian.gehr...@googlemail.com writes: at the changes page of the orgmode website, some of the code block formatting seems to be broken (see http://orgmode.org/Changes.html#sec-3). I recently pushed a fix for this. It looks okay to me know. Can you check again? Can anyone please check if the attached patch would fix this? With my local setup, this yields a proper display of the code blocks. Or do the commas in front of the code lines have a meaning that I am simply missing? The content of the #+begin_src block is inserted as an example, which looks the right thing to do to me. Thanks, -- Bastien
[O] several sub-TODOs with shifted date possible with a single custom-command?
Hallo, I started a few weeks ago to use org-mode for my special usecase, so iam still very new to all of the features of org-mode. After a steep learningcurve to the very beginning its working for me rather well. (thx to all the docu and tutorials) Iam a farmer, and my intention of the use of org-mode is to do the timeplaning for all my cows with it. My setup so far is, every cow to a single .org file with all the todo/done-tasks in it and then generate a weekly agenda out of it. So i have in all the different files the same or very similar type of TODOs. That gets me to two adds i wanted to have: 1) I have TODOs with several sub-TODOs of the same type but time shifted, looking like this: Name of cow ... ** DONE insemination DATE *** TODO heat check DATE +3weeks *** TODO heat check DATE +6weeks *** TODO pregnancy check SCHEDULED: DATE +7weeks *** TODO stop milking SCHEDULED: DATE +225days *** TODO expected birth DATE +285days SCHEDULED: DATE +280days The way i found to add all of this at once is, to do a clone subtree with 1 and x-days time shift to set the new DATE an add it to the needed place with normal emacs text copy commands. But it would be real great to add all of this over a single command, like adding a schedule task with asking for the date and all the sub-TODOs withe its dates calced correct. Would be great to somehow have a function with all of this. Has anyone already programmed something similar like that? Have not found anything in the docu, faq, ... but maybe it was just my blindness? 2) I would really like to use the MobileOrg app on my android phone with this. But on the phone i can't see the context of a todo-task. In the normal emacs agenda i see the filename (=name of the cow) and the days I am past of some schedule-start. Any hints how i could get that context visible at the MobileOrg agenda-view too? thx a lot Markus
Re: [O] orgweb/Changes: broken formatting of code blocks
Hi Bastien, thanks, the formatting of the code block example looks fine now. Best Julian On 04/11/2012 12:19 PM, Bastien wrote: Hi Julian, Julian Gehringjulian.gehr...@googlemail.com writes: at the changes page of the orgmode website, some of the code block formatting seems to be broken (see http://orgmode.org/Changes.html#sec-3). I recently pushed a fix for this. It looks okay to me know. Can you check again? Can anyone please check if the attached patch would fix this? With my local setup, this yields a proper display of the code blocks. Or do the commas in front of the code lines have a meaning that I am simply missing? The content of the #+begin_src block is inserted as an example, which looks the right thing to do to me. Thanks,
[O] Org release 7.8.09 (BUGFIX-only release)
Hi all, I released Org 7.8.09, a bugfix release. This version is in the Emacs branch from which Emacs 24.1 will be released. http://orgmode.org/org-7.8.09.zip http://orgmode.org/org-7.8.09.tar.gz http://orgmode.org/org-mode-download.html Enjoy! -- Bastien
Re: [O] 24.0.95; (org) outline-style cycling + outline-mode
Jambunathan K kjambunat...@gmail.com writes: Thanks for the fix and it addresses the problem I reported. Feel free to close this bug once you commit the changes to bzr repo. Thanks for confirming. This in now in Emacs, I closed the bug there. -- Bastien
[O] Bug: table formula editor: readable elisp [7.8.03]
Remember to cover the basics, that is, what you expected to happen and what in fact did happen. You don't know how to make a good report? See http://orgmode.org/manual/Feedback.html#Feedback Your bug report will be posted to the Org-mode mailing list. Dear Hackers, I am working on turning org-tables into full kanban boards which get their data from org todo states. During hacking I realized, that even in the formula editor, lisp code without linebreaks is very hard to read. So it would be nice, if the formula editor could automatically reformat the code to be readable. That would mean inserting linebreaks where applthat helps. Best wishes, Arne PS: My current zero-state kanban: | | | |-+-| | | | #+TBLFM: @1='(let ((words org-todo-keywords-1)) (nth (- $# 1) words))::@2$1..@$='(let ((elem (nth (- @# 1) (delete nil (org-map-entries (lambda () (let ((line (filter-buffer-substring (point) (line-end-position)))(keyword (nth (- $# 1) org-todo-keywords-1))) (let ((cleanline (nth 1 (split-string line * (if (not (member keyword (split-string cleanline ))) nil (concat [[ cleanline ][ (substring cleanline (+ (length keyword) 1) (min 30 (length cleanline))) ]] ) nil 'agenda) (if (equal elem nil) elem))) Emacs : GNU Emacs 23.4.2 (x86_64-pc-linux-gnu, GTK+ Version 2.24.8) of 2012-03-20 on fluss Package: Org-mode version 7.8.03 current state: == (setq org-export-latex-after-initial-vars-hook '(org-beamer-after-initial-vars) org-speed-command-hook '(org-speed-command-default-hook org-babel-speed-command-hook) org-agenda-custom-commands '((o Agenda and TODOs ((tags KANBAN) (agenda nil) (todo org-agenda-files '(~/.emacs.d/private/org/emacs-plan.org) org-agenda-include-diary t org-babel-load-languages '((python . t) (sh . t)) org-metaup-hook '(org-babel-load-in-session-maybe) org-after-todo-state-change-hook '(org-clock-out-if-current) org-babel-tangle-lang-exts '((python . py) (emacs-lisp . el)) org-export-latex-format-toc-function 'org-export-latex-format-toc-default org-agenda-skip-scheduled-if-done t org-tab-first-hook '(org-hide-block-toggle-maybe org-src-native-tab-command-maybe) org-src-mode-hook '(org-src-babel-configure-edit-buffer org-src-mode-configure-edit-buffer) org-confirm-shell-link-function 'yes-or-no-p org-export-first-hook '(org-beamer-initialize-open-trackers) org-agenda-before-write-hook '(org-agenda-add-entry-text) org-default-notes-file ~/.emacs.d/private/org/emacs-remember-mode.org org-directory ~/.emacs.d/private/org outline-mode-hook '((lambda nil (require (quote outline-magic org-blank-before-new-entry nil org-babel-pre-tangle-hook '(save-buffer) org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers org-cycle-show-empty-lines org-optimize-window-after-visibility-change) org-export-preprocess-before-normalizing-links-hook '(org-remove-file-link-modifiers) org-mode-hook '(org-mode-reftex-setup turn-on-font-lock #[nil \300\301\302\303\304$\207 [org-add-hook change-major-mode-hook org-show-block-all append local] 5] org-babel-hide-all-hashes) org-extend-today-until 4 org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point org-babel-execute-safely-maybe) org-confirm-elisp-link-function 'yes-or-no-p org-agenda-start-on-weekday nil org-export-interblocks '((lob org-babel-exp-lob-one-liners) (src org-babel-exp-inline-src-blocks)) org-clock-out-hook '(org-clock-remove-empty-clock-drawer) org-agenda-skip-deadline-if-done t org-occur-hook '(org-first-headline-recenter) org-from-is-user-regexp nil org-export-preprocess-before-selecting-backend-code-hook '(org-beamer-select-beamer-code) outline-minor-mode-hook '((lambda nil (require (quote outline-magic))) (lambda nil (require (quote outline-magic)) (define-key outline-minor-mode-map [(f10)] (quote outline-cycle))) ) org-remember-templates '((todo 116 ❢: %?\n ~/.emacs.d/private/org/emacs-plan.org nil nil) (Note 110 %?\n nil nil nil)) org-export-latex-final-hook '(org-beamer-amend-header org-beamer-fix-toc org-beamer-auto-fragile-frames org-beamer-place-default-actions-for-lists) org-metadown-hook '(org-babel-pop-to-session-maybe) org-link-abbrev-alist '((bib . ~/Dokumente/Uni/Doktorarbeit-inverse-co2-ch4/aufschriebe/ref.bib::%s) (notes . ~/Dokumente/Uni/Doktorarbeit-inverse-co2-ch4/aufschriebe/papers.org::#%s) (papers . ~/Dokumente/Uni/Doktorarbeit-inverse-co2-ch4/aufschriebe/papers/%s.pdf)) org-export-blocks '((src org-babel-exp-src-block nil)
Re: [O] org-yank improvement?
Carsten Dominik carsten.domi...@gmail.com writes: On 11.4.2012, at 08:38, Bastien wrote: I must confess I'm not a user of org-indent. I have been testing it a few times and always had the feeling it goes against Org's What You See is What You Have core principle. But let's fix bugs in it anyway. For what it is worth, I constantly use it. - Carsten Me too! -Bernt
Re: [O] Bug: Tag Completion Not Prompting for all tags
Yes, there is still the original bug (re-occurring after the reverts). Matt's comment was accurate but related to the implementation of the fix not th concept of the bug. If you switch two free-tag entry mode from fast tag selection, the tags listed in the alist are not available for completion. The trick, it appears, is to fix this in a way that a) works with and without Ido mode and b) doesn't also introduce the duplication that Matt reported. On Wednesday, April 11, 2012, Bastien wrote: Hi Mike, Mike McLean mike.mcl...@pobox.com javascript:; writes: The bug was after shifting to free tag selection mode, the tags defined in org-tag-alist are not available for completion. Not sure I understand. Do you suggest there is still a bug, considering that we want to skip to Matt's quote about historical behavior? Please let me know if so. -- Bastien
Re: [O] Bug: Tag Completion Not Prompting for all tags
And c) with :startgroup and :endgroup in the alist :) On Wednesday, April 11, 2012, Mike McLean wrote: Yes, there is still the original bug (re-occurring after the reverts). Matt's comment was accurate but related to the implementation of the fix not th concept of the bug. If you switch two free-tag entry mode from fast tag selection, the tags listed in the alist are not available for completion. The trick, it appears, is to fix this in a way that a) works with and without Ido mode and b) doesn't also introduce the duplication that Matt reported. On Wednesday, April 11, 2012, Bastien wrote: Hi Mike, Mike McLean mike.mcl...@pobox.com writes: The bug was after shifting to free tag selection mode, the tags defined in org-tag-alist are not available for completion. Not sure I understand. Do you suggest there is still a bug, considering that we want to skip to Matt's quote about historical behavior? Please let me know if so. -- Bastien
Re: [O] org-yank improvement?
Bernt Hansen be...@norang.ca writes: Carsten Dominik carsten.domi...@gmail.com writes: On 11.4.2012, at 08:38, Bastien wrote: I must confess I'm not a user of org-indent. I have been testing it a few times and always had the feeling it goes against Org's What You See is What You Have core principle. But let's fix bugs in it anyway. For what it is worth, I constantly use it. - Carsten Me too! Okay -- a great relief to know I can count on Carsten and you to help solve possible issues there! -- Bastien
Re: [O] latex to org converter
Charles Philip Chan cpchan at bell.net writes: Marvin Doyley marvinpas at gmail.com writes: Does anybody has a script that convert latex files to org mode ? I wrote one in Matlab, but it is a little clunky - I wrote it in matlab because I am still learning lisp Not exactly a script, but I highly recommend Pandoc[1]. There is also pandoc-mode[2], which is an Emacs frontend to Pandoc. Footnotes: [1] http://johnmacfarlane.net/pandoc/ [2] http://wwwuser.gwdg.de/~jkremer/pandoc-mode.html I always thought that TeX/LaTeX would be the perfect engine for that. It already understands the markup. ``Only'' the output format would need to be written. Maybe with LuaTeX such a task can be made easier. Disclamer: I've never done any deep TeX/LaTeX/Lua coding. Mirko
Re: [O] View inherited DEADLINEs in agenda
Hi All, I had asked a similar question on StackOverflow a long time ago (http://stackoverflow.com/questions/4872088/is-there-any-way-for-subtasks-to-inherit-deadlines-in-org-mode) and one of the answers was useful to me - namely, http://stackoverflow.com/a/8920418/137430. Adding the answer here for sake of completion. How about a function for adding subtasks? This one adds a deadline to the subtask if its parent has one: (defun my-org-insert-sub-task () (interactive) (let ((parent-deadline (org-get-deadline-time nil))) (org-goto-sibling) (org-insert-todo-subheading t) (when parent-deadline (org-deadline nil parent-deadline Don't forget to bind it to a key: (define-key org-mode-map (kbd C-c s) 'my-org-insert-sub-task) On Tue, Apr 3, 2012 at 12:46 PM, Bastien b...@gnu.org wrote: Hi Fabrizio, Fabrizio Chiarello fabrizio.chiare...@ieee.org writes: I solved by adding the following block in the agenda: This is a nice and useful hack. Can you consider adding it to Worg/org-hacks.org? If you want, just send me the .org content that I would add to org-hacks.org. Otherwise send me your public key and I'll give you write access to Worg. Thanks in advance for your contribution! -- Bastien -- Unix is simple. It takes a genius to understand it's simplicity. - Anon People think it must be fun to be a super genius, but they don't realize how hard it is to put up with all the idiots in the world. - Calvin. Cheers, Vedang. Programmer, Infinitely Beta. http://twitter.com/vedang http://vedang.me
Re: [O] [PATCH] Skip uninteresting lines when navigating the agenda
Bernt Hansen be...@norang.ca writes: * lisp/org-agenda.el (org-agenda-next-line): Skip lines without markers * lisp/org-agenda.el (org-agenda-previous-line): Skip lines without markers Next and previous line functions now only visit agenda lines which have a marker defined. This skips all of the uninteresting data lines in the agenda window such as empty grid lines, titles, and separate lines in block agendas. I'm dropping this patch. It doesn't allow cursor navigation to clock report lines with links. I'll mark the patch rejected on the patchwork server. Regards, Bernt
[O] [babel] Literate Programming for publication
Hi, I just try (again) to use org-mode and babel for literate programming finally resulting in a camera ready manuscript for publication. I noticed that there are different ways of achieving this and wonder what others use or what others think might be the best. What I want do Ideally, I would like to separate the org-file into three parts 1. org-mode itself containing all kind of infos, notes, dates, links,etc - for me and possibly co-authors 2. latex stuff, the parts which should present the final manuscript - to the publisher, colleagues, etc 3. code, all the code to munch all input data into some graphs and to distill the final results - for me, coauthors and people who request it. What I managed to do Today I started again combining python resp. pylab and matplotlib together with org-mode I managed to use * python source code blocks in session mode - generation of graphs in png format * org-mode native text - all text of the manuscript including the generated figures At this point I noticed I could use latex source code blocks or latex code blocks but I had the following problem with both of them. In python I define certain variables e.g. #+begin_src python U = 3 # applied voltage t = pl.arange(0,3.1,0.1) # time #many more... #+end_src later in the text I have to write this parameters as well. e.g. as shown in figure 3 the current increase after applying a voltage pulse with an amplitude of 3 V for 3 seconds Now here comes the problem. If I start playing around with my python code I might end up with different values in the calculation and in the text. This is very hard to spot and hence very dangerous to overlook. Thus, I used something like as shown in figure 3 the current increase after applying a voltage pulse with an amplitude of src_python[:session name]{print(U)} V for src_python[:session]{print(t[-1]} seconds The code blocks will be replaced on export and the original text will be the exported. Now, I have only one place to change parameters all numbers would be valid for both code and text. However, this did not work within latex code blocks or latex blocks. Having all text in org mode outline, however does not allow me to separate easily publishable text and notes. Maybe I could use drawers and property nodes etc. but I think this looks to make thinks even more complex. Finally, the biggest problem is the fact that I can't tangle the entire org-file into different files. I really would like to get * a tex/pdf/odt manuscript file for the publishers * a pdf/org/html/odt file including all and everything * a python source file. How can I manage to use different code blocks (latex and python) but still be able to inject results from python into the latex code blocks? noweb and vars looked good but it did not work for me. Thanks for all input Torsten src_language{body}
[O] [babel] hide inline source code blocks by results
Hi, I guess we had such a discussion some time ago already. I just started again to use inline source code blocks e.g. text text text src_python[:session]{print((U[0]-U[1])*1000)} mV text text text if you have a lot of these in a text its rather hard to read. I was thinking of something similar like links in org-mode The inline source code gets hidden behind the result of the last evaluation and can be accessed in the same way like links in org-mode. It could even open up in a buffer of the target language like source code blocks. The above example would be reduced to text text text _355_ mV text text text C-c C-c would update the result mouse click open the source code in a language specific buffer etc. This would really make it more readable All the best Torsten
Re: [O] [babel] Literate Programming for publication
Torsten Wagner torsten.wag...@gmail.com writes: Hi, I just try (again) to use org-mode and babel for literate programming finally resulting in a camera ready manuscript for publication. I noticed that there are different ways of achieving this and wonder what others use or what others think might be the best. What I want do Ideally, I would like to separate the org-file into three parts 1. org-mode itself containing all kind of infos, notes, dates, links,etc - for me and possibly co-authors 2. latex stuff, the parts which should present the final manuscript - to the publisher, colleagues, etc 3. code, all the code to munch all input data into some graphs and to distill the final results - for me, coauthors and people who request it. What I managed to do Today I started again combining python resp. pylab and matplotlib together with org-mode I managed to use * python source code blocks in session mode - generation of graphs in png format * org-mode native text - all text of the manuscript including the generated figures At this point I noticed I could use latex source code blocks or latex code blocks but I had the following problem with both of them. In python I define certain variables e.g. #+begin_src python U = 3 # applied voltage t = pl.arange(0,3.1,0.1) # time #many more... #+end_src later in the text I have to write this parameters as well. e.g. as shown in figure 3 the current increase after applying a voltage pulse with an amplitude of 3 V for 3 seconds Now here comes the problem. If I start playing around with my python code I might end up with different values in the calculation and in the text. This is very hard to spot and hence very dangerous to overlook. Thus, I used something like as shown in figure 3 the current increase after applying a voltage pulse with an amplitude of src_python[:session name]{print(U)} V for src_python[:session]{print(t[-1]} seconds The code blocks will be replaced on export and the original text will be the exported. Now, I have only one place to change parameters all numbers would be valid for both code and text. However, this did not work within latex code blocks or latex blocks. Having all text in org mode outline, however does not allow me to separate easily publishable text and notes. Aloha Torsten, I tried using latex code blocks and found that they were more trouble than they were worth. The LaTeX exporter works well for preparing drafts to submit to journals. Nicolas Goaziou's exporter project seems to be very nice and an improvement, so I would recommend keeping all text in the Org mode outline, rather than using latex code blocks. I separate the publishable text from the notes and code blocks with tags for the headlines in my Org mode files. I have this at the top of the file: #+EXPORT_EXCLUDE_TAGS: noexport Then: * Some publishable text * Some notes :noexport: * Some code :noexport: Maybe I could use drawers and property nodes etc. but I think this looks to make thinks even more complex. Finally, the biggest problem is the fact that I can't tangle the entire org-file into different files. I really would like to get * a tex/pdf/odt manuscript file for the publishers Export to latex or odt, possibly with the new exporter * a pdf/org/html/odt file including all and everything Adjust the tags accordingly, or #+EXPORT_EXCLUDE_TAGS:, and re-export * a python source file. It should be possible to tangle this in the usual way. Depending on what you want, perhaps a master code block would work: #+begin_src python :noweb yes :tangle master.py code-block-1 code-block-2 #+end_src This involves keeping track of the different code blocks, and there is likely a better way to do this, but the approach should work. hth, Tom How can I manage to use different code blocks (latex and python) but still be able to inject results from python into the latex code blocks? noweb and vars looked good but it did not work for me. Thanks for all input Torsten src_language{body} -- Thomas S. Dye http://www.tsdye.com
Re: [O] org-mime-htmlize: visual representation (thunderbird)
Hi Uwe, Uwe Brauer o...@mat.ucm.es writes: On Wed, 11 Apr 2012 00:23:54 -0400, Eric Schulte eric.schu...@gmx.com wrote: Uwe Brauer o...@mat.ucm.es writes: Uwe Hi Uwe, Thanks for sending along this helpful review. I've just pushed two changes to org-mime so that it now (1) wraps html and images in a multipart/related mime structure and (2) marks images as disposition inline so that they don't show up as attachments. Hi Eric, Thanks for your efforts. I have good and bad news. The bad news is your changes make things worse in Thunderbird, for reasons I don't understand the header of the resulting messages reads: Content-type: text/plain; charset=us-ascii which is wrong and now png are displayed! OK, for my own edification I had changed the message body from (I'm hoping these are sufficiently quoted to survive mailing) ,[original] | | text alternative... | | images for html... ` to ,[revised (and more broken in TB)] | | ` which wraps the html and images into a multipart/related type. Why is this later structure illegal? Are nested multi type parts not allowed? Also, it seems that everything I've tried works in gnus and in most web user agents. Is thunderbird simply a stickler for the letter of the RFC law? Which brings me to the good news. After I wrote to you I received a message from the TB developers which emphasised that, besides the information I have gave you, the main point is the header, which should be Content-type: multipart/related; boundary==-=-= and the thunderbird developers insist that this is the RFC 2387 standard. Gnus actually generate via the mml-generate-mime function the header Content-type: multipart/mixed; boundary==-=-= which is wrong. OK, I've just reverted my change, but I'm keeping the change of image disposition to inline. I brought up the issue in the gnus mailing list and the developers agreed that in the case of a html message with png the Content-type should follow the RFC standard. I checked this explicitly: your old code but with a different mml-generate-mime function generates a message which is correctly displayed in thunderbird and GMail and Ipod for that manner. OK. Then I will assume that this issue is out of my hands and wait for gnus to change its mime wrapping behavior upstream. BTW I don't know how this issue, of the Content-type in the header, is treated in VM or Wanderlust. I do my best to provide reasonable implementations for these other two mailers and assume that if anything goes wrong then someone will submit a bug report. Now the question is how to proceed: I had the idea of introducing a new variable mml-mime-use-related and wrap it into the mml-generate-mime code. Then org-mime-htmlize should set this variable to t, and later a different function should be added to the mail-send-hook setting the variable to nil again. Lars didn't like the idea and came up with a different implementation. However I don't see how to use it easily. So I include both solutions and let you decide which fits best for org-mime-htmlize. But as it is now you should undo your recent changes because even with the *new* mml-generate-mime function and your *new* code the resulting mail is not displayed correctly in TB. I have now added lars and the ding mailing list to the CC. While Lars' solution does look cleaner it is not clear to me how this would be used from an external tool (such as org-mime) which does not call `mml-generate-mime' explicitly, but rather relies on the normal mailing process to handle these specifics. Wouldn't it make the most sense for the mailing process to inspect the email and set the appropriate multipart type automatically. Thanks, Regards Uwe My solution: , | (defvar mml-mime-use-related t | *Variable to control whether to use `multipart/mixed' or `multipart/related'.) | | (defun mml-generate-mime () | Generate a MIME message based on the current MML document. | (let ((cont (mml-parse)) | (mml-multipart-number mml-multipart-number)) | (if (not cont) | nil | (mm-with-multibyte-buffer | (if (and (consp (car cont)) | (= (length cont) 1)) | (mml-generate-mime-1 (car cont)) | (if mml-mime-use-related | (mml-generate-mime-1 (nconc (list 'multipart '(type . related)) | cont)) | (mml-generate-mime-1 (nconc (list 'multipart '(type . mixed)) | cont))) | (buffer-string)) ` Lars solution , | (defun mml-generate-mime (optional multipart-type) | Generate a MIME message based on the current MML document. | MULTIPART-TYPE defaults
Re: [O] layout org-babel menu WAS: About org-babel menu
Rainer M Krug r.m.k...@gmail.com writes: On Wed 11 Apr 2012 10:11:01 CEST, Bastien wrote: Hi Rainer, Rainer M Krug r.m.k...@gmail.com writes: Thanks Bastien - here is my suggestion and if no objections are raised, I would suggest to implement it: I don't understand the ... parts in your example. e.g. ... all languages supported means a menu entry should be added for each language. Similar in the header menu, all headers should be filled in, although I would leave the header section out at the moment. Hope this helps, There are still ambiguous parts, IMO the following should be fully explicitly expanded + header arguments | | | + general | | + export ... | | + ... | + Show | |+ Header arguments for code block | |+ Header arguments for all code block in buffer | |+ ... + help | | | + Link to info help on header arguments | + Link to info help on how to enable languages | + URL to language specific help on worg | + ... | + ... Additionally there are more evaluation functions which are not included in the menu, please ensure that every user-visible function shown by running `org-babel-describe-bindings' in an Org-mode buffer is included. The other parts can be expanded using the given variables. + Library of BABEL | | | + ... functions in the library - is this feasible? Should only be displayed if `org-babel-library-of-babel' is non-nil, and it's contents may be used to expand the menu option. | + Language specific | | + R | | |+ file ... | | |+ ... | | |+ ... | | + Python | | |+ ... | | |+ ... | | | | | + ... These may be expanded using the language specific header argument variables which my latest un-applied patch introduces. These have names like `org-babel-header-args:lang'. Best, Rainer I think that is it for the moment - the header arguments section, specifically the language specific one, should possibly be left out as Eric is working on the autocomplete feature, which could possibly be called from the menu as well when implemented? Eric's take. Thanks! -- 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 -- Eric Schulte http://cs.unm.edu/~eschulte/
[O] bug#11160: Acknowledgement (24.0.95; (org) outline-style cycling + outline-mode)
Jambunathan K kjambunat...@gmail.com writes: http://orgmode.org/worg/org-faq.html#use-visibility-cycling-in-outline-mode. which specifically notes that org-style cycling is written in a way that they are independent of the outline setup. This bug is now fixed in emacs-24 branch. Thanks, -- Bastien
Re: [O] layout org-babel menu WAS: About org-babel menu
Rainer M Krug r.m.k...@gmail.com writes: On 11/04/12 03:40, Eric Schulte wrote: t...@tsdye.com (Thomas S. Dye) writes: Eric Schulte eric.schu...@gmx.com writes: Torsten Wagner torsten.wag...@gmail.com writes: Hi, for me the biggest trouble with babel is to remember the possible keywords in the header for different languages. There were a lot of ongoing syntax change which did not make it easier for me to remember all this. Thus a menu which is organised by languages offering all possible settings for each language would be very helpful. | Python || | export - code - result - both - none || | tangle - no - yes- filename | | | result - value - output | | | ... | ... Not sure how effectual this would be in a main menu. It would be definitely awesome in a context menu That would be (copied from worg) [*] indicates cursor position #+NAME: factorial #+BEGIN_SRC haskell [*] :results silent :exports code :var n=0 a context menu would appear presenting all possible header arguments for haskell #+NAME: factorial #+BEGIN_SRC haskell :results [*] :exports code :var n=0 a context menu presenting all possible values for the header argument :results in haskell I guess that together with the possibility to call this menu by keyboard strokes or alternatively show the same infos in the minibuffer would be a great win for babel and it would make many questions here on the list unnecessary. Furthermore, any change or extension in the syntax for a certain language would be directly reflected to the end-user. E.g., If I suddenly see the menu entry :exports 3dprint, I would be curious and check it out on worg and the manual ;) Totti Hi, I've put together a first pass at such support for interactive header argument look up. Please evaluate this elisp code [1] in your *scratch* buffer, then in an Org-mode buffer insert a code block like the following with the point at [*], and press tab. #+begin_src R :[*] :foo #+end_src You should see an auto-completion list showing which header arguments are available and (for those with known arguments) which arguments may be specified. This includes language specific header arguments, i.e., the R code block above suggests about twice as many possible header arguments as an elisp block. Note this expand on tab after : behavior is active on #+headers: lines as well. This makes use of the `org-babel-common-header-args-w-values' variable which holds header argument names and completions, as well as the org-babel-header-arg-names:lang variables. Does this seem like a good interface? Is it missing any important functionality? Best, Footnotes: [1] ;; Add support for completing-read insertion of header arguments after : (defun org-babel-header-arg-expand () Call `org-babel-enter-header-arg-w-completion' in appropriate contexts. (when (and (= (char-before) ?\:) (org-babel-where-is-src-block-head)) (org-babel-enter-header-arg-w-completion (match-string 2 (defun org-babel-enter-header-arg-w-completion (optional lang) Insert header argument appropriate for LANG with completion. (let* ((lang-headers-var (intern (concat org-babel-header-arg-names: lang))) (lang-headers (when (boundp lang-headers-var) (mapcar #'symbol-name (eval lang-headers-var (headers (append (mapcar #'symbol-name org-babel-header-arg-names) lang-headers)) (header (org-completing-read Header Arg: headers)) (args (cdr (assoc (intern header) org-babel-common-header-args-w-values))) (arg (when (and args (listp args)) (org-completing-read (format %s: header) (mapcar #'symbol-name (car args)) (insert (concat header (or arg ))) (cons header arg))) (add-hook 'org-tab-first-hook 'org-babel-header-arg-expand) Hi Eric, This is potentially much nicer than a function template. I tried filling out an R source code block's header arguments, but I couldn't find a way to get :results output graphics, which I use frequently for ggplot2 graphics. With TAB I could see type arguments, but not collection or handling arguments. Is there some way to cycle through the various completion lists? All the best, Tom Hi Tom, Currently language specific arguments for header arguments are not stored in any elisp variables so there is no way to provide this information to the auto completion function. I'm adding a new suite of language-specific variables which may be customized by each language to provide information on language-specific header-argument arguments. I've just put together this new code into a patch. I'm not currently able to run the test suite without massive failures (with or without this patch), so I'm just attaching the patch here rather than pushing it up directly. If it works well on other people's systems I think it should be committed. Hi I applied the patch and it seems to be working when
Re: [O] [babel] keep source code buffer open
Hi Torsten, You could keep the buffer open but just save it with C-x C-s which will propagate changes back to the original Org-mode buffer. If you want to wrap the save-switch-to-org-export actions into a single keystroke then I think an Emacs Macro or writing a simple personal elisp function would be the best approach. Best, Torsten Wagner torsten.wag...@gmail.com writes: Hi, yep me again. I find myself hitting C-' all the day long today and was wondering is there a way to keep the source code buffer open instead of closing it after pressing again C-'. Now I need to do * C-' open the source code buffer * do my changed * C-' close the buffer take over the changes * C-c C-e d export as PDF after evaluation of all code blocks * check the PDF * start over again All this comes with window splits and most of the time I hit C-s in the wrong buffer because I am so used to it to save my changes to files. I would like to make changes in the code buffer and start e.g. evaluation or exporting from within the source code buffer. That is * Press once C-' * make my changes * press C-c ?? to move all changes over into the org-mode buffer and evaluate the source code block or * press C-c ?? to move all changes over into the org-mode buffer and export the org-buffer repeat Is there any way to do this? That's it for today... promise Thanks Torsten -- Eric Schulte http://cs.unm.edu/~eschulte/
Re: [O] layout org-babel menu WAS: About org-babel menu
Bastien b...@gnu.org writes: Hi Rainer, Rainer M Krug r.m.k...@gmail.com writes: Thanks Bastien - here is my suggestion and if no objections are raised, I would suggest to implement it: I don't understand the ... parts in your example. I agree, I think explicitly spelling out all options would make this example more usable. I think that is it for the moment - the header arguments section, specifically the language specific one, should possibly be left out as Eric is working on the autocomplete feature, which could possibly be called from the menu as well when implemented? Eric's take. I see no problem in duplicating functionality/content between the menu and the auto completion. Isn't the whole point of menus to duplicate functionality for the purpose of clarity? Best, Thanks! -- Eric Schulte http://cs.unm.edu/~eschulte/
Re: [O] [babel] hide inline source code blocks by results
Currently inline blocks like don't associate themselves with their results, they are only expected to be evaluated on export, so the functionality you suggest below would require first changing how results are associated with inline code blocks. Another option would be to hide everything but the body of the block, but this may be more confusing than it is worth. Best, Torsten Wagner torsten.wag...@gmail.com writes: Hi, I guess we had such a discussion some time ago already. I just started again to use inline source code blocks e.g. text text text src_python[:session]{print((U[0]-U[1])*1000)} mV text text text if you have a lot of these in a text its rather hard to read. I was thinking of something similar like links in org-mode The inline source code gets hidden behind the result of the last evaluation and can be accessed in the same way like links in org-mode. It could even open up in a buffer of the target language like source code blocks. The above example would be reduced to text text text _355_ mV text text text C-c C-c would update the result mouse click open the source code in a language specific buffer etc. This would really make it more readable All the best Torsten -- Eric Schulte http://cs.unm.edu/~eschulte/
Re: [O] [babel] keep source code buffer open
Here is a keyboard macro I used with some success (fset 'org-execute-from-indirect (lambda (optional arg) Keyboard macro. (interactive p) (kmacro-exec-ring-item (quote (C-c ' C-c C-c C-' 0 %d)) arg))) basically it just exits the source code buffer, compiles and then reopens the source code buffer On 11 April 2012 16:58, Torsten Wagner torsten.wag...@gmail.com wrote: Hi, yep me again. I find myself hitting C-' all the day long today and was wondering is there a way to keep the source code buffer open instead of closing it after pressing again C-'. Now I need to do * C-' open the source code buffer * do my changed * C-' close the buffer take over the changes * C-c C-e d export as PDF after evaluation of all code blocks * check the PDF * start over again All this comes with window splits and most of the time I hit C-s in the wrong buffer because I am so used to it to save my changes to files. I would like to make changes in the code buffer and start e.g. evaluation or exporting from within the source code buffer. That is * Press once C-' * make my changes * press C-c ?? to move all changes over into the org-mode buffer and evaluate the source code block or * press C-c ?? to move all changes over into the org-mode buffer and export the org-buffer repeat Is there any way to do this? That's it for today... promise Thanks Torsten
Re: [O] send org subtree as e-mail?
Wow, that worked perfectly. Thank you! On Tue, Apr 3, 2012 at 7:09 AM, Eric Schulte eric.schu...@gmx.com wrote: Peter Salazar cycleofs...@gmail.com writes: I frequently compose e-mails as subtrees of my org files. I'd like to be able to e-mail the contents of these subtrees, maybe by first viewing the subtree in an indirect buffer. My org files look like this: * e-mails ** note to person about blah To: per...@blah.com Subject: ADD people 7 times more likely to be creative --text follows this line-- Dear Person, Blah blah blah. Best, Peter I can open the subtree in an indirect buffer, but I can't e-mail the contents as they appear because I get Invalid header line. If I delete the org-header, I can successfully send the e-mail. But then I need to undelete the header afterward. How can I send the contents of a subtree as an e-mail without first having to delete the header? Thanks, Peter Checkout the `org-mime-subtree' subtree command. It converts the current subtree to an email, pulling email headers from subtree properties, specifically MAIL_SUBJECT or subtree heading - subject MAIL_TO - TO MAIL_CC - CC MAIL_BCC - BCC MAIL_FMT - determines the format of the email (e.g., org, ascii or html) so your example above would be ** note to person about blah :PROPERTIES: :MAIL_TO: per...@blah.com :MAIL_SUBJECT: ADD people 7 times more likely to be creative :END: Dear Person, Blah blah blah. Best, Peter Cheers, -- Eric Schulte http://cs.unm.edu/~eschulte/
[O] table of contents and numbers
Dear list, My apologies for another very basic question. I'm wondering why I do not get a table of contents when exporting the following file as pdf ---start org file --- #+TITLE: Test #+OPTIONS: toc:t num:nil * Part 1 Some text * Part 2 Some more text ---end org file --- I do get the TOC when exporting as hmtl, though. Many thanks, Julian -- Julian Mariano Burgos, PhD Hafrannsóknastofnunin/Marine Research Institute Skúlagata 4, 121 Reykjavík, Iceland Sími/Telephone : +354-5752037 Bréfsími/Telefax: +354-5752001 Netfang/Email: jul...@hafro.is
Re: [O] var expansion on tangling only once per file
This is not currently possible, and any conceivable implementation would be necessarily complex requiring a good deal of cross-buffer coordination. Would it be possible to simply only declare the variable in a header argument applying to the first code block? Using a session would keep that variables state through all subsequent code blocks. Best, Rainer M Krug r.m.k...@gmail.com writes: Hi I have a file wide variable defined and tangle several source blockd into one file. BNo the variable is expanded in each block. Would it be possible to have the expansion at the beginning of the file and nod be repeated, as this can cause problems? The following org code #+PROPERTY: tangle test.R #+PROPERTY: var TheVar=99 * Part one #+begin_src R :tabgle: x - 1 #+end_src * Problem #+begin_src R y - list( x = 1, #+end_src * Problem continued #+begin_src R x - 3 ) #+end_src results in an error in R due to the repeated TheVar - 99 in the list definition. Org-mode version 7.8.08 (release_7.8.07.213.ge6fdf) from git this morning If I remember correctly, this sneeked in quite recently. Thanks, Rainer -- Eric Schulte http://cs.unm.edu/~eschulte/
Re: [O] Running org-babel-tangle and/or org-export-as-pdf in Emacs batch mode
Bernd Weiss bernd.we...@uni-koeln.de writes: Dear all, I am not sure if this an orgmode-, an ESS- or an Emacs-related question. I am working on an orgmode-file with embedded R code. Since I am using a build tool called waf, I would like to call Emacs from command line like this: emacs --batch --load e:/config/.emacs --visit test.org --funcall org-export-as-pdf (or call org-babel-tangle) However, it stops with Type C-h m for help on ESS version 12.03. If I remove the R part (#+begin_src etc.), everything works as expected. This is my (hopefully) minimal example, the command line output and the orgmode related infos. Thanks, Bernd Hi Bernd, I can't recreate this hanging issue locally (I don't have access to a windows box). This sounds like an ESS issue to me since ESS seems to be the hanging process. Perhaps a good first step would be to try to evaluate (require 'ess) (R) in a batch Emacs session without Emacs hanging. Once this is working then it should be clear how to run ESS sessions from code blocks. Best, ---minimal example: test.org--- # Babel settings #+PROPERTY: session *R* #+PROPERTY: tangle test.R #+PROPERTY: comments yes #+PROPERTY: results output #+PROPERTY: exports both #+BEAMER_FRAME_LEVEL: 1 #+startup: beamer #+LaTeX_CLASS: beamer #+LaTeX_CLASS_OPTIONS: [bigger] #+latex_header: %%\modebeamer{\usetheme{Madrid}} * test heading lsals #+begin_src R 1+1 #+end_src ---minimal example: text.org--- ---cl-output-- wmx336@fi-weiss-50 /cygdrive/e/projects/software/ps2012r_intro/test $ emacs --batch --load e:/config/.emacs --visit test.org --funcall org-export-as-pdf customizing GNU Emacs customizing GNU Emacs for Win 7 Loading e:/config/.recentf... Cleaning up the recentf list... Cleaning up the recentf list...done (0 removed) Loading tex-mik... Ido mode enabled Source file `d:/programme/emacs/site-lisp/org-mode/contrib/lisp/org-contacts.el' newer than byte-compiled file Ido mode enabled Loading d:/programme/emacs/site-lisp/color-theme/themes/color-theme-example.el (source)... Loading d:/programme/emacs/site-lisp/color-theme/themes/color-theme-example.elc... Loading d:/programme/emacs/site-lisp/color-theme/themes/color-theme-library.el (source)... Loading d:/programme/emacs/site-lisp/color-theme/themes/color-theme-library.elc... Loading d:/programme/emacs/site-lisp/color-theme/themes/color-theme-tango.el (source)... Loading d:/programme/emacs/site-lisp/color-theme/themes/color-theme-tango.elc... [yas] warning: keybinding (rinari-minor-mode-map . C-c C-c C-r) invalid for snippet #+begin_src R...#+end_ since keymap rinari-minor-mode-map does not (yet?) exist. [yas] warning: keybinding (rinari-minor-mode-map . C-c C-c C-b) invalid for snippet beamer_envargs since keymap rinari-minor-mode-map does not (yet?) exist. Loading d:/programme/emacs/site-lisp/graphviz-dot-mode.el (source)... OVERVIEW Local Ispell dictionary set to nil Starting new Ispell process [default] ... File mode specification error: (error d:\\programme\\Aspell\\bin\\aspell.exe did not output version line) Loading vc-git... Exporting to PDF... Exporting to LaTeX... Local Ispell dictionary set to nil Automatic display of crossref information was turned on Applying style hooks... Applying style hooks... done Local Ispell dictionary set to nil Local Ispell dictionary set to nil executing R code block... Type C-h m for help on ESS version 12.03 ---cl-output-- ---org-related-infos--- Emacs : GNU Emacs 23.3.1 (i386-mingw-nt5.1.2600) of 2011-03-10 on 3249CTO Package: Org-mode version 7.8.06 (release_7.8.06.180.g22bfd) current state: == (setq org-export-preprocess-before-backend-specifics-hook '(org-inlinetask-export-handler) org-export-latex-after-initial-vars-hook '(org-beamer-after-initial-vars) org-export-latex-listings t org-speed-command-hook '(org-speed-command-default-hook org-babel-speed-command-hook) org-agenda-custom-commands '((c conferences ((tags CONFERENCE)) ((org-tags-match-list-sublevels nil)) ((org-columns-default-format %DATE %LOCATION))) (d Upcoming deadlines agenda ((org-agenda-time-grid nil) (org-deadline-warning-days 365) (org-agenda-entry-types (quote (:deadline) (W Weekly Review ((agenda ((org-agenda-ndays 14))) (todo WRITING org-agenda-files '(e:/projects/habilitation/org/prHabilitation.org e:/projects/org/agendas/2011fall.org e:/projects/org/agendas/2011springterm.org e:/projects/org/agendas/SynRG.org e:/projects/org/agendas/capture.org e:/projects/org/agendas/d_2011a.org
Re: [O] table of contents and numbers
Julian Burgos jul...@hafro.is wrote: Dear list, My apologies for another very basic question. I'm wondering why I do not get a table of contents when exporting the following file as pdf ---start org file --- #+TITLE: Test #+OPTIONS: toc:t num:nil * Part 1 Some text * Part 2 Some more text ---end org file --- I do get the TOC when exporting as hmtl, though. I believe it's because of a rather technical latex limitation: latex writes TOC entries into a .toc file, which is then read back in when the \tableofcontents macro is expanded. When you specify num:nil asking for unnumbered sections, the latex exporter produces \section* markers, instead of the standard \section markers. But when latex processes those, it does not add anything to the .toc file. If org added a \tableofcontents, you would get just the title and an empty TOC. In order to prevent that, the latex exporter requires that both toc and num be non-nil - see l.1487 ff in lisp/org-latex.el: , | ... | ;; table of contents | (when (and org-export-with-toc | (plist-get opt-plist :section-numbers)) |(funcall org-export-latex-format-toc-function | ...)) ` The HTML exporter does this by hand, so to speak, so it is not as constrained and can do the right thing. Nick
[O] Disable links in Latex export
I'm exporting a structured document to Latex/PDF. The table of contents contains hyperlinks for each section which I would like to disable. I tried setting org-export-latex-href and org-export-latex-hyperref to empty strings, but this did not help. Thanks.
Re: [O] Disable links in Latex export
SW sabrewo...@gmail.com wrote: I'm exporting a structured document to Latex/PDF. The table of contents contains hyperlinks for each section which I would like to disable. I tried setting org-export-latex-href and org-export-latex-hyperref to empty strings, but this did not help. Thanks. There are no such variables. There are variables org-export-latex-href-format and org-export-latex-hyperref-format but they are used for links in the document body. The TOC is under the control of latex and hyperref, so you cannot use either of these to influence it. The only way I know of to disable links completely is to not use hyperref at all. You can redefine the package list appropriately. Unfortunately, I think there is an unconditional \hypersetup inserted by the latex exporter that would then break things - there is even a FIXME: note: , | ;; add some hyperref options | ;; FIXME: let's have a defcustom for this? | (format \\hypersetup{\n pdfkeywords={%s},\n pdfsubject={%s},\n pdfcreator={%s}}\n | (org-export-latex-fontify-headline keywords) | (org-export-latex-fontify-headline description) |(concat Emacs Org-mode version org-version)) ` Given that the new latex exporter is where all the action is right now, I don't foresee that this is going to be fixed. If all you care about is the *appearance*, rather than the existence of links, however, you can use hyperref package options to influence that. For example \usepackage[pdfborder={0,0,0}]{hyperref} will get rid of the red boxes around the links in the TOC: they are still links, they are just not that obvious any more. You can do that by customizing the org-export-latex-default-packages-alist variable: just add the above option (without the square brackets) to the hyperref package entry. Nick
[O] [PATCH] org-latex.el: append final newline to export buffer
Hi. org-export-as-latex (sometimes?) doesn't add a final newline to the exported buffer. It's getting in my way as I set require-final-newline to 'query. Opinions? -- Jérémie Courrèges-Anglas GPG fingerprint: 61DB D9A0 00A4 67CF 2A90 8961 6191 8FBF 06A1 1494 From 2cf51a01885071c948d20c641d2d2fded6c2d1e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20Courr=C3=A8ges-Anglas?= j...@wxcvbn.org Date: Wed, 11 Apr 2012 20:36:10 +0200 Subject: [PATCH] org-latex.el: append final newline to export buffer * lisp/org-latex.el: Ensure a final newline is appended to the export buffer. TINYCHANGE --- lisp/org-latex.el |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/lisp/org-latex.el b/lisp/org-latex.el index 4418dee..8e05616 100644 --- a/lisp/org-latex.el +++ b/lisp/org-latex.el @@ -1034,6 +1034,11 @@ when PUB-DIR is set, use this as the publishing directory. (if (looking-at [\n \t]+) (replace-match \n))) +;; Ensure we have a final newline +(goto-char (point-max)) +(or (eq (char-before) ?\n) + (insert ?\n)) + (run-hooks 'org-export-latex-final-hook) (if to-buffer (unless (eq major-mode 'latex-mode) (latex-mode)) -- 1.7.6 pgpOh9ppjsphN.pgp Description: PGP signature
Re: [O] table of contents and numbers
On Wed, Apr 11, 2012 at 12:12 PM, Nick Dokos nicholas.do...@hp.com wrote: Julian Burgos jul...@hafro.is wrote: Dear list, My apologies for another very basic question. I'm wondering why I do not get a table of contents when exporting the following file as pdf ---start org file --- #+TITLE: Test #+OPTIONS: toc:t num:nil * Part 1 Some text * Part 2 Some more text ---end org file --- I do get the TOC when exporting as hmtl, though. I believe it's because of a rather technical latex limitation: latex writes TOC entries into a .toc file, which is then read back in when the \tableofcontents macro is expanded. When you specify num:nil asking for unnumbered sections, the latex exporter produces \section* markers, instead of the standard \section markers. But when latex processes those, it does not add anything to the .toc file. If org added a \tableofcontents, you would get just the title and an empty TOC. In order to prevent that, the latex exporter requires that both toc and num be non-nil - see l.1487 ff in lisp/org-latex.el: , | ... | ;; table of contents | (when (and org-export-with-toc | (plist-get opt-plist :section-numbers)) | (funcall org-export-latex-format-toc-function | ...)) ` One can work around this by manually adding sections under each headline. - #+options: num:nil toc:t #+text: \tableofcontents * Introduction \addcontentsline{toc}{section}{Introduction} - Tedious for long documents, but does work. John The HTML exporter does this by hand, so to speak, so it is not as constrained and can do the right thing. Nick
[O] Ever used org-mode contrib packages?
Hello, I've just updated the index of contributed packages on Worg [1]. Have a look, it is full of treasures... Out of the 61 listed contributions: - 43 are hosted on Org-mode's contrib/lisp/ directory - 9 are hosted elsewhere - 9 are already incorporated into the core of org-mode, but remain here for documentation purposes. (Well, 9 is not the right number, since org-babel amounts only for 1 in these stats...) As for the documentation, 24 packages have a dedicated documentation page on Worg (once again, 1 tree of pages for org-babel). Fell free to document those you find useful. On my side, I am only discovering the contrib/lisp directory, but have already tested with profits org-contacts and org-mairix. I'm curious to know what you are using from org-contrib... All the best, François. [1] http://orgmode.org/worg/org-contrib/index.html
[O] Agenda: Don't widen narrowed subtrees
When a file used in the org-agenda is in a narrowed state (org-narrow-to-subtree or similar) and you refresh the agenda buffer via `g', it becomes un-narrowed. This is a very annoying behavior as I tend to narrow to subtrees while editing their contents. Is this a bug or desired behavior? If the latter, I'll try hunting the missing `save-restriction' down tomorrow. -- Moritz Ulrich
Re: [O] Ever used org-mode contrib packages?
Hi François, On Wed, Apr 11, 2012 at 21:22, François Allisson franc...@allisson.co wrote: I'm curious to know what you are using from org-contrib... - I use org-notmuch to link to emails from org files. - I also use org-occur-goto for easier navigation. - I also use org-google-weather to display weather information in my Agenda -- Suvayu Open source is the future. It sets us free.
Re: [O] layout org-babel menu WAS: About org-babel menu
Eric Schulte eric.schu...@gmx.com writes: Rainer M Krug r.m.k...@gmail.com writes: On 11/04/12 03:40, Eric Schulte wrote: t...@tsdye.com (Thomas S. Dye) writes: Eric Schulte eric.schu...@gmx.com writes: Torsten Wagner torsten.wag...@gmail.com writes: Hi, for me the biggest trouble with babel is to remember the possible keywords in the header for different languages. There were a lot of ongoing syntax change which did not make it easier for me to remember all this. Thus a menu which is organised by languages offering all possible settings for each language would be very helpful. | Python || | export - code - result - both - none || | tangle - no - yes- filename | | | result - value - output | | | ... | ... Not sure how effectual this would be in a main menu. It would be definitely awesome in a context menu That would be (copied from worg) [*] indicates cursor position #+NAME: factorial #+BEGIN_SRC haskell [*] :results silent :exports code :var n=0 a context menu would appear presenting all possible header arguments for haskell #+NAME: factorial #+BEGIN_SRC haskell :results [*] :exports code :var n=0 a context menu presenting all possible values for the header argument :results in haskell I guess that together with the possibility to call this menu by keyboard strokes or alternatively show the same infos in the minibuffer would be a great win for babel and it would make many questions here on the list unnecessary. Furthermore, any change or extension in the syntax for a certain language would be directly reflected to the end-user. E.g., If I suddenly see the menu entry :exports 3dprint, I would be curious and check it out on worg and the manual ;) Totti Hi, I've put together a first pass at such support for interactive header argument look up. Please evaluate this elisp code [1] in your *scratch* buffer, then in an Org-mode buffer insert a code block like the following with the point at [*], and press tab. #+begin_src R :[*] :foo #+end_src You should see an auto-completion list showing which header arguments are available and (for those with known arguments) which arguments may be specified. This includes language specific header arguments, i.e., the R code block above suggests about twice as many possible header arguments as an elisp block. Note this expand on tab after : behavior is active on #+headers: lines as well. This makes use of the `org-babel-common-header-args-w-values' variable which holds header argument names and completions, as well as the org-babel-header-arg-names:lang variables. Does this seem like a good interface? Is it missing any important functionality? Best, Footnotes: [1] ;; Add support for completing-read insertion of header arguments after : (defun org-babel-header-arg-expand () Call `org-babel-enter-header-arg-w-completion' in appropriate contexts. (when (and (= (char-before) ?\:) (org-babel-where-is-src-block-head)) (org-babel-enter-header-arg-w-completion (match-string 2 (defun org-babel-enter-header-arg-w-completion (optional lang) Insert header argument appropriate for LANG with completion. (let* ((lang-headers-var (intern (concat org-babel-header-arg-names: lang))) (lang-headers (when (boundp lang-headers-var) (mapcar #'symbol-name (eval lang-headers-var (headers (append (mapcar #'symbol-name org-babel-header-arg-names) lang-headers)) (header (org-completing-read Header Arg: headers)) (args (cdr (assoc (intern header) org-babel-common-header-args-w-values))) (arg (when (and args (listp args)) (org-completing-read (format %s: header) (mapcar #'symbol-name (car args)) (insert (concat header (or arg ))) (cons header arg))) (add-hook 'org-tab-first-hook 'org-babel-header-arg-expand) Hi Eric, This is potentially much nicer than a function template. I tried filling out an R source code block's header arguments, but I couldn't find a way to get :results output graphics, which I use frequently for ggplot2 graphics. With TAB I could see type arguments, but not collection or handling arguments. Is there some way to cycle through the various completion lists? All the best, Tom Hi Tom, Currently language specific arguments for header arguments are not stored in any elisp variables so there is no way to provide this information to the auto completion function. I'm adding a new suite of language-specific variables which may be customized by each language to provide information on language-specific header-argument arguments. I've just put together this new code into a patch. I'm not currently able to run the test suite without massive failures (with or without this patch), so I'm just attaching the patch here rather than pushing it up directly. If it works well on other people's systems I think it should be committed. Hi I applied
Re: [O] Ever used org-mode contrib packages?
suvayu ali fatkasuvayu+li...@gmail.com writes: Hi François, On Wed, Apr 11, 2012 at 21:22, François Allisson franc...@allisson.co wrote: I'm curious to know what you are using from org-contrib... - I use org-notmuch to link to emails from org files. - I also use org-occur-goto for easier navigation. - I also use org-google-weather to display weather information in my Agenda - org-drill - org-learn org-drill - heavily dependent on org-learn. If I had kids doing O-levels I would surely recommend it. Invaluable for stuff you want to learn by heart. Good documentation too. Best, Martyn
[O] multiple date_tree values possible in a single file
Hello, everyone I really like the date tree hierarchy. I was wondering whether it was possible to use multiple date_tree hierarchies in a single file, or how one would go about setting it up. For example * Items TODO ** tree 1 :PROPERTIES: :DATE_TREE: t :END: ** tree 2 :PROPERTIES: :DATE_TREE: t :END: I don't think i can get this to work. Any suggestions? Thanks, Stuart
Re: [O] multiple date_tree values possible in a single file
Stuart McLean smclean0...@gmail.com wrote: Hello, everyone I really like the date tree hierarchy. I was wondering whether it was possible to use multiple date_tree hierarchies in a single file, or how one would go about setting it up. For example * Items TODO ** tree 1 :PROPERTIES: :DATE_TREE: t :END: ** tree 2 :PROPERTIES: :DATE_TREE: t :END: I don't think i can get this to work. Any suggestions? I'm not sure what you mean: what exactly can you not get to work? Nick