Re: [O] HTML5 presentations
I just added the link to the non-beamer presentation engine page on Worg. http://orgmode.org/worg/org-tutorials/non-beamer-presentations.html The prefix non-beamer defines presentation by exclusion.[1] This could be confusing. For example, OpenDocument Presentations are non-beamer so are HTML presentations. So calling it HTML presentation would be a good idea. Better still we could have a landing page for presentations which in turn point to beamer, HTML and OpenDocument presentations. Just nitpicking, Jambunathan K. Footnotes: [1] Furthermore Non-latex users wouldn't be able to relate to beamer or latex even. --
Re: [O] HTML5 presentations
Christian Moe m...@christianmoe.com writes: Cool! I tested it on a much-too-long slideshow, and noticed one problem, though: each new slide appeared a little further to the left. It also works fine with complex LaTeX math. :-) The only thing that it doesn't do now and stops me from using it directly is the missing support for image scaling. I tried using #+ATTR_HTML: title=Beer! width=90% [[file:~/Desktop/Pictures/beer-bunny.jpg]] but the image is shown in original size which is much larger than the slide. Oh, and numbered lists show up as plain item lists. Bye, Tassilo
Re: [O] Literate Programming - Continue a Source Block?
Hi Neeum, Neeum Zawan wrote: With noweb, one can continue a source block that one started earlier. Can this not be done with Babel? If not, I'm struggling a little with how to do LP using Babel... Of course, this can be done here as well: simply reuse the same tangle target (file), and blocks are concatenated in the order they appear. Second solution: create one sole block that will be tangled, and which contains your other blocks (using the ref syntax), in the order you want. Best regards, Seb -- Sebastien Vauban
[O] execute function when TAB expands a headline
Hi there, I am (also!) using org-mode for displaying dictionary data, with the headword part of the headline. When I press on TAB, the entry expands and I see the explanation and some sample sentences. Now, to make it easier (for my eyes) to parse the examples, I would like to highlight the headword, as it appears in the examples. I believe hi-lock mode etc. could do the trick, but I am stuck at how to hook into the TAB execution, so that I can call my code. Any hints very much appreciated! All the best, Chris
Re: [O] execute function when TAB expands a headline
Christian Wittern cwitt...@gmail.com writes: I am (also!) using org-mode for displaying dictionary data, with the headword part of the headline. When I press on TAB, the entry expands and I see the explanation and some sample sentences. Now, to make it easier (for my eyes) to parse the examples, I would like to highlight the headword, as it appears in the examples. I believe hi-lock mode etc. could do the trick, but I am stuck at how to hook into the TAB execution, so that I can call my code. Any hints very much appreciated! I believe you could use org-cycle-hook. Best, Matt
Re: [O] HTML5 presentations
On Wed, Jun 8, 2011 at 9:24 AM, Tassilo Horn tass...@member.fsf.org wrote: Christian Moe m...@christianmoe.com writes: Cool! I tested it on a much-too-long slideshow, and noticed one problem, though: each new slide appeared a little further to the left. It also works fine with complex LaTeX math. :-) The only thing that it doesn't do now and stops me from using it directly is the missing support for image scaling. I tried using #+ATTR_HTML: title=Beer! width=90% [[file:~/Desktop/Pictures/beer-bunny.jpg]] but the image is shown in original size which is much larger than the slide. Works for me - although my image is actually smaller, but I can change it's size. I really like it. Is there an example presentation, which shows all the possibilities when creating a presentation in org? Rainer Oh, and numbered lists show up as plain item lists. Bye, Tassilo -- 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 (F): +33 - (0)9 58 10 27 44 Fax (D):+49 - (0)3 21 21 25 22 44 email: rai...@krugs.de Skype: RMkrug
Re: [O] execute function when TAB expands a headline
On 2011-06-08 20:15, Matt Lundin wrote: Christian Witterncwitt...@gmail.com writes: I believe hi-lock mode etc. could do the trick, but I am stuck at how to hook into the TAB execution, so that I can call my code. Any hints very much appreciated! I believe you could use org-cycle-hook. Great! That indeed sounds like what I need. I'll give it a try. All the best, Chris
Re: [O] Agenda Bulk Scatter bug
Robert Cunningham ro...@iinet.net.au writes: for a few weeks now, and including the git commit af677f6d0667bacba72defeaee7e76557e68f8c8 that I last tested, the Agenda Bulk Scatter (BS) has had a bug whereby items it reschedules have the DATE lost. Please, please, if you'd like to get your bug fixed, provide a detailed bug report[1] and better yet do a git bisect[2] to track down which change caused the regression. This will greatly increase the chances of the bug actually getting fixed. Thanks Christian Footnotes: [1] http://orgmode.org/org.html#Feedback [2] http://www.kernel.org/pub/software/scm/git/docs/git-bisect.html -- Christian Egli Swiss Library for the Blind, Visually Impaired and Print Disabled Grubenstrasse 12, CH-8045 Zürich, Switzerland
Re: [O] Referencing elemts of a table
* Michael Brand michael.ch.br...@gmail.com wrote: Hi Karl You need additionally $# from Field coordinates in formulas described here: http://orgmode.org/manual/References.html#References and Calc vector subscript: #+TBLFM: @2 = subscr(remote(orgtblA, @2$2..@2$7), $#) This was the thing I was missing! Thank you! But on the page of the URL mentioned above there is nothing related to »subscr« at all. Is there a more verbose reference I do not know yet? -- Karl Voit
Re: [O] HTML5 presentations
Rainer M Krug r.m.k...@gmail.com writes: Hi Rainer, The only thing that it doesn't do now and stops me from using it directly is the missing support for image scaling. I tried using #+ATTR_HTML: title=Beer! width=90% [[file:~/Desktop/Pictures/beer-bunny.jpg]] but the image is shown in original size which is much larger than the slide. Works for me - although my image is actually smaller, but I can change it's size. And you are really sure that you are using M-x org-export-as-html5presentation RET ? If so, you must be using a different version. There's at least the gist.github version (I use), but there are at least two forks at github, too... Bye, Tassilo
Re: [O] HTML5 presentations
On Wed, Jun 8, 2011 at 3:01 PM, Tassilo Horn tass...@member.fsf.org wrote: Rainer M Krug r.m.k...@gmail.com writes: Hi Rainer, The only thing that it doesn't do now and stops me from using it directly is the missing support for image scaling. I tried using #+ATTR_HTML: title=Beer! width=90% [[file:~/Desktop/Pictures/beer-bunny.jpg]] but the image is shown in original size which is much larger than the slide. Works for me - although my image is actually smaller, but I can change it's size. And you are really sure that you are using M-x org-export-as-html5presentation RET Well - M-x org-export-as-html5presentation-and-open RET and then M-x org-export-as-html5presentation RET and update in the browser. ? If so, you must be using a different version. There's at least the gist.github version (I use), but there are at least two forks at github, too... I am using the one from: https://gist.github.com/509761 Org-mode version 7.5 also tried with Org-mode version 7.5 (release_7.5.358.g5194) GNU Emacs 23.3.1 (i686-pc-linux-gnu, GTK+ Version 2.22.0) and here is the org file I am using: #+TITLE: First #+AUTHOR: Author's name * Heading - item - sub item * Table | col | col | |-+-| | col | col | * Image #+ATTR_HTML: title=Beer! width=2% [[./51245383.jpeg]] Cheers, Rainer Bye, Tassilo -- 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 (F): +33 - (0)9 58 10 27 44 Fax (D):+49 - (0)3 21 21 25 22 44 email: rai...@krugs.de Skype: RMkrug
[O] [Orgmode] WISH: link expansion in Freemind export
Hello, I thought it would be nice to be able to replace a local link with the contents of the target file when exporting to Freemind and I couldn't figure out how to do this with the existing options (just started using org-mode). I wanted to be able to make linked notes and then visualise them as a mind map. For instance, exporting something like: * TODO todo-list * stuff * more stuff [[./file.org][testlink]] would produce: ... pDATA/p ... where 'DATA' is the actual contents of file.org, instead of pa href=.../a/p I already modified my copy of org-freemind.el to try this out. I just modified org-free-mind-convert-links-from-org to insert the target contents instead of the html link: (defun org-freemind-convert-links-from-org (org-str) Convert org links in ORG-STR to freemind links and return the result. (let ((fm-str (replace-regexp-in-string (rx (not (any [\)) (submatch http (opt ?\s) :// (1+ (any -%.?@a-zA-Z0-9()_/:~=# [[\\1][\\1]] org-str))) (with-temp-buffer (insert-file-contents(substring fm-str (+ (string-match \\[\\[ fm-str) 2) (string-match \\]\\[ fm-str))) (buffer-string (It's been a long time since I've written (*)lisp code so this might not be the best way to do this.) Ideally this expansion would be recursive (and replace links in target files). I only handled one level since this is my usual use case (main note - satellite notes) and making it recursive would also imply doing more restructuring through org-freemind.el, which is out of my way right now. I just dived in to get the functionality through this hack. (This is also why the above code is not in patch notation.) A proper solution would probably be to add more options to org-exp.el and additional code in org-freemind.el. I suppose other export formats, such as ASCII, or just normal editing, might use this option as well. Best regards, Filip
Re: [O] HTML5 presentations
Rainer M Krug r.m.k...@gmail.com writes: The only thing that it doesn't do now and stops me from using it directly is the missing support for image scaling. I tried using #+ATTR_HTML: title=Beer! width=90% [[file:~/Desktop/Pictures/beer-bunny.jpg]] but the image is shown in original size which is much larger than the slide. Works for me - although my image is actually smaller, but I can change it's size. I am using the one from: https://gist.github.com/509761 Ditto. Org-mode version 7.5 also tried with Org-mode version 7.5 (release_7.5.358.g5194) I also use the latter. GNU Emacs 23.3.1 (i686-pc-linux-gnu, GTK+ Version 2.22.0) Ok, I use the bzr trunk from yesterday. So that's a difference. I've just edebugged `org-export-html5presentation-format-image' and in the let... (let* ((caption (org-find-text-property-in-string 'org-caption src)) (attr (org-find-text-property-in-string 'org-attributes src)) ; HERE! (label (org-find-text-property-in-string 'org-label src))) ... I guess there should be something set. But the call returns nil. The same applies to #+CAPTION: This is the caption #+LABEL: img1 #+ATTR_HTML: title=Beer width=50% [[file:~/Desktop/Pictures/beer-bunny.jpg]] where neither caption, label, nor attr are set. When I set point on the link in the org-file and do M-x describe-text-properties RET I get , | Text content at position 690: | | There is an overlay here: | From 686 to 731 | face hl-line | window nil | | There are text properties here: | face org-link | font-lock-multiline t | fontifiedt | help-echoLINK: file:~/Desktop/Pictures/beer-bunny.jpg | keymap [Show] | mouse-face highlight | org-no-flyspell t ` Bye, Tassilo
Re: [O] Doing calculations on clocktable
Ah, great! Thanks /Gustav 2011/6/7 Michael Brand michael.ch.br...@gmail.com Hi Gustav There was a discussion about that here: http://thread.gmane.org/gmane.emacs.orgmode/39487 Michael 2011/6/7 Gustav Wikström gustav.e...@gmail.com: I'm trying to do some calculations on a clocktable in org-mode. But the way times are displayed as strings with a colon between hours and minutest makes it a bit difficult.. Does someone have any tips on how to overcome this obstacle?
Re: [O] Referencing elemts of a table
Karl Voit devn...@karl-voit.at wrote: * Michael Brand michael.ch.br...@gmail.com wrote: Hi Karl You need additionally $# from Field coordinates in formulas described here: http://orgmode.org/manual/References.html#References and Calc vector subscript: #+TBLFM: @2 = subscr(remote(orgtblA, @2$2..@2$7), $#) This was the thing I was missing! Thank you! But on the page of the URL mentioned above there is nothing related to »subscr« at all. Is there a more verbose reference I do not know yet? Yes, it's documented in the Calc manual, section 11.3, Extracting Vector Elements. I'd encourage you to write up a short tutorial on your use case: it's interesting, non-trivial and perhaps a nice introduction to using Calc functions in Org tables. Worg would be a better place for it! Nick
Re: [O] Referencing elemts of a table
Hi Karl On Wed, Jun 8, 2011 at 14:49, Karl Voit devn...@karl-voit.at wrote: * Michael Brand michael.ch.br...@gmail.com wrote: You need additionally $# from Field coordinates in formulas described here: http://orgmode.org/manual/References.html#References and Calc vector subscript: #+TBLFM: @2 = subscr(remote(orgtblA, @2$2..@2$7), $#) This was the thing I was missing! Thank you! But on the page of the URL mentioned above there is nothing related to »subscr« at all. Is there a more verbose reference I do not know yet? Org table spreadsheet gives access to Emacs Calc that has its own manual and subscr is in chapter Extracting Vector Elements: (info (Calc)Extracting Elements) Michael
Re: [O] Literate Programming - Continue a Source Block?
Sebastien Vauban wxhgmqzgw...@spammotel.com writes: Hi Neeum, Neeum Zawan wrote: With noweb, one can continue a source block that one started earlier. Can this not be done with Babel? If not, I'm struggling a little with how to do LP using Babel... Of course, this can be done here as well: simply reuse the same tangle target (file), and blocks are concatenated in the order they appear. But this will only allow me to append to the end of the file (up to that point), correct? I want to append to a source block that may be in the middle. Consider the following example: (Begin-example) #+BABEL: :noweb yes * Outline The structure of the configuration file will be: #+srcname: outline #+begin_src emacs-lisp :tangle .emacs :exports code ;; Store configurations that impact appearance visual-config ;; Languages configurations lang-config ;; GNUS configurations gnus-config #+end_src * General Appearance This section controls the general appearance (color of cursor, fonts, etc). #+srcname: visual-config #+begin_src emacs-lisp :exports code ;; Config here. #+end_src * GNUS configuration #+srcname: gnus-config #+begin_src emacs-lisp :exports code ;; Config here. #+end_src * Languages #+srcname: lang-config #+begin_src emacs-lisp :exports code python-config perl-config #+end_src ** Python Now here's where the problem begins. I want to add some configurations that impact some Python settings. I can dump those in python-config. However, I also want to add some visual settings for python-mode (change font colors, etc). For whatever reason, I think that part should go into visual-config. How do I now append the relevant portion to visual-config while I'm in _this_ portion of the org document? (End-example) The above is somewhat artificial, but in a proper programming project something like this will occur frequently: A new feature will be added at some later point and I'll want to update various blocks of code. Second solution: create one sole block that will be tangled, and which contains your other blocks (using the ref syntax), in the order you want. I had thought of this, but I find it somewhat lacking. Consider my example above. I could have created a visual-python in my visual-config block. However: 1. That requires me to know I'm going to need it later when I write visual-config. 2. If I didn't know I'd need it, I'd have to continually modify various parts of the org document every time I add a new feature to my code. I find this suboptimal and error prone. 3. For me, one of the main motivations to do LP is to document the evolution of the project, such that someone else can read the document and understand. Part of this is that I want all aspects of a single feature to appear under a single heading. When the reader reads the document, he shouldn't have to see too many aspects of the code early on that will be explained much later in the document. Now the original noweb allows what I'm asking for. If you begin a source block with a name of an existing block but append an = symbol, it knows to append to that source block. It would be great if org-mode could add that capability. Another approach is that if multiple source blocks with the same name are found, the default behavior is to concatenate all those source blocks together (and then add a header option for overwrite if the user wanted to overwrite instead of append). Thoughts?
Re: [O] [PATCH] Support for more flexible effort specifications in TaskJuggler exporter
Hi Stuart Stuart Hickinbottom stu...@hickinbottom.com writes: I've been experimenting with tracking medium-sized tasks in org as a work-breakdown and exporting to TaskJuggler to see just how many evenings and weekends I'll have to work to meet my promised deadlines! A recent patch (patch 638, 6th Match 2011) added support for more flexible effort estimate properties such as 4h, 3.5d etc. Unfortunately, at the moment the TaskJuggler exporter is more fussy over this property and only accepts HH:MM or an integer, both of which it translates to a number of days when exporting. The attached patch adds support for passing-through effort specifications when they're in the form REAL UNIT as they are for TJ, supporting the suffixes d, w, m and y in a consistent way to org. Support for HH:MM or bare number of days should still work as before. It also cleans up another couple of things about the export of effort: - HH:MM produces a floating point days duration now (was previously rounded to an integer) - The bare REAL effort regex failed to escape the decimal point (and would match any char) - Regexes now anchor to the string start to avoid matching the end of duff values - Docstring updated for more flexible effort specification Thanks for your patch. I just pushed a patch along the lines of yours which uses the built-in facilities of orgmode. It handles all effort durations that are defined in `org-duration-string-to-minutes'. This brings it in line with the rest of orgmode's effort handling. It also fixes the documentation in org.texi. Can you check and see if this fixes all your issues? Thanks Christian -- Christian Egli Swiss Library for the Blind, Visually Impaired and Print Disabled Grubenstrasse 12, CH-8045 Zürich, Switzerland
[O] Prettyfy agenda view (regexp)
Hi, I have some really long diary entries polluting my agenda view (more than 30 lines). I'd like to show headlines only. If I could parse entries by regexp before letting them populate my agenda I'd be mighty happy! To my relief I found the following function: org-agenda-format-item[fn:1] Alas this variable was never merged into the mainline. . . Are there any plans to integrate this into org or any other way to format agenda items? Thanks, Rasmus Footnotes: [fn:] http://git.naquadah.org/?p=~jd/org-mode.git;a=commitdiff;h=refs/heads/jd/agenda-format -- Sent from my Emacs
[O] [bug] Potential agenda display bug
Hi I am not quite satisfied with the look of my Agenda when the diary is included (which it needs to be)[fn:1] Previously, Bastien added a fix to: #+BEGIN_QUOTE puts multiline diary entries on a single line when it makes sense (i.e. when lines don't start with a diary time specification.) #+END_QUOTE I noticed this is my agenda today: Diary: Turn in paper; Status: CONFIRMED (UID: n76mq9j54mlhctptk53du8n...@google.com); Inger (1930); Status: CONFIRMED (UID: 3505199c-0241-401c-a296-20b0f9f2c3cc) And corresponding diary code: %%(and (diary-block 6 8 2011 6 8 2011)) Aflever Polle-Opgave Status: CONFIRMED(UID: n76mq9j54mlhctptk53du8n...@google.com) [... ignored some 5000 lines ...] %%(diary-remind '(diary-anniversary 6 8 2000) '(7 6 5 4 3 2 1)) Inger (1930) Status: CONFIRMED(UID: 3505199c-0241-401c-a296-20b0f9f2c3cc) Here is the display from diary Wednesday, June 8, 2011: Shavuot = Aflever Polle-Opgave Status: CONFIRMED(UID: n76mq9j54mlhctptk53du8n...@google.com) Inger (1930) Status: CONFIRMED(UID: 3505199c-0241-401c-a296-20b0f9f2c3cc) These should be probably be separated by a \n in the Agenda... Otherwise I'd easily miss the second event. Cheers, Rasmus Footnotes: [fn:1] This is somewhat a sequel to a previous thread: http://www.mail-archive.com/emacs-orgmode@gnu.org/msg37302.html -- Sent from my Emacs
Re: [O] Literate Programming - Continue a Source Block?
The above is somewhat artificial, but in a proper programming project something like this will occur frequently: A new feature will be added at some later point and I'll want to update various blocks of code. Currently the best method is that suggested previously/below of using named references in the target code block, as suggested below. While it shouldn't be overly difficult to add the behavior your described with something like a :noweb-append header argument, e.g., #+begin_src emacs-lisp :noweb-append visual-config ... #+end_src This behavior is not currently implemented. Second solution: create one sole block that will be tangled, and which contains your other blocks (using the ref syntax), in the order you want. I had thought of this, but I find it somewhat lacking. Consider my example above. I could have created a visual-python in my visual-config block. However: 1. That requires me to know I'm going to need it later when I write visual-config. nit picking here, but while this does require a small edit to visual-config, there is no need for prior knowledge of the need for visual-python. 2. If I didn't know I'd need it, I'd have to continually modify various parts of the org document every time I add a new feature to my code. I find this suboptimal and error prone. Technically only one edit per new block introduced, which does not seem overly onerous. 3. For me, one of the main motivations to do LP is to document the evolution of the project, such that someone else can read the document and understand. Part of this is that I want all aspects of a single feature to appear under a single heading. When the reader reads the document, he shouldn't have to see too many aspects of the code early on that will be explained much later in the document. I agree, this is a motivating example. Now the original noweb allows what I'm asking for. If you begin a source block with a name of an existing block but append an = symbol, it knows to append to that source block. It would be great if org-mode could add that capability. I agree, and the functionality you describe shouldn't be overly difficult to implement. I like the concision of the =original-name syntax used by noweb, but I would lean towards the use of a :noweb-append type header argument as suggested above because currently the names of blocks in Babel carry no semantic content and I'd prefer to leave it this way. Another approach is that if multiple source blocks with the same name are found, the default behavior is to concatenate all those source blocks together (and then add a header option for overwrite if the user wanted to overwrite instead of append). Thoughts? Thanks for the motivating example and the thorough explanation of behavior. I'll certainly put this on my long-term development queue, however, that does not guarantee an implementation in the near future. If anyone is interested in this functionality and is up for writing some elisp I am happy to offer advice and code pointers immediately. Best -- Eric -- Eric Schulte http://cs.unm.edu/~eschulte/
[O] [PATCH] Fix reported file time for clock reports
* lisp/org-clock.el (org-clocktable-write-default): --- Hi, My agenda clock reports were not displaying total file time correctly anymore. Since the patch for adding properties used up a placeholder when no properties are provided there was no place to put the total file time into the summary line. I'm not completely sure the placeholder is in the right place for this but this works for me. Please double check before applying. This patch is available at git://git.norang.ca/org-mode.git fix-clock-report-file-time Regards, Bernt lisp/org-clock.el |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/org-clock.el b/lisp/org-clock.el index a3caa48..8d00c0a 100644 --- a/lisp/org-clock.el +++ b/lisp/org-clock.el @@ -2162,9 +2162,9 @@ from the dynamic block defintion. (insert-before-markers |-\n) ; a hline because a new file starts ;; First the file time, if we have multiple files (when multifile - ;; Summarize the time colleted from this file + ;; Summarize the time collected from this file (insert-before-markers - (format (concat | %s %s | %s* (nth 8 lwords) * | *%s*|\n) + (format (concat | %s %s | %s* (nth 8 lwords) * | %s *%s*|\n) (file-name-nondirectory (car tbl)) (if level-p | ) ; level column, maybe (if timestamp | ) ; timestamp column, maybe -- 1.7.6.rc0.12.g2c6b5
Re: [O] Literate Programming - Continue a Source Block?
Eric Schulte schulte.e...@gmail.com writes: Second solution: create one sole block that will be tangled, and which contains your other blocks (using the ref syntax), in the order you want. I had thought of this, but I find it somewhat lacking. Consider my example above. I could have created a visual-python in my visual-config block. However: 1. That requires me to know I'm going to need it later when I write visual-config. nit picking here, but while this does require a small edit to visual-config, there is no need for prior knowledge of the need for visual-python. 2. If I didn't know I'd need it, I'd have to continually modify various parts of the org document every time I add a new feature to my code. I find this suboptimal and error prone. Technically only one edit per new block introduced, which does not seem overly onerous. In this case, yes. In a real programming project, it could be a number of them. For example, I may have a code block dedicated to imports/includes which I want to be on the top of the file - and I may have to append to that when adding a new feature. And then the actual code for the new feature may require edits to other parts of one's program. Ideally, everything should be decoupled, but reality rarely follows the ideal ;-) Now the original noweb allows what I'm asking for. If you begin a source block with a name of an existing block but append an = symbol, it knows to append to that source block. It would be great if org-mode could add that capability. I agree, and the functionality you describe shouldn't be overly difficult to implement. I like the concision of the =original-name syntax used by noweb, but I would lean towards the use of a :noweb-append type header argument as suggested above because currently the names of blocks in Babel carry no semantic content and I'd prefer to leave it this way. I suppose it may also break compatibility in case someone out there uses the =symbol. Had it been thought of earlier, I would have preferred the default behavior being append if you have multiple blocks of the same name, and an explicit option *not* to append but to overwrite, but your idea makes the most sense with respect to preserving backward compatibility. In addition to append, there probably should be another option for overwriting instead of appending (neither is possible right now). Also, just on the side, I'm not sure it's documented anywhere what happens if you have multiple source code blocks of the same name. At the moment, it seems only the first is used (I would have expected the last). Thanks for the motivating example and the thorough explanation of behavior. I'll certainly put this on my long-term development queue, however, that does not guarantee an implementation in the near future. If anyone is interested in this functionality and is up for writing some elisp I am happy to offer advice and code pointers immediately. Wish I knew elisp. Anyway, hopefully someone will get it done one day. Thanks.
[O] [PATCH] org-end-of-meta-data-and-drawers
Currently, this function goes to a lot of trouble to concatenate a complicated regexp to find metadata and drawers, and then doesn't use it. As it stands, if you put point in a headline that has a property drawer and then call =(org-end-of-meta-data-and-drawers)=, point moves to the *beginning* of the property drawer -- obviously not what you want. Eric diff --git a/lisp/org.el b/lisp/org.el index 777850a..e7f9f89 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -19992,7 +19992,7 @@ clocking lines, and drawers. \\| \\([ \t]*\\( org-keyword-time-regexp \\)\\ (forward-line 1) -(while (looking-at (concat [ \t]*\\( org-keyword-time-regexp \\))) +(while (looking-at (concat [ \t]*\\( re \\))) (if (not (match-end 1)) ;; empty or planning line (forward-line 1)
Re: [O] [PATCH] org-end-of-meta-data-and-drawers
Eric Abrahamsen e...@ericabrahamsen.net writes: Currently, this function goes to a lot of trouble to concatenate a complicated regexp to find metadata and drawers, and then doesn't use it. As it stands, if you put point in a headline that has a property drawer and then call =(org-end-of-meta-data-and-drawers)=, point moves to the *beginning* of the property drawer -- obviously not what you want. Dammit this is still not right, hang on a second… Eric
Re: [O] [PATCH] org-end-of-meta-data-and-drawers
Eric Abrahamsen e...@ericabrahamsen.net writes: Eric Abrahamsen e...@ericabrahamsen.net writes: Currently, this function goes to a lot of trouble to concatenate a complicated regexp to find metadata and drawers, and then doesn't use it. As it stands, if you put point in a headline that has a property drawer and then call =(org-end-of-meta-data-and-drawers)=, point moves to the *beginning* of the property drawer -- obviously not what you want. Dammit this is still not right, hang on a second… Okay, this should be right, sorry about that. diff --git a/lisp/org.el b/lisp/org.el index 777850a..ee0b88c 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -19992,7 +19992,7 @@ clocking lines, and drawers. \\| \\([ \t]*\\( org-keyword-time-regexp \\)\\ (forward-line 1) -(while (looking-at (concat [ \t]*\\( org-keyword-time-regexp \\))) +(while (looking-at re) (if (not (match-end 1)) ;; empty or planning line (forward-line 1)
[O] v4, now with properties and inclusion tags
Simon Guest simon.gu...@tesujimath.org writes: At Fri, 29 Apr 2011 10:56:51 -0400, Nick Dokos wrote: Indeed: it would require a bit of refactoring of Simon's code to provide the function(s) to apply to each entry, and changes to the top level functions to use the mapping API instead of looping explicitly. That sounds like a good idea. I may at some stage want to exclude counting certain trees, and then I may have another look at this if someone else hasn't already done it. But for now, time pressure dictates I stop hacking on my word count function. cheers, Simon I'm afraid this is a bit of a two-steps-forward, one-step-back situation, but I've rejiggered Simon's code so that it now: 1. Uses the mapping and property APIs 2. Allows selection of subtrees for count via a tag 3. Sets wordcount totals for each subtree as a property, instead of an overlay First of all, this requires the fix to =org-end-of-meta-data-and-drawers= that I sent (and then re-sent) to this list earlier today. Otherwise it will work funny. I changed it to use properties instead of overlays because I wanted something that was persistent, and available for programmatic manipulation. Plus, you can get an overlay effect with column view. So right now M-x org-word-count will do the following: 1. Add the subtree word count as a property (=org-wc-prop-name=) to each headline in the buffer 2. Respect the region, if it's active 3. Operate only on trees tagged with =org-wc-include-tag=, if that tag is present 4. Report a buffer/region word count total in the minibuffer 5. With a prefix arg, *only* give a minibuffer report, don't set properties The two variables =org-wc-include-tag= and =org-wc-prop-name= are buffer local, unless I've misunderstood how buffer local works and screwed it up. There's a helper function, =org-wc-remove-all-props= that can be used to remove the =org-wc-prop-name= property from all headlines. Does anyone else think that =org-entry-delete= should remove the whole drawer if there are no other properties left? This is very much a proposal, and I've got a bit of time to work on it, so I'm willing to field requests, though my elisp is bad. Two immediate possibilities would be: automatically excluding subtrees tagged noexport, and using =org-context= to be cleverer about what to avoid. Further suggestions (and code fixes) welcome! Eric org-wc.el Description: application/emacs-lisp
Re: [O] HTML Syntax Highlighting Questions
On Sun, May 29, 2011 at 8:50 PM, Avdi Grimm a...@avdi.org wrote: How do I control syntax highlighting in HTML export? Specifically, how can I: A. Disable syntax highlighting entirely B. Switch from inline colors to semantic tagging that I can style with a stylesheet? I could swear that I've seen instructions about this somewhere in the past. Aha! I revisited this question, and I found the relevant setting: org-export-htmlize-output-type From the docs: Output type to be used by htmlize when formatting code snippets. Choices are `css', to export the CSS selectors only, or `inline-css', to export the CSS attribute values inline in the HTML. We use as default `inline-css', in order to make the resulting HTML self-containing. However, this will fail when using Emacs in batch mode for export, because then no rich font definitions are in place. It will also not be good if people with different Emacs setup contribute HTML files to a website, because the fonts will represent the individual setups. In these cases, it is much better to let Org/Htmlize assign classes only, and to use a style file to define the look of these classes. To get a start for your css file, start Emacs session and make sure that all the faces you are interested in are defined, for example by loading files in all modes you want. Then, use the command M-x org-export-htmlize-generate-css to extract class definitions. -- Avdi Grimm http://avdi.org
[O] [Taskjuggler] Backwards incompatible change [was: Support for the new effort durations?]
Christian Egli christian.e...@sbs.ch writes: The Effort property previously had no unit attached. With release 7.5 of orgmode you can now attach units to it such as 4h, 2d or 2m. The taskjuggler exporter however doesn't support this feature yet. It currently assumes that if is simply a number that we are talking about days. If the format is something like 5:30 it assumes that the effort is in hours:minutes. It has no support for other formats (weeks, months which taskjuggler itself would support). Now I suppose the exporter should honor the new effort durations that were introduced in 7.5. This is not that hard to change. However this would mean that existing orgmode files will be exported differently, i.e. the change is not backwards compatible. At the moment I do not know how to deal with this. Should I just move to the new effort durations and ask the user to upgrade their orgmode files or more specifically to upgrade their effort properties to the new effort durations format? I pushed a change now which supports the new effort durations. However this change is NOT BACKWARDS COMPATIBLE. Previously the exporter assumed that effort estimates such as '2' meant 2 days. It now assumes that you are talking about 2 minutes. In order to get the same result when exporting change plain effort estimates such as '2' to '2d'. M-x query-replace-regexp should get you there. The info file is updated. I need to fix the tutorial on worg. Thanks Christian -- Christian Egli Swiss Library for the Blind, Visually Impaired and Print Disabled Grubenstrasse 12, CH-8045 Zürich, Switzerland