From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id +RWyCKe47GAZmQAAgWs5BA (envelope-from ) for ; Mon, 12 Jul 2021 23:48:23 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id eAa6A6e47GDDLAAAbx9fmQ (envelope-from ) for ; Mon, 12 Jul 2021 21:48:23 +0000 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 99A52150F7 for ; Mon, 12 Jul 2021 23:48:22 +0200 (CEST) Received: from localhost ([::1]:52658 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m33mn-0005eY-6P for larch@yhetil.org; Mon, 12 Jul 2021 17:48:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49342) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m33mO-0005eN-4i for emacs-orgmode@gnu.org; Mon, 12 Jul 2021 17:47:56 -0400 Received: from mail-lj1-x233.google.com ([2a00:1450:4864:20::233]:41738) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m33mL-0001ly-LO for emacs-orgmode@gnu.org; Mon, 12 Jul 2021 17:47:55 -0400 Received: by mail-lj1-x233.google.com with SMTP id e20so26598876ljn.8 for ; Mon, 12 Jul 2021 14:47:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=Cm1VfqSbUQ++MIQL2WdYOvjjYF714gTte1yJpdCDLxU=; b=Kw04IeUUQgPTHULfvU03n6Z14+favS5VKkZ5Nigp5Lc5JKKiGJzTpjpqzNpSAi17Ez jEp1HKe5Bh6ctFsGVnt+kAw1aeBOo9jw1QpnZ7NI0GRNvbuHe1HCQU6lVdaixH5b5Mol Cn+kfRgb343WIulmKxskPuhWBDUCbTtUhLNKT2NmB4nhdN2/C1QQkSk7p/bYNRpXM2Bk 1fFYPwnJ5NmyzA32pUuDRTsJJKlwtwh8IYOPdPGDu9N4SmSoULw9STtmOAUxLdaLz000 eK9pWLyetb3Xo8hUapxfXydvWDjjfRw7AFVtDQKdjWjhUE3rqoJpMsZE9M/p4bL2JMOm 6PvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=Cm1VfqSbUQ++MIQL2WdYOvjjYF714gTte1yJpdCDLxU=; b=UvcKZPE6lt4YPgMfpALvj4Pp9is7YqX+s1JvGYXwpJSwxC+PYeJikDQK8jyeDq49eB DigSQtYB01UrBqSNnoly6+FEW1eVsmGQaMlKvcFlmgRnpoMIvAi5aNPrsf8a8DFDbr3b 7tMGkE06QSO5VU4fVpZv3JJdrwIyiFV0EuEEEHbghBSYRW4j+uMZaSExWTh7M1qlL4F4 cWwzxkSGNchIyv/lD4zr1ifidzE8E0qqCOH2enibYMX78VM1n3/aHmyC6GYMaSVRFALT b0bMmgLv5fYSO69CjWMK+2bintZBFnHq15fnxx5E6CoLfkYntkl0upvnSgJp/ySAcOJX x94A== X-Gm-Message-State: AOAM531pg5r6kSvOq/Vqog3dYCZJnt6g38+S/J6csXAO5oR284cDptGm SdrgnkOj1L1bygXkkgjie4ex0y7GZwGjF9TQeEG2PpQ2r8I= X-Google-Smtp-Source: ABdhPJy2MSzapaLzeQwZjE7Q/rxdFtlqbhbWVE48y8Vo1f2AwHyuSsn96FJArW8hEuXX2MuDV/MiDyneWoILdETIiWw= X-Received: by 2002:a2e:95cc:: with SMTP id y12mr1133571ljh.360.1626126470096; Mon, 12 Jul 2021 14:47:50 -0700 (PDT) MIME-Version: 1.0 From: Matt Price Date: Mon, 12 Jul 2021 17:47:38 -0400 Message-ID: Subject: conditionally add heading to tree on export To: Org Mode Content-Type: multipart/alternative; boundary="0000000000009c298e05c6f4127c" Received-SPF: pass client-ip=2a00:1450:4864:20::233; envelope-from=moptop99@gmail.com; helo=mail-lj1-x233.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, HTML_MESSAGE=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.23 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 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1626126502; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=Cm1VfqSbUQ++MIQL2WdYOvjjYF714gTte1yJpdCDLxU=; b=pPnQ0hMOElNhvK8eHcoH36j5N6IAe26J7a1YTN1diKq8LFacEUotMz8iSNNMDo05SCSXj3 kMKWujncy10rT1MwVfIghYGBiEGHmG+rAcRydGc45/ywSyEkoXwQ22qAMWHjDO5vak2WW3 W6uSgXMwr97zK+cldvLrYS9bbMeZRweJO+6yqlbkG+xLKXBkcVo1j6/BTj3LJ6nydVphs/ +gnP6szrNLalzLRt6O5clapN75tqvh6tlJHg21tn/r9ClwRsLhXiChYPpTcrEhlr5ZseSC IfRukyqxA5lxs7d7PEWDbuP4MB+Ht8D8D8u3BXqmkbkXrzH2P7TfNOmy+oFO8A== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1626126502; a=rsa-sha256; cv=none; b=evmA91Maq9tkKCx8ycAkM2PZopjcLpk4z6V3g2xTPd+jGra8DNi9U4Gxe27y0qe5Y0N7WL NygjBWNwNv3S94b6REG7lNHTXXxUfbSs38iAVlwY7y9lD923eIqn3sS/lV/rcz7hJn9NQy 6piv2YVxw6/nIsHw0U6AJpjx5oFrOVdQUOxlzK4ykhlAH2rY/tRtW+L6Y82YvjJuyCV6Zm 9ebdfYBsuqM8lENg3lqcKpCTjCBki65QxFufV2XELCtyiVOUv+HgNDt93ppPMzO742KRC+ e9xlo6d+vTCjK/Ta1dKbYu27AS9tWozRoSj61B9Pq4nMVqH8Qw1+ZnTDUH/KXA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=Kw04IeUU; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Spam-Score: -3.10 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=Kw04IeUU; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: 99A52150F7 X-Spam-Score: -3.10 X-Migadu-Scanner: scn0.migadu.com X-TUID: tevRccUssL4D --0000000000009c298e05c6f4127c Content-Type: text/plain; charset="UTF-8" Hi everyone, Now that org-cite is working (!!!), I am incrementally updating all my lecture slides to use proper citations. This is mostly quite simple, but I find that in the rush before class I am often forgetting to add a new slide with *both* the #+print_bibliography: line that will generate a bibliography, *and* a :CUSTOM_ID: property set to ~bibliography~, which is required for working links around citation objects. I'd like to check to see whether a slide with :CUSTOM_ID of ~bibliography~ exists, and if not, insert a heading at the end of the exported text (either the file or a subtree), something like ** Sources :PROPERTIES: :CUSTOM_ID: bibliography :END: #+print_bibliography: What is the appropriate way for me to do this as an end user who doesn't want to write his own derived backend? Is the appropriate process to write a function that inspects and modifies the parse tree, and then add that function to ~org-export-filter-body-functions~? In fact, I wonder if I want to do this for all HTML export that contains citation objects. What do other people think about that idea? Thanks as always, Matt --0000000000009c298e05c6f4127c Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi everyone,

Now that org-ci= te is working (!!!), I am incrementally updating all my lecture slides to u= se proper citations.=C2=A0 This is mostly quite simple, but I find that in = the rush before class I am often forgetting to add a new slide with *both* = the

#+print_bibliography:

line that will generate a bibliography, *and* a :CUSTOM_ID: property = set to ~bibliography~, which is required for working links around citation = objects.=C2=A0

I'd like to check to see w= hether a slide with :CUSTOM_ID of ~bibliography~ exists, and if not, insert= a heading at the end of the exported text (either the file or a subtree), = something like

** Sources
:PROPERTIES:
:CUSTOM_ID: bibliography
:END:
#+print_bibliog= raphy:


What is the appropriate way = for me to do this as an end user who doesn't want to write his own deri= ved backend? Is the appropriate process to write a function that inspects a= nd modifies the parse tree, and then add that function to ~org-export-filte= r-body-functions~?

In fact, I wonder if I want to = do this for all HTML export that contains citation objects. What do other p= eople think about that idea?

Thanks as always,
Matt
--0000000000009c298e05c6f4127c--