From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id kDmiAg3hw15YfgAA0tVLHw (envelope-from ) for ; Tue, 19 May 2020 13:37:17 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id 0HbKOQzhw17xBgAAbx9fmQ (envelope-from ) for ; Tue, 19 May 2020 13:37:16 +0000 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 43799940712 for ; Tue, 19 May 2020 13:37:16 +0000 (UTC) Received: from localhost ([::1]:39854 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jb2Ql-0006jC-7k for larch@yhetil.org; Tue, 19 May 2020 09:37:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33886) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jb2QF-0006fJ-Co for emacs-orgmode@gnu.org; Tue, 19 May 2020 09:36:43 -0400 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]:39239) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jb2QD-0002eT-QS for emacs-orgmode@gnu.org; Tue, 19 May 2020 09:36:42 -0400 Received: by mail-wm1-x32e.google.com with SMTP id w64so3593478wmg.4 for ; Tue, 19 May 2020 06:36:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=andrew-cmu-edu.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=9qtOaMP56Zbrw9ECLeURWJL/z++IDsLMNIDc6vqGKF8=; b=gQGNwWKGPE33LQ6JPE5LY2E4UmImpuozEaQeEndKTXXfjuVog2VxKyTNv5Zw9U7xpX HbkbJr0Ykj6KHUNotKuMXXfFovGgaKV2miuDxMaPj6agcC01xHxQhM2qw6kZ1hc+8e5I guQPcTS+V2lkyJ66gmfsW4PZrzesc2G1J50NHdvR6ZFNbWgr3wbF3x5zcEb0Htjptq5S mxBo66tT3GP1Rhhwn3p8sWbSoqAu9CCxO3ie1xOULKOhyzOxJJ0aHlsaxfw6iyjRAFp0 /5EwhmYWGkldaUrqaJ06ooDOsyreicdKyoN37mhbzWUKIrPSJWtCvAEZtQ0z9ZLJTg7A kKyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=9qtOaMP56Zbrw9ECLeURWJL/z++IDsLMNIDc6vqGKF8=; b=cINTp1pyQNQ6Mlderr7cgctxEsXO8hiIwaSHPmYPdp7bUpF8tE+N0tilOjOYC3nFPi u2gzdbhqcVh7svftI9EJ9Gwh0pbs9LPGvvoFdWSTw+N2Wq2Ooo5ZqaKt1DolIbGH21jT EkUGjSL0QmbxNwFdznZIBjXcKPI3lIaWgZrJcQVVTulkAfOlIO9XvBb7yfWiEvXF8jD1 rV8f9Inu66OU3kbT6HRHny3DNTY5iLBIhPXeL9u+UbW06qs55bBgps3Bz3UXC0Ko4hL/ 8GyjxX55go3f2Cixbleopf3/BLZoYPNAK/R4cZc+hvXW3dNl1pUTgGIZz303pn+y7Yhr +S9g== X-Gm-Message-State: AOAM530UYRR4CpcmCsGf7s44k0VgbP9q+bS65o3FVa2SVAd+koeu/1kX CSJwGMCahbPXJJMNEISRlHHapLWy1MaNU8Y9ABs= X-Google-Smtp-Source: ABdhPJwOPbJIcjhTInaunIKDslU48O1TJh/8Ou8TJWS2MHHj2piPZp7ZuB7mNVk5+JJDNEvMqJza4LtreSo2dDbKY7o= X-Received: by 2002:a1c:2348:: with SMTP id j69mr5674539wmj.11.1589895400054; Tue, 19 May 2020 06:36:40 -0700 (PDT) MIME-Version: 1.0 References: <87zha4jj3q.fsf@gmail.com> <87tv0cjc24.fsf@gmail.com> In-Reply-To: <87tv0cjc24.fsf@gmail.com> From: John Kitchin Date: Tue, 19 May 2020 09:36:28 -0400 Message-ID: Subject: Re: How to defint functions for other org link parameters like :face :display etc? To: stardiviner Content-Type: multipart/alternative; boundary="0000000000008ce3ce05a6005e7c" Received-SPF: pass client-ip=2a00:1450:4864:20::32e; envelope-from=johnrkitchin@gmail.com; helo=mail-wm1-x32e.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -15 X-Spam_score: -1.6 X-Spam_bar: - X-Spam_report: (-1.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Org Mode Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=andrew-cmu-edu.20150623.gappssmtp.com header.s=20150623 header.b=gQGNwWKG; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=andrew.cmu.edu (policy=none); spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Spam-Score: 1.39 X-TUID: DmFNu10JmwiO --0000000000008ce3ce05a6005e7c Content-Type: text/plain; charset="UTF-8" I don't know if :display is for that, I think it is mostly related to should a link with description only show the description, or should it be full and show link and description. You probably want the :activate option, where you could use something like an overlay on the link. I don't have time to make an example for that right now. the gist is you make an activate function, and you can add a text-property or overlay display on the link. You probably need to check that the property isn't there already to avoid adding overlays on every fontification. https://kitchingroup.cheme.cmu.edu/blog/2016/11/04/New-link-features-in-org-9/#org069cbfa John ----------------------------------- Professor John Kitchin Doherty Hall A207F Department of Chemical Engineering Carnegie Mellon University Pittsburgh, PA 15213 412-268-7803 @johnkitchin http://kitchingroup.cheme.cmu.edu On Tue, May 19, 2020 at 9:21 AM stardiviner wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA256 > > > John Kitchin writes: > > > My go to reference is > > > https://kitchingroup.cheme.cmu.edu/blog/2016/11/04/New-link-features-in-org-9/ > > Really thanks, John. I have read your blog article. Found most of link > parameters examples. But still confused me, I'm wandering how to define a > function for link parameter ":display" to append an all-the-icons unicode > icon > on link. I only found one ~:display 'full~ example in your article. > > an you show an example using a function for ~:display~? Thanks in advanced. > > > > > On Tue, May 19, 2020 at 6:56 AM stardiviner wrote: > > > >> -----BEGIN PGP SIGNED MESSAGE----- > >> Hash: SHA256 > >> > >> > >> I'm write an extension to beautify org link with colors and unicode > icons > >> for > >> better intuitive looks. But I don't know how to write those functions. > >> > >> I checked out this info page ([[info:org#Adding Hyperlink > >> Types][info:org#Adding Hyperlink Types]]) of org mode. > >> > >> But have not found ~org-link-set-parameters~ other parameters code > >> examples. I > >> hope some examples can be added for the all other parameters. > >> > >> - -- > >> [ stardiviner ] > >> I try to make every word tell the meaning that I want to express. > >> > >> Blog: https://stardiviner.github.io/ > >> IRC(freenode): stardiviner, Matrix: stardiviner > >> GPG: F09F650D7D674819892591401B5DF1C95AE89AC3 > >> > >> -----BEGIN PGP SIGNATURE----- > >> > >> iQFIBAEBCAAyFiEE8J9lDX1nSBmJJZFAG13xyVromsMFAl7DuYkUHG51bWJjaGls > >> ZEBnbWFpbC5jb20ACgkQG13xyVromsMMRAf/dkXg9kxbgTeCdjfcl2koeJkBmfNj > >> xFGkuM0MlAc1oCIvGAeZ23GZ/B9cgtbfarGdZy1FJl9r7ehFx10Qg9w5keSIptA6 > >> mplEeCeKNgTwzyHIMQhI4xS+a80YliJNc8MgFi2o9tImKqavVV2eqwHPZDNE8HXt > >> NEN+tfi8k2Sg7J7XhkdQD1YiNPTnKD8OXfzaR6162l5qSo3YuwoAegGmuULie2Ti > >> fci2pFO56g46xLp1tWvI6z+Zxabyff/IjKkSWSNTHuQ5lhvYsmuFKF1JDfS/DHJV > >> zy3Rr6sXK+MY1YWMMh2uLvmigL/BYl5HvjzC/Sq6wXcqVi0FuryeEfDWzg== > >> =HMJr > >> -----END PGP SIGNATURE----- > >> > >> -- > > John > > > > ----------------------------------- > > Professor John Kitchin > > Doherty Hall A207F > > Department of Chemical Engineering > > Carnegie Mellon University > > Pittsburgh, PA 15213 > > 412-268-7803 > > @johnkitchin > > http://kitchingroup.cheme.cmu.edu > > > - -- > [ stardiviner ] > I try to make every word tell the meaning that I want to express. > > Blog: https://stardiviner.github.io/ > IRC(freenode): stardiviner, Matrix: stardiviner > GPG: F09F650D7D674819892591401B5DF1C95AE89AC3 > > -----BEGIN PGP SIGNATURE----- > > iQFIBAEBCAAyFiEE8J9lDX1nSBmJJZFAG13xyVromsMFAl7D3TMUHG51bWJjaGls > ZEBnbWFpbC5jb20ACgkQG13xyVromsPoCQf/TrUtyBtPUYGtNiJeXWk0oQNbwggf > 6FHX3wsvBS3O9A2VpKuzWTdnKSFR7dVUF8NkBwHbvU+599LqT5XxGtF2iDX+jgiz > t0G2207sczHtiwsE/KLGAxXmEI4tGESLv+4Jui3kjp8JJJCusDcjzTIXQ6O9sb91 > PmSbQhj4dbUz/3zk+utLb3YBMUPDnsr4H+eon+ko+EQOxTL48O4x7xvjj07XrnX3 > DawQG0qs9SnenkMsK2HzQBRDqCf0DfrVPmajWYUQJ62j2ocah8oXij6WH5/rgCpA > xtt2sXJrQd2TFpCxcGWn5PsyEUMWjxAx1dia8pcMkBLvnb2SQkM6204jWQ== > =SVJD > -----END PGP SIGNATURE----- > > --0000000000008ce3ce05a6005e7c Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I don't know if :display is for that, I think it is mo= stly related to should a link with description only show the description, o= r should it be full and show link and description.

You p= robably want the :activate option, where you could use something like an ov= erlay on the link. I don't have time to make an example for that right = now. the gist is you make an activate function, and you can add a text-prop= erty or overlay=C2=A0 display on the link. You probably need to check that = the property isn't there already to avoid adding overlays on every=C2= =A0fontification.


https://kitchingroup.cheme.cmu.edu/blog/2016/11/04/New-link-featu= res-in-org-9/#org069cbfa
John

-----------------------------------
Prof= essor John Kitchin=C2=A0
Doherty Hall A207F
Department of Chemical En= gineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-= 7803


On Tue, May 19, 2020 at 9:21 AM s= tardiviner <numbchild@gmail.com> wrote:
--= ---BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256


John Kitchin <
jkitchin@andrew.cmu.edu> writes:

> My go to reference is
> https://kitchingr= oup.cheme.cmu.edu/blog/2016/11/04/New-link-features-in-org-9/

Really thanks, John. I have read your blog article. Found most of link
parameters examples. But still confused me, I'm wandering how to define= a
function for link parameter ":display" to append an all-the-icons= unicode icon
on link. I only found one ~:display 'full~ example in your article.

an you show an example using a function for ~:display~? Thanks in advanced.=

>
> On Tue, May 19, 2020 at 6:56 AM stardiviner <numbchild@gmail.com> wrote:
>
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA256
>>
>>
>> I'm write an extension to beautify org link with colors and un= icode icons
>> for
>> better intuitive looks. But I don't know how to write those fu= nctions.
>>
>> I checked out this info page ([[info:org#Adding Hyperlink
>> Types][info:org#Adding Hyperlink Types]]) of org mode.
>>
>> But have not found ~org-link-set-parameters~ other parameters code=
>> examples. I
>> hope some examples can be added for the all other parameters.
>>
>> - --
>> [ stardiviner ]
>>=C2=A0 =C2=A0 =C2=A0 =C2=A0 I try to make every word tell the meani= ng that I want to express.
>>
>>=C2=A0 =C2=A0 =C2=A0 =C2=A0 Blog: https://stardiviner.github.i= o/
>>=C2=A0 =C2=A0 =C2=A0 =C2=A0 IRC(freenode): stardiviner, Matrix: sta= rdiviner
>>=C2=A0 =C2=A0 =C2=A0 =C2=A0 GPG: F09F650D7D674819892591401B5DF1C95A= E89AC3
>>
>> -----BEGIN PGP SIGNATURE-----
>>
>> iQFIBAEBCAAyFiEE8J9lDX1nSBmJJZFAG13xyVromsMFAl7DuYkUHG51bWJjaGls >> ZEBnbWFpbC5jb20ACgkQG13xyVromsMMRAf/dkXg9kxbgTeCdjfcl2koeJkBmfNj >> xFGkuM0MlAc1oCIvGAeZ23GZ/B9cgtbfarGdZy1FJl9r7ehFx10Qg9w5keSIptA6 >> mplEeCeKNgTwzyHIMQhI4xS+a80YliJNc8MgFi2o9tImKqavVV2eqwHPZDNE8HXt >> NEN+tfi8k2Sg7J7XhkdQD1YiNPTnKD8OXfzaR6162l5qSo3YuwoAegGmuULie2Ti >> fci2pFO56g46xLp1tWvI6z+Zxabyff/IjKkSWSNTHuQ5lhvYsmuFKF1JDfS/DHJV >> zy3Rr6sXK+MY1YWMMh2uLvmigL/BYl5HvjzC/Sq6wXcqVi0FuryeEfDWzg=3D=3D >> =3DHMJr
>> -----END PGP SIGNATURE-----
>>
>> --
> John
>
> -----------------------------------
> Professor John Kitchin
> Doherty Hall A207F
> Department of Chemical Engineering
> Carnegie Mellon University
> Pittsburgh, PA 15213
> 412-268-7803
> @johnkitchin
> http://kitchingroup.cheme.cmu.edu


- --
[ stardiviner ]
=C2=A0 =C2=A0 =C2=A0 =C2=A0I try to make every word tell the meaning that I= want to express.

=C2=A0 =C2=A0 =C2=A0 =C2=A0Blog: https://stardiviner.github.io/ =C2=A0 =C2=A0 =C2=A0 =C2=A0IRC(freenode): stardiviner, Matrix: stardiviner<= br> =C2=A0 =C2=A0 =C2=A0 =C2=A0GPG: F09F650D7D674819892591401B5DF1C95AE89AC3
-----BEGIN PGP SIGNATURE-----

iQFIBAEBCAAyFiEE8J9lDX1nSBmJJZFAG13xyVromsMFAl7D3TMUHG51bWJjaGls
ZEBnbWFpbC5jb20ACgkQG13xyVromsPoCQf/TrUtyBtPUYGtNiJeXWk0oQNbwggf
6FHX3wsvBS3O9A2VpKuzWTdnKSFR7dVUF8NkBwHbvU+599LqT5XxGtF2iDX+jgiz
t0G2207sczHtiwsE/KLGAxXmEI4tGESLv+4Jui3kjp8JJJCusDcjzTIXQ6O9sb91
PmSbQhj4dbUz/3zk+utLb3YBMUPDnsr4H+eon+ko+EQOxTL48O4x7xvjj07XrnX3
DawQG0qs9SnenkMsK2HzQBRDqCf0DfrVPmajWYUQJ62j2ocah8oXij6WH5/rgCpA
xtt2sXJrQd2TFpCxcGWn5PsyEUMWjxAx1dia8pcMkBLvnb2SQkM6204jWQ=3D=3D
=3DSVJD
-----END PGP SIGNATURE-----

--0000000000008ce3ce05a6005e7c--