Re: [O] Table alignment
Bastien b...@gnu.org writes: Hi Thomas, t...@tsdye.com (Thomas S. Dye) writes: Aligning this table with C-c C-c when the cursor is in one of the cells of the first column results in an error: if: Wrong type argument: char-or-string-p, nil. It is confused by the = character, and thinks it is a formula that needs evaluation. I just pushed a fix for this, thanks for reporting this! Thanks Bastien. The fix works fine. All the best, Tom -- Thomas S. Dye http://www.tsdye.com
Re: [O] Habit tracking and table data
Bastien b...@gnu.org: Steinar Bang s...@dod.no writes: I'm logging my bicycling to work using org habit tracking. I'm using a comment to track the time and distance (and average speed). It would have been nice if the habit tracking could have used a table for this. Can you give an example of what you are using *** TODO Til jobb 2012 :LOGBOOK: - State DONE from TODO [2012-04-30 Mon 09:41] \\ 32:50, Skillebekk, Sinsen, Torshovdalen, 15.37km (28.09km/t) - State DONE from TODO [2012-04-27 Fri 16:09] \\ 37:29, Skillebekk, Sinsen, Torshovdalen, 15.35km (24.97km/t) :END: :PROPERTIES: :LAST_REPEAT: [2012-04-30 Mon 09:40] :LOGGING: lognoterepeat :STYLE:habit :END: SCHEDULED 2011-07-24 Sun +1d and what you would like to use instead? I'm not quite sure, but I would like to have the numbers in table columns, and be able to pull out graphs and calculations from them (eg. overall average speed, best times, worst times).
Re: [O] More than one column view in a file
Hi Sebastien, Sebastien Vauban wxhgmqzgwmuf-genee64ty+gs+fvcfc7...@public.gmane.org writes: I'd like to have a couple of different (column) views in my Org file How about trying this patch which let you have another format in column view? After applying this patch, try this. M-: (org-columns %66ITEM(Task) %6Effort(Estim.){:}) Best, IP From ee660fcb0c5a3a547681d8390284bb57399e05bf Mon Sep 17 00:00:00 2001 From: Ippei FURUHASHI top.tuna+orgm...@gmail.com Date: Tue, 1 May 2012 12:11:06 +0900 Subject: [PATCH] org-colview.el: Add functions to column view with formats selectively * lisp/org-colview.el (org-columns): Give new argument `columns-fmt-string'. * lisp/org-colview.el (org-columns-get-format-end-top-level): Split this function into 2 functions, `org-columns-get-format' and `org-columns-goto-top-level'. For example, even if the item (or the parent) has the property, :COLUMNS: %66ITEM(Task) %6Effort(Estim.){:} %6CLOCKSUM(Time) Org can offer column view with another format by typing M-: (org-columns %66ITEM(Task) %6Effort(Estim.){:}) --- lisp/org-colview.el | 30 ++ 1 files changed, 22 insertions(+), 8 deletions(-) diff --git a/lisp/org-colview.el b/lisp/org-colview.el index 5409701..c7b5d45 100644 --- a/lisp/org-colview.el +++ b/lisp/org-colview.el @@ -665,27 +665,41 @@ (defun org-columns-open-link (optional arg) (org-open-link-from-string value arg))) (defun org-columns-get-format-and-top-level () - (let (fmt) + (let (fmt (org-columns-get-format)) +(org-columns-goto-top-level) +fmt)) + +(defun org-columns-get-format (optional fmt-string) + (interactive) + (let (fmt-as-property) (when (condition-case nil (org-back-to-heading) (error nil)) - (setq fmt (org-entry-get nil COLUMNS t))) -(setq fmt (or fmt org-columns-default-format)) + (setq fmt-as-property (org-entry-get nil COLUMNS t))) +(setq fmt (or fmt-string fmt-as-property org-columns-default-format)) (org-set-local 'org-columns-current-fmt fmt) (org-columns-compile-format fmt) +fmt)) + +(defun org-columns-goto-top-level () + (let () +(when (condition-case nil (org-back-to-heading) (error nil)) + (org-entry-get nil COLUMNS t) (if (marker-position org-entry-property-inherited-from) (move-marker org-columns-top-level-marker org-entry-property-inherited-from) - (move-marker org-columns-top-level-marker (point))) -fmt)) + (move-marker org-columns-top-level-marker (point)) -(defun org-columns () - Turn on column view on an org-mode file. +(defun org-columns (optional columns-fmt-string) + Turn on column view on an org-mode file. When `COLUMNS-FMT-STRING' +is specified e.g. \%66ITEM(Task) %6Effort(Estim.){:}\), it is +treated as format for columns, COLUMNS property. (interactive) (org-verify-version 'columns) (org-columns-remove-overlays) (move-marker org-columns-begin-marker (point)) (let ((org-columns-time (time-to-number-of-days (current-time))) beg end fmt cache maxwidths) -(setq fmt (org-columns-get-format-and-top-level)) +(org-columns-goto-top-level) +(setq fmt (org-columns-get-format columns-fmt-string)) (save-excursion (goto-char org-columns-top-level-marker) (setq beg (point)) -- 1.7.9.msysgit.0
Re: [O] More than one column view in a file
Hi Sebastien, Sebastien Vauban wxhgmqzgwmuf-genee64ty+gs+fvcfc7...@public.gmane.org writes: Hello, I'd like to have a couple of different (column) views in my Org file How about trying this patch which lets you have another format in column view? After applying this patch, try this at the Tasks tree in your example. M-: (org-columns %66ITEM(Task) %6CLOCKSUM(Time) %6Effort(Estim.){:}) to compare with the result of M-: (org-columns) Best, IP (snip) #+TITLE: Effort vs Estimate #+AUTHOR:Seb Vauban * Tasks :PROPERTIES: :ID: 49380c04-9b6e-4298-aff8-d936d9679d8e :COLUMNS: %6TODO %66ITEM(Task) %6Effort(Estim.){:} :END: ** TODO A (snip and end) From ee660fcb0c5a3a547681d8390284bb57399e05bf Mon Sep 17 00:00:00 2001 From: Ippei FURUHASHI top.tuna+orgm...@gmail.com Date: Tue, 1 May 2012 12:11:06 +0900 Subject: [PATCH] org-colview.el: Add functions to column view with formats selectively * lisp/org-colview.el (org-columns): Give new argument `columns-fmt-string'. * lisp/org-colview.el (org-columns-get-format-end-top-level): Split this function into 2 functions, `org-columns-get-format' and `org-columns-goto-top-level'. For example, even if the item (or the parent) has the property, :COLUMNS: %66ITEM(Task) %6Effort(Estim.){:} %6CLOCKSUM(Time) Org can offer column view with another format by typing M-: (org-columns %66ITEM(Task) %6Effort(Estim.){:}) --- lisp/org-colview.el | 30 ++ 1 files changed, 22 insertions(+), 8 deletions(-) diff --git a/lisp/org-colview.el b/lisp/org-colview.el index 5409701..c7b5d45 100644 --- a/lisp/org-colview.el +++ b/lisp/org-colview.el @@ -665,27 +665,41 @@ (defun org-columns-open-link (optional arg) (org-open-link-from-string value arg))) (defun org-columns-get-format-and-top-level () - (let (fmt) + (let (fmt (org-columns-get-format)) +(org-columns-goto-top-level) +fmt)) + +(defun org-columns-get-format (optional fmt-string) + (interactive) + (let (fmt-as-property) (when (condition-case nil (org-back-to-heading) (error nil)) - (setq fmt (org-entry-get nil COLUMNS t))) -(setq fmt (or fmt org-columns-default-format)) + (setq fmt-as-property (org-entry-get nil COLUMNS t))) +(setq fmt (or fmt-string fmt-as-property org-columns-default-format)) (org-set-local 'org-columns-current-fmt fmt) (org-columns-compile-format fmt) +fmt)) + +(defun org-columns-goto-top-level () + (let () +(when (condition-case nil (org-back-to-heading) (error nil)) + (org-entry-get nil COLUMNS t) (if (marker-position org-entry-property-inherited-from) (move-marker org-columns-top-level-marker org-entry-property-inherited-from) - (move-marker org-columns-top-level-marker (point))) -fmt)) + (move-marker org-columns-top-level-marker (point)) -(defun org-columns () - Turn on column view on an org-mode file. +(defun org-columns (optional columns-fmt-string) + Turn on column view on an org-mode file. When `COLUMNS-FMT-STRING' +is specified e.g. \%66ITEM(Task) %6Effort(Estim.){:}\), it is +treated as format for columns, COLUMNS property. (interactive) (org-verify-version 'columns) (org-columns-remove-overlays) (move-marker org-columns-begin-marker (point)) (let ((org-columns-time (time-to-number-of-days (current-time))) beg end fmt cache maxwidths) -(setq fmt (org-columns-get-format-and-top-level)) +(org-columns-goto-top-level) +(setq fmt (org-columns-get-format columns-fmt-string)) (save-excursion (goto-char org-columns-top-level-marker) (setq beg (point)) -- 1.7.9.msysgit.0
Re: [O] Error in org2blog/wp-login: Must provide a callback function to url-retrieve
Steinar Bang s...@dod.no: When I try to log in, using `M-x org2blog/wp-login RET', I get the following error message in the minibuffer: Must provide a callback function to url-retrieve Are anyone else successfully using org2blog with emacs 23? I don't think this have worked for any emacs 23.x releases. In both emacs 23.1 (Ubuntu 10.4) and 23.4 (debian testing) url-retrieve is defined like this: (defun url-retrieve (url callback optional cbargs) Ie. with a callback function as the second argument. In both 1.6.7 (the ELPA version) and the 1.6.8 (the last release, dating from 2010-03-05) versions of xml-rpc.el what happens is this: ... (cond ((boundp 'url-be-asynchronous) ; Sniff for w3 lib capability (if async-callback-function (setq url-be-asynchronous t url-current-callback-data (list async-callback-function (current-buffer)) url-current-callback-func 'xml-rpc-request-callback-handler) (setq url-be-asynchronous nil)) (url-retrieve server-url t) Ie. if url-be-asynchronous is defined, url-retrieve is called with t as the second argument, and this will fail because url-retrieve-internal tests the argument like so: ... (if (not (functionp callback)) (error Must provide a callback function to url-retrieve)) Thoughts? Possible cures?
[O] [patch] a small change
0001-A-small-change.patch Description: Binary data
Re: [O] [patch] a small change
Hi Feng, thanks for the patch. Can you give it a better name? Also split it into two patches, one for the typo one for the other change. As for the code: - don't use 'nil, use nil - (append (list 'x 'y) 'y) = (list 'x 'y 'z) Thanks! -- Bastien
Re: [O] [PATCH] fix hook calling in org-export-remove-or-extract-drawers
Hi Bill, Thanks for the patch. Please don't attach patches using application/octet-stream, patchwork don't catch those -- see http://orgmode.org/worg/org-contribute.html#sec-4-3 Bill Wishon b...@wishon.org writes: * lisp/org-exp.el (org-export-remove-or-extract-drawers): Changed funcall to run-hook-with-args-until-success to properly run the org-export-format-drawer-function hook. The problem was that funcall was being executed on the hook (list of functions) instead of running the hook with run-hook-with-args-until-success, which tries to run potentially a list of hooks until one returns non-nil. I don't really understand why `run-hook-with-args-until-success' is needed here. Or `org-export-format-drawer-function' returns a string, or it returns nil, in case we fall back on `org-export-format-drawer'. Maybe I miss something? -- Bastien
[O] [patch] Using 'call-process to launch latex program
From 4b577b6909c57a74adf75925ea9f26e17f9ad946 Mon Sep 17 00:00:00 2001 From: Feng Shu tuma...@gmail.com Date: Tue, 1 May 2012 18:48:50 +0800 Subject: [PATCH 1/2] spelling fixes * org.el (org-create-formula-image-with-imagemagick): converte -- convert. --- lisp/org.el |2 +- 1 个文件被修改,插入 1 行(+),删除 1 行(-) diff --git a/lisp/org.el b/lisp/org.el index f54026c..c3f37f9 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -17037,7 +17037,7 @@ Some of the options can be changed using the variable ((eq processing-type 'imagemagick) (unless executables-checked (org-check-external-command - converte you need to install imagemagick) + convert you need to install imagemagick) (setq executables-checked t)) (unless (file-exists-p movefile) (org-create-formula-image-with-imagemagick -- 1.7.10 From db879ef257b28ba852e3db612205d0e259eabd9f Mon Sep 17 00:00:00 2001 From: Feng Shu tuma...@gmail.com Date: Tue, 1 May 2012 18:51:17 +0800 Subject: [PATCH 2/2] Using 'call-process to launch latex program * org.el (org-create-formula-image-with-imagemagick): using function 'call-process to launch latex program instead of function 'shell-command, and when we preview formula,it will not show *shell output buffer* --- lisp/org.el |3 ++- 1 个文件被修改,插入 2 行(+),删除 1 行(-) diff --git a/lisp/org.el b/lisp/org.el index c3f37f9..63fc5ab 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -17312,7 +17312,8 @@ inspection. (save-match-data (shell-quote-argument (file-name-directory texfile))) t t cmd))) - (shell-command cmd))) + (setq cmd (split-string cmd)) + (eval (append (list 'call-process (pop cmd) nil nil nil) cmd (error nil)) (cd dir)) (if (not (file-exists-p pdffile)) -- 1.7.10
Re: [O] [patch] Using 'call-process to launch latex program
Applied, thanks! -- Bastien
Re: [O] External link abbreviations don't work when contained in #+INCLUDE file
Hi, D. C. Toedt d...@toedt.com writes: External link abbreviations don't seem to work if they're in an # +INCLUDE file -- they end up pointing to a (non-existent) anchor within the main document. The same external link abbreviations seem to work fine if they're in the main file. That's the thing to do: put the links abbreviations in the main file or in `org-link-abbrev-alist'. Options are local to the file and it would be inconsistent to make an exception for #+LINK. HTH, -- Bastien
Re: [O] Org tiny changes?
Hi François, François Pinard pin...@iro.umontreal.ca writes: I came to suspect a mix of Org Emacs Lisp files from the Ubuntu bundled Emacs, prefix=/usr, and those coming from Git, prefix=/usr/local/. Right or wrong, I came to suspect this because the installation of Org from Git goes to a different place (at least for me) now that the Makefile has been reshuffled. The new Makefile install Org at the same place than the old one, so probably the change in the location of Emacs comes from Ubuntu. Thanks for your patience with me! You're welcome :) -- Bastien
Re: [O] Filter depending on item level
Hi Marcelo, Marcelo de Moraes Serpa celose...@gmail.com writes: Is there a way to filter the agenda based on the level of the item. If you mean filtering the agenda view (like `/' does tag filtering) there is no way to filter by entry level for now. HTH, -- Bastien
Re: [O] Sparse tree date question
Hi John, John Hendy jw.he...@gmail.com writes: It seems that =C-c / [a/b/D]= only works for deadline or scheduled active timestamps, not active or inactive time stamps alone. Is this correct or am I doing something wrong? Correct. If it is correct... could a feature be added in which inactive or active timestamps simply recording dates could be added to the search options? Perhaps this can be done via the regexp option and I'm just unaware that this is how individuals accomplish the above. I'm swamped right now, but there is room for improvement here, you're right. On my TODO list. Thanks, -- Bastien
Re: [O] Habit tracking and table data
Hi Steinar, Steinar Bang s...@dod.no writes: Can you give an example of what you are using *** TODO Til jobb 2012 :LOGBOOK: - State DONE from TODO [2012-04-30 Mon 09:41] \\ 32:50, Skillebekk, Sinsen, Torshovdalen, 15.37km (28.09km/t) - State DONE from TODO [2012-04-27 Fri 16:09] \\ 37:29, Skillebekk, Sinsen, Torshovdalen, 15.35km (24.97km/t) :END: :PROPERTIES: :LAST_REPEAT: [2012-04-30 Mon 09:40] :LOGGING: lognoterepeat :STYLE:habit :END: SCHEDULED 2011-07-24 Sun +1d and what you would like to use instead? I'm not quite sure, but I would like to have the numbers in table columns, and be able to pull out graphs and calculations from them (eg. overall average speed, best times, worst times). Yes, it would be nice to parse the LOGBOOK information consistently, then to render it in a table... patch welcome! -- Bastien
[O] Auto-fill-mode with code sections
Hi, I use org-mode extensively with R code sections, as a scientific notebook. One annoyance I have is that when I have auto-fill-mode turned on (which is convenient for the main body parts of the document), it extends to the code section and starts auto-filling my code. Can anyone recommend a configuration that will get me folding in the body sections, but not in the code sections? It could use another mechanism besides auto-fill-mode if that's what's preferred these days, but auto-fill-mode is the one I'm familiar with. Thanks. -- Ken Williams, Senior Research Scientist WindLogics http://windlogics.com CONFIDENTIALITY NOTICE: This e-mail message is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution of any kind is strictly prohibited. If you are not the intended recipient, please contact the sender via reply e-mail and destroy all copies of the original message. Thank you.
Re: [O] Display/print text only for export
Hallo Andreas, Andreas Kalex andreas.ka...@gmx.de writes: I am writing some text in org-mode, in which I will use former chapters from the same file and sometimes from other files. Is it possible to use a link for these parts that they should only be displayed and/or printed for export (e.g. in pdf)? Does #+INCLUDE: suits your needs? It works for exporting, it cannot display included files in the buffer. HTH, -- Bastien
Re: [O] Error in org2blog/wp-login: Must provide a callback function to url-retrieve
Steinar Bang s...@dod.no: Are anyone else successfully using org2blog with emacs 23? I don't think this have worked for any emacs 23.x releases. Yes it has. The problem was mine. I had a very old setting (older than 2002-03-12, which is as far as my current version control of my home directory goes), that interfered and caused the wrong branch of a cond clause to be called (the emacs 20.3 branch): (setq w3-user-fonts-take-precedence t ; Use _my_ font. w3-user-colors-take-precedence t ; Use _my_ colors. w3-honor-stylesheets nil ; No, just do it.. w3-use-terminal-characters nil ; No weird characters. w3-use-terminal-characters-on-tty nil w3-horizontal-rule-char 45 ; I said: no weird characters w3-display-frames nil url-be-asynchronous t w3-do-incremental-display t url-honor-refresh-requests nil w3-delay-image-loads t) I removed the url-be-asynchronous setting and then xml-rpc worked.
Re: [O] Error in org2blog/wp-login: Must provide a callback function to url-retrieve
Steinar, Thanks for debugging the problem and sending us updates on it. :) I was trying to reproduce the problem, before getting back to you on this. Thanks, Puneeth
Re: [O] Custom time display in mode-line
Daniel Clemente n142857 at gmail.com writes: Hi org-clock-modeline-total now accepts following values: current, today, repeat, all, auto. It would be useful to allow it to accept either a custom function or a format string which composes a text string like: 0:10 (tot: 1:10/2:00) meaning: „clocking 10 minutes in this session, but the total clocked time (including those 10min) is 1:10, and the effort estimate is 2:00“. Not all entries have a „total clocked time“ (: entries clocked for the first time) and not all entries have an estimate. - Either many format strings must be given (_simple, _with_total, _with_estimate, _with_total_and_estimate), e.g. (%current %current (tot: %total) %current/%estimate %current (tot:%total/%estimate)) - … or we must cope with results like 0:10 (tot: /) - … or a custom function must be used to do those conditionals. Accepting a function would be like redefining org-clock-get-clock-string but without touching org's core. I tried to change the code but I'm confused as to why org-clock-modeline- total (a mere visualization/„view“ setting) is read in org-clock-get-sum-start (which is a „model“/core function and therefore not tied to any particular „view“). I think org-clock- modeline-total should be read just in org-clock-get-clock-string. Documentation of org-clock-get-clocked-time is also wrong („The time returned includes the time spent on this task in previous clocking intervals.“) since this depends on what org-clock-get-sum-start did. -- Daniel Hi, I just started using org-clock, and that seems like a major issue (from an emacs user perspective, who is used to be able to modify everything that gets displayed, especially such an important part). The code is a bit messy and I don't understand everything, so I'm not able to write a patch for this, but can someone look into that? Ideally, org-clock-modeline-total would be obsoleted and replaced by a org-clock-modeline-format that'd get passed to format-spec.
Re: [O] [PATCH] fix hook calling in org-export-remove-or-extract-drawers
Hi Bastien, I'll try to find a different mail client next time. On Tue, May 1, 2012 at 3:01 AM, Bastien b...@gnu.org wrote: I don't really understand why `run-hook-with-args-until-success' is needed here. Or `org-export-format-drawer-function' returns a string, or it returns nil, in case we fall back on `org-export-format-drawer'. My thought was that you could have multiple hooks in org-export-format-drawer-function and each one could be checking for things like is this html export, is the drawer name == PROPERTIES and could decide to take action and return a string, or perhaps take no action, return nil, and let another hook have a shot at the drawer. The other thing with funcall here is that if you use add-hook to add your function to that hook it creates a list of functions, and when funcall is called on a list of functions instead of an individual function it is an error. Best, ~Bill
Re: [O] Error in org2blog/wp-login: Must provide a callback function to url-retrieve
Steinar Bang s...@dod.no writes: When I try to log in, using `M-x org2blog/wp-login RET', I get the following error message in the minibuffer: Must provide a callback function to url-retrieve Are anyone else successfully using org2blog with emacs 23? I just checked that org2blog works for me with GNU Emacs 23.3.1 (i686-pc-linux-gnu, GTK+ Version 2.24.5) of 2011-08-14 on rothera, modified by Debian in Ubuntu 11.10. But I have the following header in xml-rpc.el. ;; Author: Mark A. Hershberger m...@everybody.org ;; Original Author: Daniel Lundin dan...@codefactory.se ;; Version: 1.6.8 ;; Created: May 13 2001 ;; Keywords: xml rpc network ;; URL: http://launchpad.net/xml-rpc-el ;; Last Modified: 2010-03-05 13:41:20 mah
Re: [O] Error in org2blog/wp-login: Must provide a callback function to url-retrieve
Puneeth Chaganti puncha...@gmail.com: Thanks for debugging the problem and sending us updates on it. :) Yes, I really hate it when I google for my problems and find questions but no solutions, so I try to avoid giving others that experience. :-) Anyway, thanks for writing org2blog. The first real posting (actually written during Christmas) is now out: http://steinar.bang.priv.no/
[O] org-bibtex.el feature request
Hi all, I'm using org-bibtex.el and capture templates to store links from BibTeX entries and am finding it very useful functionality. The documentation in org-bibtex.el says And it constructs a nice description tag for the link that contains the author name, the year and a short title. This works as advertised, but it would really be a help were there to be an option to use the BibTeX citation key as the link description. I'd like to request that this be considered as a feature to add. The motivation is that I am using the following in my org-capture-templates: (b BibTeX Entry) (ba Bibtex Article entry (file+headline Reading.org To File %:author) * %:title %^G :PROPERTIES: :entered: %U :END: %a %:key %:author %:title %:year %:journal %? :empty-lines 2) The use of various :keywords gives me the full information about the author and year (while I can see that the short form might be of use, I do want the complete information) and thus the short form is redundant. The BibTeX key seems to me to be the natural description link. (Unlike the short form that is generated, it is sure to be unique in a well maintained BibTeX file.) Were it used, the resulting capture text would seem cleaner. While I would indeed like this, I recognize it is a small thing and there may be a desire to contain the growth of the variables that org-mode relies on. Thanks for considering it, in any case. Best, Brian vdB
[O] Source block returns error before first headline
Aloha all, I have a source code block that returns LaTeX results that should be placed before the first headline. The source block works correctly *if* if is placed after a headline, but if I place it before the headline it fails with Invalid read syntax: # I'm enclosing an excerpt, but will work up an ECM if this is necessary. All the best, Tom ---Excerpt * Shouldn't need this heading #+BEGIN_LaTeX \title{A Sample {\ttlit ACM} SIG Proceedings Paper in Org-mode Format\titlenote{(Does NOT produce the permission block, copyright information nor page numbering). For use with ACM\_PROC\_ARTICLE-SP.CLS. Supported by ACM.}} \subtitle{[Extended Abstract] \titlenote{A full version of this paper is available as \textit{Author's Guide to Preparing ACM SIG Proceedings Using \LaTeX$2_\epsilon$\ and BibTeX} at \texttt{www.acm.org/eaddress.htm}}} #+END_LaTeX # Note that add-author-record isn't fully correct. It formats a comma # separated list, when it should return a list with the final element # separated by and. #+name: author-list #+header: :var authors=authorlist #+header: :var add-authors=additional-authors #+header: :results latex #+header: :exports results #+BEGIN_SRC emacs-lisp (defun author-record (r) (if ( (length (first r)) 0) (format \\alignauthor\n%s\\titlenote{%s} \\affaddr{%s} \\affaddr{%s} \\affaddr{%s} \\email{%s} (first r) (second r) (third r) (fourth r) (fifth r) (sixth r)) \\and) ) (defun non-empty (list) (let ( (i 0)) (mapcar #'(lambda (elem) (if ( (length (first elem)) 0) (incf i))) list) i) ) (defun add-author-record (r) (format %s (%s, email: {\\texttt{%s}}) (first r) (second r) (third r))) (let ( (i (+ (non-empty (setcdr authors (cdr (cdr authors (- (length add-authors) 2) )) (a (mapcar (lambda (row) (author-record row)) (setcdr authors (cdr (cdr authors) (b (mapcar (lambda (row) (add-author-record row)) (setcdr add-authors (cdr (cdr add-authors) ) (concat (format \\numberofauthors{%s}\n\\author{\n i) (mapconcat 'identity a \n) } (if ( (length add-authors) 0) (concat \n\\additionalauthors{Additional authors: (mapconcat 'identity b , ) .}) ( #+END_SRC #+RESULTS: author-list #+BEGIN_LaTeX \numberofauthors{8} \author{ \alignauthor G.K.M. Tobin\titlenote{The secretary disavows any knowledge of this author's actions.}\\ \affaddr{Institute for Clarity in Documentation}\\ \affaddr{P.O. Box 1212}\\ \affaddr{Dublin, Ohio 43017-6221}\\ \email{webmas...@marysville-ohio.com} \alignauthor Lars Th{\o}rv{\a}ld\titlenote{This author is the one who did all the really hard work.}\\ \affaddr{The Th{\o}rv{\a}ld Group}\\ \affaddr{1 Th{\o}rv{\a}ld Circle}\\ \affaddr{Hekla, Iceland}\\ \email{la...@affiliation.org} \and \alignauthor Lawrence P. Leipuner\titlenote{}\\ \affaddr{Brookhaven Laboratories}\\ \affaddr{Brookhaven National Lab}\\ \affaddr{P.O. Box 5000}\\ \email{lleipu...@reasearchlabs.org} \alignauthor Sean Fogarty\titlenote{}\\ \affaddr{NASA Ames Research Center}\\ \affaddr{Moffett Field}\\ \affaddr{California 94035}\\ \email{foga...@amesres.org} \alignauthor Charles Palmer\titlenote{}\\ \affaddr{Palmer Research Laboratories}\\ \affaddr{8600 Datapoint Drive}\\ \affaddr{San Antonio, Texas 78229}\\ \email{cpal...@prl.com}} \additionalauthors{Additional authors: John Smith (The Th{\o}rv{\a}ld Group, email: {\texttt{jsm...@affiliation.org}}), Julius P. Kumquat (The Kumquat Consortium, email: {\texttt{jpkumquat@consortium}}).} #+END_LaTeX \maketitle #+BEGIN_abstract This paper provides a sample of a LaTeX document which resembles the style of original ACM LaTeX template ``Option 1: LaTeX2e - Strict Adherence to SIGS style''. The focus on this template is the usage with Emacs Org-mode. Therefore the content is reduced to a minimum. #+END_abstract -- Thomas S. Dye http://www.tsdye.com
Re: [O] orgstuct++ does not lurk silently in the shadow
Hi Christopher, I've now fixed orgstuct++-mode so that you can turn it on and off safely. Some Org filling functions fall back on the major-mode filling functions through a new defmacro. Please test and report any problem. Thanks! -- Bastien
Re: [O] [PATCH] fix hook calling in org-export-remove-or-extract-drawers
Hi Bill, Bill Wishon b...@wishon.org writes: My thought was that you could have multiple hooks in org-export-format-drawer-function and each one could be checking for things like is this html export, is the drawer name == PROPERTIES and could decide to take action and return a string, or perhaps take no action, return nil, and let another hook have a shot at the drawer. Well, you can implement such checks within the same function :) We would need to rename `org-export-format-drawer-function' to suggest it can be a list of functions -- I don't want to go into this direction right now, I need to double-check what the new exporter (contrib/lisp/org-export.el) does wrt this. Nicolas, how the new exporter handle this? The other thing with funcall here is that if you use add-hook to add your function to that hook it creates a list of functions, and when funcall is called on a list of functions instead of an individual function it is an error. Yes, `org-export-format-drawer-function' supports only one function. -- Bastien
Re: [O] [PATCH] fix hook calling in org-export-remove-or-extract-drawers
On Tue, May 1, 2012 at 10:58 AM, Bastien b...@gnu.org wrote: We would need to rename `org-export-format-drawer-function' to suggest it can be a list of functions Maybe this is a non-issue then. I had assumed it was a hook because it was on the page describing org-mode hooks, but your right that it doesn't end in -hook and therefore I shouldn't have been using add-hook to add my function to it but rather just set it to a single function. Perhaps to make it clearer the worg page on hooks could have a section for the non-hook hooks.
Re: [O] Custom time display in mode-line
Hi, Thanks for answering, 01/05/12 19:41, Bastien Antoine Levitt antoine.lev...@gmail.com writes: Ideally, org-clock-modeline-total would be obsoleted and replaced by a org-clock-modeline-format that'd get passed to format-spec. Please suggest the docstring for `org-clock-modeline-format'. This will give us a stable basis to work on. At this stage, I don't understand clearly enough what is buggy about `org-clock-modeline-total'. It's not buggy, it's just not customizable enough. I'm very sensitive about what goes into my modeline. (and apparently I'm not alone) I have in mind something like mode-line-format. So for instance, the docstring would be something like: String containing a template for displaying mode line when clock is active. The following %-constructs will be replaced: %n -- the name of the task %t -- time clocked into this task today %c -- time clocked in the current instance of the clock %a -- all time clocked for this task Plus there should probably be stuff about repeats and effort that I don't understand because I don't use them. Other emacs packages (for instance, gnus via gnus-group-line-format and such variables) allow pretty much unlimited customization of these format strings, so it makes sense that org does too. But I'm realizing that even that is not sufficient for what I want. What I really want is complete lisp control, with access to the time clocked. For instance, I'd like to be able to display stuff like Task1 : 00:24 today, 04:13 this week. Maybe a refactoring with more options to org-clock-get-clocked-time (for instance, accepting the same :block options as the clocktable) would be a good idea?
Re: [O] [PATCH] fix hook calling in org-export-remove-or-extract-drawers
Hello, Bastien b...@gnu.org writes: My thought was that you could have multiple hooks in org-export-format-drawer-function and each one could be checking for things like is this html export, is the drawer name == PROPERTIES and could decide to take action and return a string, or perhaps take no action, return nil, and let another hook have a shot at the drawer. Well, you can implement such checks within the same function :) We would need to rename `org-export-format-drawer-function' to suggest it can be a list of functions -- I don't want to go into this direction right now, I need to double-check what the new exporter (contrib/lisp/org-export.el) does wrt this. Nicolas, how the new exporter handle this? There is no global `org-export-format-drawer-function' variable, and each back-end may provide it. I think the big four does it. Though, it's more a convenience variable provided for compatibility with legacy exporter. There are other, and more standard, ways to achieve the same result in the new export engine (filters being one). Filters are lists of functions, by the way. Regards, -- Nicolas Goaziou
Re: [O] [PATCH] fix hook calling in org-export-remove-or-extract-drawers
On Tue, May 1, 2012 at 11:18 AM, Nicolas Goaziou n.goaz...@gmail.comwrote: There are other, and more standard, ways to achieve the same result in the new export engine (filters being one). What I was trying to achieve when I got into trying out the org-export-format-drawer-function was to try and customize the look of the properties drawers when they're exported to html. By default they are exported as pre formatted text with the class=example. What would be the right way to reformat this during output so that I could present this in another format, say a table or bullet list? ~Bill
Re: [O] defining a clocktable in a capture template with absolute timespan computed relative to today
Hi Brian, Brian van den Broek brian.van.den.br...@gmail.com writes: On 27 April 2012 05:52, Ippei FURUHASHI top.tuna+orgm...@gmail.com wrote: Hi Brian, Brian van den Broek brian.van.den.br...@gmail.com writes: how to add 1 day to the return value of (current-time). This hard coding is out of org-mode range, #+BEGIN_SRC elisp (format-time-string %Y-%m-%d (time-add (current-time) (seconds-to-time (* 24 60 60 #+END_SRC #+RESULTS: : 2012-04-28 snip Hi IP, Thanks for the reply and apologies for the delay in my response; I was traveling. Thanks too for the code sample. It does exactly what was desired. (I expect I ought to have been able to dig that up for myself, so a double thanks :-) It's my pleasure. I've been experimenting with a new means of using org to plan my day at the outset and, at the end of it, to easily review how close I have come to accomplishing what I planned. I'm very interested. How do you compare your plan with results? I was experimenting with planning tasks at the beginning of the day by assigning a number of .5 hour blocks to them at the outset of the day and then simply visually inspecting a clock table for the day at day's end to see how well I managed to adhere to the intent. I have something like this in my org-capture-templates definition: #+BEGIN_SRC elisp (p Plan the Day entry (file+datetree log.org) * Plan and Work Log for %(format-time-string \%Y-%m-%d\ (current-time)) :plan: :PROPERTIES: :entered: %U :END: |---+-| | Task* | Pomos * | |---+-| | [[id:de721347-0896-41d3-84d0-da824332c71c][Plan the day]] | ( ) %i| | [[id:898a9827-2d51-4fd7-8e07-4ff678a83e19][Some Task]] | [ ][ ] | | [[id:f30fc641-5e22-4329-8b9b-58dd26c28f54][Work on Textbook]] | [ ][ ] [ ][ ] | |---+-| #+BEGIN: clocktable :maxlevel 4 :scope agenda :tstart \%(format-time-string \%Y-%m-%d %a\ (current-time)) 08:00\ :tend \%(format-time-string \%Y-%m-%d %a\ (time-add (current-time) (seconds-to-time (* 24 60 60 08:00\ :link t :narrow 60! :indent t :tcolumns 3 :fileskip0 #+END: * Day's End :journal: :empty-lines 1 :clock-in t :clock-resume t) ))) #+END_SRC (I am an extreme night owl, so 08:00 is a good place to mark the day change for me. I have '(setq org-extend-today-until 8)' in my .emacs.) Several constant tasks are built into the capture template, and each day I would add to and subtract from the daily plan as appropriate. I use '( )' to mark a .5 hour block that I estimated would be sufficient for the task at issue and a '[ ]' for a .5 hour block devoted to an ongoing substantial task. As I consume the blocks, I change them to '(X)' and '[X]'. For tasks where I underestimated the time needed, I use ' + ' to separate the second estimate. Tasks where I overestimated have the unconsumed '( )' left as is. At the end of the day, I update the clock table, and judge how well my plans were followed by a simple visual scan. I also fill out a diary type entry under the headline at the end of the capture template. Thanks for sharing it. According to your instruction, I filled in the table. This table has both the plan and the results. |-+---| | Task * | Pomos * | |-+---| | Plan the day| (X) blah blah blah| | Some Task | [X][ ]| | Work on Textbook| [X][X] [X][X] ++ | |-+---| To save or to gain the time for ongoing substantial tasks, you need the clocktable. That's why you review the table as well as the clocktable. For me, your logging system looks like another (visual) expression of - Effort - clock time - priority (to filter tasks). It's reasonable. After doing this for a while, I abandoned it as having too much overhead for how I am presently working. I am on leave from a college teaching job for this academic year, and most of the projects that I am working on are large ongoing ones that I want to work on each day, but don't have broken down into estimate-able subtasks. (For instance, I am writing a textbook; I want to spend at least 2 hours a day on that, and will keep doing so until it is done, but there are no detailed subtasks suitable for estimation.) There is little flux and it is easy enough to tell by use of the clock table alone how well I am living up to my intentions. I will try this method again next semester when I am back to teaching and have more smaller tasks that are suitable for estimation (e.g.,
Re: [O] More than one column view in a file
Hi Sebastien Sebastien Vauban wxhgmqzgwmuf-genee64ty+gs+fvcfc7...@public.gmane.org writes: Hello, I'd like to have a couple of different (column) views in my Org file, for example: - one (public) view with the estimated time only - another one (private, I mean not exported) with the real clocked time My previous patch and this patch cooperate to generate the columnview dynamic block with given columns format. The result for your example is shown below, and I hope you like it. Please regard #+BEGIN line as 1 line, though it seems to be wrapped. #+TITLE: Effort vs Estimate #+AUTHOR:Seb Vauban * Tasks :PROPERTIES: :ID: 49380c04-9b6e-4298-aff8-d936d9679d8e :COLUMNS: %66ITEM(Task) %6Effort(Estim.){:} %6CLOCKSUM(Time) :END: ** TODO A *** TODO A1 :PROPERTIES: :Effort: 12:00 :END: :LOGBOOK: CLOCK: [2012-03-01 Thu 09:00]--[2012-03-01 Thu 17:00] = 8:00 CLOCK: [2012-03-02 Fri 09:00]--[2012-03-02 Fri 17:00] = 8:00 CLOCK: [2012-04-05 Thu 09:00]--[2012-04-05 Thu 12:45] = 3:45 CLOCK: [2012-04-16 Mon 09:00]--[2012-04-16 Mon 14:45] = 5:45 :END: *** TODO A2 :PROPERTIES: :Effort: 24:00 :END: ** TODO B :PROPERTIES: :Effort: 1:00 :END: :LOGBOOK: CLOCK: [2012-03-01 Thu 09:00]--[2012-03-01 Thu 09:30] = 0:30 :END: * Budget estimate We have estimated the budget as follows: #+tblname: dblock-tasks #+BEGIN: columnview :hlines 1 :id 49380c04-9b6e-4298-aff8-d936d9679d8e :maxlevel 3 :format %6TODO %66ITEM(Task) %6Effort(Estim.){:} | TODO | Task| Estim. | |--+-+| | | * Tasks | 37:00 | | TODO | ** A| 36:00 | | TODO | *** A1 | 12:00 | | TODO | *** A2 | 24:00 | | TODO | ** B| 1:00 | #+END: * Worked hours :noexport: We have worked that much, and can compare with what had been estimated: #+tblname: dblock-tasks #+BEGIN: columnview :hlines 1 :id 49380c04-9b6e-4298-aff8-d936d9679d8e :maxlevel 3 :format %6TODO %66ITEM(Task) %6Effort(Estim.){:} %6CLOCKSUM(Time) | TODO | Task| Estim. | Time | |--+-++---| | | * Tasks | 37:00 | 26:00 | | TODO | ** A| 36:00 | 25:30 | | TODO | *** A1 | 12:00 | 25:30 | | TODO | *** A2 | 24:00 | | | TODO | ** B| 1:00 | 0:30 | #+END: Best regards, IP From 50701702a646064034eb4fc718862aa8b7f53bcd Mon Sep 17 00:00:00 2001 From: Ippei FURUHASHI top.tuna+orgm...@gmail.com Date: Wed, 2 May 2012 05:23:00 +0900 Subject: [PATCH] lisp/org-colview.el: add new param of format to columnview dblock * lisp/org-colview.el (org-dblock-write:columnview): Add a new param, :format which specifies the column view format to be output as columnview dynamic block. One can generate columnview dynamic block with chosen format: #+BEGIN: columnview :format %6TODO %66ITEM(Task) %6Effort(Estim.){:} #+END: TINYCHANGE --- lisp/org-colview.el |7 +-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lisp/org-colview.el b/lisp/org-colview.el index c7b5d45..d3fb601 100644 --- a/lisp/org-colview.el +++ b/lisp/org-colview.el @@ -1229,13 +1229,16 @@ (defun org-dblock-write:columnview (params) :vlines When t, make each column a colgroup to enforce vertical lines. :maxlevel When set to a number, don't capture headlines below this level. :skip-empty-rows - When t, skip rows where all specifiers other than ITEM are empty. + When t, skip rows where all specifiers other than ITEM are empty. +:format When a non-nil string like \%66ITEM(Task) %6Effort(Estim.){:}\, + it specifies the format of column view. (let ((pos (move-marker (make-marker) (point))) (hlines (plist-get params :hlines)) (vlines (plist-get params :vlines)) (maxlevel (plist-get params :maxlevel)) (content-lines (org-split-string (plist-get params :content) \n)) (skip-empty-rows (plist-get params :skip-empty-rows)) + (columns-fmt (plist-get params :format)) (case-fold-search t) tbl id idpos nfields tmp recalc line id-as-string view-file view-pos) @@ -1265,7 +1268,7 @@ (defun org-dblock-write:columnview (params) (save-restriction (widen) (goto-char (or view-pos (point))) - (org-columns) + (org-columns columns-fmt) (setq tbl (org-columns-capture-view maxlevel skip-empty-rows)) (setq nfields (length (car tbl))) (org-columns-quit -- 1.7.9.msysgit.0
Re: [O] [bug] Assigning 0:00 to cell gives an error
Hi Sébastien, Sebastien Vauban wxhgmqzgwmuf-genee64ty+gs+fvcfc7...@public.gmane.org writes: We can assign the value 0:00 to a cell via the string function: | Task| HH:MM | |-+---| | This| 1:23 | | Nothing | 0:00 | | That| 4:56 | #+TBLFM: @2$2=1:23::@3$2=string(0:00)::@4$2=string(4:56) but, *when giving the value via the table formula* - we can't convert any time (0:00 or H:MM) to a fractional time: | Task| HH:MM | |-+---| | This| 0.00 | | Nothing | na| | That| na| #+TBLFM: @2$2=1:23;t::@3$2=string(0:00);t::@4$2=string(4:56);t The :t and :T flags are not assigning a value to a cell. - we can't confirm that its format must be H:MM | Task| HH:MM | |-+---| | This| 0:00 | | Nothing | na| | That| na| #+TBLFM: @2$2=1:23;T::@3$2=string(0:00);T::@4$2=string(4:56);T ... same here. Those problems do arise in both ways of assigning a time to a cell: - via the common way: @2$2=1:23 Results: 0.00 - via the string function: @4$2=string(4:56) The @4$2=string(4:56) works fine here, without any flag. -- Bastien
Re: [O] [bug?] Computations on efforts expressed in days
Sebastien Vauban wxhgmqzgwmuf-genee64ty+gs+fvcfc7...@public.gmane.org writes: I want to compute efforts given in days. As explained by the doc of `org-effort-durations', we must add a =d= modifier to tell Org that given numbers must be multiplied by 480 (in the case of hours) to get the correct number of corresponding minutes. I did that, but (as shown in the following inlined ECM): - the computed total for task A is interpreted as hours (4.5 days becomes 4 hours 30 minutes). - the grand computed total for all tasks becomes completely wrong (4:38 instead of 4.5 + 0.125 = 4.625 days). Am I doing something wrong, or forgetting something? This should be fixed now. Thanks, -- Bastien
Re: [O] [bug] Negating time changes its value
Sebastien Vauban wxhgmqzgwmuf-genee64ty+gs+fvcfc7...@public.gmane.org writes: Taking the opposite of a time (that is, putting a minus sign in front of it) changes its value... Fixed... please confirm. Thanks *a lot* for reporting this -- this was indeed a nasty bug. -- Bastien
[O] org + beamer: How to get @Š@ to create \alert?
I've just started using orgmode to create Beamer presentations, and have a question. In the worg documentation (http://orgmode.org/worg/org-tutorials/org-beamer/tutorial.html), it gives an example of how enclosing text in @ signs is supposed to result in highlighted red text. When I try it, I get text surrounded by two @ signs... Following suggestions from this list back in 2010, I tried customizing org-export-latex-emphasis-alist to Value: ((* \\textbf{%s} nil) (/ \\emph{%s} nil) (_ \\underline{%s} nil) (+ \\st{%s} nil) (= \\protectedtexttt t) (~ \\verb t) (@ \\alert{%s} nil)) but this doesn't seem to help either. Can anyone tell me how to get this working? Thanks. By the way, org-version reports: Org-mode version 7.8.09 (release_7.8.09-481-g3c3402 @ /Applications/Emacs.app/Contents/Resources/site-lisp/org-mode/lisp/org-inst all.el)
Re: [O] org + beamer: How to get @Š@ to create \alert?
Richard Stanton stan...@haas.berkeley.edu wrote: I've just started using orgmode to create Beamer presentations, and have a question. In the worg documentation (http://orgmode.org/worg/org-tutorials/org-beamer/tutorial.html), it gives an example of how enclosing text in @ signs is supposed to result in highlighted red text. When I try it, I get text surrounded by two @ signs... Following suggestions from this list back in 2010, I tried customizing org-export-latex-emphasis-alist to Value: ((* \\textbf{%s} nil) (/ \\emph{%s} nil) (_ \\underline{%s} nil) (+ \\st{%s} nil) (= \\protectedtexttt t) (~ \\verb t) (@ \\alert{%s} nil)) but this doesn't seem to help either. Can anyone tell me how to get this working? You also need to customize org-emphasis-alist. soapbox Not sure whether this qualifies as a bug or not. It probably does but even so, it's unlikely to be fixed and that's probably a *good* thing: IMNSHO, these interfaces are about the clunkiest to be found in org: they are very heavy for the result they produce. I hope the new exporter will clean up this area, even at the price of backward incompatibility (says he, knowing that any such will not affect him :-]) /soapbox Donning my asbestos suit, Nick