emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Adam Sneller <adam@earth2adam.com>
To: Nicolas Goaziou <mail@nicolasgoaziou.fr>
Cc: Kyle Meyer <kyle@kyleam.com>,
	"emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Re: Can no longer org-set-link-parameters with "fuzzy" link types
Date: Tue, 6 Apr 2021 13:20:06 +0100	[thread overview]
Message-ID: <8C83BBE4-44A3-49AC-A86B-C478384C09F8@earth2adam.com> (raw)
In-Reply-To: <877dlfmxc8.fsf@nicolasgoaziou.fr>

[-- Attachment #1.1: Type: text/plain, Size: 1686 bytes --]

Thank you both for the replies!

Nicholas - can you recommend how to best implement this with font-lock-add-keywords?

Best regards,


> On 6 Apr 2021, at 13:06, Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote:
> Hello,
> Kyle Meyer <kyle@kyleam.com> writes:
>> [ Sorry for the slow response. ]
>> Adam Sneller writes:
>>> I have a function that searches for broken fuzzy links in org-mode and
>>> applies org-warning face to anything it finds:
>>> (org-link-set-parameters
>>> "fuzzy"
>>> :face (lambda (path)
>>> (let ((org-link-search-inhibit-query t))
>>> (if (condition-case nil
>>> (save-excursion
>>> (save-match-data
>>> (org-link-search path (point) t)))
>>> (error nil))
>>> 'org-link 'org-warning))))
>>> In 9.4.4 this patch breaks this:
>>> https://code.orgmode.org/bzg/org-mode/commit/8c4e270df280a08b7e61295712c86246088146ba
>>> Is there some other recommended way to get this done as of 9.4.4?
>> I don't know enough about the change to say whether this is recommended,
>> but it looks like you could get the behavior you're after with something
>> like
>>  (add-to-list 'org-link-parameters
>>               '("fuzzy" :face (lambda (path) ...)))
> Link parameters are meant to be used with "scheme:path" links. However,
> we forbid internal link types, as writing [[fuzzy:whatever]] would be
> confusing for Org. As a consequence, link parameters are not meant to
> control internal links.
> We might need a different variable specific to internal links, but in
> the current case, using `font-lock-add-keywords' should be sufficient.
> Regards,
> --
> Nicolas Goaziou

[-- Attachment #1.2: Type: text/html, Size: 2015 bytes --]

  reply	other threads:[~2021-04-06 12:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-25  4:00 Can no longer org-set-link-parameters with "fuzzy" link types Adam Sneller
2021-04-06  0:54 ` Kyle Meyer
2021-04-06 12:06   ` Nicolas Goaziou
2021-04-06 12:20     ` Adam Sneller [this message]
2021-04-07 17:42       ` Nicolas Goaziou

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:

  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=8C83BBE4-44A3-49AC-A86B-C478384C09F8@earth2adam.com \
    --to=adam@earth2adam.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=kyle@kyleam.com \
    --cc=mail@nicolasgoaziou.fr \


* 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


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).