Re: [BUG] org-auto-repeat-maybe: error "Can’t expand minibuffer to full frame" and missing log note
Bhavin Gandhi writes: > I'm attaching the patch for the current approach we discussed in this > thread. I have tried basic operations like taking note on state change, > and have tried with recurring entries which need more than 10 cycles to > be marked as done (original bug report). > > As I was changing the indentation of code from org-add-log-note, I converted > some tabs to spaces, is it okay to do so? Thanks! Should be fine I think. We have a mess with spaces and tabs in some places. Applied onto main with amendments. https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=2e012db31a8dbae0f859b8fbfc899aeed3e34244 I have changed the commit message to `quote' lisp symbols and have double space " " between sentences. I also added defvars for the new variables to pacify the compiler and changed the commit message accordingly. Applied Fixed -- Ihor Radchenko, Org mode contributor, Learn more about Org mode at https://orgmode.org/. Support Org development at https://liberapay.com/org-mode, or support my work at https://liberapay.com/yantar92
Re: [BUG] org-auto-repeat-maybe: error "Can’t expand minibuffer to full frame" and missing log note
On Wed, 17 Aug 2022 at 15:14, Ihor Radchenko wrote: > >> Yikes! Then, can also check for window-minibuffer-p, but I feel that it > >> will be a fight against all kinds of edge cases. > > > > I haven't been able to make much progress on this bug in the last two > > weeks. Will try to send a patch in a few days, as the steps I gave above > > feels like an edge case which we won't see happening hopefully. > > Your patch will be already an improvement. I'm attaching the patch for the current approach we discussed in this thread. I have tried basic operations like taking note on state change, and have tried with recurring entries which need more than 10 cycles to be marked as done (original bug report). As I was changing the indentation of code from org-add-log-note, I converted some tabs to spaces, is it okay to do so? -- Bhavin Gandhi (bhavin192) | https://geeksocket.in From afb1158d9a360020f093436228cdf4e689474db8 Mon Sep 17 00:00:00 2001 From: Bhavin Gandhi Date: Sun, 25 Sep 2022 22:06:53 +0530 Subject: [PATCH] org.el: Make sure `org-add-log-note' runs at the end of Org command MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * lisp/org.el (org-add-log-setup): Save `this-command' and `recursion-depth' before adding the `org-add-log-note'to post-command-hook. (org-add-log-note): Execute only if the current `(recursion-depth)' and `this-command' are same as the ones we saved during the log-setup. This change tries to make sure that we run the `org-add-log-note' only after the current Org command has finished executing. Previously, the post-command-hook was getting triggered if the Org command in turn runs some other command. Fixes the bug originally reported by Michael Powe. Bhavin Gandhi. [BUG] org-auto-repeat-maybe: error "Can’t expand minibuffer to full frame" and missing log note. Sat, 18 Jun 2022 23:30:50 +0530. https://list.orgmode.org/CAOn=hbcsoco++we0xgrhfoxxcexrocpygd1ncjzkyy-9lck...@mail.gmail.com/ Relevant discussion on bug-gnu-emacs: https://debbugs.gnu.org/56425 --- lisp/org.el | 64 - 1 file changed, 34 insertions(+), 30 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index b63aaed4f..ba20df59f 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -10355,6 +10355,8 @@ EXTRA is additional text that will be inserted into the notes buffer." org-log-note-how how org-log-note-extra extra org-log-note-effective-time (org-current-effective-time) +org-log-note-this-command this-command +org-log-note-recursion-depth (recursion-depth) org-log-setup t) (add-hook 'post-command-hook 'org-add-log-note 'append)) @@ -10383,37 +10385,39 @@ EXTRA is additional text that will be inserted into the notes buffer." (defun org-add-log-note (&optional _purpose) "Pop up a window for taking a note, and add this note later." - (remove-hook 'post-command-hook 'org-add-log-note) - (setq org-log-setup nil) - (setq org-log-note-window-configuration (current-window-configuration)) - (delete-other-windows) - (move-marker org-log-note-return-to (point)) - (pop-to-buffer-same-window (marker-buffer org-log-note-marker)) - (goto-char org-log-note-marker) - (org-switch-to-buffer-other-window "*Org Note*") - (erase-buffer) - (if (memq org-log-note-how '(time state)) - (org-store-log-note) -(let ((org-inhibit-startup t)) (org-mode)) -(insert (format "# Insert note for %s. + (when (and (equal org-log-note-this-command this-command) + (= org-log-note-recursion-depth (recursion-depth))) +(remove-hook 'post-command-hook 'org-add-log-note) +(setq org-log-setup nil) +(setq org-log-note-window-configuration (current-window-configuration)) +(delete-other-windows) +(move-marker org-log-note-return-to (point)) +(pop-to-buffer-same-window (marker-buffer org-log-note-marker)) +(goto-char org-log-note-marker) +(org-switch-to-buffer-other-window "*Org Note*") +(erase-buffer) +(if (memq org-log-note-how '(time state)) +(org-store-log-note) + (let ((org-inhibit-startup t)) (org-mode)) + (insert (format "# Insert note for %s. # Finish with C-c C-c, or cancel with C-c C-k.\n\n" - (cl-case org-log-note-purpose - (clock-out "stopped clock") - (done "closed todo item") - (reschedule "rescheduling") - (delschedule "no longer scheduled") - (redeadline "changing deadline") - (deldeadline "removing deadline") - (refile "refiling") - (note "this entry") - (state - (format "state change from \"%s\" to \"%s\"" - (or org-lo
Re: [BUG] org-auto-repeat-maybe: error "Can’t expand minibuffer to full frame" and missing log note
Hi, sorry for the late answer. Ihor Radchenko writes: > You do not need to share the paperwork with us. FSF has a database > available to GNU maintainers with a list of all the people with > copyright assignment. > > I am CCing Bastien. > Bastien, can you please confirm that Bhavin's paperwork is > registered Yes he is. > and add him to the contributor list? Done. Thanks Bhavin for contributing! -- Bastien
Re: [BUG] org-auto-repeat-maybe: error "Can’t expand minibuffer to full frame" and missing log note
Bhavin Gandhi writes: >> Thanks! I received the PDF to sign the next day after my email, this >> will probably take a couple of days more from my side as I'm talking >> with my employer. > > I finally got this done. I now have a fully executed copy of the copyright > assignment (signed by FSF and me). Do I need to send it to someone so > that they can check and update the page at > https://orgmode.org/worg/contributors.html ? You do not need to share the paperwork with us. FSF has a database available to GNU maintainers with a list of all the people with copyright assignment. I am CCing Bastien. Bastien, can you please confirm that Bhavin's paperwork is registered and add him to the contributor list? >> Yikes! Then, can also check for window-minibuffer-p, but I feel that it >> will be a fight against all kinds of edge cases. > > I haven't been able to make much progress on this bug in the last two > weeks. Will try to send a patch in a few days, as the steps I gave above > feels like an edge case which we won't see happening hopefully. Your patch will be already an improvement. I guess that the proper fix of this type of issues would be rewriting the note system in such a way that it uses recursive editing. Then, we can make the user write the note in the middle of a running command and not worry about post-command-hook quirks. But that will be a much more involved change. -- Ihor Radchenko, Org mode contributor, Learn more about Org mode at https://orgmode.org/. Support Org development at https://liberapay.com/org-mode, or support my work at https://liberapay.com/yantar92
Re: [BUG] org-auto-repeat-maybe: error "Can’t expand minibuffer to full frame" and missing log note
On Thu, 21 Jul 2022 at 23:33, Bhavin Gandhi wrote: > > On Sat, 16 Jul 2022 at 14:50, Ihor Radchenko wrote: > > > Seems like soon I will cross the TINYCHANGE limit, so I will get the > > > FSF copyright assignment done. > > > > Note that FSF should reply within 5 working days. If not, we can help > > you to push them. > > Thanks! I received the PDF to sign the next day after my email, this > will probably take a couple of days more from my side as I'm talking > with my employer. I finally got this done. I now have a fully executed copy of the copyright assignment (signed by FSF and me). Do I need to send it to someone so that they can check and update the page at https://orgmode.org/worg/contributors.html ? On Tue, 26 Jul 2022 at 17:18, Ihor Radchenko wrote: > > > > So, I saved this-command and (recursion-depth) value, and I'm checking > > for it in the org-add-log-note (attaching diff of my changes). But this > > doesn't guarantee that we are not in the minibuffer when the > > post-command-hook runs. > > > > This is what I did, and it failed after answering the question about 10 > > repeated intervals: > > 1. M-: (y-or-n-p "Some question") > > 2. Now I switched to Org mode buffer. > > 3. Did C-c C-t on the entry. > > > > When org-log-add-setup runs, (recursion-depth) is 1, and > > (minibuffer-depth) is also 1. > > Now, the question about 10 repeated intervals is asked, once I answer > > it, post-command-hook runs. And it runs while we are in the minibuffer > > waiting for 'Some question'. > > Yikes! Then, can also check for window-minibuffer-p, but I feel that it > will be a fight against all kinds of edge cases. I haven't been able to make much progress on this bug in the last two weeks. Will try to send a patch in a few days, as the steps I gave above feels like an edge case which we won't see happening hopefully. -- Bhavin Gandhi (bhavin192) | https://geeksocket.in
Re: [BUG] org-auto-repeat-maybe: error "Can’t expand minibuffer to full frame" and missing log note
Bhavin Gandhi writes: >> Thanks for the idea, I'm exploring (recursion-depth), >> (minibuffer-depth). I will come up with a patch to fix this bug. > > So, I saved this-command and (recursion-depth) value, and I'm checking > for it in the org-add-log-note (attaching diff of my changes). But this > doesn't guarantee that we are not in the minibuffer when the > post-command-hook runs. > > This is what I did, and it failed after answering the question about 10 > repeated intervals: > 1. M-: (y-or-n-p "Some question") > 2. Now I switched to Org mode buffer. > 3. Did C-c C-t on the entry. > > When org-log-add-setup runs, (recursion-depth) is 1, and > (minibuffer-depth) is also 1. > Now, the question about 10 repeated intervals is asked, once I answer > it, post-command-hook runs. And it runs while we are in the minibuffer > waiting for 'Some question'. Yikes! Then, can also check for window-minibuffer-p, but I feel that it will be a fight against all kinds of edge cases. > So, I changed the second condition to (= (minibuffer-depth) 0). > This has a different effect when org-todo finishes the execution and we > are still in minibuffer: > this-command won't be org-todo again unless it is invoked again by the > user. org-add-log-note post-command-hook is never removed, and it keeps > executing as the condition is not fulfilled. > > I'm going through the code of org-add-log-note to see if we can avoid > calling (delete-other-windows) in the minibuffer. Or move out of minibuffer > and then proceed. what about (when (or (and (equal org-log-note-this-command this-command) (= org-log-note-recursion-depth (recursion-depth))) (> org-log-note-recursion-depth (recursion-depth))) Best, Ihor
Re: [BUG] org-auto-repeat-maybe: error "Can’t expand minibuffer to full frame" and missing log note
On Sat, 16 Jul 2022 at 14:50, Ihor Radchenko wrote: > > Seems like soon I will cross the TINYCHANGE limit, so I will get the > > FSF copyright assignment done. > > Note that FSF should reply within 5 working days. If not, we can help > you to push them. Thanks! I received the PDF to sign the next day after my email, this will probably take a couple of days more from my side as I'm talking with my employer. > Thanks for the idea, I'm exploring (recursion-depth), > (minibuffer-depth). I will come up with a patch to fix this bug. So, I saved this-command and (recursion-depth) value, and I'm checking for it in the org-add-log-note (attaching diff of my changes). But this doesn't guarantee that we are not in the minibuffer when the post-command-hook runs. This is what I did, and it failed after answering the question about 10 repeated intervals: 1. M-: (y-or-n-p "Some question") 2. Now I switched to Org mode buffer. 3. Did C-c C-t on the entry. When org-log-add-setup runs, (recursion-depth) is 1, and (minibuffer-depth) is also 1. Now, the question about 10 repeated intervals is asked, once I answer it, post-command-hook runs. And it runs while we are in the minibuffer waiting for 'Some question'. So, I changed the second condition to (= (minibuffer-depth) 0). This has a different effect when org-todo finishes the execution and we are still in minibuffer: this-command won't be org-todo again unless it is invoked again by the user. org-add-log-note post-command-hook is never removed, and it keeps executing as the condition is not fulfilled. I'm going through the code of org-add-log-note to see if we can avoid calling (delete-other-windows) in the minibuffer. Or move out of minibuffer and then proceed. diff --git a/lisp/org.el b/lisp/org.el index 3d4de5b4f..978850199 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -10146,6 +10146,8 @@ EXTRA is additional text that will be inserted into the notes buffer." org-log-note-how how org-log-note-extra extra org-log-note-effective-time (org-current-effective-time) +org-log-note-this-command this-command +org-log-note-recursion-depth (recursion-depth) org-log-setup t) (add-hook 'post-command-hook 'org-add-log-note 'append)) @@ -10174,6 +10176,8 @@ EXTRA is additional text that will be inserted into the notes buffer." (defun org-add-log-note (&optional _purpose) "Pop up a window for taking a note, and add this note later." + (when (and (equal org-log-note-this-command this-command) + (= org-log-note-recursion-depth (recursion-depth))) (remove-hook 'post-command-hook 'org-add-log-note) (setq org-log-setup nil) (setq org-log-note-window-configuration (current-window-configuration)) @@ -10204,7 +10208,7 @@ EXTRA is additional text that will be inserted into the notes buffer." (t (error "This should not happen") (when org-log-note-extra (insert org-log-note-extra)) (setq-local org-finish-function 'org-store-log-note) -(run-hooks 'org-log-buffer-setup-hook))) +(run-hooks 'org-log-buffer-setup-hook (defvar org-note-abort nil) ; dynamically scoped (defun org-store-log-note ()
Re: [BUG] org-auto-repeat-maybe: error "Can’t expand minibuffer to full frame" and missing log note
Bhavin Gandhi writes: > Seems like soon I will cross the TINYCHANGE limit, so I will get the > FSF copyright assignment done. Note that FSF should reply within 5 working days. If not, we can help you to push them. Best, Ihor
Re: [BUG] org-auto-repeat-maybe: error "Can’t expand minibuffer to full frame" and missing log note
On Mon, 11 Jul 2022 at 07:26, Ihor Radchenko wrote: > > Bhavin Gandhi writes: > > >> A better fix may relate to the fact that org-add-log-setup is usually > >> used to run org-add-log-note at the end of current command. y-or-n-p or > >> any other kind of command (e.g. added via advice) will break this > >> assumption we use. So, org-add-log-setup could also store > >> `this-command', say, in `org-log-note-this-command' and > >> `org-add-log-note' can then execute only when `this-command' is the same > >> with `org-log-note-this-command'. WDYT? > > > > I had something similar in my mind, something like we check if > > this-command is org-* (not very robust). Your idea makes sense to > > me. But this won't work when read-from-minibuffer is called as it > > doesn't seem to change this-command when it runs. > > Then, we will also need to save (recursion-depth) value and check for it > in addition to this-command. Thanks for the idea, I'm exploring (recursion-depth), (minibuffer-depth). I will come up with a patch to fix this bug. Seems like soon I will cross the TINYCHANGE limit, so I will get the FSF copyright assignment done. -- Bhavin Gandhi (bhavin192) | https://geeksocket.in
Re: [BUG] org-auto-repeat-maybe: error "Can’t expand minibuffer to full frame" and missing log note
Bhavin Gandhi writes: >> A better fix may relate to the fact that org-add-log-setup is usually >> used to run org-add-log-note at the end of current command. y-or-n-p or >> any other kind of command (e.g. added via advice) will break this >> assumption we use. So, org-add-log-setup could also store >> `this-command', say, in `org-log-note-this-command' and >> `org-add-log-note' can then execute only when `this-command' is the same >> with `org-log-note-this-command'. WDYT? > > I had something similar in my mind, something like we check if > this-command is org-* (not very robust). Your idea makes sense to > me. But this won't work when read-from-minibuffer is called as it > doesn't seem to change this-command when it runs. Then, we will also need to save (recursion-depth) value and check for it in addition to this-command. Best, Ihor
Re: [BUG] org-auto-repeat-maybe: error "Can’t expand minibuffer to full frame" and missing log note
On Mon, 4 Jul 2022 at 17:32, Ihor Radchenko wrote: > > While looking at the *Messages* buffer, I came across the command > > y-or-n-p-insert-y. There are commands for n, and other keys. When we > > press y, M-p etc, these commands get executed. So, even if we manage to > > fix the initial example in Emacs, the hook will still run while one is > > in the minibuffer. > > This explains the observed behavior. Apart from these commands triggering the post-command-hook, there is one additional time it gets executed. This is the place when y-or-n-p calls read-from-minibuffer. When read-from-minibuffer executes, this-command remains my-test-command. > A possible fix could be let-binding post-command-hook to > (delq #'org-add-log-note post-command-hook), though we may get a similar > issue in other context in future. > > A better fix may relate to the fact that org-add-log-setup is usually > used to run org-add-log-note at the end of current command. y-or-n-p or > any other kind of command (e.g. added via advice) will break this > assumption we use. So, org-add-log-setup could also store > `this-command', say, in `org-log-note-this-command' and > `org-add-log-note' can then execute only when `this-command' is the same > with `org-log-note-this-command'. WDYT? I had something similar in my mind, something like we check if this-command is org-* (not very robust). Your idea makes sense to me. But this won't work when read-from-minibuffer is called as it doesn't seem to change this-command when it runs. I had created an Emacs bug report: https://debbugs.gnu.org/56425 -- Bhavin Gandhi (bhavin192) | https://geeksocket.in
Re: [BUG] org-auto-repeat-maybe: error "Can’t expand minibuffer to full frame" and missing log note
Bhavin Gandhi writes: > While looking at the *Messages* buffer, I came across the command > y-or-n-p-insert-y. There are commands for n, and other keys. When we > press y, M-p etc, these commands get executed. So, even if we manage to > fix the initial example in Emacs, the hook will still run while one is > in the minibuffer. This explains the observed behavior. A possible fix could be let-binding post-command-hook to (delq #'org-add-log-note post-command-hook), though we may get a similar issue in other context in future. A better fix may relate to the fact that org-add-log-setup is usually used to run org-add-log-note at the end of current command. y-or-n-p or any other kind of command (e.g. added via advice) will break this assumption we use. So, org-add-log-setup could also store `this-command', say, in `org-log-note-this-command' and `org-add-log-note' can then execute only when `this-command' is the same with `org-log-note-this-command'. WDYT? Best, Ihor
Re: [BUG] org-auto-repeat-maybe: error "Can’t expand minibuffer to full frame" and missing log note
On Fri, 1 Jul 2022 at 07:43, Ihor Radchenko wrote: > > Currently, when we call `org-auto-repeat-maybe', it adds > > `org-add-log-note' to post-command-hook using `org-add-log-setup'. As > > soon as we reach the question about 10 repeater intervals (the call to > > `y-or-n-p' from `org-auto-repeat-maybe'), the post-command-hook gets > > executed.[1] > > Bhavin, did you have a chance to send a bug report on this to Emacs > devs? Haven't done that yet. But it seems like we will have to find a fix to make sure `delete-other-windows' is not called for the minibuffer. My modified example: (defvar my-hook-counter) (defun my-test-command () (interactive) (message "my-test-command: setting post-command-hook") (setq my-hook-counter 3) (add-hook 'post-command-hook 'my-own-hook) (y-or-n-p "Some question: ") (message "my-test-command: message after setting the hook") ) (defun my-own-hook () (print (format "hook: this: %s, real: %s, last: %s" this-command real-this-command last-command)) (message "my-own-hook: hopefully executing at the end") (setq my-hook-counter (- my-hook-counter 1)) (if (eq my-hook-counter 0) (remove-hook 'post-command-hook 'my-own-hook)) ) While looking at the *Messages* buffer, I came across the command y-or-n-p-insert-y. There are commands for n, and other keys. When we press y, M-p etc, these commands get executed. So, even if we manage to fix the initial example in Emacs, the hook will still run while one is in the minibuffer. -- Bhavin Gandhi (bhavin192) | https://geeksocket.in
Re: [BUG] org-auto-repeat-maybe: error "Can’t expand minibuffer to full frame" and missing log note
Bhavin Gandhi writes: > Currently, when we call `org-auto-repeat-maybe', it adds > `org-add-log-note' to post-command-hook using `org-add-log-setup'. As > soon as we reach the question about 10 repeater intervals (the call to > `y-or-n-p' from `org-auto-repeat-maybe'), the post-command-hook gets > executed.[1] Bhavin, did you have a chance to send a bug report on this to Emacs devs? Best, Ihor
[BUG] org-auto-repeat-maybe: error "Can’t expand minibuffer to full frame" and missing log note
On Mon, 13 Jun 2022 at 23:01, Bhavin Gandhi wrote: > > 1. emacs -Q > > 2. Create test.org with following content > > > > * TODO Repeating entry > > SCHEDULED: <2022-05-01 Mon ++2d> > > > > 3. C-c C-t on the entry, shows the above error. And shifts the scheduled > >date correctly. > > When this error appears, the log note entry about state change is not > added. I found this issue for the first time when I saw the state > change log notes were missing. > > If I do C-c C-t again on the same entry, we get the note. > - State "DONE" from "TODO" [2022-06-13 Mon 22:48] > > This is missing when we hit the error mentioned in the first mail. Confirmed. Trying to change the subject for Woof! for the first time, I hope I get it right. I remember reading this code around a year back, where we were fixing two bugs. 1. Bug: Duplicate logbook entry for repeated tasks: https://list.orgmode.org/orgmode/CAOn=hbcaW1R6vtun-E2r4LS=j3dp=vjqmjgtzy8uc1sypar...@mail.gmail.com/ 2. Bug: org-agenda-undo does not work with repeated tasks [9.4]: https://list.orgmode.org/87v98a8mes@gnu.org/ Currently, when we call `org-auto-repeat-maybe', it adds `org-add-log-note' to post-command-hook using `org-add-log-setup'. As soon as we reach the question about 10 repeater intervals (the call to `y-or-n-p' from `org-auto-repeat-maybe'), the post-command-hook gets executed.[1] So, we end up calling `delete-other-windows' while we are waiting for the user to respond with y/n. And this causes error "Can’t expand minibuffer to full frame". I don't know how to fix this issue yet, but I'm planning to add a test case for completing repeating tasks which need 10+ repeating intervals to shift the date. Maybe this is off-topic: I'm not sure why [1] happens, my assumption was Emacs will wait till all the functions finish executing, and then run the post-command-hooks. this-command remains org-todo (C-c C-t) throughout all the other calls done by org-todo as long as they are not commands i.e. org-auto-repeat-maybe etc. So, I tried following snippet: (defun my-test-command () (interactive) (message "my-test-command: setting post-command-hook") (add-hook 'post-command-hook 'my-own-hook) (y-or-n-p "Some question: ") (message "my-test-command: message after setting the hook") ) (defun my-own-hook () (remove-hook 'post-command-hook 'my-own-hook) (message "my-own-hook: hopefully executing at the end") ) In this case as well, as soon as it calls y-or-n-p, I can see "my-own-hook: hopefully executing at the end" in the minibuffer (while it is still waiting for user input). Is it expected? I read (info "(elisp)Command Overview") but couldn't understand this behavior. -- Bhavin Gandhi (bhavin192) | https://geeksocket.in
Re: error "Can’t expand minibuffer to full frame"
On 2021-02-22 09:42, Florian Lindner wrote: Hello, I try to configure my org mode (Org mode version ( @ /lhome/lindnfl/.emacs.d/elpa/org-9.4.4/)) to ask for a note and also for a specific property when moving a state to WAIT. For that I use (setq org-todo-keywords '((sequence "NEXT" "TODO" "WAIT(w@)" "|" "DONE(d!)" "NODO(n@)")) org-log-into-drawer t ) (defun flo/org-state-change() (when (string= org-state "WAIT") (org-set-property "DELEGATED_TO" (read-string "Delegate To: " (setq org-after-todo-state-change-hook 'flo/org-state-change) However, I suspect the state-change-hook and the note when leaving WAIT state conflict: Error in post-command-hook (org-add-log-note): (error "Can’t expand minibuffer to full frame") resulting in that I am only asked to set the property, note the note. What can i do about it? I don't really care in which order I enter the two note / property. Thanks, Florian I seem to recall having a similar conflict. In my case, I realized that the calling script "kept going" instead of waiting for the note entry to be completed. Therefore, try and make sure that org-log-into-drawer gets called "last." I am pretty sure this will require digging into Org internals to see in what order things go. Sorry if that's vague, it's been a while since I dealt with this. And it may or may not even actually be your problem. Cheers, TRS-80
error "Can’t expand minibuffer to full frame"
Hello, I try to configure my org mode (Org mode version ( @ /lhome/lindnfl/.emacs.d/elpa/org-9.4.4/)) to ask for a note and also for a specific property when moving a state to WAIT. For that I use (setq org-todo-keywords '((sequence "NEXT" "TODO" "WAIT(w@)" "|" "DONE(d!)" "NODO(n@)")) org-log-into-drawer t ) (defun flo/org-state-change() (when (string= org-state "WAIT") (org-set-property "DELEGATED_TO" (read-string "Delegate To: " (setq org-after-todo-state-change-hook 'flo/org-state-change) However, I suspect the state-change-hook and the note when leaving WAIT state conflict: Error in post-command-hook (org-add-log-note): (error "Can’t expand minibuffer to full frame") resulting in that I am only asked to set the property, note the note. What can i do about it? I don't really care in which order I enter the two note / property. Thanks, Florian