From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Schulte Subject: Re: [ANN] BREAKING CHANGE -- removing #+BABEL file-wide property lines Date: Sat, 22 Oct 2011 09:52:08 -0600 Message-ID: <87fwil10o2.fsf@gmail.com> References: <87pqhrih3s.fsf@gmail.com> <30891.1319141196@alphaville.dokosmarshall.org> <87fwinifqu.fsf@gmail.com> <32184.1319143892@alphaville.dokosmarshall.org> <87zkgvgxe7.fsf@gmail.com> <1405.1319147324@alphaville.dokosmarshall.org> <87zkgvfhra.fsf@gmail.com> <2127.1319148505@alphaville.dokosmarshall.org> <87vcrjfgt1.fsf@gmail.com> <80sjmmvm60.fsf@somewhere.org> <4EA129DB.4070006@christianmoe.com> <8762ji5jr6.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([140.186.70.92]:47556) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RHduu-0005Id-2p for emacs-orgmode@gnu.org; Sat, 22 Oct 2011 11:55:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RHdur-00082W-PC for emacs-orgmode@gnu.org; Sat, 22 Oct 2011 11:55:23 -0400 Received: from mail-iy0-f169.google.com ([209.85.210.169]:41924) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RHdur-0007vC-M6 for emacs-orgmode@gnu.org; Sat, 22 Oct 2011 11:55:21 -0400 Received: by mail-iy0-f169.google.com with SMTP id f6so7387593iag.0 for ; Sat, 22 Oct 2011 08:55:21 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Rainer M Krug Cc: Sebastien Vauban , emacs-orgmode@gnu.org, mail@christianmoe.com > > 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/