From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:1008:1e59::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id wEZNGmnRimWcZAAAkFu2QA (envelope-from ) for ; Tue, 26 Dec 2023 14:13:13 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id EJU0F2nRimW65wAA62LTzQ (envelope-from ) for ; Tue, 26 Dec 2023 14:13:13 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=me.com header.s=1a1hai header.b=uMGSy0SD; 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=pass (policy=quarantine) header.from=me.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1703596393; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=A2OVZXk5n/oQ+HCSrf7fLiRBLdkY8lJMrXYe8Zd9IqQ=; b=CQfYZBcmCy1AazlondIBtrZDd0cxM0co1KqS1vcAb6F0E7xcMJrZVG9jzWRQyb5GHTbNbM BJLMu7LPXWHnqs0IPz5xnr6Dx1FAZVgT7KETv1uOf6iO3lm4xM3knrBQ1geMgICRHcFO+8 Okr/LhLJ88sPfz6g221yskK5N4mSjoRdOca2LrEnNF3JdWq82T1CadNbddGTs/BNSosItu AhZ8Vx2kv0wy8W/YEFoxgfJboN9p9XFIZoqZdxG6TjVUxbo5EJwjv5D7FFw0vV8a9/0doZ bZP/au1TvhWmj51J7jjTSiBNhv83kFJYEoOL+QPa3OaBnhHNJ3Nww3rrwelBIQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=me.com header.s=1a1hai header.b=uMGSy0SD; 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=pass (policy=quarantine) header.from=me.com ARC-Seal: i=1; s=key1; d=yhetil.org; t=1703596393; a=rsa-sha256; cv=none; b=U3MRwhqv2+w09f2DUk0OLy7KxlPLQvVch3dPvkaUEzjFrnbXpQIibu1Xcxv2hJUNVGWoWQ Igf4d4jGEL+wmdLo5gcUT5v+E07Xeg+aqFnUcPsW2WjTA7wE2Omnf8YBoudvT92yUOyDE6 okAKTfwUTlrt7mNQNL7ilPfNCdddg8CEiZECUY5HCuQZH44ClxCLrjmiPNO9tedMmeW/+D 1CamNSiXqx4jtsjAiGJy86PBUA9F+OaWAWCamJ/Py9xvQGrTy209E6Jw/3eqTPTBhrOPrJ Pgs6Fn6SaQFK6tml4nseZbkLEHcs+GFdhlYkTKBs6Lkuyg0kti2cFt+Uz7QO5Q== 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 221F1470EB for ; Tue, 26 Dec 2023 14:13:13 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rI7EL-0003DB-E8; Tue, 26 Dec 2023 08:12:21 -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 1rI7EJ-0003Cp-Or for emacs-orgmode@gnu.org; Tue, 26 Dec 2023 08:12:19 -0500 Received: from mr85p00im-ztdg06021801.me.com ([17.58.23.195]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rI7EH-0007V8-He for emacs-orgmode@gnu.org; Tue, 26 Dec 2023 08:12:19 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=me.com; s=1a1hai; t=1703596332; bh=A2OVZXk5n/oQ+HCSrf7fLiRBLdkY8lJMrXYe8Zd9IqQ=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type; b=uMGSy0SDCxQpELFWiMXbYbDMgIqZ381HA86vh4YV++eZM7S1M7l2qFpqGrtMejkcb cZdwcxqO8A90WkTCm4N/Y5Y7WOHVfoHVu8s8ECySAGcd++wcWH/TJfrOAeBrBPMca0 RJOQNCPgGOLcXVE3gjFP17PeEQMA9LTDTwcSbcUDZL0CQJCozBhOfOpf6U55qVmdvE 8WLfM0v0tQXWURFFlL/jp9euyOV4pwWcKEMM1SqxDGmvkuc7NSZwImEASvtML81aTK boo7yiVo/13ppVvAa65Jljsaete4zIiJvlOlr2C4hocQrLeKc3qQ2vEQvSR28qYPGu 55e6Fmj80aJUg== Received: from Rudolfs-MacBook-Air.local (mr38p00im-dlb-asmtp-mailmevip.me.com [17.57.152.18]) by mr85p00im-ztdg06021801.me.com (Postfix) with ESMTPSA id 9E978D00390; Tue, 26 Dec 2023 13:12:11 +0000 (UTC) From: Rudolf =?utf-8?Q?Adamkovi=C4=8D?= To: David Bremner , emacs-orgmode@gnu.org Subject: Re: custom function for org-babel src block export In-Reply-To: <87r0jagdg1.fsf@tethera.net> References: <87r0jagdg1.fsf@tethera.net> Date: Tue, 26 Dec 2023 14:12:08 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Proofpoint-ORIG-GUID: g_KGjcyNXtLXpVDSQlqEYI8yIAJ_eaA8 X-Proofpoint-GUID: g_KGjcyNXtLXpVDSQlqEYI8yIAJ_eaA8 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-12-26_06,2023-12-26_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 clxscore=1011 spamscore=0 adultscore=0 bulkscore=0 mlxlogscore=427 suspectscore=0 malwarescore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2308100000 definitions=main-2312260100 Received-SPF: pass client-ip=17.58.23.195; envelope-from=salutis@me.com; helo=mr85p00im-ztdg06021801.me.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.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_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, 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-Scanner: mx13.migadu.com X-Migadu-Spam-Score: -5.29 X-Spam-Score: -5.29 X-Migadu-Queue-Id: 221F1470EB X-TUID: VFX+oxzJBkUd How about: (defvar stacker-base "\href{https://www.example.com/stacker/?program=3D%s}{execute on stacker}= ") (defun org-babel-execute:stacker (body params) (format stacker-base=20 (org-link-encode body '(?? ? ?( ?) ?\n)))) It works with noweb too: #+NAME: last #+BEGIN_SRC stacker :eval no (f) #+END_SRC #+BEGIN_SRC stacker :noweb yes (defvar x 1) (deffun (f) (defvar y 2) (deffun (h) (+ x y)) (h)) <> #+END_SRC #+RESULTS: : href{https://www.example.com/stacker/?program=3D%28defvar%20x%201%29%0A%2= 8deffun%20%28f%29%0A%20%20%28defvar%20y%202%29%0A%20%20%28deffun%20%28h%29%= 0A%20%20%20%20%28+%20x%20y%29%29%0A%20%20%28h%29%29%0A%28f%29}{execute on s= tacker} Rudy --=20 "Genius is 1% inspiration and 99% perspiration." --- Thomas Alva Edison, 1932 Rudolf Adamkovi=C4=8D [he/him] Studenohorsk=C3=A1 25 84103 Bratislava Slovakia