help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: post-command-hook to slow?


From: Pascal J. Bourguignon
Subject: Re: post-command-hook to slow?
Date: Fri, 06 Jun 2014 20:47:15 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Thorsten Jolitz <address@hidden> writes:

> This is the way to go for me, since this is the way outorg works. I
> figured out how to do it more or less like this:
>
> #+begin_src emacs-lisp
> (defun outshine-use-outorg-finish-store-log-note ()
>   "Finish store-log-note and exit recursive edit"
>   (org-store-log-note)
>   (outorg-copy-edits-and-exit))
> #+end_src
>
> [these are just relevant excerpts, not a complete working function]
> #+begin_src emacs-lisp
>       (outorg-edit-as-org)
>       (call-interactively fun))
>       (when (marker-buffer org-log-note-marker)
>               (org-add-log-note)
>       (org-set-local
>        'org-finish-function
>        'outshine-use-outorg-finish-store-log-note))
> #+end_src
>
> This works fine in cases when org-add-log-note is actually called, but
> for state changes to e.g. TODO when no log is taken, the finish
> function and thus outorg-copy-edits-and-exit is never called, thus the
> *outorg-edit-buffer* stays around.
>
> To solve the problem completely I would need need something like
>
> #+begin_src emacs-lisp
>       (if (not (marker-buffer org-log-note-marker))
>         (outorg-copy-edits-and-exit)    
>               (org-add-log-note)
>       (org-set-local
>        'org-finish-function
>        'outshine-use-outorg-finish-store-log-note)))))
> #+end_src
>
> but this does not work ...


It should work, unless outorg-copy-edits-and-exit does or expects
something.  You should see what it does.
-- 
__Pascal Bourguignon__
http://www.informatimago.com/
"Le mercure monte ?  C'est le moment d'acheter !"


reply via email to

[Prev in Thread] Current Thread [Next in Thread]