emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Eric S Fraga <e.fraga@ucl.ac.uk>
To: emacs-orgmode@gnu.org
Subject: [bug] changing TODO status with org-after-todo-state-change-hook defined fails
Date: Fri, 1 Mar 2013 14:44:46 +0000	[thread overview]
Message-ID: <87r4jz2n8h.fsf@pinto.chemeng.ucl.ac.uk> (raw)

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

Hello,

All of a sudden, changing the TODO status (=org-todo=) from anything to
WAIT is failing with:

: Error in post-command-hook (org-add-log-note): (error "Can't expand minibuffer to full frame")

and ends up asking for a date and time and inserts new SCHEDULED
information.  My TODO sequence is:

: org-todo-keywords '((sequence "TODO(t)" "INPR(i@/!)" "WAIT(w@/!)" "|" "DONE(d@/!)" "XXXX(x@)" "POST(p!)"))

I have the following hook defined:

#+begin_src emacs-lisp
(add-hook 'org-after-todo-state-change-hook
	  '(lambda ()
	     ;; remove the scheduled date/time if present as the activity is no longer mine
	     ;; based on a suggestion by Manish on the org-mode mailing list
	     (if (string= org-state "WAIT") (org-schedule t))))
#+end_src

This used to work in that it would remove any SCHEDULED entry in the
item.  Now not only does it not remove the SCHEDULED information, it
prompts for a date+time after the error message above.  No log note is
requested.  It also seems to delete some text after the logbook drawer
in some cases.

I simply do not understand what is happening!  With emacs -Q and only
the two settings above (i.e. not the rest of my org customisation), the
problem arises.  If I don't have the hook, there is no
problem.  Attached is my simple test file.  The log notes indicated I
was successful in changing from TODO to WAIT before I defined the
hook.  I then switched to TODO and tried to then switch back to
WAIT.  The logging of the latter failed.

I note that nothing appears to have changed in org-schedule recently.

Any suggestions (other than remove the hook ;-)?

Thanks,
eric

-- 
: Eric S Fraga, GnuPG: 0xC89193D8FFFCF67D
: in Emacs 24.3.50.1 and Org release_7.9.3f-1315-g25b5ab

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: examplebug.org --]
[-- Type: text/x-org, Size: 406 bytes --]

#+TITLE:     examplebug.org
#+AUTHOR:    Eric S Fraga
#+options: toc:nil num:nil
#+TODO: TODO(t) INPR(i@/!) WAIT(w@/!) | DONE(d@/!) XXXX(x@) POST(p!)

* WAIT first test
  SCHEDULED: <2013-03-01 Fri>
  - State "TODO"       from "WAIT"       [2013-03-01 Fri 14:41]
  - State "WAIT"       from "TODO"       [2013-03-01 Fri 14:41] \\
    this works as I do not have the hook defined

  Something I need to do.

             reply	other threads:[~2013-03-01 14:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-01 14:44 Eric S Fraga [this message]
2013-03-01 16:31 ` [bug] changing TODO status with org-after-todo-state-change-hook defined fails Bastien
2013-03-01 20:19   ` Eric S Fraga
2013-03-01 22:16   ` Sebastien Vauban
2013-03-02 10:25     ` Bastien

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=87r4jz2n8h.fsf@pinto.chemeng.ucl.ac.uk \
    --to=e.fraga@ucl.ac.uk \
    --cc=emacs-orgmode@gnu.org \
    /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).