From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id MB0yCP6DKWPpJQEAbAwnHQ (envelope-from ) for ; Tue, 20 Sep 2022 11:12:30 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id GMdACP6DKWM1SwEA9RJhRA (envelope-from ) for ; Tue, 20 Sep 2022 11:12:30 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 9724F2A08B for ; Tue, 20 Sep 2022 11:12:29 +0200 (CEST) Received: from localhost ([::1]:33094 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oaZIq-0002t0-4V for larch@yhetil.org; Tue, 20 Sep 2022 05:12:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38160) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oaYsR-0006Hp-TW for emacs-orgmode@gnu.org; Tue, 20 Sep 2022 04:45:12 -0400 Received: from mail-pl1-x629.google.com ([2607:f8b0:4864:20::629]:37598) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oaYsP-0002vz-Sn for emacs-orgmode@gnu.org; Tue, 20 Sep 2022 04:45:11 -0400 Received: by mail-pl1-x629.google.com with SMTP id d24so1688616pls.4 for ; Tue, 20 Sep 2022 01:45:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:from:to:cc:subject:date; bh=7yw7jFJL41IIXDcB2ZSfImeYdKA2UCQbshA5i0hRUbg=; b=aQH1ChQRgn88hnHFnFA0JhmUqJmnOIKCMZd8he6bPS3kq5oh1PthvLakohxry1H05M vprGfXKaeYrotn1ft2F6TKXHam1C0vBDmR4uodKkyOaRKfMruoU0INyQ4TRp5bbPlaJB yZZqr5GHvc2Oir44OCIDd++XQ5+Rru2Cy93Xt5YjxsIXq+BqKw8JPdT42t3IXFYDM8rz ZxUhR8GHS1Di9iWwLE5WYK5VVUWBZpnql0pVpIse0TB7wE80mjLlzCmRSXFUfaZv8C2W mxleZe7ZClk3w66GMqUYctQhQV+D2a7JaLspfp5Sx0V3z+LKDjMNhhTwQivMXy2GL5ur VZlw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date; bh=7yw7jFJL41IIXDcB2ZSfImeYdKA2UCQbshA5i0hRUbg=; b=LOxgpbF1ejtqqvKBRxXjj90qHpPXSTu6PvZliJvJ9kg3Gtq1qAVFygDlx0EBBw2pVD gEtf6FTX3l6chBxQUi8nRLvE2Ni0G4kMdQaxV0CCRNghmw+rb3KKW+OArZukxOUdlLgc RWNQ+Z/iNhC7IiIiK78fOWUAX87BmD0VP+f1mc5FMW/lN/yAmLYUZT1FgpvwFTu2lDTo 1stGPhwHTk4P1jvEL37OD7pvdynt8JuwmGbuOoZq9TcImatSgOnX7SLUOQlZlrhiHTRn s6S+41ouL1XP6ZM41fG2JsRKMQXaVEDBlQGfPgLLerDAWAKKny5KDtYaHn0KNFSolHPR GdCw== X-Gm-Message-State: ACrzQf372UY/Z3ySnvASDY1YGj3jMRmVXsqU4CNpoRpnOFTCtJ8OgMmq vlg//dl7Str8z0V5nKTHDqI= X-Google-Smtp-Source: AMsMyM5BySiuzOtgScKhGbBdaUgbJ+/xyELM1SfwD4KKMf2GLHmQmKajtEoTnidsSh4SRcC2owMqkw== X-Received: by 2002:a17:90a:f0c9:b0:200:b3d1:c4b0 with SMTP id fa9-20020a17090af0c900b00200b3d1c4b0mr2740267pjb.105.1663663507366; Tue, 20 Sep 2022 01:45:07 -0700 (PDT) Received: from localhost ([2409:8970:a80:3a4:8ec6:81ff:fe70:339d]) by smtp.gmail.com with ESMTPSA id e11-20020a63db0b000000b004393f60db36sm978955pgg.32.2022.09.20.01.45.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Sep 2022 01:45:05 -0700 (PDT) From: Ihor Radchenko To: Timothy Cc: emacs-orgmode@gnu.org Subject: Re: [PATCH] Add org-babel-tangle-finished hook In-Reply-To: <87fsgpz876.fsf@tec.tecosaur.net> References: <87fsgpz876.fsf@tec.tecosaur.net> Date: Tue, 20 Sep 2022 16:45:56 +0800 Message-ID: <87illiqvqz.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::629; envelope-from=yantar92@gmail.com; helo=mail-pl1-x629.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1663665149; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=7yw7jFJL41IIXDcB2ZSfImeYdKA2UCQbshA5i0hRUbg=; b=BnagWuK70bPqlR9UymM2ArpL8i5vl783jM4B1qZfH6D3t5Fpbi+cayJbX7u6tGs9ZqP7aL fXu6DfKZviCKbKMSAX5d0DPZwxj2qKCWEft7ea2Dd4ez4faDN27BxmrWWoa5KCpa+sG9ia vP0MVwX1XHej+v0II9sEfVigXa2/B1uKWf34obthY30YodO2SClQnvFhzmlMrfzY5fcRUz d6S78ToHDXmqpcfi0MOqkjSWnBgCQDBKUwO2wfBY22H3i17ljfzTckdIcwlLQvTse4iI6g dZcHHa8V9FwmcAKrOZFETCC9/DxD9R2/zvZ6iRwe3OwU338lQCcj57JHy+sAmg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1663665149; a=rsa-sha256; cv=none; b=QZYfDqlCJaZl4bFRkKS30Jy9aaXRwxN5soaVmYIrMJq3D0JIetHEelQS2+y3lDC2ZRq63N h+PX0lDJDFwUqXTFxHVGGhOvf/G8JFIaP76KKYRUcMwHBuotVxKzdhn82EhLJzgmX061zO fBfvzzA6vXP3xGwfwL1KvpEnE7Loy4JrwPpCKjjPhdiUM4Fu3VU/kHU0ruVrpm0Ln4G+UA tI1z15Xs42qMXT79Y5yK2zZTuHjhpDxti++EPafKP66EKDwV2bwWNOEBX9k0b+yt+171q6 Ex3sGvliaNxHzsY4fitrW7sdSBHZTCxi8wrHdhX1FNDwpltBWi5LGYAv34pyQQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=aQH1ChQR; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -1.84 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=aQH1ChQR; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 9724F2A08B X-Spam-Score: -1.84 X-Migadu-Scanner: scn1.migadu.com X-TUID: sZ8ySDEZNmOe Timothy 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 > 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