emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem with custom links


From: Kyle Meyer
Subject: Re: Problem with custom links
Date: Fri, 12 Feb 2021 00:16:14 -0500

Thomas S. Dye writes:

> Aloha all,
>
> Recently, custom links that I've used for years changed their 
> behavior.  They used to behave like other org mode links, but now 
> they are displayed in a different color face and are always fully 
> displayed, unless I add two new keywords to 
> org-link-set-parameters.
>
>   (org-link-set-parameters
>    "parencite"
[...]
>    :display 'org-link
>    :face 'org-link)

I tried this snippet, dropping the :display and :face arguments

  (org-link-set-parameters
   "parencite"
   :follow 'org-ebib-open
   :export (lambda (path desc format)
             (cond
              ((eq format 'html)
               (format "(<cite>%s</cite>)" path))
              ((eq format 'latex)
               (if (or (not desc) (equal 0 (search "parencite:" 
                                                   desc)))
                   (format "\\parencite{%s}" path)
                 (format "\\parencite[%s][%s]{%s}"
                         (cadr (split-string desc ";"))
                         (car (split-string desc ";")) path))))))

with the following buffer:

  [[parencite:foo][bar]]

With an otherwise default configuration and the current master
(49364f904), the link gets fontified with the org-link face and
displayed as just "bar".  So, that seems to be behaving as expected and
I don't spot any relevant code change to the handling of the defaults in
org-activate-links.

Have you tried to trigger it without any additional configuration?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]