emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@gmail.com>
To: Timothy <orgmode@tec.tecosaur.net>
Cc: emacs-orgmode@gnu.org
Subject: Re: [PATCH] Add org-babel-tangle-finished hook
Date: Tue, 20 Sep 2022 16:45:56 +0800	[thread overview]
Message-ID: <87illiqvqz.fsf@localhost> (raw)
In-Reply-To: <87fsgpz876.fsf@tec.tecosaur.net>

Timothy <orgmode@tec.tecosaur.net> writes:

> +(defcustom org-babel-tangle-finished-hook nil
> +  "Hook run at the very end of `org-babel-tangle'.
> +In this way, it is the counterpart to `org-babel-pre-tangle-hook'."
> +  :group 'org-babel
> +  :package-version '(Org . "9.6")
> +  :type 'hook)

I'd also mention the active buffer when the hook is ran. (And also add
the relevant info to org-babel-pre-tangle-hook docstring)

> From 167d548bf0e3434aab7af40826f7f31b8174ea27 Mon Sep 17 00:00:00 2001
> From: TEC <git@tecosaur.net>
> Date: Sun, 28 Aug 2022 01:29:56 +0800
> Subject: [PATCH 2/3] manual: Document org-babel-tangle-finished-hook
>
> * etc/ORG-NEWS: Mention new hook, `org-babel-tangle-finished-hook'.
>
> * doc/org-manual.org (Tangle hooks): Mention new hook,
> `org-babel-tangle-finished-hook'.
> ---
>  doc/org-manual.org |  4 ++++
>  etc/ORG-NEWS       | 35 +++++++++++++++++++++--------------
>  2 files changed, 25 insertions(+), 14 deletions(-)
>
> diff --git a/doc/org-manual.org b/doc/org-manual.org
> index a37b8390c..2481d81e9 100644
> --- a/doc/org-manual.org
> +++ b/doc/org-manual.org
> @@ -18592,6 +18592,10 @@ *** Tangle hooks
>    ~org-babel-tangle~, making it suitable for post-processing,
>    compilation, and evaluation of code in the tangled files.
>  
> +- ~org-babel-tangle-finished-hook~ ::
> +  #+vindex: org-babel-tangle-finished-hook
> +This hook is run after post-tangle hooks, in the original buffer.

There is no indentation in the hook description. It will start a new
paragraph after the item.

-- 
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


  parent reply	other threads:[~2022-09-20  9:12 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-18  3:11 [PATCH] Add org-babel-tangle-finished hook Timothy
2022-09-18  3:29 ` Timothy
2022-09-20  8:45 ` Ihor Radchenko [this message]
2022-09-22  6:59   ` Timothy

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=87illiqvqz.fsf@localhost \
    --to=yantar92@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=orgmode@tec.tecosaur.net \
    /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).