Преглед на файлове

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 години
родител
ревизия
5bb59a3fdf
променени са 2 файла, в които са добавени 5 реда и са изтрити 5 реда
  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
 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.

+ 1 - 1
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")