emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Bug [w/patch]: TODO blocking doesn't work across files with different TODO keyword sets
@ 2013-09-01  0:37 Josh Berry
  0 siblings, 0 replies; only message in thread
From: Josh Berry @ 2013-09-01  0:37 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1540 bytes --]

Hi list,

Some of my agenda files use custom TODO keywords (set through a
#+SETUPFILE), and some use the standard TODO | DONE keywords.  I recently
discovered that TODO blocking is broken in the files which use custom
keywords.

It turns out the org-not-done-heading-regexps variable was global instead
of buffer-local like the other *-regexp variables; this appears to be due
to a typo in org.el.

I think the blocker hook
(org-block-todo-from-children-or-siblings-or-parent) was picking up the
global value (set by one of the "factory-default" buffers, which got opened
last) and applying it to buffers with my custom TODO keywords, so it was
not correctly identifying some headlines as TODO headlines.

The patch below corrects the typo and fixes TODO blocking in my
custom-keyword files.  I hope you find it useful.  (BTW, I quickly ran
through the other make-variable-buffer-local invocations in org.el, and
didn't see any more typos of this nature.)

Thanks,
Josh

diff --git a/lisp/org.el b/lisp/org.el
index 97b5365..985dd74 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -4602,7 +4602,7 @@ Otherwise, these types are allowed:
 (make-variable-buffer-local 'org-not-done-regexp)
 (defvar org-not-done-heading-regexp nil
   "Matches a TODO headline that is not done.")
-(make-variable-buffer-local 'org-not-done-regexp)
+(make-variable-buffer-local 'org-not-done-heading-regexp)
 (defvar org-todo-line-regexp nil
   "Matches a headline and puts TODO state into group 2 if present.")
 (make-variable-buffer-local 'org-todo-line-regexp)

[-- Attachment #2: Type: text/html, Size: 1748 bytes --]

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2013-09-01  0:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-01  0:37 Bug [w/patch]: TODO blocking doesn't work across files with different TODO keyword sets Josh Berry

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).