Re: [O] colorize html output when batch exporting
Quick summary: I'm now able to generate the css, but I don't understand how it can change the colors. Rick Frankel writes: > Which version of emacs are you using? FWIW, I just had this problem > yesterday (although it choked on a different face) in emacs trunk > (24.4.x). But on my machine @work on (24.3.8) it is working fine. I'm on 24.3.1. > It seems that htmlize is choking on invalid face definitions. > Somewhere you have a reference to a face "font-lock-comment" which > does not exist (the correct definition in this case is > "font-lock-comment-face"), so if you can find the customization that > refers to "font-lock-comment" and fix it you should be able to > generate the CSS. Thank you for the suggestion. I had a quick look at what org-html-htmlize-generate-css is doing, and it starts by building a face-list which is used in my case. I thought the problem was that I had been using this instance of emacs for too long (thus many faces where loaded), but with a fresh emacs, I still have an error (this time for `font-lock-pseudo-keyword-face`). Loading an emacs with no configuration (except for org and htmlize), I'm now able to generate the CSS. After loading the mode of interest, I now know the names of the classes I should work with. However, I still find there is a problem. Here is the html source generated from a snippet of the file: #+BEGIN_SRC html Inductive expr := | expr_this : expr | expr_identifier : string -> expr | expr_literal : literal -> expr | expr_object : list (propname * propbody) -> expr | expr_function : option string -> list string -> funcbody -> expr | expr_access : expr -> expr -> expr | expr_member : expr -> string -> expr | expr_new : expr -> list expr -> expr | expr_call : expr -> list expr -> expr | expr_unary_op : unary_op -> expr -> expr | expr_binary_op : expr -> binary_op -> expr -> expr | expr_conditional : expr -> expr -> expr -> expr | expr_assign : expr -> option binary_op -> expr -> expr #+END_SRC I don't understand how things are supposed to be colorized, as there is no mention in the html of span elements to put color on. For instance, "Inductive" is a keyword, and in a coq buffer it has face "font-lock-keyword-face". Shouldn't it have class "org-keyword" in the generated html? Thanks, Alan
Re: [O] Buffer local alias?
Hi Tom, t...@tsdye.com (Thomas S. Dye) writes: > Aloha Andreas, > > Andreas Leha writes: > >> I am not as organized as Tom is. So the chances to use my up-to-date >> orgmode and successfully export any of my org documents from a year ago >> (they are almost all 'Literate Programming' documents and, thus, maybe >> more fragile?) are slim. I do not have numbers, but it seems like I'll >> need to adapt such documents all the time. >> >> I know that this problem is a problem of balancing backward >> compatibility with new features, better design, etc and cannot be >> solved. And I see the win in (most of) the breaking changes. >> >> But let me just express my vote for even more awareness of people like >> me, who do not read all release notes, forget most of the messages from >> the mailing list and as a result need 2 hours to export some document >> from last year again today. >> >> A change like this one (renaming sbe to org-sbe) is a small change and >> will only be an annoyance in one years time. The drop of the implicit >> naming of call lines, for example, was (and still will be for some of my >> files) a bigger issue. > > I fully agree that it is challenging to prepare an Org mode file that > can be "moth-balled" for a while, then resuscitated to full > functionality without a lot of work. > > Perhaps one way to deal with this is to have the Org mode literate > programming (reproducible research) file choose which version of > Org-mode to use. Due to my difficulties in reproducing my own document from a year ago, I stopped calling my Org-mode documents 'reproducible research' ;-) > Something like the following? > > #+name: org-mode-version > #+begin_src sh > cd path/to/org-mode-git-repo > git checkout rev > #+end_src > > # Local Variables: > # eval: (and (fboundp 'org-sbe) (not (fboundp 'sbe)) (fset 'sbe 'org-sbe)) > # eval: (sbe "org-mode-version") > # eval: (org-reload t) > # End: > > I haven't the faintest idea if this is a "good idea" or a snake pit of > potential problems. Is the idea worth experimenting with? IIRC, org-reload is not too well supported and might even vanish one day. I could not find that discussion on a quick search, though. So, this approach might be potentially problematic, indeed. Regards, Andreas
Re: [O] subtree export title w/ tags
Hi Bastien, Bastien wrote: > Robert Klein writes: > >> Is there something I can do, so the tag doesn't end up in the title? > > You can add the :EXPORT_TITLE: property in the subtree. > > Still, I think tags should be removed from the title by default, > I will look into this. `org-export-with-tags' seems to be the option to do that, nope? ╭ org-export-with-tags │ │ If nil, do not export tags, just remove them from headlines. ╰ Best regards, Seb -- Sebastien Vauban
Re: [O] Changing behaviour of {:} in column view?
Luke Crook wrote: > In column view, org-mode sums 3xSubtasks each having an effort of "1d" as "1d > 0:00". Is there a way to change the sum to display this as "3d"? You could try to attach an ECM (« Exemple Complet Minimal », or minimal working example) demo'ing your problem. That'd save time for people to try to confirm the problem, and eventually fix it. Best regards, Seb -- Sebastien Vauban
Re: [O] [poll] Fontify code in code blocks
Hello Bastien, Bastien wrote: > When `org-src-fontify-natively' will be `t' by default, > it will be important to keep the distinction between source > blocks and HTML/LaTeX blocks. > > So HTML blocks should remain unfontified by default, just > to mark the difference with "active" source blocks. I can share your idea that it's good to see a difference between both types of code snippets. But, then, instead of _not_ fontifying the code in question, it'd be better (for example) to provide them with a different background color (other than the current `org-block-background', shared by both types of snippets). > I still think an option to highlight them would be nice. Ouf ;-) >> That would be the same for #+HTML/LaTeX one-liners, yes! > > For this I disagree... this would encourage using such > one-liners too much. I don't think having highlighting or not encourages one-lines: we need them (for their purpose) or not, with or without highlighting. On the contrary, not highlighting one-liners would encourage to convert them into 3-liners (if we "need" the colors): #+begin_html/latex ... one-line code ... #+end_html/latex Not sure to understand why you'd make a distinction. >> Now, I have no idea about what's the work required. But I definitely >> would love to see that implemented. > > Well, it's not hard but not straightforward -- and I'd rather > be sure that the decision is to take that route before I try to > implement this. > > Waiting to read what other think. So do I. Best regards, Seb -- Sebastien Vauban
Re: [O] org-store-link without having to press Enter?
Hello Nick, Nick Dokos wrote: > Sebastien Vauban writes: >> >> I'd like to use org-store-link in a piece of code. However, it currently >> requires the user to select some link from a list of store links. > > I think you mean org-insert-link, right? Yes; you're right! >> If I always want to select the last one -- that is, the default >> option --, how can I bypass the required RET? >> >> I can do this: >> >> (execute-kbd-macro "\C-c\C-l\C-m") >> >> But I find it fragile because it relies on key bindings which could >> change in time. >> >> How could I do otherwise? > > I don't know if there is an API, but org-store-link just adds the link > info to the front of the list org-stored-links, so the last link added > is (car org-stored-links). Each element of org-stored-links is > a two-element list (link description). Both of these are strings > (possibly strings with text properties). > > So something like this might work: > > (let ((link (car org-stored-links))) > (insert (format "[[%s][%s]]" (car link) (cadr link > > at least for now... It's imo "better" than the keyboard macro but it's > still pretty low level and ugly. It does work. THANKS! -- I prefer it over my own version. I thought there could exist some way to (pre-)send the input to be read when prompted by a function. It seems not (I guess you'd have mentioned it otherwise...). I wonder as well how I could do the `execute-kbd-macro' if there wasn't a key bound to the command I'm interested in. I tried things like the following, with no success: (execute-kbd-macro "M-x org-insert-link\C-m") Best regards, Seb -- Sebastien Vauban
Re: [O] Buffer local alias?
Nick Dokos wrote: >> I read about defalias and saw that this should be used at the >> point that the original definition is made, so I followed the pointer to >> fset and naively tried this in the local variables: >> >> # eval: (and (boundp 'org-sbe) (not (boundp 'sbe)) (fset 'sbe 'org-sbe)) >> # eval: (sbe "setup-common-lisp) >> >> But this gets me the following error: >> >> File local-variables error: (void-function sbe) >> >> Can someone offer a suggestion? @Thomas: I just launch an idea: group the above two lines in one `progn' construct? > Use fboundp, instead of boundp: the latter checks the variable binding > slot, whereas the former checks the function binding slot. @Nick: I always thought that `boundp' checked in both variable and function slots, not only in the variable slot. An attempt makes me think you're right, but that's not what I understood from the docstring: ╭ │ boundp is a built-in function in `C source code'. │ │ (boundp SYMBOL) │ │ Return t if SYMBOL's value is not void. │ Note that if `lexical-binding' is in effect, this refers to the │ global value outside of any lexical scope. ╰ Best regards, Seb -- Sebastien Vauban
Re: [O] Automatically add a repeater when scheduling
Marcelo de Moraes Serpa wrote: > Does org allow automatically adding a repeater (say, +1d) to a schedule > when adding it with C-c C-s? No -- at least, not yet: ╭ │ C-c C-s runs the command org-schedule, which is an interactive Lisp function in │ `org.el'. │ │ It is bound to C-c C-s,. │ │ (org-schedule ARG &optional TIME) │ │ Insert the SCHEDULED: string with a timestamp to schedule a TODO item. │ With one universal prefix argument, remove any scheduling date from the item. │ With two universal prefix arguments, prompt for a delay cookie. │ With argument TIME, scheduled at the corresponding date. TIME can │ either be an Org date like "2011-07-24" or a delta like "+2d". ╰ You see that C-c C-s is already pretty loaded (with up to two universal arguments foreseen...). > If not, I think it wouldn't be so hard to monkeypatch the method to do so, > would it? Best regards, Seb -- Sebastien Vauban
Re: [O] Buffer local alias?
Hello Andreas, Andreas Leha wrote: > The drop of the implicit naming of call lines, for example, was (and > still will be for some of my files) a bigger issue. Could you remind me what's the problem you're talking of? Best regards, Seb -- Sebastien Vauban
Re: [O] Add "legacy" time tracking as CLOCK entries
Richard Walker wrote: > Hi, while I've been using org-mode for some time, I'm now working > on a project where I've decided to use the time-tracking functions. > But I've got some "legacy" time on the project that I would like > to incorporate. I.e., I have in my (paper) log book a record of > (say) half an hour spent on a certain day, but I don't have a record > of the start and end time and I don't want to invent them. > > I note that I can add an entry that looks like this: > > CLOCK: => 0:30 > > and have this contribute to totals. But I would > also like to record the date for this entry. > > Checking the regular expression in org-clock-sum > and a bit of trial and error showed that > this _doesn't_ work: > > CLOCK: [2013-12-11 Wed] => 0:30 > > and nor does: > > CLOCK: [2013-12-11 Wed]--[2013-12-11 Wed] => 0:30 > > But this does seem to work: > > CLOCK: => 0:30 [2013-12-11 Wed] > > I've figured this out myself on the basis of not finding anything > about it in the manual. Nevertheless, is there a "standard" > way of doing this that I missed? Can't you try to convert your lines to: CLOCK: [2013-12-11 Wed 0:00]--[2013-12-11 Wed 0:30] => 0:30 duration This seems the simplest option to me. Best regards, Seb -- Sebastien Vauban
Re: [O] Bug: Export to Latex - Incorrect output for list items starting with left bracket [8.2.3c (8.2.3c-elpa @ /Users/jdegenhardt/.emacs.d/elpa/org-20131115/)]
Nicolas Goaziou writes: [...] > I'd like to fix it, yes. It will not help you with older documents, but > what do you think about the export snippet exception I suggested? Sorry, I didn't get back to you on this. Although obviously more cumbersome than my current approach, your suggestion would cover my main use case *and* from org's point of view would be much more "honest". I would be happy with this. thanks, eric -- : Eric S Fraga (0xFFFCF67D), Emacs 24.3.1, Org release_8.2.4-322-gece429
Re: [O] Buffer local alias?
> Andreas Leha writes: [...] >> I know that this problem is a problem of balancing backward >> compatibility with new features, better design, etc and cannot be >> solved. And I see the win in (most of) the breaking changes. I agree wholeheartedly with the sentiment expressed here. Despite the difficulties I have had resurrecting some LP org documents recently, the benefits of the continual developments to org + babel are clear. [...] "Thomas S. Dye" writes: > Perhaps one way to deal with this is to have the Org mode literate > programming (reproducible research) file choose which version of > Org-mode to use. Something like the following? > > #+name: org-mode-version > #+begin_src sh > cd path/to/org-mode-git-repo > git checkout rev > #+end_src > > # Local Variables: > # eval: (and (fboundp 'org-sbe) (not (fboundp 'sbe)) (fset 'sbe 'org-sbe)) > # eval: (sbe "org-mode-version") > # eval: (org-reload t) > # End: > > I haven't the faintest idea if this is a "good idea" or a snake pit of > potential problems. Is the idea worth experimenting with? Very much so. One of my recent fights with org was due to finally getting back reviewers' comments on a paper I had submitted almost a year ago. If I had had an automatic link to the correct version of org, the one that matched my document, it would have made things much easier. Obviously, I could have done this manually and probably should have. However, I think it may be quite difficult to automate what you are proposing... -- : Eric S Fraga (0xFFFCF67D), Emacs 24.3.1, Org release_8.2.4-322-gece429
Re: [O] Buffer local alias?
Hello Sebastien, "Sebastien Vauban" writes: > Hello Andreas, > > Andreas Leha wrote: >> The drop of the implicit naming of call lines, for example, was (and >> still will be for some of my files) a bigger issue. > > Could you remind me what's the problem you're talking of? Evaluating a #+call line used to produce a result block named with the name of the called code block and the arguments used. That is not the case any more. Something like (off the top of my head): --8<---cut here---start->8--- #+call: foo(bar=1) #+call: foo(bar=2) #+results: foo(bar=1) | the | results | #+results: foo(bar=2) | the | results | --8<---cut here---end--->8--- Now, one has to name the call line to get a named results block. I would not call it a problem, though. The change just meant that I had to introduce a lot of names for call lines in some of my files where I relied on that implicit naming of results. I know, that I have not adapted all affected files of mine. So, if ever I wanted to re-export these, I will need to do some more naming of call lines... All the best, Andreas
Re: [O] [poll] Fontify code in code blocks
On 14 Jan 2014, at 21:47, Bastien wrote: > Hi Sébastien, > > "Sebastien Vauban" > writes: > >> I think this overall results of the poll is quite clear, no? > > Well, I think we should wait for Carsten's vote on this. > > Carsten, do you think `org-src-fontify-natively' should > be set to `t' by default for Org 8.3? Votes are for this > default in majority so far, but there are only a few votes. Hi Bastien, I don’t have strong feelings either way. Lets turn it on a see what the impact will be. - Carsten > > -- > Bastien
Re: [O] subtree export title w/ tags
"Sebastien Vauban" writes: > `org-export-with-tags' seems to be the option to do that, nope? > > ╭ org-export-with-tags > │ > │ If nil, do not export tags, just remove them from headlines. > ╰ I think the OP wants to remove tags just from the titles. -- Bastien
Re: [O] Adding a new column in the agenda view
HI Marcelo, Marcelo de Moraes Serpa writes: > Is org-agenda-filter-by-top-headline a new func? I can't find it in > org 7.9.4. For org 7.9.4, the name of the function is `org-agenda-filter-by-top-category'. HTH, -- Bastien
Re: [O] python :session does return
Hi John, Yes, you and others in that thread seem to be experiencing the same problem, although there are also different issues discussed there. I'm a bit surprised... With the popularity of python I would expect more org users to have run into this and it to be fixed, but perhaps it isn't as widely used as I thought. Anyway, it is now usable even if the 'print' statements don't show up. -k. On Tue, Jan 14, 2014 at 6:04 PM, John Hendy wrote: > On Tue, Jan 14, 2014 at 7:38 AM, Ken Mankoff wrote: > > > > I've seen various historical issues with :session but it seems I may > have a > > different problem. This is the latest org in emacs 24.3. If I do not have > > :session, then everything works just fine. > > > > This sounded familiar to me, so I googled around for Org mailing list > discussions I was involved in related to python. Does this shed any > new light? > - https://www.mail-archive.com/emacs-orgmode@gnu.org/msg68542.html > > Seems that the discussion ended with the possibility that it was an > emacs change to python.el, and not related to Org, but I'm not sure if > any actions were ever taken regarding that. In any case, the > discussion features a discrepancy between python behavior with > `:session name` and without, so it seemed like a possible candidate to > pass along! > > > > Best regards, > John > > > If I C-c C-c in the following code: > > > > #+BEGIN_SRC python :session transect > > import numpy as np > > x = np.arange(12) > > #+END_SRC > > > > Emacs hangs the first time with minibuffer message of "Sent > > python-eldoc-setup-code". If I C-g, I can edit the org buffer again. All > > other invocations of that code and the minibuffer message is "executing > > Python code block...", but still emacs hangs until I C-g. > > > > If I look at the *transect* buffer, I see the following. The code runs > just > > fine, but for some reason it does not return. > > > > -k. > > > > > > > > Enthought Canopy Python 2.7.3 | 64-bit | (default, Dec 2 2013, 16:19:29) > > [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin > > Type "help", "copyright", "credits" or "license" for more information. > > import numpy as np > > Start .pythonrc > > End .pythonrc > > import numpy as np > > > > x = np.arange(12) > > x = np.arange(12) > > > > > > > open('/var/folders/60/jb7kfrsn2jd90hpcgj4m_wrcgn/T/babel-28022EFF/python-28022Yjm', > > 'w').write(str(_)) > > > open('/var/folders/60/jb7kfrsn2jd90hpcgj4m_wrcgn/T/babel-28022EFF/python-28022Yjm', > > 'w').write(str(_)) > > > > > > > > > > 'org_babel_python_eoe' > > 'org_babel_python_eoe' > > >>> >>> >>> >>> >>> Traceback (most recent call last): > > > > File "", line 1, in > > NameError: name '_' is not defined > > >>> >>> 'org_babel_python_eoe' > import numpy as np > > > > import numpy as np > > x = np.arange(12) > > x = np.arange(12) > > > > > > > > open('/var/folders/60/jb7kfrsn2jd90hpcgj4m_wrcgn/T/babel-28022EFF/python-28022lts', > > 'w').write(str(_)) > > > > > open('/var/folders/60/jb7kfrsn2jd90hpcgj4m_wrcgn/T/babel-28022EFF/python-28022lts', > > 'w').write(str(_)) > > > > > > > > 'org_babel_python_eoe' > > 'org_babel_python_eoe' > > > > 'org_babel_python_eoe' > > > > > > > > > > >
Re: [O] How to signal end of a section or subsection
Hi Eric, On Tue, Jan 14, 2014 at 11:55 AM, Eric S Fraga wrote: > > > What I would do is make the A, B and C paragraph items. Then add > checkboxes (C-u C-c C-x C-b) to any list item you want to mark as a todo > item. You can set/unset using C-c C-x C-b. If you add the text [/] to > the headline with the TODO on it, it will be updated to indicate the > number of completed checkboxes and the total number of such boxes each > time you set or unset one. > I just discovered org inline tasks. This seems to be another approach, and very useful! http://orgmode.org/worg/org-faq.html#closing-outline-sections -k.
Re: [O] Citations and references in ODT
Aric, perhaps you could add markdown support using export filters? I have just come across this feature and it looks useful. http://thread.gmane.org/gmane.emacs.orgmode/74816/focus=74876 -k. On Mon, Jan 13, 2014 at 7:16 PM, Aric Gregson wrote: > Ken Mankoff writes: > > > I find the ODT export very useful. Working on another document imported > > from LaTeX I have a lot of \citep{} and \citet{} in addition to \cite{}. > Is > > it possible for ox-jabref.el to support this even if it does not > > distinguish between the T and P? > > On a similar note, would it be possible to add support for the markdown > style of references? > > [@Authoryear; @anotherauthoryear] > > I have so many like this across files. > > Thanks, Aric >
Re: [O] subtree export title w/ tags
Bastien, Sebastien, thank you both for your help. I'll check out `org-export-with-tags'. I do need the tags, but only in the -export-as- function of a derived exporter. Probably I still can get them. Thanks a lot Best regards Robert On 01/15/2014 12:53 PM, Bastien wrote: > > > "Sebastien Vauban" > writes: > >> `org-export-with-tags' seems to be the option to do that, nope? >> >> ╭ org-export-with-tags >> │ >> │ If nil, do not export tags, just remove them from headlines. >> ╰ > > I think the OP wants to remove tags just from the titles. >
Re: [O] [BUG, PATCH] org-indent-mode not correctly deactivated
Hello, Bastien writes: > With a file like > > , > | #+STARTUP: indent > | > | * Heading > | ** Subheading > ` > > org-mode will correctly use org-indent-mode when displaying it. > > Now edit the file to deactivate org-indent: > > , > | #+STARTUP: noindent > | > | * Heading > | ** Subheading > ` > > Go to #+STARTUP and hit C-c C-c : org-indent-mode will not be > activated, but it will not be properly deactivated, leaving a > confusing whitespace before indented headlines. > > The attached patch fixes the problem, but it is wrong, because it > "actively" deactivates org-indent-mode each time a buffer is not > using org-indent-mode, in sessions where org-indent-mode has been > used at least once. There is no attached patch in your mail. Though, I don't understand why you think your approach is wrong. In `org-mode' mode definition, we can change: (when org-startup-indented (require 'org-indent) (org-indent-mode 1)) into: (cond (org-startup-indented (require 'org-indent) (org-indent-mode 1)) ((org-bound-and-true-p org-indent-mode) (org-indent-mode -1))) It's probably similar to what you wrote in your patch. Regards, -- Nicolas Goaziou
[O] auto-fill-mode for text changes (plain-lists) indentation
Hi Org users, I am trying to set auto-fill-mode for text, adding in my .emacs: (add-hook 'text-mode-hook '(lambda () (auto-fill-mode t))) it works quite well but it seems to change the plain-lists indentation. * without auto-fill-mode + item 1 :: description comes here indentation makes text start here + item 2 :: another description + item 3 :: here is a quite long description, that would be nice to have an automatic carriage return here indentation makes text start here * with auto-fill-mode + item 1 :: description comes here Now text is indented from here :-( + item 2 :: another description + item 3 :: here is a quite long description, it is nice to have an automatic carriage retrun here! but now text is indented from here :-( Is there anyway to use auto-fill-mode without changing indentation? Thanks, Rémy A.
Re: [O] Bug: Export to Latex - Incorrect output for list items starting with left bracket [8.2.3c (8.2.3c-elpa @ /Users/jdegenhardt/.emacs.d/elpa/org-20131115/)]
Hello, Eric S Fraga writes: > Nicolas Goaziou writes: > >> I'd like to fix it, yes. It will not help you with older documents, but >> what do you think about the export snippet exception I suggested? > > Sorry, I didn't get back to you on this. Although obviously more > cumbersome than my current approach, your suggestion would cover my main > use case *and* from org's point of view would be much more "honest". I > would be happy with this. So, here comes another patch. WDYT? Regards, -- Nicolas Goaziou >From fd99c294e2f5ae75fa5f6a23c1958bd437310d0c Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Mon, 13 Jan 2014 17:48:19 +0100 Subject: [PATCH] ox-latex: Fix items starting with a square bracket * lisp/ox-latex.el (org-latex-headline, org-latex-item): Fix items starting with a square bracket. Thanks to Jon Degenhardt, Vladimir Lomov and Eric S Fraga for contributing to the discussion. --- lisp/ox-latex.el | 28 ++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el index 8294938..8842923 100644 --- a/lisp/ox-latex.el +++ b/lisp/ox-latex.el @@ -1374,7 +1374,13 @@ holding contextual information." (when (org-export-first-sibling-p headline info) (format "\\begin{%s}\n" (if numberedp 'enumerate 'itemize))) ;; Itemize headline - "\\item " full-text "\n" headline-label pre-blanks contents))) + "\\item" + (and full-text (org-string-match-p "\\`[ \t]*\\[" full-text) + "\\relax") + " " full-text "\n" + headline-label + pre-blanks + contents))) ;; If headline is not the last sibling simply return ;; LOW-LEVEL-BODY. Otherwise, also close the list, before ;; any blank line. @@ -1564,7 +1570,25 @@ contextual information." (and tag (format "[{%s}] " (concat checkbox (org-export-data tag info))) -(concat counter "\\item" (or tag (concat " " checkbox)) +(concat counter + "\\item" + (cond + (tag) + (checkbox (concat " " checkbox)) + ;; Without a tag or a check-box, if CONTENTS starts with + ;; an opening square bracket, add "\relax" to "\item", + ;; unless the brackets comes from an initial export + ;; snippet (i.e. it is inserted willingly by the user). + ((and contents + (org-string-match-p "\\`[ \t]*\\[" contents) + (not (let ((e (car (org-element-contents item + (and (eq (org-element-type e) 'paragraph) + (let ((o (car (org-element-contents e + (and (eq (org-element-type o) 'export-snippet) + (eq (org-export-snippet-backend o) + 'latex))) + "\\relax ") + (t " ")) (and contents (org-trim contents)) ;; If there are footnotes references in tag, be sure to ;; add their definition at the end of the item. This -- 1.8.5.2
Re: [O] colorize html output when batch exporting
On 2014-01-15 03:04, Alan Schmitt wrote: Quick summary: I'm now able to generate the css, but I don't understand how it can change the colors. However, I still find there is a problem. Here is the html source generated from a snippet of the file: #+BEGIN_SRC html Inductive expr := | expr_this : expr | expr_identifier : string -> expr | expr_literal : literal -> expr | expr_object : list (propname * propbody) -> expr | expr_function : option string -> list string -> funcbody -> expr | expr_access : expr -> expr -> expr | expr_member : expr -> string -> expr | expr_new : expr -> list expr -> expr | expr_call : expr -> list expr -> expr | expr_unary_op : unary_op -> expr -> expr | expr_binary_op : expr -> binary_op -> expr -> expr | expr_conditional : expr -> expr -> expr -> expr | expr_assign : expr -> option binary_op -> expr -> expr #+END_SRC I don't understand how things are supposed to be colorized, as there is no mention in the html of span elements to put color on. For instance, "Inductive" is a keyword, and in a coq buffer it has face "font-lock-keyword-face". Shouldn't it have class "org-keyword" in the generated html? Yes, it should. Something is not right with your output. I'm not familiar with coq, and i don't have coq-mode.el, but from the above it looks like a BNF grammar. Are you sure coq-mode was loaded when you did the export? Could you try a simple example? Here's a mimimal org file #+BEGIN_SRC org ,#+OPTIONS: html-postamble:nil html-preamble:nil html-scripts:nil html-style:nil ,#+HTML_HEAD_EXTRA: ,#+HTML_DOCTYPE: xhtml5 ,* Test htmlize ,*Note:* =org-html-htmlize-output-type= is ~css~ ,#+BEGIN_SRC perl :exports code print "foo\n"; ,#+END_SRC #+END_SRC and the results i get: #+BEGIN_HTML http://www.w3.org/1999/xhtml"; lang="en" xml:lang="en"> html html Table of Contents Test htmlize Test htmlize Note: org-html-htmlize-output-type is css class="org-cperl-nonoverridable">print class="org-string">"foo\n"; #+END_HTML
Re: [O] colorize html output when batch exporting
Hi Rick, Rick Frankel writes: > Yes, it should. Something is not right with your output. I'm not > familiar with coq, and i don't have coq-mode.el, but from the above it > looks like a BNF grammar. Are you sure coq-mode was loaded when you > did the export? This was the problem! I added the code to load the mode, and all is well now. Thanks a lot for your help, Alan
Re: [O] [BUG, PATCH] org-indent-mode not correctly deactivated
Hi Nicolas, Nicolas Goaziou writes: > There is no attached patch in your mail. Though, I don't understand why > you think your approach is wrong. In `org-mode' mode definition, we can > change: > > (when org-startup-indented (require 'org-indent) (org-indent-mode 1)) > > into: > > (cond (org-startup-indented (require 'org-indent) (org-indent-mode 1)) > ((org-bound-and-true-p org-indent-mode) (org-indent-mode -1))) This will not work, because (org-bound-and-true-p org-indent-mode) returns nil at the time `org-mode' is called. > It's probably similar to what you wrote in your patch. Here is my patch -- quite similar, except that it will disable `org-indent-mode' for every restart once it has been activated once, which is wrong, or at least to heavy-handed. Maybe we can simply tell users to deactivate `org-indent-mode' manually, but this feels wrong too. diff --git a/lisp/org.el b/lisp/org.el index ee7965a..f77a0e1 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -5350,7 +5350,8 @@ The following commands are available: (modify-syntax-entry ?@ "w") (modify-syntax-entry ?\" "\"") (if org-startup-truncated (setq truncate-lines t)) - (when org-startup-indented (require 'org-indent) (org-indent-mode 1)) + (cond (org-startup-indented (require 'org-indent) (org-indent-mode 1)) + ((fboundp 'org-indent-initialize) (org-indent-mode 0))) (org-set-local 'font-lock-unfontify-region-function 'org-unfontify-region) ;; Activate before-change-function -- Bastien
Re: [O] M-right does not demote some subheadings in a region
Samuel Wales writes: > I can't produce an ECM at this time, or compare with Susan's > bug, but there is a serious demote bug in recent Org. > > In this tree: > > # * a > # *** a > # *** b > # *** c > # * ca > # * cb > # * cc > # *** d > # *** e > # *** f > > If I mark b through e and m-right, everything goes under a > as expected. However, the entries under c do not get > demoted. This is the same bug than the one Susan reported, and it was fixed yesterday. Please update and confirm. Thanks, -- Bastien
Re: [O] [BUG, PATCH] org-indent-mode not correctly deactivated
Bastien writes: > Nicolas Goaziou writes: > >> (cond (org-startup-indented (require 'org-indent) (org-indent-mode 1)) >> ((org-bound-and-true-p org-indent-mode) (org-indent-mode -1))) > > This will not work, because (org-bound-and-true-p org-indent-mode) > returns nil at the time `org-mode' is called. If it returns nil, it means that `org-startup-indented' is nil and either `org-indent' isn't loaded or `org-indent-mode' is off. I don't get why it wouldn't work. Regards, -- Nicolas Goaziou
Re: [O] org-store-link without having to press Enter?
Hi Sébastien, please test the attached patch against master. It creates a new command `org-insert-last-stored-link' bound to `C-c M-l'. You can use `C-2 C-c M-l' to insert the last two links. So the set of commands around inserting links would be: C-c l => store link (the suggested user binding) C-c C-l => insert a link C-c C-M-l => insert all links as a list C-u C-c C-M-l => insert all links as a list and keep them C-1 C-c C-M-l => insert the last stored link C-c M-l => short for the previous keybinding I also find myself in this workflow: 1. collect various links through a session 2. store the last one for a new task 3. dump all links into some "read later" heading so I think this feature deserves to be in core. What do you and others think? diff --git a/lisp/org.el b/lisp/org.el index ecd84e9..85e7ce5 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -9930,14 +9930,29 @@ This command can be called in any mode to insert a link in Org-mode syntax." (org-load-modules-maybe) (org-run-like-in-org-mode 'org-insert-link)) -(defun org-insert-all-links (&optional keep) - "Insert all links in `org-stored-links'." +(defun org-insert-all-links (&optional keep not-as-list-item) + "Insert all links in `org-stored-links'. +When `keep' is non-nil, do not delete then link from `org-stored-links'. +When `not-as-list-item', insert the link directly, not as a list item." (interactive "P") - (let ((links (copy-sequence org-stored-links)) l) -(while (setq l (if keep (pop links) (pop org-stored-links))) - (insert "- ") + (let ((org-keep-stored-link-after-insertion (equal keep '(4))) + (links (copy-seq org-stored-links)) + (cnt 1) l) +(if (null org-stored-links) + (message "No link to insert") +(while (and (or (listp keep) (>= keep cnt)) + (setq l (if (listp keep) + (pop links) + (pop org-stored-links + (setq cnt (1+ cnt)) + (unless not-as-list-item (insert "- ")) (org-insert-link nil (car l) (or (cadr l) "")) - (insert "\n" + (unless not-as-list-item (insert "\n")) + +(defun org-insert-last-stored-link (arg) + "Insert the last link stored in `org-stored-links'." + (interactive "p") + (org-insert-all-links arg t)) (defun org-link-fontify-links-to-this-file () "Fontify links to the current file in `org-stored-links'." @@ -19198,6 +19213,7 @@ boundaries." (org-defkey org-mode-map "\C-c\C-x\C-n" 'org-next-link) (org-defkey org-mode-map "\C-c\C-x\C-p" 'org-previous-link) (org-defkey org-mode-map "\C-c\C-l" 'org-insert-link) +(org-defkey org-mode-map "\C-c\M-l" 'org-insert-last-stored-link) (org-defkey org-mode-map "\C-c\C-\M-l" 'org-insert-all-links) (org-defkey org-mode-map "\C-c\C-o" 'org-open-at-point) (org-defkey org-mode-map "\C-c%"'org-mark-ring-push) -- Bastien
Re: [O] Plentiful warnings & errors installing org+contrib
Melleus writes: > Got numerous warnings and some errors when trying to install org+contrib > package from orgmode.org/elpa repository. Please carefully read the "Installation" section of the Org manual: when installing Org from GNU ELPA, you need to do it from a fresh Emacs session. Let us know if it solves your problem. -- Bastien
Re: [O] Italicise block of text
Hello Roger, when answering a mail/post from the list, please Cc the list in your response, so other members of the list can see your mail to. On 2014-01-15 14:30 Roger Mason wrote: > But this does not: > > /Perhaps, but [...] to replacement./ > I just get a block of text bounded by / and / in the resulting pdf. Maybe the markup gets escaped somehow by special characters in the text. I do not know enough about the markup of org to help you here. I think Nicolas can give you a more satisfying answer. Regards, -- Alexander Baier
Re: [O] [BUG, PATCH] org-indent-mode not correctly deactivated
Nicolas Goaziou writes: > Bastien writes: > >> Nicolas Goaziou writes: >> >>> (cond (org-startup-indented (require 'org-indent) (org-indent-mode 1)) >>> ((org-bound-and-true-p org-indent-mode) (org-indent-mode -1))) >> >> This will not work, because (org-bound-and-true-p org-indent-mode) >> returns nil at the time `org-mode' is called. > > If it returns nil, it means that `org-startup-indented' is nil and > either `org-indent' isn't loaded or `org-indent-mode' is off. > > I don't get why it wouldn't work. Try to edebug-defun `org-mode' with the recipe I posted and you'll see: yes, `org-startup-indented' and `org-indent-mode' are off, but the org-indent properties have not been removed from the before, as they are by manually turning off with M-x org-indent-mode RET -- Bastien
Re: [O] [BUG, PATCH] org-indent-mode not correctly deactivated
Bastien writes: > Try to edebug-defun `org-mode' with the recipe I posted and you'll > see: yes, `org-startup-indented' and `org-indent-mode' are off, > but the org-indent properties have not been removed from the before, ^^ buffer /me english speaking trying. -- Bastien
Re: [O] tooltips
Christian Moe writes: > Let me know if this doesn't work or isn't clear. It works very well! I made a micro screencast for demoing it: http://bzg.fr/u/org-footnotes-jquery.ogv Thanks for packaging this. -- Bastien
Re: [O] org-store-link without having to press Enter?
Bastien writes: > 1. collect various links through a session > 2. store the last one for a new task > 3. dump all links into some "read later" heading > > so I think this feature deserves to be in core. > > What do you and others think? > Much better! > > diff --git a/lisp/org.el b/lisp/org.el > index ecd84e9..85e7ce5 100644 > --- a/lisp/org.el > +++ b/lisp/org.el > @@ -9930,14 +9930,29 @@ This command can be called in any mode to insert a > link in Org-mode syntax." >(org-load-modules-maybe) >(org-run-like-in-org-mode 'org-insert-link)) > > -(defun org-insert-all-links (&optional keep) > - "Insert all links in `org-stored-links'." > +(defun org-insert-all-links (&optional keep not-as-list-item) > + "Insert all links in `org-stored-links'. > +When `keep' is non-nil, do not delete then link from `org-stored-links'. ^^^the > +When `not-as-list-item', insert the link directly, not as a list item." >(interactive "P") > - (let ((links (copy-sequence org-stored-links)) l) > -(while (setq l (if keep (pop links) (pop org-stored-links))) > - (insert "- ") > + (let ((org-keep-stored-link-after-insertion (equal keep '(4))) > + (links (copy-seq org-stored-links)) > + (cnt 1) l) > +(if (null org-stored-links) > + (message "No link to insert") > +(while (and (or (listp keep) (>= keep cnt)) > + (setq l (if (listp keep) > + (pop links) > + (pop org-stored-links > + (setq cnt (1+ cnt)) > + (unless not-as-list-item (insert "- ")) >(org-insert-link nil (car l) (or (cadr l) "")) > - (insert "\n" > + (unless not-as-list-item (insert "\n")) > + > +(defun org-insert-last-stored-link (arg) > + "Insert the last link stored in `org-stored-links'." Not sure whether it's worth adding a comment here: I had to experiment a bit to convince myself that an interactive call without a prefix arg passed 1 as the value of arg. I found it unclear but that may be just my ignorance. > + (interactive "p") > + (org-insert-all-links arg t)) > > (defun org-link-fontify-links-to-this-file () >"Fontify links to the current file in `org-stored-links'." > @@ -19198,6 +19213,7 @@ boundaries." > (org-defkey org-mode-map "\C-c\C-x\C-n" 'org-next-link) > (org-defkey org-mode-map "\C-c\C-x\C-p" 'org-previous-link) > (org-defkey org-mode-map "\C-c\C-l" 'org-insert-link) > +(org-defkey org-mode-map "\C-c\M-l" 'org-insert-last-stored-link) > (org-defkey org-mode-map "\C-c\C-\M-l" 'org-insert-all-links) > (org-defkey org-mode-map "\C-c\C-o" 'org-open-at-point) > (org-defkey org-mode-map "\C-c%"'org-mark-ring-push) Nick
Re: [O] Plentiful warnings & errors installing org+contrib
Thank you for replying! That was the first thing I did. The second was installing Emacs sources. But results were just the same. To me it looks like that orgmode.org repository is not compatible with Emacs from Debian or there are some unmaintained dependencies issues at least, which could be understandable from the log by someone more literable in Lisp than me. And surely I could do anything wrong which is the most likely, but I cannot understand what?
Re: [O] tooltips
On Wed, Jan 15, 2014 at 10:26 PM, Bastien wrote: > Christian Moe writes: > >> Let me know if this doesn't work or isn't clear. > > It works very well! > > I made a micro screencast for demoing it: > http://bzg.fr/u/org-footnotes-jquery.ogv > > Thanks for packaging this. > > -- > Bastien Thanks Christian for that. Just one small thing -- Can we remove the number? [I tried to look at the js but could not figure out the details and also the debugging model]
Re: [O] Changing behaviour of {:} in column view?
Sebastien Vauban writes: > > Luke Crook wrote: > > In column view, org-mode sums 3xSubtasks each having an effort of "1d" as "1d > > 0:00". Is there a way to change the sum to display this as "3d"? > > You could try to attach an ECM (« Exemple Complet Minimal », or minimal > working example) demo'ing your problem. That'd save time for people to > try to confirm the problem, and eventually fix it. > Yes, I should have done. The following shows the sum of Tasks 1/2/3 as "1d 00:00" in column view, which is correct as this reflects the actual number of hours of effort (8 hours a day). My question is, can this be displayed assuming 'n' hours of effort a day and shown in days? So the sum of Effort in this case would be displayed as "3d". * Test :PROPERTIES: :ID: Tasks :COLUMNS: %ITEM %17Effort(Effort){:} :END: ** Task 1 :PROPERTIES: :Effort: 1d :END: ** Task 2 :PROPERTIES: :Effort: 1d :END: ** Task 3 :PROPERTIES: :Effort: 1d :END:
[O] modifying header when in columns mode
ago and it still doesn't seem to reflected in group.> Is there a way to modify a header line in column view other than manually navigating to the field? If I try to use a standard key like S-up I get: "org-self-insert-command: Text is read-only: "Type `e' to edit property"". If I try to eval org-priority I get: org-priority: Text is read-only: "Type `e' to edit property" Since column is editable, just in a different way, it feels like the APIs should still work. Failing that, is there another function I can use (so I can write my own wrapper that tries both)? Thanks, d
[O] Error when trying to show the agenda view for the current day
Hi, Not sure what I did, but when I try to C-a a a, the agenda view fails to be built, and I get the following message: "byte-code: Before first headline at position 169 in buffer gtd.org" Does anyone know what this means? Thanks in advance.
Re: [O] Automatically add a repeater when scheduling
Thank you. This might be a good feature and I might looking into creating a new version that does this automatically, since I use the current day agenda view as my next actions list, and use it to automatically carry tasks to the following day, so the +1d repeater really keeps things clean for my specific workflow. The nice thing is that when they are "current", they are put in the right order (as they are defined in the org file in question), but what bugs me is that when they are outdated, they are ordered by the oldest to the newest, it seems. On Wed, Jan 15, 2014 at 3:36 AM, Sebastien Vauban wrote: > Marcelo de Moraes Serpa wrote: > > Does org allow automatically adding a repeater (say, +1d) to a schedule > > when adding it with C-c C-s? > > No -- at least, not yet: > > ╭ > │ C-c C-s runs the command org-schedule, which is an interactive Lisp > function in > │ `org.el'. > │ > │ It is bound to C-c C-s, >│ Item>. > │ > │ (org-schedule ARG &optional TIME) > │ > │ Insert the SCHEDULED: string with a timestamp to schedule a TODO item. > │ With one universal prefix argument, remove any scheduling date from > the item. > │ With two universal prefix arguments, prompt for a delay cookie. > │ With argument TIME, scheduled at the corresponding date. TIME can > │ either be an Org date like "2011-07-24" or a delta like "+2d". > ╰ > > You see that C-c C-s is already pretty loaded (with up to two universal > arguments foreseen...). > > > If not, I think it wouldn't be so hard to monkeypatch the method to do > so, > > would it? > > Best regards, > Seb > > -- > Sebastien Vauban > > >
Re: [O] python :session does return
I think the issue here is that python users seem less likely (per user on average) to edit the related Org-mode support (i.e., ob-python.el) than users of some other languages which may be less popular in the large but have better Org-mode support. Also, as a maintainer of Org-mode's code block support, I personally do not use Python. Best, Ken Mankoff writes: > Hi John, > > Yes, you and others in that thread seem to be experiencing the same > problem, although there are also different issues discussed there. > > I'm a bit surprised... With the popularity of python I would expect more > org users to have run into this and it to be fixed, but perhaps it isn't as > widely used as I thought. Anyway, it is now usable even if the 'print' > statements don't show up. > > -k. > > > > On Tue, Jan 14, 2014 at 6:04 PM, John Hendy wrote: > >> On Tue, Jan 14, 2014 at 7:38 AM, Ken Mankoff wrote: >> > >> > I've seen various historical issues with :session but it seems I may >> have a >> > different problem. This is the latest org in emacs 24.3. If I do not have >> > :session, then everything works just fine. >> > >> >> This sounded familiar to me, so I googled around for Org mailing list >> discussions I was involved in related to python. Does this shed any >> new light? >> - https://www.mail-archive.com/emacs-orgmode@gnu.org/msg68542.html >> >> Seems that the discussion ended with the possibility that it was an >> emacs change to python.el, and not related to Org, but I'm not sure if >> any actions were ever taken regarding that. In any case, the >> discussion features a discrepancy between python behavior with >> `:session name` and without, so it seemed like a possible candidate to >> pass along! >> >> >> >> Best regards, >> John >> >> > If I C-c C-c in the following code: >> > >> > #+BEGIN_SRC python :session transect >> > import numpy as np >> > x = np.arange(12) >> > #+END_SRC >> > >> > Emacs hangs the first time with minibuffer message of "Sent >> > python-eldoc-setup-code". If I C-g, I can edit the org buffer again. All >> > other invocations of that code and the minibuffer message is "executing >> > Python code block...", but still emacs hangs until I C-g. >> > >> > If I look at the *transect* buffer, I see the following. The code runs >> just >> > fine, but for some reason it does not return. >> > >> > -k. >> > >> > >> > >> > Enthought Canopy Python 2.7.3 | 64-bit | (default, Dec 2 2013, 16:19:29) >> > [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin >> > Type "help", "copyright", "credits" or "license" for more information. >> > import numpy as np >> > Start .pythonrc >> > End .pythonrc >> >> import numpy as np >> > >> > x = np.arange(12) >> > x = np.arange(12) >> > >> > >> > >> open('/var/folders/60/jb7kfrsn2jd90hpcgj4m_wrcgn/T/babel-28022EFF/python-28022Yjm', >> > 'w').write(str(_)) >> > >> open('/var/folders/60/jb7kfrsn2jd90hpcgj4m_wrcgn/T/babel-28022EFF/python-28022Yjm', >> > 'w').write(str(_)) >> > >> > >> > >> > >> > 'org_babel_python_eoe' >> > 'org_babel_python_eoe' >> >> >>> >>> >>> >>> >>> Traceback (most recent call last): >> > >> > File "", line 1, in >> > NameError: name '_' is not defined >> >> >>> >>> 'org_babel_python_eoe' >> import numpy as np >> > >> > import numpy as np >> > x = np.arange(12) >> >> x = np.arange(12) >> > >> > >> >> > >> open('/var/folders/60/jb7kfrsn2jd90hpcgj4m_wrcgn/T/babel-28022EFF/python-28022lts', >> > 'w').write(str(_)) >> >> >> > >> open('/var/folders/60/jb7kfrsn2jd90hpcgj4m_wrcgn/T/babel-28022EFF/python-28022lts', >> > 'w').write(str(_)) >> > >> >> > >> >> > 'org_babel_python_eoe' >> >> 'org_babel_python_eoe' >> > >> > 'org_babel_python_eoe' >> >> >> > >> > >> > >> > >> -- Eric Schulte https://cs.unm.edu/~eschulte PGP: 0x614CA05D
Re: [O] Buffer local alias?
Andreas Leha writes: > I am not as organized as Tom is. So the chances to use my up-to-date > orgmode and successfully export any of my org documents from a year ago > (they are almost all 'Literate Programming' documents and, thus, maybe > more fragile?) are slim. I do not have numbers, but it seems like I'll > need to adapt such documents all the time. We've discussed this before… If you want anything "reproducible", you either need to keep it up-to-date with rolling releases and regression tests or you need an environment that can be frozen (i.e. a VM with the data plus the OS and applications). Anything less than that is coming back to bite you at some inconvenient moment. Regards, Achim. -- +<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+ SD adaptations for KORG EX-800 and Poly-800MkII V0.9: http://Synth.Stromeko.net/Downloads.html#KorgSDada
Re: [O] auto-fill-mode for text changes (plain-lists) indentation
Hi Rémy, Rémy Abergel writes: > Hi Org users, > > I am trying to set auto-fill-mode for text, adding in my .emacs: > > (add-hook 'text-mode-hook '(lambda () (auto-fill-mode t))) > > it works quite well but it seems to change the plain-lists > indentation. > > * without auto-fill-mode > + item 1 :: description comes here > indentation makes text start here > + item 2 :: another description > + item 3 :: here is a quite long description, that would be nice to > have an automatic carriage return here > indentation makes text start here > > * with auto-fill-mode > + item 1 :: description comes here > Now text is indented from here :-( > + item 2 :: another description > + item 3 :: here is a quite long description, it is nice to have an > automatic carriage retrun here! > but now text is indented from here :-( > To me this feels correct. > Is there anyway to use auto-fill-mode without changing indentation? I do not have an answer, sorry. Regards, Andreas
Re: [O] Buffer local alias?
Hi Achim, Achim Gratz writes: > Andreas Leha writes: >> I am not as organized as Tom is. So the chances to use my up-to-date >> orgmode and successfully export any of my org documents from a year ago >> (they are almost all 'Literate Programming' documents and, thus, maybe >> more fragile?) are slim. I do not have numbers, but it seems like I'll >> need to adapt such documents all the time. > > We've discussed this before… If you want anything "reproducible", you > either need to keep it up-to-date with rolling releases and regression > tests or you need an environment that can be frozen (i.e. a VM with the > data plus the OS and applications). Anything less than that is coming > back to bite you at some inconvenient moment. > Yes, I know. That's why I am sighing a bit: Both approaches need work or are inconvenient in one way or the other. I am following the first approach, since I sort of can live with that kind of impaired reproducibility and I really want (some of) the new features constantly added to Org. I just want to say: For me, the more backwards compatible Org stays the better. That's why I vote for the alias in the initial topic of this thread. And for similar measures in other cases, where backwards compability is as 'cheap' as in this case. It will just mean a little less work for me in the end. Regards, Andreas
Re: [O] python :session does return
On Wed, Jan 15, 2014 at 6:22 AM, Ken Mankoff wrote: > Hi John, > > Yes, you and others in that thread seem to be experiencing the same problem, > although there are also different issues discussed there. > > I'm a bit surprised... With the popularity of python I would expect more org > users to have run into this and it to be fixed, but perhaps it isn't as > widely used as I thought. Anyway, it is now usable even if the 'print' > statements don't show up. Sorry I haven't been following along quite as closely as I probably should have... I booted into Linux to remove the issue of setting up python on my Windows partition. Are my results contrary to what's been happening to you? #+begin_src ~/Desktop/test.org * heading Using =:results output= #+BEGIN_SRC python :results output :session transect import numpy as np x = np.arange(12) print x #+END_SRC #+RESULTS: : : >>> [ 0 1 2 3 4 5 6 7 8 9 10 11] #+end_src #+begin_src ~/Desktop/test.org * heading I can also use =:results value= and it spits out an org table #+BEGIN_SRC python :results value :session transect import numpy as np x = np.arange(12) x #+END_SRC #+RESULTS: | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | #+end_src #+begin_src Emacs *transect* buffer >>> import numpy as np >>> x = np.arange(12) >>> print x [ 0 1 2 3 4 5 6 7 8 9 10 11] >>> >>> >>> >>> 'org_babel_python_eoe' 'org_babel_python_eoe' >>> #+end_src #+begin_src .emacs ;; Arch linux installs python3 by default, and python is bound to it ;; need to set this variable to make sure we're using python v2 (setq org-babel-python-command "python2") #+end_src $ python2 --version Python 2.7.6 M-x org-version Org-mode version 8.2.3c (release_8.2.3c-227-g54a64f @ /home/jwhendy/.elisp/org.git/lisp/) $ emacs --version GNU Emacs 24.3.1 I think the :session name -> a *name* session is still a bit goofy, but I at the very least I wanted to share that I don't get any hanging behavior and seem to get coherent results out of a python babel code block. Best regards, John > > -k. > > > > On Tue, Jan 14, 2014 at 6:04 PM, John Hendy wrote: >> >> On Tue, Jan 14, 2014 at 7:38 AM, Ken Mankoff wrote: >> > >> > I've seen various historical issues with :session but it seems I may >> > have a >> > different problem. This is the latest org in emacs 24.3. If I do not >> > have >> > :session, then everything works just fine. >> > >> >> This sounded familiar to me, so I googled around for Org mailing list >> discussions I was involved in related to python. Does this shed any >> new light? >> - https://www.mail-archive.com/emacs-orgmode@gnu.org/msg68542.html >> >> Seems that the discussion ended with the possibility that it was an >> emacs change to python.el, and not related to Org, but I'm not sure if >> any actions were ever taken regarding that. In any case, the >> discussion features a discrepancy between python behavior with >> `:session name` and without, so it seemed like a possible candidate to >> pass along! >> >> >> >> Best regards, >> John >> >> > If I C-c C-c in the following code: >> > >> > #+BEGIN_SRC python :session transect >> > import numpy as np >> > x = np.arange(12) >> > #+END_SRC >> > >> > Emacs hangs the first time with minibuffer message of "Sent >> > python-eldoc-setup-code". If I C-g, I can edit the org buffer again. All >> > other invocations of that code and the minibuffer message is "executing >> > Python code block...", but still emacs hangs until I C-g. >> > >> > If I look at the *transect* buffer, I see the following. The code runs >> > just >> > fine, but for some reason it does not return. >> > >> > -k. >> > >> > >> > >> > Enthought Canopy Python 2.7.3 | 64-bit | (default, Dec 2 2013, >> > 16:19:29) >> > [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin >> > Type "help", "copyright", "credits" or "license" for more information. >> > import numpy as np >> > Start .pythonrc >> > End .pythonrc >> >> import numpy as np >> > >> > x = np.arange(12) >> > x = np.arange(12) >> > >> > >> > >> > open('/var/folders/60/jb7kfrsn2jd90hpcgj4m_wrcgn/T/babel-28022EFF/python-28022Yjm', >> > 'w').write(str(_)) >> > >> > open('/var/folders/60/jb7kfrsn2jd90hpcgj4m_wrcgn/T/babel-28022EFF/python-28022Yjm', >> > 'w').write(str(_)) >> > >> > >> > >> > >> > 'org_babel_python_eoe' >> > 'org_babel_python_eoe' >> >> >>> >>> >>> >>> >>> Traceback (most recent call last): >> > >> > File "", line 1, in >> > NameError: name '_' is not defined >> >> >>> >>> 'org_babel_python_eoe' >> import numpy as np >> > >> > import numpy as np >> > x = np.arange(12) >> >> x = np.arange(12) >> > >> > >> >> > >> > open('/var/folders/60/jb7kfrsn2jd90hpcgj4m_wrcgn/T/babel-28022EFF/python-28022lts', >> > 'w').write(str(_)) >> >> >> > >> > open('/var/folders/60/jb7kfrsn2jd90hpcgj4m_wrcgn/T/babel-28022EFF/python-28022lts', >> > 'w').write(str(_)) >> > >> >> > >> >> > 'org_babel_python_eoe' >> >>
[O] Link error to latest stable version
I just attempted to download the latest stable version from orgmode.org: Stable version *8.2.5e* (Jan. 2014) The tar.gz link gave me a 404 error. Cheers, Alan -- Alan L Tyreehttp://www2.austlii.edu.au/~alan Tel: 04 2748 6206 sip:typh...@iptel.org
Re: [O] [BUG, PATCH] org-indent-mode not correctly deactivated
Bastien writes: > Nicolas Goaziou writes: > >> Bastien writes: >> >>> Nicolas Goaziou writes: >>> (cond (org-startup-indented (require 'org-indent) (org-indent-mode 1)) ((org-bound-and-true-p org-indent-mode) (org-indent-mode -1))) >>> >>> This will not work, because (org-bound-and-true-p org-indent-mode) >>> returns nil at the time `org-mode' is called. >> >> If it returns nil, it means that `org-startup-indented' is nil and >> either `org-indent' isn't loaded or `org-indent-mode' is off. >> >> I don't get why it wouldn't work. > > Try to edebug-defun `org-mode' with the recipe I posted and you'll > see: yes, `org-startup-indented' and `org-indent-mode' are off, > but the org-indent properties have not been removed from the before, > as they are by manually turning off with M-x org-indent-mode RET I see, thank you. But I still don't understand where, and when, `org-indent-mode' is reset. Anyway, we can also patch `org-mode-restart', from (defun org-mode-restart () (interactive) (funcall major-mode) (hack-local-variables) (message "%s restarted" major-mode)) to, (defun org-mode-restart () (interactive) (let ((indent-status (org-bound-and-true-p org-indent-mode))) (funcall major-mode) (hack-local-variables) (when (and indent-status (not (org-bound-and-true-p org-indent-mode))) (org-indent-mode -1))) (message "%s restarted" major-mode)) Still not pretty, but a bit better, IMO. Also, there's a dangling (defvar org-indent-mode nil) in org.el that looks suspicious. I don't think we need it if we use `org-bound-and-true-p' whenever we need to check for `org-indent-mode' value. Regards, -- Nicolas Goaziou
Re: [O] Fwd: [bug] Beamer export fails in current master
Hello, James Harkins writes: > Fine thought, but my bisect regimen went something like this: > > 1. Delete all elc files from the location from which I'm loading org. > > 2. Quit emacs. > > 3. At every bisect step, launch Emacs fresh with "emacs > /path/to/test-file.org" and then do nothing except C-c C-e l B. Then > quit Emacs. > > 4. If I got the error, git bisect bad. If I got an export buffer of > LaTeX code, git bisect good. > > When I got the error, it was always consistently reproducible for that > revision, and it was always enough to launch Emacs, open the file and > try the export, no fancy other things to mess up the cache. I see nothing wrong in that process. Can you still reproduce the error with latest Org? Regards, -- Nicolas Goaziou
[O] SH-ALT-RightArrow works but not SH-ALT-LeftArrow to uniformly promote subheadings
Bastien, Silly me. I should have checked both directions. So your fix fixed half the problem. Susan
Re: [O] tooltips
Rustom, Bastien, Bastien writes: >> I made a micro screencast for demoing it: >> http://bzg.fr/u/org-footnotes-jquery.ogv Thanks, Bastien, that's cool! Rustom Mody writes: > Thanks Christian for that. > Just one small thing -- Can we remove the number? Sure, try this new version of fntooltip.js: -- $(document).ready(fntooltips); function fntooltips() { $(".footnum").each( function () { $("[href='#" + this.id + "']") .attr("title", $(this).closest("div").find("p").text().trim()); } ) } -- The only line that's changed is the one that now goes $(this).closest("div").find("p").text().trim()); Yours, Christian
Re: [O] Plentiful warnings & errors installing org+contrib
Fortunately I have found the org-mode install in official Debian repositories. And even it has the ox-bibtex package I was looking for. It turned out to be fully compatible with my installation of Emacs. And now, after some tweaks in my .emacs I have it up and running. Debian is a kind of thing-in-itself but I much like it for its stability. So sorry for the noise. And thank you.
Re: [O] Plentiful warnings & errors installing org+contrib
Melleus writes: > Fortunately I have found the org-mode install in official Debian > repositories. And even it has the ox-bibtex package I was looking for. > It turned out to be fully compatible with my installation of Emacs. And > now, after some tweaks in my .emacs I have it up and running. Debian is > a kind of thing-in-itself but I much like it for its stability. So sorry > for the noise. And thank you. THe price you pay for that is that Debian probably packages an old version of org-mode. M-x org-version RET will tell you which one. The current version from the org-mode git repo is 8.2.5d. As long as you go into that with your eyes open, there is nothing wrong with using the older version of course. Just be sure to mention it when/if you report problems here. Nick
Re: [O] Error when trying to show the agenda view for the current day
Marcelo de Moraes Serpa writes: > Not sure what I did, but when I try to C-a a a, the agenda view fails > to be built, and I get the following message: > > "byte-code: Before first headline at position 169 in buffer gtd.org" Can you get a more complete backtrace? (setq debug-on-error t) in your emacs.el Thanks! -- Bastien
Re: [O] SH-ALT-RightArrow works but not SH-ALT-LeftArrow to uniformly promote subheadings
Susan Cragin writes: > Silly me. I should have checked both directions. So your fix fixed > half the problem. Silly *me*. Fixed, thanks. -- Bastien
Re: [O] Plentiful warnings & errors installing org+contrib
Melleus writes: > Fortunately I have found the org-mode install in official Debian > repositories. And even it has the ox-bibtex package I was looking for. > It turned out to be fully compatible with my installation of Emacs. And > now, after some tweaks in my .emacs I have it up and running. Thanks to confirming the problem is gone! -- Bastien
Re: [O] Link error to latest stable version
Alan L Tyree writes: > I just attempted to download the latest stable version from > orgmode.org: Stable version 8.2.5e (Jan. 2014) > > The tar.gz link gave me a 404 error. This is now fixed, thansk for reporting this! -- Bastien
Re: [O] [poll] Fontify code in code blocks
Hi Carsten, Carsten Dominik writes: > I don’t have strong feelings either way. Lets turn it on a see what > the impact will be. Done in master, thanks, -- Bastien
Re: [O] [BUG, PATCH] org-indent-mode not correctly deactivated
Nicolas Goaziou writes: > (defun org-mode-restart () > (interactive) > (let ((indent-status (org-bound-and-true-p org-indent-mode))) > (funcall major-mode) > (hack-local-variables) > (when (and indent-status (not (org-bound-and-true-p org-indent-mode))) > (org-indent-mode -1))) > (message "%s restarted" major-mode)) > > Still not pretty, but a bit better, IMO. Definitely better, I applied this. > Also, there's a dangling (defvar org-indent-mode nil) in org.el that > looks suspicious. I don't think we need it if we use > `org-bound-and-true-p' whenever we need to check for `org-indent-mode' > value. Indeed, I removed this. Thanks! -- Bastien
Re: [O] Plentiful warnings & errors installing org+contrib
Thank you. Now I have working 2.8.4 from testing repositories. And comparing to latest 2.8.5 that I couldn't manage I happily accept such price.
Re: [O] [ANN, OT] Emacs web-server, a new option for serving Org-mode files
Eric Schulte writes: > I've written an Emacs web-server [1], which may be used to interact with > Org-mode over HTTP. It has no dependencies aside from needing Emacs 24 > or later and it should be easy to install and use [2]. Thanks Eric for having shared this project. Unfortunately in my setup (Emacs 24.3.1, Windows 7) I could not run even the first "hello world". If some Windows user has time and chance to try, may I please ask if they run web-server successfully. My attempt was to run emacs -Q and type: --8<---cut here---start->8--- (require 'cl) (require 'ert) (add-to-list 'load-path "C:/Users/andrea/Desktop/emacs-web-server-master") (require 'web-server) (load-file "./examples/000-hello-world.el") --8<---cut here---end--->8--- While executing this script I received no errors, not even with debug-on-error turned on. I checked that my port 9000 is free before using it. When I launch Chrome/curl/wget, the connection is established but it never terminates, and no output is delivered to client. Even M-x list-processes showed apparently correct output: - server listen -- -- (network server on local) ws-server listen -- -- (network server on [0 0 0 0 9000]) ws-server <1... open-- -- (network connection to 127.0.0.1) - Thanks for any hint/advice, kindest regards. Andrea
Re: [O] tooltips
On Thu, Jan 16, 2014 at 3:44 AM, Christian Moe wrote: > > Rustom Mody writes: > >> Thanks Christian for that. >> Just one small thing -- Can we remove the number? > > Sure, try this new version of fntooltip.js: Super! Thanks Christian!
Re: [O] Add "legacy" time tracking as CLOCK entries
On 15/01/2014, Sebastien Vauban wrote: > Richard Walker wrote: >> I note that I can add an entry that looks like this: >> >> CLOCK: => 0:30 >> >> and have this contribute to totals. But I would >> also like to record the date for this entry. ... > > Can't you try to convert your lines to: > > CLOCK: [2013-12-11 Wed 0:00]--[2013-12-11 Wed 0:30] => 0:30 > > duration That's just the sort of thing I wanted to avoid. But now I've found that "my" way doesn't show the durations in the Agenda views; yours does. So I have switched all the entries to your way. On some days, I have several of these entries for different tasks, so I get "Clocking overlap" errors in the Day-Agenda view when I use the clockcheck function. OK, the solution to that is to ignore those errors ...
[O] odt exporter on mixed org setup
Just helped a friend to install and upgrade to latest org. Method summary: $ git clone $ make update combined with setup of load-paths Ended with: ox-odt cannot find factory style files I remember that I too had this problem http://lists.gnu.org/archive/html/emacs-orgmode/2013-07/msg00341.html and it had recently disappeared. Checked that it comes back it I use emacs23; goes away if I use emacs24 Checked that the messages when it works in emacs24 are like thus: Debug (ox-odt): Searching for OpenDocument styles files... Debug (ox-odt): Trying /usr/share/emacs/etc/org/styles/... [2 times] Debug (ox-odt): Trying ~/pdsw/etc/styles/... Debug (ox-odt): Trying ~/pdsw/org-mode/lisp/etc/styles/... Debug (ox-odt): Trying /usr/share/emacs/24.3/etc/org/... Debug (ox-odt): Using styles under /usr/share/emacs/24.3/etc/org/ Debug (ox-odt): Searching for OpenDocument schema files... Debug (ox-odt): Trying /usr/share/emacs/etc/org/schema/... [2 times] Debug (ox-odt): No OpenDocument schema files installed So evidently my 'working' odt export is working because its using the builtin emacs odt exporter and not the latest one Looking at org-odt-* stuff I see almost a dozen files and directories and file lists and what not. All attempts so far at doing (setq org-odt-styles-dir "~/pdsw/org-mode/etc/styles") in various places, hooks etc have not changed the fact that it gets the builtin one
Re: [O] odt exporter on mixed org setup
Rustom Mody writes: > Just helped a friend to install and upgrade to latest org. > Method summary: > $ git clone > $ make update > combined with setup of load-paths > > Ended with: ox-odt cannot find factory style files > > I remember that I too had this problem > http://lists.gnu.org/archive/html/emacs-orgmode/2013-07/msg00341.html > and it had recently disappeared. > > Checked that it comes back it I use emacs23; goes away if I use emacs24 > Checked that the messages when it works in emacs24 are like thus: > > Debug (ox-odt): Searching for OpenDocument styles files... > Debug (ox-odt): Trying /usr/share/emacs/etc/org/styles/... [2 times] > Debug (ox-odt): Trying ~/pdsw/etc/styles/... > Debug (ox-odt): Trying ~/pdsw/org-mode/lisp/etc/styles/... > Debug (ox-odt): Trying /usr/share/emacs/24.3/etc/org/... > Debug (ox-odt): Using styles under /usr/share/emacs/24.3/etc/org/ > Debug (ox-odt): Searching for OpenDocument schema files... > Debug (ox-odt): Trying /usr/share/emacs/etc/org/schema/... [2 times] > Debug (ox-odt): No OpenDocument schema files installed > > So evidently my 'working' odt export is working because its using the > builtin emacs odt exporter and not the latest one > > Looking at org-odt-* stuff I see almost a dozen files and directories > and file lists and what not. > > All attempts so far at doing > (setq org-odt-styles-dir "~/pdsw/org-mode/etc/styles") > in various places, hooks etc have not changed the fact that it gets > the builtin one I did have problems with that one as well. Setting this in .emacs worked for me, though. But it was not considered the 'definite' solution back then [fn:1]. Regards, Andreas Footnotes: [fn:1] See here: http://news.gmane.org/find-root.php?message_id=m21u3b5a3j.fsf%40uio.no Quote: , | > That was the correct pointer. org-odt-styles-file is indeed nil, | > and org-odt-styles-dir is pointing to the wrong directory! I | > gather that it is derived from org-odt-styles-dir-list. That | > list contains the correct directory, but only at the third | > position. (...) | > Isn't that supposed to be set automagically during the install process? | | It is set when ox-odt is loaded, ultimately based on info from the | install, I guess, but making a number of guesses about other possible | locations to look. Org-odt-styles-dir will then look for the first | directory in the list that contains the two required files | (OrgOdtStyles.xml, OrgOdtContentTemplate.xml). The order of the | directories listed shouldn't matter, as long as you don't have more than | one directory containing files with the right names. Not sure I can help | with this. | | > I have now a | > (setq org-odt-styles-dir "/home/andreas/local/emacs/org-mode-install/etc/styles") | > in my .emacs | > Is that the correct fix here? | | For now, if it works... `