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 ms0.migadu.com with LMTPS id qKjlBa7fEmKwOQAAgWs5BA (envelope-from ) for ; Mon, 21 Feb 2022 01:41:18 +0100 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 iCc+A67fEmJYhQEA9RJhRA (envelope-from ) for ; Mon, 21 Feb 2022 01:41:18 +0100 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 E5A583ED45 for ; Mon, 21 Feb 2022 01:41:16 +0100 (CET) Received: from localhost ([::1]:35196 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nLwlG-0005kL-ND for larch@yhetil.org; Sun, 20 Feb 2022 19:41:06 -0500 Received: from eggs.gnu.org ([209.51.188.92]:59656) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nLwiu-0005k2-4B for emacs-orgmode@gnu.org; Sun, 20 Feb 2022 19:38:42 -0500 Received: from wout2-smtp.messagingengine.com ([64.147.123.25]:49063) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nLwin-0002BV-Mh for emacs-orgmode@gnu.org; Sun, 20 Feb 2022 19:38:35 -0500 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id 802863200993 for ; Sun, 20 Feb 2022 19:38:28 -0500 (EST) Received: from imap49 ([10.202.2.99]) by compute2.internal (MEProxy); Sun, 20 Feb 2022 19:38:28 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.com; h= cc:content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm2; bh=sx4r+H6az2zM27jmvOrAUcLucYKSs3eZxCVBV7 BNjpc=; b=E0ymjSY15ENfPn/mhWqMvuo7SCRoVed9wvf4+5Upqc31ILnv8lPK2u TqhEzmMElJlu/b4aGmm0tJiDuEsaHl/+HHPnVsvbxtuo1+KUqpyn3ZGJcEB/222a 1CaD2j9S8BE8kuizrT6RQzaQRs8c4izH2EvOWXC37N3mEraPWcoc9MzNn2iXbWTu qgE97qi81AAL+FBxw6/wmsSEOVNOKRnhXEoSrVzdEUvArqt8RF/aVtIYa2ssmjPb YuUFpwAHHLB/PvDitvdMbFjgjLKe2MpbVww2W8N89GupVePEbIqwl9xV72MkjIvd cPcBHizZD9QG+p9O7HHrJYgxqrXN12dA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=sx4r+H6az2zM27jmv OrAUcLucYKSs3eZxCVBV7BNjpc=; b=kxcx2dR6mF4EpGNHVPiAa9PpUynI9cm6Z QpdXmaGCpSZGtx79JeCj7ZnTvZv/KMPqUsTwVxGJ1b3eGUhw4ALRrlrM3+eY4At4 1Rs5PNjbma+RcArCw5Rp7/vGmLFiW4aWk9pUoRC3auqIuf5Mg9XAI5fHZOXqSWAB dqzgiQr7o8GaS5PeguI/1ayozXvARsWFiucxqzLZUBj4Rffcmcv99P4Vg7dqZcCG 9PSuilOeI3eRfm+FdVIv0vBiasKHNtPLemO1I2Vv/YN+ovixCyJYm/uBDNqSTE3R GqpuTzwLtQkhxQsw1pXcF7Osv89M/ALe264k5Fmel49PS+LgyWn5A== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrkeehgddvvdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhepofgfggfkjghffffhvffutgesrgdtre erreerjeenucfhrhhomhepfdfurghmuhgvlhcuuegrnhihrgdfuceoshgsrghnhigrsehf rghsthhmrghilhdrtghomheqnecuggftrfgrthhtvghrnhepuefhjefgieehleegvdffke ehffeuhefhgfekveeludegheehgfdtgeehtdfgheeknecuffhomhgrihhnpehsrghmsggr nhihrgdrtghomhenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfh hrohhmpehssggrnhihrgesfhgrshhtmhgrihhlrdgtohhm X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id DCEE9F6007E; Sun, 20 Feb 2022 19:38:27 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.5.0-alpha0-4778-g14fba9972e-fm-20220217.001-g14fba997 Mime-Version: 1.0 Message-Id: <8bb3b1e9-ff36-45a6-9eb2-811b38d5aea8@www.fastmail.com> In-Reply-To: <87mtinb2vq.fsf@posteo.net> References: <086129c3-de30-4e0b-a0b7-6b1c9b0578b6@www.fastmail.com> <871r01i1pm.fsf@posteo.net> <45e958d4-9c0c-4ea6-90b7-433ed9f38d44@www.fastmail.com> <875ypbap18.fsf@posteo.net> <871qzzaofq.fsf@posteo.net> <9c3009fc-3d69-41dc-ae61-0d60e10f1598@www.fastmail.com> <87r17zb3db.fsf@posteo.net> <87mtinb2vq.fsf@posteo.net> Date: Sun, 20 Feb 2022 19:38:06 -0500 From: "Samuel Banya" To: "Charles Berry" Subject: Re: Question Regarding Creating HTML Style Buttons With Org Mode Content-Type: multipart/alternative; boundary=295ea724ce0d4e71b8104a4ab44c3bd4 Received-SPF: pass client-ip=64.147.123.25; envelope-from=sbanya@fastmail.com; helo=wout2-smtp.messagingengine.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, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-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" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1645404077; 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:dkim-signature; bh=sx4r+H6az2zM27jmvOrAUcLucYKSs3eZxCVBV7BNjpc=; b=oDGtSAavwtBmODMdukfr3DGM2/Fr1ooWK5o0vkLos7wvw4NJs4u2/ihYrq8oYGZYCEchoQ aEfZb0ETlAqvFM7LIniqcoiCT97ofF0lAPqpHJmhs9TXsmiSHvubaiGR/1pjViCmUSLJWm Fej8wFnXkZcUP4T53hmGttl01v4WfaQJUBUdkMBCEAcPb9zWftyBHQQ2yeVfCYAwptWvTt NGZ0G0+DQo8Oc2Lqp6dCXvdc/RyuPE7YR8cLm0LI0sVtyjENvnnmdvolSqFGw5tPdB1tT3 lxJ1qdX8zCVacFwdX2srgaqwEWTHdR2mJZ/+Z0JyN4gnvQ6I1xP59TUte7ssxg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1645404077; a=rsa-sha256; cv=none; b=rV+q3OZqqZupsHZqnLqqT3Hmk1pZ9lf4hchoJBkVr5P5+tPmJy2HfUjOmk1PvAxtG+nn3K eek7kSO97r/mo/qcY2UgAatUz48vIKvdbccpMdxDSrikyoD+9M+9pDbW2WDfKu1gAnvzUX ozcmEpvSK6zGdRTBeGJ8UVN3CCpc/ra5i9u+Jt9rdIFDFN0dbrF5eEqi7/0yZ0wgcKl1NC Tq3E9LTo69rOgueJLQCq2oRonSNwGhTmDsqcHhpvEi+9dCB8yfWCY6CApWgzcF+18kc0YE hfRykb6a9FLJDmIHmaMVDwcic41h5i6Vh2lEhXCAWfcMmsESGdeXGtbPCHnd0A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=fastmail.com header.s=fm2 header.b=E0ymjSY1; dkim=fail ("headers rsa verify failed") header.d=messagingengine.com header.s=fm2 header.b=kxcx2dR6; dmarc=fail reason="SPF not aligned (relaxed)" header.from=fastmail.com (policy=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" X-Migadu-Spam-Score: -1.12 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=fastmail.com header.s=fm2 header.b=E0ymjSY1; dkim=fail ("headers rsa verify failed") header.d=messagingengine.com header.s=fm2 header.b=kxcx2dR6; dmarc=fail reason="SPF not aligned (relaxed)" header.from=fastmail.com (policy=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" X-Migadu-Queue-Id: E5A583ED45 X-Spam-Score: -1.12 X-Migadu-Scanner: scn0.migadu.com X-TUID: ErwK9xZVEgnP --295ea724ce0d4e71b8104a4ab44c3bd4 Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable Thanks for this, will try this for my Emacs config. On Sat, Feb 19, 2022, at 4:51 AM, Juan Manuel Mac=C3=ADas wrote: > Juan Manuel Mac=C3=ADas writes: >=20 > > If you want to pass the class or id 'manually' to each link, and thus > > have more control, you can evaluate this other version, where the cl= ass > > or id would be added at the end of the link description, after (for > > example) "!style": >=20 > PS: Sorry, this is the correct code: >=20 > (org-link-set-parameters "button" > :face '(:foreground "green4" :underline t) > :follow (lambda (path) (browse-url path)) > :export (lambda (path desc backend) > (when (eq backend 'html) > (let ((style (if (string-match "\\(!style\\)\\(.+\\)" desc) > (match-string 2 desc) > "")) > (desc (replace-regexp-in-string "\\(!style .+\\)" "" desc))) > (format "
" style > path desc))))) >=20 >=20 > Example: >=20 > [[button:http://www.sambanya.com/artgallery.html][Art Gallery Page Lin= k !style class=3D"mybutton"]] >=20 > =3D=3D HTML =3D=3D> >=20 >

>

>

>=20 >=20 --295ea724ce0d4e71b8104a4ab44c3bd4 Content-Type: text/html;charset=utf-8 Content-Transfer-Encoding: quoted-printable
Thanks for this= , will try this for my Emacs config.

On Sat= , Feb 19, 2022, at 4:51 AM, Juan Manuel Mac=C3=ADas wrote:
Juan Manuel Mac=C3=ADas = writes:

> If you want to pass the class = or id 'manually' to each link, and thus
> have more con= trol, you can evaluate this other version, where the class
> or id would be added at the end of the link description, after (fo= r
> example) "!style":

PS:= Sorry, this is the correct code:

  (o= rg-link-set-parameters "button"
   :face '(:fore= ground "green4" :underline t)
   :follow (lambda= (path) (browse-url path))
   :export (lambda (p= ath desc backend)
     (when (eq backe= nd 'html)
       (let ((styl= e (if (string-match "\\(!style\\)\\(.+\\)" desc)
(match-st= ring 2 desc)
       ""))
=
      (desc (replace-regexp-in-strin= g "\\(!style .+\\)" "" desc)))
(format "<form><bu= tton %s
   formaction=3D\"%s\">%s</button&= gt;</form>" style
   path desc)))))


Example:

<= div>[[button:ht= tp://www.sambanya.com/artgallery.html][Art Gallery Page Link !style = class=3D"mybutton"]]

=3D=3D HTML =3D=3D>=

<p>
<form><bu= tton  class=3D"mybutton" formaction=3D"http://www.sambanya.com/artgallery.html">= Art Gallery Page Link </button></form>
</p&= gt;



<= /body> --295ea724ce0d4e71b8104a4ab44c3bd4--