emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Moritz Ulrich <ulrich.moritz@googlemail.com>
To: emacs-orgmode@gnu.org
Subject: Regression in `org-todo'
Date: Sun, 1 Apr 2012 17:01:12 +0200	[thread overview]
Message-ID: <CALw-MDpYXMgo_K8VqSq=G8VTgVNbFsHmKeL+sybyhURD=v0VQw@mail.gmail.com> (raw)

[-- 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 (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.

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
-			  'org-todo-get-default-hook state last-state)
+			  'org-todo-get-default-hook state org-last-state)
 		 (next (if state (concat " " state " ") " "))
 		 (change-plist (list :type 'todo-state-change :from this :to state

             reply	other threads:[~2012-04-01 15:01 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-01 15:01 Moritz Ulrich [this message]
2012-04-01 18:35 ` [URGENT] Regression in `org-todo' 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

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:

  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='CALw-MDpYXMgo_K8VqSq=G8VTgVNbFsHmKeL+sybyhURD=v0VQw@mail.gmail.com' \
    --to=ulrich.moritz@googlemail.com \
    --cc=emacs-orgmode@gnu.org \


* 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


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