From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:1008:1e59::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms1.migadu.com with LMTPS id eDEOG+IuV2bh2wAAA41jLg (envelope-from ) for ; Wed, 29 May 2024 15:34:26 +0200 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id 2Ai8F+IuV2ao9wAA62LTzQ (envelope-from ) for ; Wed, 29 May 2024 15:34:26 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=OdsLfATa; dmarc=pass (policy=none) header.from=posteo.net; 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" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1716989666; a=rsa-sha256; cv=none; b=g7641c0TWsLoyyDAAuJfYdfp3cR+sE6dZiuq4bHY5NEvqsG8bo7xhETpnFb9PaT2xqBuUC 3ggI15vDHmCtgNN0ONIiQOnK+0L9+ZCOYB62eZplJ2SvN38meX+ZPeUmCLJ4vV4lMwS8Gt PlLH1AL0BIRAd2TwgNbB3a9+BIZ80hoVInJt0zeKO9r6mRsY809srnp9/M1YbbfNh18s0e FMZ7QayL9vPnkiFpTjEbXKSXoK3wTmcvDeCfsZ6fVpxSUsB7ilU7z49botgUMMwyE53Fih KpGpZK4Mma3bG4kVvBSgbz9LUFbrToqv821MTVdFSn5yzwOeHUAdztsmFZQTVA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=OdsLfATa; dmarc=pass (policy=none) header.from=posteo.net; 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1716989666; 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=nnPJM2EJVRkEehPaldpGJUiJUTKxgdHihx8C+sDd5qs=; b=d6RwJvgOdaxOTJ6ikeaQaCq2o23FDDJHRCjfOuAziHiPW2ryKfCtyy2cp2tGUfvB2P7KCf RzZgjoO9OxQT4yRtqTxoO/9gyop4oodt9AaLyech01pIlvqx/xpUsU/zCVlcGBEFEnqt4K 1FBuwXEoePdbdCo0D8T87WR+EMLw0SlFfUUoY0SFo2Sz77PZDAqfR0w/BJ4oMx5amd7com 3qxmHKDGykW3PxGJBjpVmXrheMpziAX04ontOq79LOs4U2bYWQaEv/zjccb0fmrXC3/ckP 1UJiGiz8hOVyoOgpCIR5wyE69BZWUUMS+FLKM+ZrFvnlma+98Qc/I0/8E+pKSw== 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 D75B062791 for ; Wed, 29 May 2024 15:34:25 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sCJR1-00037m-Ex; Wed, 29 May 2024 09:33:43 -0400 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 1sCJR0-00037H-2p for emacs-orgmode@gnu.org; Wed, 29 May 2024 09:33:42 -0400 Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sCJQx-0007hE-Pj for emacs-orgmode@gnu.org; Wed, 29 May 2024 09:33:41 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id B6AF5240101 for ; Wed, 29 May 2024 15:33:35 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1716989615; bh=hZkrScedEeQjkL11KTs3JMGg/ESMb1TIW39SUFj9ras=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: From; b=OdsLfATaMo5W3/PbfTLiKaEpQiUGdPAbMlenDv4oKWjkzwTzYmxDKiBXg95orNg1P bn+3VVUg6i9vLzMfSlTXZtA4dIcVzvp7LAgYy2T1DQ+yoUsc+dSDGNgosILxl495NK v564YtOMsXld0KGK1O7tpAhWa/YZR3ovCcfSCQwXNSWfVHBvJsh7x9UDXvDkumHlzq xxjUgkjlDk6ewGYkmBJuVSDmVivhG4UEdGGPU/hTcxXfmO1Oz9EpQRqqaQzVcnWsPz 3J0mbvlDzpPxQVANU0wmMGHbOE4V0nT3BlkbbhtXY9Y8di8/wqKeOhMAfXFvzDpHIZ v0w88wxQ1XT3A== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Vq9M31rqzz6tvx; Wed, 29 May 2024 15:33:35 +0200 (CEST) From: Ihor Radchenko To: Martin Steffen Cc: emacs-orgmode@gnu.org Subject: Re: question about links, macros + org-publish and "parametrization" In-Reply-To: References: Date: Wed, 29 May 2024 13:35:17 +0000 Message-ID: <87r0dk7nca.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.66; envelope-from=yantar92@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=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-Queue-Id: D75B062791 X-Migadu-Scanner: mx12.migadu.com X-Migadu-Spam-Score: -6.98 X-Spam-Score: -6.98 X-TUID: IUDrDQejV2dq Martin Steffen writes: > The way I make that smooth is I define > > #LINK: exercises-web https://www.gitpages.io/somelecture/fall23/exercises > > ... > So I am happy with that, but I wonder if I could make it even more > parametrized. Like > > > combining macros with links > > > like that "fall23" is an argument to a macros, which then builds up a > link. But that does not to work in a naive way, like > > > #+MACRO: semester fall24 > #+LINK: https://www.gitpages.io/somelecture/{{{semester}}}/exercises > ... > where semester is a macro, not a literal "fall24". The second reason is > that the use as in (*) is not really useful, what I am really after is > something like > > [[parametricexercizes(fall24)][the exercises are here]] The simplest thing you can use is #+LINK: exercises-web https://www.gitpages.io/somelecture/%s/exercises [[exercises-web:fall24][the exercises are here]] If you need something more complex, check out %(my-function) placeholder instead of %s as described in "Link Abbreviations" section of Org manual. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at