Browse Source

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'.
Bastien Guerry 13 years ago
parent
commit
5bb59a3fdf
2 changed files with 5 additions and 5 deletions
  1. 4 4
      doc/org.texi
  2. 1 1
      lisp/org.el

+ 4 - 4
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
 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}.
 normally don't want to see it.  For this, Org mode has @emph{drawers}.
 Drawers need to be configured with the variable
 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:
 look like this:
 
 
 @example
 @example
@@ -14433,8 +14433,8 @@ Set tags that can be inherited by any entry in the file, including the
 top-level entries.
 top-level entries.
 @item #+DRAWERS: NAME1 .....
 @item #+DRAWERS: NAME1 .....
 @vindex org-drawers
 @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
 @item #+LINK:  linkword replace
 @vindex org-link-abbrev-alist
 @vindex org-link-abbrev-alist
 These lines (several are allowed) specify link abbreviations.
 These lines (several are allowed) specify link abbreviations.

+ 1 - 1
lisp/org.el

@@ -4547,7 +4547,7 @@ but the stars and the body are.")
 			      (mapcar (lambda (x) (org-split-string x ":"))
 			      (mapcar (lambda (x) (org-split-string x ":"))
 				      (org-split-string value)))))))
 				      (org-split-string value)))))))
 	     ((equal key "DRAWERS")
 	     ((equal key "DRAWERS")
-	      (setq drawers (org-split-string value splitre)))
+	      (setq drawers (append org-drawers (org-split-string value splitre))))
 	     ((equal key "CONSTANTS")
 	     ((equal key "CONSTANTS")
 	      (setq const (append const (org-split-string value splitre))))
 	      (setq const (append const (org-split-string value splitre))))
 	     ((equal key "STARTUP")
 	     ((equal key "STARTUP")