emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] [ANN] BREAKING CHANGE -- removing #+BABEL file-wide property lin


From: Eric Schulte
Subject: Re: [O] [ANN] BREAKING CHANGE -- removing #+BABEL file-wide property lines
Date: Sat, 22 Oct 2011 09:52:08 -0600
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.90 (gnu/linux)

>
> 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.

2. Adding a "#+PROPERTY:" line authoring helper similar to the table
   formula helper making it more natural to edit such long property
   lines.

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.

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

Cheers -- Eric

-- 
Eric Schulte
http://cs.unm.edu/~eschulte/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]