From: "Pascal J. Bourguignon" <pjb@informatimago.com>
To: help-gnu-emacs@gnu.org
Subject: Re: post-command-hook to slow?
Date: Fri, 06 Jun 2014 20:47:15 +0200 [thread overview]
Message-ID: <87d2el50zw.fsf@kuiper.lan.informatimago.com> (raw)
In-Reply-To: mailman.3167.1402076299.1147.help-gnu-emacs@gnu.org
Thorsten Jolitz <tjolitz@gmail.com> 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 !"
next prev parent reply other threads:[~2014-06-06 18:47 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.3007.1401978250.1147.help-gnu-emacs@gnu.org>
2014-06-05 17:29 ` post-command-hook to slow? Pascal J. Bourguignon
2014-06-05 18:11 ` Thorsten Jolitz
[not found] ` <mailman.3038.1401991947.1147.help-gnu-emacs@gnu.org>
2014-06-05 20:19 ` Pascal J. Bourguignon
2014-06-05 21:09 ` Thorsten Jolitz
[not found] ` <mailman.3061.1402002590.1147.help-gnu-emacs@gnu.org>
2014-06-05 23:05 ` Pascal J. Bourguignon
2014-06-06 17:37 ` Thorsten Jolitz
[not found] ` <mailman.3167.1402076299.1147.help-gnu-emacs@gnu.org>
2014-06-06 18:47 ` Pascal J. Bourguignon [this message]
2014-06-05 14:23 Thorsten Jolitz
2014-06-06 2:27 ` Stefan Monnier
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87d2el50zw.fsf@kuiper.lan.informatimago.com \
--to=pjb@informatimago.com \
--cc=help-gnu-emacs@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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.