Re: [Orgmode] Re: [PATCH] Re: Custom docbook stylesheets.
Hi, I have applied this change. Users of the docbook exporter should read the Changes.org entry Baoqiu has provided: Customizable variable changes for DocBook exporter == To make it more flexible for users to provide DocBook exporter related commands, we start to use format-spec to format the commands in this release. If you use DocBook exporter and use it to export Org files to PDF and/or FO format, the settings of the following two customizable variables need to be changed: 1. org-export-docbook-xslt-proc-command 2. org-export-docbook-xsl-fo-proc-command Instead of using =%s= in the format control string for all arguments, now we use /three/ different format spec characters: 1. %i : input file argument 2. %o : output file argument 3. %s : XSLT stylesheet argument For example, if you set =org-export-docbook-xslt-proc-command= to java com.icl.saxon.StyleSheet -o %s %s /path/to/docbook.xsl in the past, now you need to change it to java com.icl.saxon.StyleSheet -o %o %i %s and set a new customizable variable called =org-export-docbook-xslt-stylesheet= to =/path/to/docbook.xsl=. Please check the documentation of these two variables for more details and other examples. Along with the introduction of variable org-export-docbook-xslt-stylesheet, we also added a new in-buffer setting called #+XSLT:. You can use this setting to specify the XSLT stylesheet that you want to use on a per-file basis. This setting overrides org-export-docbook-xslt-stylesheet. On May 15, 2010, at 6:01 AM, Baoqiu Cui wrote: Hi Carsten, Carsten Dominik carsten.domi...@gmail.com writes: Dear Baoqiu, thanks for the patch, I applied it. Can you please also make a patch for the documentation - I think #+XSLT must be mentioned in the export chapter And an entry for the Changes.org file would indeed be nice, can you write that as well? Thanks for applying the previous patch. Attached below please find the 2nd patch that mainly covers the documentation changes, which include 1. Some changes in org.texi to cover `#+XSLT'. 2. An entry in Changes.org about the incompatible change. 3. A small change in org-exp.el to include `#+XSLT' in org-get-current-options(). Hope I did not miss anything important. Free feel to change the wording or add anything that you'd like to add. diff --git a/ORGWEBPAGE/Changes.org b/ORGWEBPAGE/Changes.org index b7352b3..eab265b 100644 --- a/ORGWEBPAGE/Changes.org +++ b/ORGWEBPAGE/Changes.org @@ -14,6 +14,47 @@ :CUSTOM_ID: v6.36 :END: +** Incompatible Changes + +*** Customizable variable changes for DocBook exporter + +To make it more flexible for users to provide DocBook exporter +related commands, we start to use format-spec to format the +commands in this release. If you use DocBook exporter and use it +to export Org files to PDF and/or FO format, the settings of the +following two customizable variables need to be changed: + +1. =org-export-docbook-xslt-proc-command= +2. =org-export-docbook-xsl-fo-proc-command= + +Instead of using =%s= in the format control string for all +arguments, now we use /three/ different format spec characters: + +1. =%i=: input file argument +2. =%o=: output file argument +3. =%s=: XSLT stylesheet argument + +For example, if you set =org-export-docbook-xslt-proc-command= to + +: java com.icl.saxon.StyleSheet -o %s %s /path/to/docbook.xsl + +in the past, now you need to change it to + +: java com.icl.saxon.StyleSheet -o %o %i %s + +and set a new customizable variable called +=org-export-docbook-xslt-stylesheet= to =/path/to/docbook.xsl=. + +Please check the documentation of these two variables for more +details and other examples. + +Along with the introduction of variable +=org-export-docbook-xslt-stylesheet=, we also added a new +in-buffer setting called =#+XSLT:=. You can use this setting to +specify the XSLT stylesheet that you want to use on a per-file +basis. This setting overrides +=org-export-docbook-xslt-stylesheet=. + ** Details *** Inline display of linked images diff --git a/doc/org.texi b/doc/org.texi index d2b7904..7b6afd7 100644 --- a/doc/org.texi +++ b/doc/org.texi @@ -9020,6 +9020,7 @@ Insert template with export options, see example below. #+LATEX_HEADER: extra line(s) for the LaTeX header, like \usepack...@{xyz@} #+EXPORT_SELECT_TAGS: Tags that select a tree for export #+EXPORT_EXCLUDE_TAGS: Tags that exclude a tree from export +#+XSLT:the XSLT stylesheet used by DocBook exporter to generate FO file @end example @noindent @@ -9860,7 +9861,7 @@ For more information, see the documentation on Worg. @section DocBook export @cindex DocBook export @cindex PDF export -...@cindex Cui, Baoqui +...@cindex Cui, Baoqiu Org contains a DocBook exporter written by Baoqiu Cui. Once an Org file is exported to DocBook format, it can be further processed to produce other @@ -9907,6 +9908,15 @@ need to have XSLT processor and XSL-FO
Re: [Orgmode] spreadsheet table limitations, specifically summing hours?
On May 14, 2010, at 11:59 PM, Stephan Schmitt wrote: Hi Nick, are you aware of the table editor? Type C-c ' (single quote) when the point is somewhere in the table. And, if you have a longish elisp formula, press TAB in the first line of the formula to get the formula spread over multiple lines and back. - Carsten Greetings, Stephan Also sprach Nick: ps I wonder if a long set of formulae like this could be split over several +TBLFM lines? The answer seems to be no. ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode - Carsten ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] spreadsheet table limitations, specifically summing hours?
Hi Nick, these are useful functions, thanks! Maybe add the to org- hacks? Also, I could think of generalizations: Allow 94h and 94:16h and 94:16:22h. I would, in fact, strip the h and just use 94:16 - Carsten On May 14, 2010, at 4:49 PM, Nick wrote: Earlier I wrote: There seem to be two problems; c) Summing HH:MM values (which org-table-sum seems to manage - although oddly without including the minutes - but not vsum) Excuse me answering my own question, but time is money, and so I've hastily written my own elisp functions to do this (appended). Perhaps this will help someone else. Given these functions defined in a .emacs config or similar, I can do: | | week ending | hh:mm | Total H | Total |VAT | Total+VAT | | ! | week| hhmm | hours | total |vat | | |---+-++-+---++---| | | 28/02/10| 20:11h | | || | | | 07/03/10| 21:11h | | || | | | 14/03/10| 25:40h | | || | | | 21/03/10| 27:16h | | || | |---+-++-+---++---| | # | 22/03/10| 94:18h | 94 | 2820 | 493.50 | 3313.50 | |---+-++-+---++---| | | 28/03/10| 26:24h | | || | | | 04/04/10| 21:15h | | || | | | 11/04/10| 23:15h | | || | |---+-++-+---++---| | # | 27/02/10| 70:54h | 71 | 2130 | 372.75 | 2502.75 | |---+-++-+---++---| #+TBLFM: $3='(reduce 'my-sum-hhmm '(@-...@-ii))::$4='(round (my-hhmm- to-hours $hhmm))::$5=$hours*$hourlyrate::$6=$total*$vatrate;%.2f::$7=$total+ $vat;%.2f #+CONSTANTS: vatrate=0.175 hourlyrate=35 Although I'd still be interested if someone can show me a better way. Cheers, N ps I wonder if a long set of formulae like this could be split over several +TBLFM lines? The answer seems to be no. ;; Parse an HH::MM date into a list containing a pair of numbers, (HH MM) (defun my-parse-hhmm (hhmm) (let ((date-re \\([0-9]+\\):\\([0-9]+\\)h?) hours minutes) (unless (string-match date-re hhmm) (error Argument is not a valid date: '%s' hhmm)) (setq hours (string-to-number (match-string 1 hhmm)) minutes (string-to-number (match-string 2 hhmm))) (list hours minutes))) ;; Convert a HH:MM date to a (possibly fractional) number of hours (defun my-hhmm-to-hours (hhmm) (let* ((date (my-parse-hhmm hhmm)) (hours (first date)) (minutes (second date))) (+ (float hours) (/ (float minutes) 60.0 ;; Date summing ;; This can be used in a table formula like this: ;; #+TBLFM: $3='(reduce 'my-sum-dates '(@-...@-ii)) (defun my-sum-hhmm (a b) (let* (;; parse a (a-date (my-parse-hhmm a)) (a-hours (first a-date)) (a-minutes (second a-date)) ;; parse b (b-date (my-parse-hhmm b)) (b-hours (first b-date)) (b-minutes (second b-date)) ;; add the parts together (minutes (+ a-minutes b-minutes)) (hours (+ a-hours b-hours)) (carry (floor (/ minutes 60))) (remainder (mod minutes 60))) (format %d:%02dh (+ hours carry) remainder))) ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode - Carsten ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] org-show-following-heading shows even when nil
On May 7, 2010, at 7:32 AM, Samuel Wales wrote: When I go to a location from the agenda, the next headline is revealed if it was hidden, even if it is a child. Setting org-show-following-heading to nil or leaving it at its default value does not prevent this. Should it? The documentation seems to suggest that it should. What I want is for hidden children to remain hidden. Rationale: I like the buffer to be in a form that can be obtained by navigation and cycling. For lack of a better term, I call that canonical visibility. Hi Samuel, for some reason I do not remember, I enforce showing the next headline in this special case. Please try the following patch and run with if for a while, to see if it causes any problems. - Carsten Modified lisp/org-agenda.el diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index 19ea87c..d7bad10 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -6124,10 +6124,7 @@ and by additional input from the age of a schedules or deadline entry. (push-mark) (goto-char pos) (when (org-mode-p) - (org-show-context 'agenda) - (save-excursion - (and (outline-next-heading) -(org-flag-heading nil ; show the next heading + (org-show-context 'agenda)) (recenter (/ (window-height) 2)) (run-hooks 'org-agenda-after-show-hook) (and highlight (org-highlight (point-at-bol) (point-at-eol) Thanks. Samuel -- Q: How many CDC scientists does it take to change a lightbulb? A: You only think it's dark. [CDC has denied a deadly disease for 25 years] == Retrovirus: http://www.wpinstitute.org/xmrv/index.html ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode - Carsten ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Question: org-remember and level1 target headline
On May 14, 2010, at 5:42 AM, Samuel Wales wrote: On 2010-05-13, Martin Pohlack m...@os.inf.tu-dresden.de wrote: Is there interest to define remember targets via paths or via ID? ID would be useful, I think. ID certainly - path could be useful to avoid ambiguities. - Carsten ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Include FAQ to info? (was: Org-FAQ request for full-text dump)
On May 13, 2010, at 6:46 PM, Memnon Anon wrote: Hi. Wouldn't it be nice to have the FAQ available for offline-browsing as well? The FAQ is an Org file, available in Worg... So does Gnus, Emacs itself ... If it is too much work to convert it to info proper, maybe an orgfile like org-help.org[1] could be added to the distribution. I do like org-help.org. But someone would have to: - go through it to check if it up to date - commit to do this again to update every few releases Cheers - Carsten Memnon Footnotes: [1] http://osdir.com/ml/attachments/orgF54hhOaC48.org ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode - Carsten ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Re: Org-FAQ request for full-text dump
On May 13, 2010, at 6:13 AM, Dan Davison wrote: Benjamin Andresen be...@in-ulm.de writes: Hello guys, quite often people ask question in the IRC-channel (#org-mode on freenode) which are answered in the FAQ. Now I personally find the org-faq very cumbersome to use, due to its javascript-interface that grabs keys. +1 The info.js HTML export is an excellent invention, but I don't think it's right for the FAQ, at least not with the current setup. Personally I sometimes skim FAQs to get a sense of a project, and I think visitors should be able to scroll down / search in a familiar fashion to get more information. I think obliging random web visitors to use Info style navigation by default is a bad idea. To be honest I've never read anything in the FAQ because I can't easily skim it, and if I have a specific question I look in the manual. In addition to a flat format, a possible better way to use info.js for the FAQ would be in a startup contents mode, whereby all headings and questions are visible, but question answers are not. You can make your bookmark look like this: http://orgmode.org/worg/org-faq.php?VIEW=content - Carsten Dan (Just a short thing: I'm faster with my native browser search functionality than with the interface that is used on org-faq.php In my browser it's: /color n n n N n vs. s color s RET s RET s RET and I don't even know how to jump back to a previous search results (also sometimes the first search doesn't even work, I have to do it twice, haven't investigated this further.)) Because of this I currently use the org-faq.org file locally and then grab the CUSTOM_ID and attach it to the org-faq.php link as an anchor. So my question is basically: Could we get a plain dump of the file? (I don't know who controls the export and I guess just copying the file and stripping out all the infoJS stuff is not the right way to do it.) br, benny Please don't take offense, I'm sure many other people like the infoJS interface, I just find it inefficient and mainly different from the way I search the web. ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode - Carsten ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Empty lines are added below heading when task is repeated and org-indent-mode is on
Using the latest version (6.36) if I have a heading like this: ** TODO test task stuff SCHEDULED: 2010-05-15 Sat 07:35 +1d Then an empty line is inserted below the heading (before stuff) if org-indent-mode is on and logging is set like this: (setq org-log-repeat nil) (setq org-log-done 'time) I tested it with a clean config using only the settings above. ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] [patch] org-id: New org-id-method 'uuid' w/ elisp function that creates random uuid
On May 8, 2010, at 4:14 PM, David Maus wrote: Carsten Dominik wrote: what is the difference/advantage of this idea over using uuidgen as Org does now? Well, it allows uuids without depending on the presence of the uuidgen binary. E.g. I happen to occasionally use computers I have no control of and carry my Emacs/Org configuration with me. Without the elisp function the ID properties of my headlines are in an inconsistent format depending on whether uuidgen was present on the machine I created the ID property or not. It may be a little pedantic but I'd like to be specific in what format the IDs have and like the idea of having IDs that follow an established standard. Maybe another usage of the function could be: - org-id-method can be 'org for Org's id mechanism or 'uuid for uuids I think it should be either uuidgen (for backward compatibility) or uuid. - `org-id-new' uses uuidgen if present and falls back to the elisp function otherwise I like that. WOuld you like to modify your patch accordingly? - Carsten ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Re: Xemacs incompatibilities
On 2010-05-14 13:40 +0100, Carsten Dominik wrote: This is a really non-standard way for a mode definition which I guess should be fixed in XEmacs. I have made that change anyway. Eric or Dan, please note this change I made in the Babel sources. Python-mode.el and python.el are written by different people. They have significant differences. Leo -- CCL-USER (if you fail to plan (plan to fail)) ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] problem compiling latest git
Manuel Amador amador.man...@gmail.com writes: Hi all, There seems to be a problem. When compiling org-mode from the latest git repository, I get the following error: In org-publish-get-base-files-1: org-publish.el:407:13:Warning: reference to free variable `sitemap-requested' org-publish.el:915:1:Error: Invalid read syntax: # make: *** [lisp/org-publish.elc] Error 1 Hi Manual, thanks for the report! My fault. This patch should fix it: diff --git a/lisp/org-publish.el b/lisp/org-publish.el index e77b1a0..fefd50d 100644 --- a/lisp/org-publish.el +++ b/lisp/org-publish.el @@ -352,6 +352,7 @@ This splices all the components into the list. (defvar sitemap-alphabetically) (defvar sitemap-sort-folders) (defvar sitemap-ignore-case) +(defvar sitemap-requested) (defun org-publish-compare-directory-files (a b) Predicate for `sort', that sorts folders-first/last and eventually alphabetically. Best wishes Sebastian ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] multicolumn figures in latex
Hi Chris, thanks a lot for this patch - it is in. I have only added documentation. - Carsten On May 6, 2010, at 1:20 PM, Chris Gray wrote: Hi, I wanted to make a figure that spanned multiple lines in LaTeX. The way to do that is via the figure* environment. Since org-mode didn't seem to support that, I hacked it in. The patch is attached. Cheers, Chris commit 4cb1a153245189aa062db4545dad76bdf413a1e1 Author: Chris Gray chrismg...@gmail.com Date: Thu May 6 12:58:00 2010 +0200 Add support for multicolumn figures in LaTeX. Modified lisp/ChangeLog diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 7f1a507..74ee48d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2010-05-06 Chris Gray chrismg...@gmail.com + + * org-latex.el (org-export-latex-format-image): Add support + for multicolumn figures in LaTeX. + 2010-05-02 Dan Davison davi...@stats.ox.ac.uk * org-src.el (org-edit-src-code): allow-write-back-p had Modified lisp/org-latex.el diff --git a/lisp/org-latex.el b/lisp/org-latex.el index 2051de1..22833b2 100644 --- a/lisp/org-latex.el +++ b/lisp/org-latex.el @@ -1881,14 +1881,17 @@ The conversion is made depending of STRING- BEFORE and STRING-AFTER. (defun org-export-latex-format-image (path caption label attr) Format the image element, depending on user settings. - (let (ind floatp wrapp placement figenv) + (let (ind floatp wrapp multicolumnp placement figenv) (setq floatp (or caption label)) (setq ind (org-get-text-property-any 0 'original-indentation path)) (when (and attr (stringp attr)) (if (string-match [ \t]*\\wrap\\ attr) (setq wrapp t floatp nil attr (replace-match t t attr))) (if (string-match [ \t]*\\float\\ attr) - (setq wrapp nil floatp t attr (replace-match t t attr + (setq wrapp nil floatp t attr (replace-match t t attr))) + (if (string-match [ \t]*\\multicolumn\\ attr) + (setq multicolumnp t attr (replace-match t t attr + (setq placement (cond @@ -1912,6 +1915,11 @@ The conversion is made depending of STRING- BEFORE and STRING-AFTER. \\includegraphics[%attr]{%path} \\caption{%labelcmd%caption} \\end{wrapfigure}) + (multicolumnp \\begin{figure*}%placement +\\centering +\\includegraphics[%attr]{%path} +\\caption{%labelcmd%caption} +\\end{figure*}) (floatp \\begin{figure}%placement \\centering \\includegraphics[%attr]{%path} ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode - Carsten ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] org-html link building diff
Hi Tom, what is the status of this development? Ready for prime time? If yes, can you please rebase to master and send me the pointer to the branch again? Or is there still stuff unclear? Can I help? Thanks! - Carsten On Apr 30, 2010, at 12:24 AM, Tom Breton (Tehom) wrote: Hi Tom, On Apr 28, 2010, at 5:01 AM, Tom Breton (Tehom) wrote: The changes are essentially made and pass my tests now, there's mostly housekeeping now: pull, merge, push. Yes. Send me your name on repo.or.cz and I'll add push for you. Please create your own branch and stay on it. It is Tehom. I have added you. Oops, when I went to push, I realized that I had capitalized that but it's apparently not capitalized on repo.or.cz. It's tehom. My branch is called tehom-master and the branch that treats link export based on it is called html-export-refactor-build-link Tom Breton (Tehom) ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode - Carsten ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] spreadsheet table limitations, specifically summing hours?
Earlier I wrote: There seem to be two problems; c) Summing HH:MM values (which org-table-sum seems to manage - although oddly without including the minutes - but not vsum) Excuse me answering my own question, but time is money, and so I've hastily written my own elisp functions to do this (appended). Perhaps this will help someone else. Given these functions defined in a .emacs config or similar, I can do: | | week ending | hh:mm | Total H | Total |VAT | Total+VAT | | ! | week| hhmm | hours | total |vat | | |---+-++-+---++---| | | 28/02/10| 20:11h | | || | | | 07/03/10| 21:11h | | || | | | 14/03/10| 25:40h | | || | | | 21/03/10| 27:16h | | || | |---+-++-+---++---| | # | 22/03/10| 94:18h | 94 | 2820 | 493.50 | 3313.50 | |---+-++-+---++---| | | 28/03/10| 26:24h | | || | | | 04/04/10| 21:15h | | || | | | 11/04/10| 23:15h | | || | |---+-++-+---++---| | # | 27/02/10| 70:54h | 71 | 2130 | 372.75 | 2502.75 | |---+-++-+---++---| #+TBLFM: $3='(reduce 'my-sum-hhmm '(@-...@-ii))::$4='(round (my-hhmm-to-hours $hhmm))::$5=$hours*$hourlyrate::$6=$total*$vatrate;%.2f::$7=$total+$vat;%.2f #+CONSTANTS: vatrate=0.175 hourlyrate=35 Although I'd still be interested if someone can show me a better way. Cheers, N ps I wonder if a long set of formulae like this could be split over several +TBLFM lines? The answer seems to be no. ;; Parse an HH::MM date into a list containing a pair of numbers, (HH MM) (defun my-parse-hhmm (hhmm) (let ((date-re \\([0-9]+\\):\\([0-9]+\\)h?) hours minutes) (unless (string-match date-re hhmm) (error Argument is not a valid date: '%s' hhmm)) (setq hours (string-to-number (match-string 1 hhmm)) minutes (string-to-number (match-string 2 hhmm))) (list hours minutes))) ;; Convert a HH:MM date to a (possibly fractional) number of hours (defun my-hhmm-to-hours (hhmm) (let* ((date (my-parse-hhmm hhmm)) (hours (first date)) (minutes (second date))) (+ (float hours) (/ (float minutes) 60.0 ;; Date summing ;; This can be used in a table formula like this: ;; #+TBLFM: $3='(reduce 'my-sum-dates '(@-...@-ii)) (defun my-sum-hhmm (a b) (let* (;; parse a (a-date (my-parse-hhmm a)) (a-hours (first a-date)) (a-minutes (second a-date)) ;; parse b (b-date (my-parse-hhmm b)) (b-hours (first b-date)) (b-minutes (second b-date)) ;; add the parts together (minutes (+ a-minutes b-minutes)) (hours (+ a-hours b-hours)) (carry (floor (/ minutes 60))) (remainder (mod minutes 60))) (format %d:%02dh (+ hours carry) remainder))) ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] spreadsheet table limitations, specifically summing hours?
Hi Nick, what is the purpose of resending this message? - Carsten On May 14, 2010, at 4:44 PM, Nick Stokoe wrote: Earlier I wrote: There seem to be two problems; c) Summing HH:MM values (which org-table-sum seems to manage - although oddly without including the minutes - but not vsum) Excuse me answering my own question, but time is money, and so I've hastily written my own elisp functions to do this (appended). Perhaps this will help someone else. Given these functions defined in a .emacs config or similar, I can do: | | week ending | hh:mm | Total H | Total |VAT | Total+VAT | | ! | week| hhmm | hours | total |vat | | |---+-++-+---++---| | | 28/02/10| 20:11h | | || | | | 07/03/10| 21:11h | | || | | | 14/03/10| 25:40h | | || | | | 21/03/10| 27:16h | | || | |---+-++-+---++---| | # | 22/03/10| 94:18h | 94 | 2820 | 493.50 | 3313.50 | |---+-++-+---++---| | | 28/03/10| 26:24h | | || | | | 04/04/10| 21:15h | | || | | | 11/04/10| 23:15h | | || | |---+-++-+---++---| | # | 27/02/10| 70:54h | 71 | 2130 | 372.75 | 2502.75 | |---+-++-+---++---| #+TBLFM: $3='(reduce 'my-sum-hhmm '(@-...@-ii))::$4='(round (my-hhmm- to-hours $hhmm))::$5=$hours*$hourlyrate::$6=$total*$vatrate;%.2f::$7=$total+ $vat;%.2f #+CONSTANTS: vatrate=0.175 hourlyrate=35 Although I'd still be interested if someone can show me a better way. Cheers, N ps I wonder if a long set of formulae like this could be split over several +TBLFM lines? The answer seems to be no. ;; Parse an HH::MM date into a list containing a pair of numbers, (HH MM) (defun my-parse-hhmm (hhmm) (let ((date-re \\([0-9]+\\):\\([0-9]+\\)h?) hours minutes) (unless (string-match date-re hhmm) (error Argument is not a valid date: '%s' hhmm)) (setq hours (string-to-number (match-string 1 hhmm)) minutes (string-to-number (match-string 2 hhmm))) (list hours minutes))) ;; Convert a HH:MM date to a (possibly fractional) number of hours (defun my-hhmm-to-hours (hhmm) (let* ((date (my-parse-hhmm hhmm)) (hours (first date)) (minutes (second date))) (+ (float hours) (/ (float minutes) 60.0 ;; Date summing ;; This can be used in a table formula like this: ;; #+TBLFM: $3='(reduce 'my-sum-dates '(@-...@-ii)) (defun my-sum-hhmm (a b) (let* (;; parse a (a-date (my-parse-hhmm a)) (a-hours (first a-date)) (a-minutes (second a-date)) ;; parse b (b-date (my-parse-hhmm b)) (b-hours (first b-date)) (b-minutes (second b-date)) ;; add the parts together (minutes (+ a-minutes b-minutes)) (hours (+ a-hours b-hours)) (carry (floor (/ minutes 60))) (remainder (mod minutes 60))) (format %d:%02dh (+ hours carry) remainder))) ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode - Carsten ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Re: My reference data management approach with org and emacs
Hi Jan, thanks a lot for your description. I've actually been using a similar setup of one big and unstructured reference/snippet file and a script for scanning paper documents away without spending too much time thinking about where to put the resulting files. The problem was that the scanned documents were accumulating in a scan-inbox directory, waiting to be filled into a file hierarchy... too much overhead for little additional gain when digging for reference documents again. Your setup seems to fill the gap between reference paper and org-mode, so I'm happy you shared it. =) One tiny remark to your defcustom declaration: (defcustom jb/filing-attachment-dir nil The directory in which individual attachment dirs are created. :type 'string) resulted in an error message (custom-variable-mark-to-save: Symbol's value as variable is void: nilasdf) when trying to save the customize buffer. Customize was trying to save this value to ~/.emacs without around it. Using instead of nil in the declaration fixed this for me. 'C-c r p' also behaves a bit odd as long as jb/filing-attachment-dir isn't initialized yet, but I don't care. Best regards, Sandro ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Re: Plotting date on xaxis
Johan Ekh (2010-02-22 19:31:41 +0100) wrote: I try to plot a table looking like this | Date | Kg | |-+| | 2010-02-21 | 95.0 | | 2010-02-22 | 93.0 | | 2010-02-23 | 92.0 | | 2010-02-24 | 91.5 | | 2010-02-25 | 91.0 | | 2010-02-29 | 92.0 | | | | with the dates on the xaxis using #+PLOT: title:Weight ind:1 deps:(2) type:2d with:linespo set:xdata time timefmt:%Y-%m-%d set:yrange [90:] but no plot is generated. If I remove set:xdata time, the plot is generated but without interpreting the dates as dates. Can anyone see what I do wrong? Today I faced the same problem and I fixed it by replacing ``timefmt:%Y-%m-%d`` with ``set:timefmt '%Y-%m-%d'. HTH, -- Ivan Vilata i Balaguer -- http://ivan.lovesgazpacho.net/ ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] TODO's dependency on nested-Checkboxes -- 'org-enforce-todo-checkbox-dependencies'
This is a tree from a hypothetical minimal org-file: TODO meet people [100%] - [X] John - [X] Jane How can I achieve this: TODO-state should automatically change to DONE when I have checked-off both 'John' and 'Jane' ? 1. The manual showed me how to do this if John and Jane are also TODOs: using org-after-todo-statistics-hook. I just can't find the check-box equivalent. 2. Google turned up 'org-enforce-todo-checkbox-dependencies' - but that is only half of what I'm looking for. If this feature does not already exist, I'd like to suggest this as a useful enhancement. Livin Stephen Sharma ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Re: Include FAQ to info? (was: Org-FAQ request for full-text dump)
Carsten Dominik carsten.domi...@gmail.com writes: On May 13, 2010, at 6:46 PM, Memnon Anon wrote: Hi. Wouldn't it be nice to have the FAQ available for offline-browsing as well? The FAQ is an Org file, available in Worg... So does Gnus, Emacs itself ... If it is too much work to convert it to info proper, maybe an orgfile like org-help.org[1] could be added to the distribution. I do like org-help.org. But someone would have to: - go through it to check if it up to date - commit to do this again to update every few releases I'd be happy to do this. Just to be clear, is the envisioned org-help.org simply the org FAQ with a different title or a redacted/abridged of the FAQ? Best, Matt ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] org-html link building diff
Hi Tom, what is the status of this development? Ready for prime time? If yes, can you please rebase to master and send me the pointer to the branch again? I believe it is ready, though I haven't heard any feedback. I pushed the changes on about the 4th of may. Or is there still stuff unclear? Can I help? Maybe. I hadn't done this before, so some feedback and (if needed) correction would be appreciated. I had to change the url to git+ssh so it would authenticate me, but when I pushed, it was visible in the public (non-ssh) git repo, so I thought it was visible to everybody. Isn't it? I thought I had done what you wanted by creating a branch for all my changes ever (tehom-master) and rebasing the org-html link changes on that (html-export-refactor-build-link). Is that working for you? If not, how can I fix it? Tom Breton (Tehom) ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] org-html link building diff
Hi Tom, I have now taken a brief look at the html-export-refactor-build-link patch. I see that in addition to changing org-html, it create a new file, with tests. While it is great that you have defined tests, this meant that I cannot simply apply he patch to the master without making unwanted changes. If we build a test strucure, it should be in a completely separate directory, not in, for example, the lisp directory. Could you please make me a branch which contains only the changes that would go into org? And if you want to provide a test framework for Org, pleas, by all means, go ahead, build it and document it so that we can all use it. Maybe we could make a tests subdirectory in the git repo that would contain it... Thanks - Carsten On May 15, 2010, at 11:37 PM, Tom Breton (Tehom) wrote: Hi Tom, what is the status of this development? Ready for prime time? If yes, can you please rebase to master and send me the pointer to the branch again? I believe it is ready, though I haven't heard any feedback. I pushed the changes on about the 4th of may. Or is there still stuff unclear? Can I help? Maybe. I hadn't done this before, so some feedback and (if needed) correction would be appreciated. I had to change the url to git+ssh so it would authenticate me, but when I pushed, it was visible in the public (non-ssh) git repo, so I thought it was visible to everybody. Isn't it? I thought I had done what you wanted by creating a branch for all my changes ever (tehom-master) and rebasing the org-html link changes on that (html-export-refactor-build-link). Is that working for you? If not, how can I fix it? Tom Breton (Tehom) - Carsten ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] org-html link building diff
On May 15, 2010, at 11:37 PM, Tom Breton (Tehom) wrote: Hi Tom, what is the status of this development? Ready for prime time? If yes, can you please rebase to master and send me the pointer to the branch again? I believe it is ready, though I haven't heard any feedback. I pushed the changes on about the 4th of may. Or is there still stuff unclear? Can I help? Maybe. I hadn't done this before, so some feedback and (if needed) correction would be appreciated. I had to change the url to git+ssh so it would authenticate me, but when I pushed, it was visible in the public (non-ssh) git repo, so I thought it was visible to everybody. Isn't it? Yes. It is the same repo - ssh access allows you to push, that is all. I thought I had done what you wanted by creating a branch for all my changes ever (tehom-master) and rebasing the org-html link changes on that (html-export-refactor-build-link). Is that working for you? If not, how can I fix it? I think the best would be to have individual topic branches that you devellpp for yourself, on your machine at home, and that you only push them to the repo when you want others or me to look at them. - Carsten ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Pretty org-entities in org-mode buffers
Hi everyone, a modified version of Eric's code is now included into Org, I just pushed it to the git repo. You can use the command `C-c C-x \' to toggle this feature. The variable `org-pretty-entities' determines if this mode is on by default. Finally, you can use #+STARTUP: entitiespretty #+STARTUP: entitiesplain to change things on a per-file base. Thanks to Eric for this great idea. - Carsten On May 5, 2010, at 6:19 PM, Eric Schulte wrote: Hi, Recently I've been making use of org-entites for exporting my greek/ math heavy class notes to HTML. I'm really loving the results. This morning I've started playing around with the below function `org-pretty-entities', which is adapted from Phil Hagelberg's `pretty-lambdas'[1]. Calling this function in an org-mode buffer will have the effect of fontifying all org-entities text strings as the character which they represent, so \Delta is replaced with Δ, \lambda with λ, \in with ∈, and so forth. I've just started playing with this, and I make no guarantees as to it's safety or utility, but I was very pleasantly surprised by the simplicity of the function, and how nice it's been to see my special characters appear in org-mode buffers as I type. #+begin_src emacs-lisp :results silent (defun org-pretty-entities () (interactive) (font-lock-add-keywords nil (mapcar (lambda (el) (list (concat (?\\( (regexp-quote \\) (nth 0 el) [\s] \ \)) `(0 (progn (compose-region (match-beginning 1) (- (match- end 1) 1) ,(nth 6 el)) nil org-entities))) (org-pretty-entities) #+end_src To try this out, just evaluate the above code block inside of an org-mode buffer, then starting typing out org-entities. Hope others find this useful. Best -- Eric Footnotes: [1] http://github.com/technomancy/emacs-starter-kit/blob/master/starter-kit-defuns.el#L135 ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode - Carsten ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode