|
From: Bastien <bzg <at> altern.org>
Subject: Re: Possible bug in org-cycle with property drawer Newsgroups: gmane.emacs.orgmode Date: 2012-01-26 08:48:25 GMT (15 weeks, 6 days, 7 hours and 1 minute ago) Hi Nick, Nick Dokos <nicholas.dokos <at> hp.com> 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!
From 00d19d068708bda1b3a647c06d457936a12ed20d Mon Sep 17 00:00:00 2001
From: Bastien Guerry <bzg <at> altern.org>
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
- <at> 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
- <at> 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
-- Bastien |
|