From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id wL7rJvDDkWSHpwAASxT56A (envelope-from ) for ; Tue, 20 Jun 2023 17:21:20 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id COTUJfDDkWQbFgAAG6o9tA (envelope-from ) for ; Tue, 20 Jun 2023 17:21:20 +0200 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 27F27E938 for ; Tue, 20 Jun 2023 17:21:20 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qBd9p-0003tl-0Q; Tue, 20 Jun 2023 11:20:37 -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 1qBd9m-0003sl-J5 for emacs-orgmode@gnu.org; Tue, 20 Jun 2023 11:20:34 -0400 Received: from mail.mojserwer.eu ([195.110.48.8]) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qBd9k-0000T3-N9 for emacs-orgmode@gnu.org; Tue, 20 Jun 2023 11:20:34 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.mojserwer.eu (Postfix) with ESMTP id D5490A0E1E9; Tue, 20 Jun 2023 17:20:29 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mail.mojserwer.eu Received: from mail.mojserwer.eu ([127.0.0.1]) by localhost (mail.mojserwer.eu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id eLFtf3DDEO8s; Tue, 20 Jun 2023 17:20:26 +0200 (CEST) Received: from localhost (178235147139.dynamic-3-poz-k-0-1-0.vectranet.pl [178.235.147.139]) by mail.mojserwer.eu (Postfix) with ESMTPSA id 17DCFBA2227; Tue, 20 Jun 2023 17:20:26 +0200 (CEST) References: <87jzvyeoci.fsf@mbork.pl> <87sfamll8s.fsf@wi.uni-muenster.de> User-agent: mu4e 1.1.0; emacs 30.0.50 From: Marcin Borkowski To: Jens Lechtenboerger Cc: Org-Mode mailing list Subject: Re: How to tell `org-html-link' to create a link with some HTML class? In-reply-to: <87sfamll8s.fsf@wi.uni-muenster.de> Date: Tue, 20 Jun 2023 17:20:23 +0200 Message-ID: <87a5wudutk.fsf@mbork.pl> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=195.110.48.8; envelope-from=mbork@mbork.pl; helo=mail.mojserwer.eu X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, 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 ARC-Seal: i=1; s=key1; d=yhetil.org; t=1687274480; a=rsa-sha256; cv=none; b=oq5wNQk8+69YnlUFpG0dqCSKORVvPPtJC/lKKuHTRaQfHRFq6Lq/rfFgUlf+jGB0NZm/6u yxn5H0RVDKzx/s28qcl2P12GwcDfGCXNibZKUMgW6GzNZPDuEAuHWiwruunxOGhXjR/0W5 z41yduF81ipyHVJs21DRH85566A5Jiagf+lI0EkwEOvWlgjpWUceJu22RKpJ/aMpe61hsK daPQmiRlBnFpFlu2jXo4ss1G1qXSTOoah41fmZhqQx8jkwL2VRmnObbErq31tq2HvDCNoy Ivh+2cG5tGk9D+lN4C6wmOcJmiy9Pjc8TenlawNo0TZXZ/4YAt3UoAl5qgp1LA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1687274480; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=nq5pVBtNpbzgoAV9s7bk08JXzO/1UrM4vlwOHFBgr+g=; b=i+rZ+OIncrLuVpQsNlVCHiPjJwIq/7/f3AnEcCIDtnVPZl2zz6ngiOB/rDxQl2NcqajnV0 veFcuJbJxmXElhjbwS0qaPYrYszLJiQ4glsIuQEaEIWUBWq23Hpo9GIPvY1BsvjVinRCcP cC4F3XHtgL1de4t0yoy5rDUitvxNna8+TCQT/55qPJLN9SsK80CL5Ne8rpBHlhcJ7rBkSq kWxYqfrWb/BSgMVdSrAFbCyd2I+r07CDqCS25aP7+TrwkxwaC10/CL/J//ZV8yHjHKZHQq m/PyQfEQgvCMQVI6KNkJJ7NSMUUqhP1Lui5bJlK1jpLdmjndchttF9a0Tq0H6Q== Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=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-Scanner: scn0.migadu.com X-Migadu-Spam-Score: -1.44 X-Spam-Score: -1.44 X-Migadu-Queue-Id: 27F27E938 X-TUID: mFVlgSEWCoqk On 2023-06-20, at 08:07, Jens Lechtenboerger w= rote: > On 2023-06-20, Marcin Borkowski wrote: > >> Dear Orgers, >> >> as I mentioned some time ago, I'm writing a custom exporter (actually, >> a very thin wrapper around the HTML exporter). I'd like `org-html-link' >> to add some class to the links it generates. Is that possible? > > Dear Marcin, > > yes, that=E2=80=99s possible, ":attr_html" is read in `org-html-link'. Y= ou > have to set that in your code, see [1] for an example for classes in > my reveal.js backend. > > Briefly, with `elem' being the link, I use this: > `(org-element-put-property elem :attr_html (list newattrs))' > > Best wishes > Jens > > [1] https://gitlab.com/oer/org-re-reveal/-/blob/master/org-re-reveal.el#L= 2167 Great, it worked! Though not at first =E2=80=93 I had to experiment a bit = to find the right invocation: (org-element-put-property link :attr_html (list ":class" "external")) which was not obvious for me. Thanks, --=20 Marcin Borkowski http://mbork.pl