emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Kyle Meyer <kyle@kyleam.com>
To: "Thomas S. Dye" <tsd@tsdye.online>
Cc: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Re: Problem with custom links
Date: Fri, 12 Feb 2021 00:16:14 -0500	[thread overview]
Message-ID: <87eehl9881.fsf@kyleam.com> (raw)
In-Reply-To: <87k0ri2ib6.fsf@tsdye.online>

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	other threads:[~2021-02-12  5:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-09  0:31 Problem with custom links Thomas S. Dye
2021-02-12  5:16 ` Kyle Meyer [this message]
2021-02-12 23:05   ` Thomas S. Dye

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87eehl9881.fsf@kyleam.com \
    --to=kyle@kyleam.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=tsd@tsdye.online \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).