emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Kyle Meyer <kyle@kyleam.com>
To: Adam Sneller <adam.sneller@ms2.digital>
Cc: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Re: Can no longer org-set-link-parameters with "fuzzy" link types
Date: Mon, 05 Apr 2021 20:54:02 -0400	[thread overview]
Message-ID: <874kgkcjx1.fsf@kyleam.com> (raw)
In-Reply-To: <9F561A9A-264D-4AED-AC4F-4FBB6D04516D@ms2.digital>

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


  reply	other threads:[~2021-04-06  0:55 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 [this message]
2021-04-06 12:06   ` Nicolas Goaziou
2021-04-06 12:20     ` Adam Sneller
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:
  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=874kgkcjx1.fsf@kyleam.com \
    --to=kyle@kyleam.com \
    --cc=adam.sneller@ms2.digital \
    --cc=emacs-orgmode@gnu.org \
    /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).