From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:5f26::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id GCTyHHdzimXmHQEAkFu2QA (envelope-from ) for ; Tue, 26 Dec 2023 07:32:23 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id ADbkF3dzimWcUQEAqHPOHw (envelope-from ) for ; Tue, 26 Dec 2023 07:32:23 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=none; 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"; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1703572343; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=Hzqli2N9Ox4hHIPvVBKiGC3cV9dcYs16K5km4GVEx9c=; b=qFPzUxov7VrJIYF9NGQtzFfDlCk5pKNUHPQF03UGv5FHvEkDIDFvcMwd59lTohKE6sCHi3 50oQVQYj/wbzXZ8nZRHlzckjz8iFwhjlK8f1IrtTwlAYFGHDX1AmK+aDk1nqi6vvmIebLi MqZmN2TScQqResD87sKFK+FU8lSQxcSijdFIt7nIeXWv48DvOrmAjgbfny+g8UXETwS7Gi lRP2OUcOqrO32p5pmyZCX2JtFu0lmlGjqp+1I4gfUxG5oS/El9PmS1S9+Z0ZdRPTfNXGWs UheT2uAgVp1yq57ckR2HtZX3mx33+y3tZ0qiYkQ1rc6zEDxaTn/P15NmPANc/g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; 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"; dmarc=none ARC-Seal: i=1; s=key1; d=yhetil.org; t=1703572343; a=rsa-sha256; cv=none; b=UHWKMemxe61/qtMGPeBzV2176AsfH6KV7njhKvyptv61v9cwqX8F+wWdmcxhimBpk8RXud ws54uy/8iwiyEu2N7j+1m0Gk52C5nytvCakkFKo6K+P9iAqC4jm4TdMLwiGIPBdux5s24U ay4UFD3MY7ZS09Zjo7Gaxyz4iUCfQon1OU8msgJqyHOtVkT1wo3RZ6rrQ30EVDo7kmO0Xt NMD/+8c2GKSSQ4r3pjUdX17uLRynIPshkIaScwlgwxAnubqb7pFWbxgcIHOlRRsjEIjHJR wiSxtRFs0lUDUVrkX3jma4tRj8elCEn7Mx1q178N4GvTIGGXwH+nw5c7XWRl5w== 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 848DE5CE33 for ; Tue, 26 Dec 2023 07:32:22 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rI0yS-0005fM-4G; Tue, 26 Dec 2023 01:31:32 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rI0yQ-0005ev-H1 for emacs-orgmode@gnu.org; Tue, 26 Dec 2023 01:31:30 -0500 Received: from phubs.tethera.net ([192.99.9.157]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rI0yO-0005lC-Is for emacs-orgmode@gnu.org; Tue, 26 Dec 2023 01:31:30 -0500 Received: from tethera.net (node-1w7jr9sq6r285hb4jzty0djso.ipv6.telus.net [IPv6:2001:569:bbf1:a00:6170:61c6:96ed:fd78]) by phubs.tethera.net (Postfix) with ESMTPS id 0BC8B180066 for ; Tue, 26 Dec 2023 02:31:26 -0400 (AST) Received: (nullmailer pid 1494240 invoked by uid 1000); Tue, 26 Dec 2023 06:31:24 -0000 From: David Bremner To: emacs-orgmode@gnu.org Subject: Re: custom function for org-babel src block export In-Reply-To: <87jzp1hf6i.fsf@tethera.net> References: <87r0jagdg1.fsf@tethera.net> <877cl2lzcz.fsf@localhost> <87jzp1hf6i.fsf@tethera.net> Date: Mon, 25 Dec 2023 22:31:24 -0800 Message-ID: <87h6k5h3ur.fsf@tethera.net> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=192.99.9.157; envelope-from=david@tethera.net; helo=phubs.tethera.net X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -5.09 X-Spam-Score: -5.09 X-Migadu-Queue-Id: 848DE5CE33 X-Migadu-Scanner: mx10.migadu.com X-TUID: f2cwR1v/9dhn David Bremner writes: > Ihor Radchenko writes: > >> David Bremner writes: >> >>> I am generating slides using org-beamer. I would like certain code >>> blocks to export as links containing URL-encoded content of the >>> block. >> >> Check out https://orgmode.org/manual/Advanced-Export-Configuration.html >> You may use export filter or extend ox-beamer backend, creating a new >> custom backend that will export your code blocks as desired. >> > > Thanks for the suggestion(s). > > I tried defining org-export-filter-src-block-functions (see end) > but I encountered two issues > My "good enough for now" solution is to use a second emacs-lisp code block as below. This requires a bit of care to keep the link in sync with the exported code, but is otherwise workable. #+name: smol-test #+begin_src smol (deffun (f x) (+ x 1)) #+end_src #+begin_src emacs-lisp :eval true :exports results :noweb yes :results value latex (db-stacker-link "<>") #+end_src #+results: #+begin_export latex \href{https://www.example.com/stacker/?program=%28deffun%20%28f%20x%29%20%28+%20x%201%29%29}{execute on stacker} #+end_export