From: Bastien <bzg@altern.org>
To: nicholas.dokos@hp.com
Cc: emacs-orgmode@gnu.org
Subject: Re: Possible bug in org-cycle with property drawer
Date: Thu, 26 Jan 2012 09:48:25 +0100 [thread overview]
Message-ID: <87ipjyg886.fsf@gnu.org> (raw)
In-Reply-To: <8796.1327508273@alphaville> (Nick Dokos's message of "Wed, 25 Jan 2012 11:17:53 -0500")
[-- Attachment #1: Type: text/plain, Size: 580 bytes --]
Hi Nick,
Nick Dokos <nicholas.dokos@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!
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Let-DRAWERS-append-new-drawers-to-org-drawers-instea.patch --]
[-- Type: text/x-patch, Size: 2398 bytes --]
From 00d19d068708bda1b3a647c06d457936a12ed20d Mon Sep 17 00:00:00 2001
From: Bastien Guerry <bzg@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
-@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
[-- Attachment #3: Type: text/plain, Size: 14 bytes --]
--
Bastien
next prev parent reply other threads:[~2012-01-26 8:47 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-25 15:48 Possible bug in org-cycle with property drawer Nick Dokos
2012-01-25 16:03 ` Carsten Dominik
2012-01-25 16:09 ` Nick Dokos
2012-01-25 16:07 ` Bastien
2012-01-25 16:17 ` Nick Dokos
2012-01-26 8:48 ` Bastien [this message]
2012-01-26 13:45 ` Nick Dokos
2012-01-26 17:38 ` Achim Gratz
2012-01-28 23:50 ` Bastien
2012-01-29 8:05 ` Achim Gratz
2012-01-29 9:53 ` Bastien
2012-01-31 18:46 ` Achim Gratz
2012-01-31 20:41 ` Nicolas Goaziou
2012-01-25 16:10 ` Bastien
2012-01-26 8:54 ` Eric S Fraga
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87ipjyg886.fsf@gnu.org \
--to=bzg@altern.org \
--cc=emacs-orgmode@gnu.org \
--cc=nicholas.dokos@hp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).