From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexander Borkowski Subject: Bug: Non buffer-local org-not-done-heading-regexp breaks TODO dependencies under certain circumstances [8.3beta (release_8.3beta-1178-g317886 @ /opt/local/share/emacs/site-lisp/org/)] Date: Sat, 30 May 2015 07:10:48 +1000 Message-ID: <5568D5D8.6000806@opus-b.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:60707) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YyRYx-0002MG-UM for emacs-orgmode@gnu.org; Fri, 29 May 2015 17:11:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YyRYu-0002DG-OM for emacs-orgmode@gnu.org; Fri, 29 May 2015 17:11:31 -0400 Received: from mx.darwyn.de ([89.163.201.58]:44360) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YyRYu-0002D1-Dg for emacs-orgmode@gnu.org; Fri, 29 May 2015 17:11:28 -0400 Received: from nostromo.opus-b.com (58.46.233.220.static.exetel.com.au [220.233.46.58]) by mx.darwyn.de (Postfix) with ESMTPSA id 7FE1510B for ; Fri, 29 May 2015 23:11:26 +0200 (CEST) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Hi all, I experimented a bit with per-file TODO keywords and noticed that under certain circumstances TODO dependencies are broken. A minimal example to reproduce the problem I encountered (under emacs -q) would be as follows: - Enable TODO dependencies, i.e. eval (setq org-enforce-todo-dependencies t) in *scratch*. - Create one file (e.g. "~/test-local.org") with these contents: #+TODO: LOCALTODO | LOCALDONE * Local Parent :PROPERTIES: :ORDERED: t :END: ** LOCALTODO First ** LOCALTODO Second Then add it to the end of agenda-files (with C-u C-c [) and close the buffer. - Create another file (e.g. "~/test-global.org") with these contents: * Global Parent :PROPERTIES: :ORDERED: t :END: ** TODO First ** TODO Second Then also add it to the end of agenda-files (with C-u C-c [) and close the buffer. - Now view the global TODO list (M-x org-todo-list) and notice that the second TODO from the "local" file is not dimmed and it is possible to change its TODO state (using the t key) as it is not blocked, but should be. I did some tracking down and I think this comes from the fact that variable org-not-done-heading-regexp is not buffer-local. It probably should be as both lines 4800 and 4803 in org.el are: (make-variable-buffer-local 'org-not-done-regexp) When I re-open emacs and eval (what I suspect line 4803 should be) (make-variable-buffer-local 'org-not-done-heading-regexp) in *scratch* before re-runing the above steps everything works as expected. Regards, Alex B. Emacs : GNU Emacs 24.5.1 (x86_64-apple-darwin11.4.2) of 2015-04-14 on tenseven-slave.macports.org Package: Org-mode version 8.3beta (release_8.3beta-1178-g317886 @ /opt/local/share/emacs/site-lisp/org/) current state: ============== (setq org-tab-first-hook '(org-hide-block-toggle-maybe org-babel-hide-result-toggle-maybe org-babel-header-arg-expand) org-speed-command-hook '(org-speed-command-default-hook org-babel-speed-command-hook) org-occur-hook '(org-first-headline-recenter) org-metaup-hook '(org-babel-load-in-session-maybe) org-confirm-shell-link-function 'yes-or-no-p org-after-todo-state-change-hook '(org-clock-out-if-current) org-src-mode-hook '(org-src-babel-configure-edit-buffer org-src-mode-configure-edit-buffer) org-agenda-before-write-hook '(org-agenda-add-entry-text) org-babel-pre-tangle-hook '(save-buffer) org-mode-hook '(#[nil "\300\301\302\303\304$\207" [org-add-hook change-major-mode-hook org-show-block-all append local] 5] #[nil "\300\301\302\303\304$\207" [org-add-hook change-major-mode-hook org-babel-show-result-all append local] 5] org-babel-result-hide-spec org-babel-hide-all-hashes) org-archive-hook '(org-attach-archive-delete-maybe) org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point org-babel-execute-safely-maybe) org-enforce-todo-dependencies t org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers org-cycle-show-empty-lines org-optimize-window-after-visibility-change) org-confirm-elisp-link-function 'yes-or-no-p org-metadown-hook '(org-babel-pop-to-session-maybe) org-blocker-hook '(org-block-todo-from-children-or-siblings-or-parent) org-agenda-files '("~/test-local.org" "~/test-global.org") org-clock-out-hook '(org-clock-remove-empty-clock-drawer) )