From mboxrd@z Thu Jan 1 00:00:00 1970 From: Martin =?utf-8?Q?Carl=C3=A9?= Subject: Re: new link parameters and link abbreviations Date: Tue, 23 Aug 2016 09:25:13 +0300 Message-ID: References: <6BCC30BB-2488-4BA2-8661-8C6AF99061C6@aiguphonie.com> <8861C3F7-1B34-4752-9935-1F0ED80136A2@aiguphonie.com> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=sha256; protocol="application/pkcs7-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:40829) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bc59K-0000YL-VL for emacs-orgmode@gnu.org; Tue, 23 Aug 2016 02:25:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bc59G-0007YL-KT for emacs-orgmode@gnu.org; Tue, 23 Aug 2016 02:25:25 -0400 Received: from mail.gispack.com ([212.204.56.78]:44094) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bc59G-0007Wp-9s for emacs-orgmode@gnu.org; Tue, 23 Aug 2016 02:25:22 -0400 In-reply-to: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: John Kitchin Cc: "emacs-orgmode@gnu.org" --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Thank you for this confirmation of the abbreviation issue.=20 > I would suggest just defining short links ;) Well, there are limits to this approach e.g. file+mnl {mnl =3D myNewLink}. Furthermore, link definitions then tend to become pretty cryptic :-(. Optimally, the 'org-link-abbrev-alist' could (optionally) even been made buffer-local, in order to safe typing efforts in different work context. I wouldn't mind changing the abbreviation syntax, if necessary. > It seems like you can probably build the abbreviation functionality into = the follow function > right? Don't really get what you mean by this. On 2016-08-23 Tue 01:03, John Kitchin wrote: > I can confirm this happens. I think it happens because the abbreviation > is not listed in org-plain-link-re, so when the bracket link is > activated, no type is ever defined (it is done by a group in the > org-plain-link-re). The type is somewhat fundamental to the activation > function, as it is used to look up all the link properties, and hence > you get the default help (and all other properties too). > > I haven't thought of a simple fix though. It would involve adding the > abbreviations to the known link types, and some kind of lookup for when > the type in a link is not in org-link-parameters that resolves the type > to something in org-link-parameters. Since the abbreviations seem to > have quite flexible format, it isn't obvious how to do that robustly, > without changing the abbreviation syntax.=20 > > I would suggest just defining short links ;) It seems like you can > probably build the abbreviation functionality into the follow function > right? > > > mc writes: > >> Yes, with pleasure: >> >> Let's put it the most simple way: >> >> >> 1. Here is my new-link definition: >> >> #+begin_src emacs-lisp >> (org-link-set-parameters "new-link" :help-echo "show new-link's help e= cho") >> #+end_src >> >> (it doesn't change matter, if there would be :follow or :store function = etc.) >> >> >> 2. the 'tooltip' shows my :help-echo string as expected. >> >> [[new-link:awesome]] >> >> >> 3. Then I add the following abbreviation of the above link: >> >> #+begin_src emacs-lisp >> (setq org-link-abbrev-alist '(("nl" . "new-link::%s"))) >> #+end_src >> >> >> 4. the 'tooltip' does not work but shows the default: >> >> [[nl:awesome]] >> >> >> Hope that clarifies the issue. >> >> >> Thanks once more for your sustained patience making link handling much >> easier and more powerful! >> mc >> >> >> >>> On 20 Aug 2016, at 17:17, John Kitchin wrote: >>>=20 >>> that isn't a feature I have used too often. Could you post a small exam= ple that illustrates the problem? Thanks, >>>=20 >>> John >>>=20 >>> ----------------------------------- >>> Professor John Kitchin=20 >>> Doherty Hall A207F >>> Department of Chemical Engineering >>> Carnegie Mellon University >>> Pittsburgh, PA 15213 >>> 412-268-7803 >>> @johnkitchin >>> http://kitchingroup.cheme.cmu.edu >>>=20 >>>=20 >>> On Fri, Aug 19, 2016 at 12:13 AM, mc > wrote: >>> The new link parameters are fabulous! >>>=20 >>> Only the parameter ':help-echo' seems not to be respected, if a link is= used by an abbreviated form as defined by the 'org-link-abbrev-alist'. >>>=20 >>> Would be nice, if this could be fixed. >>>=20 >>> Anyway, thank you for this big step forward, >>> mc >>>=20 =2D-=20 Fetch my gnupg key: gpg --keyserver pgp.mit.edu --recv-keys 7E3CA33F --=-=-= Content-Type: application/pkcs7-signature; name=smime.p7s Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename=smime.p7s MIAGCSqGSIb3DQEHAqCAMIACAQExDzANBglghkgBZQMEAgEFADCABgkqhkiG9w0BBwEAADGCAucw ggLjAgEBMIIBJDCCAR0xCzAJBgNVBAMMAk1DMRswGQYDVQQKDBLOoM6Vzp3OpM6RzqXOm86fzpkx gZcwgZQGA1UECwyBjM6gz4HPjM6zz4HOsc68zrzOsSDOo8+Fz4PPhM6uzrzOsc+Ezr/PgiDOoM6x z4HOsc+DzrfOvM6xzr3PhM65zrrOrs+CIM6kzq3Ph869zrfPgiDOus6xzrkgzqDPgc6/zrXOus+E zr/PgM65z4PPhM65zrrOv8+NIM6gzr/Ou865z4TOuc+DzrzOv8+NMRMwEQYDVQQIDArOlc67zrvO rM+CMQswCQYDVQQGEwJHUjETMBEGA1UEBwwKzpHOuM6uzr3OsTEgMB4GCSqGSIb3DQEJARYRbWNA YWlndXBob25pZS5jb20CAQcwDQYJYIZIAWUDBAIBBQCggZMwGAYJKoZIhvcNAQkDMQsGCSqGSIb3 DQEHATAcBgkqhkiG9w0BCQUxDxcNMTYwODIzMDYyNTEzWjAoBgkqhkiG9w0BCQ8xGzAZMAsGCWCG SAFlAwQBAjAKBggqhkiG9w0DBzAvBgkqhkiG9w0BCQQxIgQgqNR0VAHhYGb8nM5SqlMvMaYqLz6K SFjZ/Tt/nOTZXCcwDQYJKoZIhvcNAQEBBQAEggEABF1h388uyv1mueZlbA6hH58jAPvAmVuQP8cY +iU/EuSHpZhNwO49KwiOQDUHuP1L8qZrdQq4QCgywEv5qfRPEPYYxUT/it/grNaGwX37RRFb7mEN MSMYe5/AiJW3swmyJia3FKLnCRefrT6D0mkCBxz5cRMyGxYBe6OhiCPOwsTLbc7h+XVrLCdmD+aG oRvOx3CCm5Sp25O0WbC/r6MD4Nh64+qCVcyiUG/5QtOfT2kakT6PC9GYs7y/VtFhKOUZTSaLZ8F+ fACh8059v/KgaVsYrgbWOUGPUNJfszzE1mwLYI+o1iyancHL1JV0r/OAkq49fzKzPfN0Ff01Q+x3 PwAAAAAAAA== --=-=-=--