emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Regression in `org-todo'
@ 2012-04-01 15:01 Moritz Ulrich
  2012-04-01 18:35 ` [URGENT] " Moritz Ulrich
  2012-04-02 14:54 ` Michael Strey
  0 siblings, 2 replies; 12+ messages in thread
From: Moritz Ulrich @ 2012-04-01 15:01 UTC (permalink / raw)
  To: emacs-orgmode

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

Commit 6cbf1f417222321a47848a7368427ba8a22fe3a5 renames variable
`last-state' to `org-last-state' in org.el. This change isn't
reflected in function `org-todo'.

That causes the following regression: Toggling a TODO state to DONE on
a headline via C-c C-t (`org-todo') results in: "Symbol's value as
variable is void: org-last-state".
This is reproducible in latest HEAD and even in tag 'release_7.8.07'.

M-x emacs-version: GNU Emacs 24.0.94.1 (i386-apple-darwin11.3.0, NS
apple-appkit-1138.32) of 2012-03-12 on moritz-macbook.local

The attached patch contains a simple (two line) fix.


Cheers,
Moritz Ulrich

-- 
Moritz Ulrich

[-- Attachment #2: fix-org-last-state.patch --]
[-- Type: application/octet-stream, Size: 865 bytes --]

diff --git a/lisp/org.el b/lisp/org.el
index c418c67..169e17d 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -11313,7 +11313,7 @@ For calling through lisp, arg is also interpreted in the following way:
 		 (interpret (nth 1 ass))
 		 (done-word (nth 3 ass))
 		 (final-done-word (nth 4 ass))
-		 (last-state (or this ""))
+		 (org-last-state (or this ""))
 		 (completion-ignore-case t)
 		 (member (member this org-todo-keywords-1))
 		 (tail (cdr member))
@@ -11379,7 +11379,7 @@ For calling through lisp, arg is also interpreted in the following way:
 			  (car tail))))
 		 (state (or
 			 (run-hook-with-args-until-success
-			  'org-todo-get-default-hook state last-state)
+			  'org-todo-get-default-hook state org-last-state)
 			 state))
 		 (next (if state (concat " " state " ") " "))
 		 (change-plist (list :type 'todo-state-change :from this :to state

^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2012-04-02 23:19 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-01 15:01 Regression in `org-todo' Moritz Ulrich
2012-04-01 18:35 ` [URGENT] " Moritz Ulrich
2012-04-01 20:29   ` Bastien
2012-04-01 20:37     ` Bastien
2012-04-02 14:54 ` Michael Strey
2012-04-02 15:03   ` Bastien
2012-04-02 20:44     ` Michael Strey
2012-04-02 21:07       ` Bastien
2012-04-02 21:43         ` Nick Dokos
     [not found]       ` <mstrey@strey.biz>
2012-04-02 21:40         ` Nick Dokos
2012-04-02 22:40           ` Bastien
2012-04-02 23:18             ` Bernt Hansen

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