On Sat, Oct 22, 2011 at 5:52 PM, Eric Schulte
<schulte.eric@gmail.com> wrote:
>
> Just to add to it: at the moment I have e.g:
>
> #+BABEL: :var MAINVERSION=0
> #+BABEL: :var SVNVERSION=(vc-working-revision (buffer-file-name))
> #+BABEL: :var SVNSTATE=( symbol-name (vc-state (or (buffer-file-name) org-current-export-file)))
> #+BABEL: :var SVNSTATENUM=(if (eq (vc-state (or (buffer-file-name) org-current-export-file)) 'up-to-date) 0 13)
> #+BABEL: :var DISP_PACKAGE="seedDisp_0.4-13.tar.gz"
>
> which would look horrible in one line and a nightmare to edit.
>
> Any suggestions how this cold be changed?
>
Hmm, I don't see any easy solution for the above. I'm sorry to have
removed this functionality.
I can think of three options for how to handle this situation.
1. If it turns out to be possible/desirable my preferred solution here
would be to add general property support for appending values to
properties when properties are over specified rather than simply
replacing the value. Perhaps this could be done with a variable like
org-accumulating-properties which could hold a list of those
properties which should accumulate values rather than overwriting
them.
Should work, but will add an additional level of complexity which I think is avoidable.
2. Adding a "#+PROPERTY:" line authoring helper similar to the table
formula helper making it more natural to edit such long property
lines.
I think this might be to complicated
3. It may be possible to add syntax for extending #+PROPERTY:
specifications across multiple lines, something like
#+PROPERTY: var MAINVERSION=0,
#+PROPERTY+: SVNVERSION=(vc-working-revision (buffer-file-name)),
#+PROPERTY+: SVNSTATE=( symbol-name (vc-state (or (buffer-file-name) org-current-export-file))),
#+PROPERTY+: SVNSTATENUM=(if (eq (vc-state (or (buffer-file-name) org-current-export-file)) 'up-to-date) 0 13),
#+PROPERTY+: DISP_PACKAGE="seedDisp_0.4-13.tar.gz"
FWIW I would like to have a similar extender for #+TBLFM: lines.
Actually this choice may be my preferred solution.
I like that suggestion - This would add an option, if inheritance for subtrees is incorporated for #+PROPERTY to unset all variables - something I was looking for some time ago.
So I really like that solution: logical, clear, does not break anything, and easy to read - I would say go for it.
What do you think?
>
> In addition: I would like to have a warning if #+BABEL is present in the org
> file, so that one remembers that it has to be changed.
>
#+begin_src emacs-lisp
(add-hook 'org-mode-hook
(lambda ()
(save-excursion
(goto-char (point-min))
(when (re-search-forward (org-make-options-regexp '("BABEL")))
(message "This file contains a \"#+BABEL:\" line.")))))
#+end_src
Could this be included in the next few versions of org, as I can imnagine that especially infrequent org-babel users will be confused. Also: in a year, when I open an old org-file and it des not work, this would warn me about the necessary modifications.
Cheers,
Rainer