From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Subject: Re: Possible bug in org-cycle with property drawer Date: Thu, 26 Jan 2012 09:48:25 +0100 Message-ID: <87ipjyg886.fsf@gnu.org> References: <8502.1327506516@alphaville> <87aa5bdaug.fsf@gnu.org> <8796.1327508273@alphaville> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([140.186.70.92]:56527) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RqKzA-0000eS-Jz for emacs-orgmode@gnu.org; Thu, 26 Jan 2012 03:47:18 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RqKz9-0002Yu-6B for emacs-orgmode@gnu.org; Thu, 26 Jan 2012 03:47:12 -0500 Received: from mail-ww0-f49.google.com ([74.125.82.49]:37251) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RqKz9-0002Yo-0B for emacs-orgmode@gnu.org; Thu, 26 Jan 2012 03:47:11 -0500 Received: by wgbds1 with SMTP id ds1so221752wgb.30 for ; Thu, 26 Jan 2012 00:47:10 -0800 (PST) In-Reply-To: <8796.1327508273@alphaville> (Nick Dokos's message of "Wed, 25 Jan 2012 11:17:53 -0500") 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: nicholas.dokos@hp.com Cc: emacs-orgmode@gnu.org --=-=-= Content-Type: text/plain Hi Nick, Nick Dokos writes: > That's it: I had a > > #+DRAWERS: JUNK GARBAGE TRASH > > line in the file (and I didn't report it in the original email: blush! > sorry about that). Without it, the property drawer behaves normally. Thinking again about your problem, I don't find it natural to have #+DRAWERS /replacing/ existing drawers specified in `org-drawers', instead of just adding new ones. Do you agree? The attached patch implements a new meaning for #+DRAWERS, as a way to declare "additional" drawers. Let me know what you think, thanks! --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Let-DRAWERS-append-new-drawers-to-org-drawers-instea.patch >From 00d19d068708bda1b3a647c06d457936a12ed20d Mon Sep 17 00:00:00 2001 From: Bastien Guerry Date: Thu, 26 Jan 2012 09:42:04 +0100 Subject: [PATCH] Let #+DRAWERS append new drawers to `org-drawers', instead of replacing them. * org.el (org-set-regexps-and-options): Set the value of `org-drawers' by adding the value of the infile #+DRAWERS option to that of the existing `org-drawers'. * org.texi (Drawers): Clearly states that #+DRAWERS will add drawers to the one originally listed in `org-drawers'. --- doc/org.texi | 8 ++++---- lisp/org.el | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/org.texi b/doc/org.texi index a285cca..d374dfb 100644 --- a/doc/org.texi +++ b/doc/org.texi @@ -1773,8 +1773,8 @@ numerically, alphabetically, by time, or by custom function. Sometimes you want to keep information associated with an entry, but you normally don't want to see it. For this, Org mode has @emph{drawers}. Drawers need to be configured with the variable -@code{org-drawers}@footnote{You can define drawers on a per-file basis -with a line like @code{#+DRAWERS: HIDDEN PROPERTIES STATE}}. Drawers +@code{org-drawers}@footnote{You can define additional drawers on a +per-file basis with a line like @code{#+DRAWERS: HIDDEN STATE}}. Drawers look like this: @example @@ -14433,8 +14433,8 @@ Set tags that can be inherited by any entry in the file, including the top-level entries. @item #+DRAWERS: NAME1 ..... @vindex org-drawers -Set the file-local set of drawers. The corresponding global variable is -@code{org-drawers}. +Set the file-local set of additional drawers. The corresponding global +variable is @code{org-drawers}. @item #+LINK: linkword replace @vindex org-link-abbrev-alist These lines (several are allowed) specify link abbreviations. diff --git a/lisp/org.el b/lisp/org.el index 7a68b73..5bc9aeb 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -4547,7 +4547,7 @@ but the stars and the body are.") (mapcar (lambda (x) (org-split-string x ":")) (org-split-string value))))))) ((equal key "DRAWERS") - (setq drawers (org-split-string value splitre))) + (setq drawers (append org-drawers (org-split-string value splitre)))) ((equal key "CONSTANTS") (setq const (append const (org-split-string value splitre)))) ((equal key "STARTUP") -- 1.7.8.4 --=-=-= Content-Type: text/plain -- Bastien --=-=-=--