From: thunk2@arcor.de (Thomas Plass)
To: emacs-orgmode@gnu.org
Subject: bug? 'org-ctrl-c-ctrl-c-final-hook not run
Date: Sun, 17 Mar 2019 19:53:20 +0100 [thread overview]
Message-ID: <23694.38816.468259.88211@AGAME7.local> (raw)
This is a question for Org API users regarding
'org-ctrl-c-ctrl-c-final-hook and how it is to be understood.
As per the docstring
This can be used to add additional functionality to the C-c C-c key
which executes context-dependent commands. This hook is run after
any other test, ...
should the 'message in the hook function below be executed?
(add-hook 'org-ctrl-c-ctrl-c-final-hook
(function (lambda ()
(message "org-ctrl-c-ctrl-c-final-hook called from %s"
(org-element-type (org-element-context)))
t)))
In fact, the hook isn't run at all, although it makes no assumptions
whatsoever about its context.
Is this the way things are intended or is this behaviour a bug?
What I'm trying to achieve is to post-process a standard Org element.
However, my target element is already taken care of by one of the
patterns in 'ctrl-c-ctrl-c, so the hook-caller is never reached.
As a workaround, I take advantage of the rest of the above docstring
... while ‘org-ctrl-c-ctrl-c-hook’ is run before the first test.
and add to this hook a function that recursively calls
'org-ctrl-c-ctrl-c before it does its own work - which seems
incredibly kludgy.
Thanks for any feedback.
Regards
Thomas
next reply other threads:[~2019-03-17 19:05 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-17 18:53 Thomas Plass [this message]
2019-03-17 19:42 ` bug? 'org-ctrl-c-ctrl-c-final-hook not run Marco Wahl
2019-03-17 20:50 ` Thomas Plass
2019-03-18 8:03 ` Marco Wahl
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=23694.38816.468259.88211@AGAME7.local \
--to=thunk2@arcor.de \
--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 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.