From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id gHfIJlNSbGCN2QAAgWs5BA (envelope-from ) for ; Tue, 06 Apr 2021 14:21:39 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id wG+0IFNSbGBqCwAAB5/wlQ (envelope-from ) for ; Tue, 06 Apr 2021 12:21:39 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id C87B11BBAB for ; Tue, 6 Apr 2021 14:21:38 +0200 (CEST) Received: from localhost ([::1]:47040 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lTki8-00008g-It for larch@yhetil.org; Tue, 06 Apr 2021 08:21:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35792) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lTkgo-00008V-Hq for emacs-orgmode@gnu.org; Tue, 06 Apr 2021 08:20:14 -0400 Received: from mail-wm1-x344.google.com ([2a00:1450:4864:20::344]:53865) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lTkgk-00027z-PD for emacs-orgmode@gnu.org; Tue, 06 Apr 2021 08:20:14 -0400 Received: by mail-wm1-x344.google.com with SMTP id o6so4324122wmq.3 for ; Tue, 06 Apr 2021 05:20:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=earth2adam-com.20150623.gappssmtp.com; s=20150623; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=AGWGDZVcMPg0HPpNcJBVYyTD5V14vr2PMm8pHJYZdSU=; b=z+eYe2VGBbMWa2hn4N++duGEeXoGUi8tDDbIGP1koLzs4XysAsJTV4pWWifUg5DOiw cpDy5UuVse241hqCvBCM0KPObupBQlkQX3ix8D3bf9xMw+6kpmiQ6TtXu/vv7u3fiVri AaSNUosFm5PYGEDbjE6NCOaqdjcny3F1qNm76VmQLEx8U1RSGJrS4x5/QIExetwsx/bF jtOjKX3AVWLS1cxm3vHjX+4Mn3CQ5o2Y1gk2Tp1SyCrhzRTePLvZszAYKtfPx83WWMQV Jg8AqsNylYrtqtMQhdCmUlT+1qtt7Y0v66jN0PShYvXhEiOdVaLsEVBuqbk4XtHLArwR 8IrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=AGWGDZVcMPg0HPpNcJBVYyTD5V14vr2PMm8pHJYZdSU=; b=NsgM+r6ZomlzDm5gQYI8eGh/SfsMHJRg838afGTdiF3QhkW1MkpbH8Y3IWLTksCine T42ttxQb+A9+uwrKv6AyATcbz+fNp/+sYQBZn0ICq3HqqLXD3SbwdedDl8Witx2Pq9Lj h9+izNuF6Ed1VWt7lsrbbeDF2VQGshDYXMGOVpf/hYH52oLtjtw1lsoVsG66G+a1LIya 9eTi6MEMa/PJCGSXVCYQPQSf0Cp8JaexeRwe4U41JxPvRyojuYYqWm2gtHH1yelUIaaI rV8iUia1QXF1U8BPWxCLSGR65xQXXicFZco3t4CEpvpmGL9z9Kxf9XdOfHtsJL71KBjc D/Dw== X-Gm-Message-State: AOAM533a7sgOoxDINuYOlE0AizQY1jj6MUfr0YOhbVS2oaazNmNCwz3i eYTehrDGktHYbwrYlsbepqRzOrFkh1HnEnLJ X-Google-Smtp-Source: ABdhPJwkseaNfr9I166uG11l0YhSqkUctNfBy00S65/RPr2giZwknEd72or1GNR2RJNJtDJeLvwRFQ== X-Received: by 2002:a05:600c:4f55:: with SMTP id m21mr3871103wmq.11.1617711608470; Tue, 06 Apr 2021 05:20:08 -0700 (PDT) Received: from [192.168.1.14] ([84.9.134.236]) by smtp.gmail.com with ESMTPSA id 89sm27117154wrp.9.2021.04.06.05.20.07 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 06 Apr 2021 05:20:07 -0700 (PDT) Content-Type: multipart/related; type="multipart/alternative"; charset=us-ascii; boundary="4aF99Cb75BF81B64b38df31C99efc356aFBD1b5Effac2cAe00e2e2460feE8" Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.7\)) Subject: Re: Can no longer org-set-link-parameters with "fuzzy" link types From: Adam Sneller In-Reply-To: <877dlfmxc8.fsf@nicolasgoaziou.fr> Date: Tue, 6 Apr 2021 13:20:06 +0100 X-Mao-Original-Outgoing-Id: 639404406.501677-2658acb8806cadf31ac737637d5bd72b Content-Transfer-Encoding: quoted-printable Message-Id: <8C83BBE4-44A3-49AC-A86B-C478384C09F8@earth2adam.com> References: <9F561A9A-264D-4AED-AC4F-4FBB6D04516D@ms2.digital> <874kgkcjx1.fsf@kyleam.com> <877dlfmxc8.fsf@nicolasgoaziou.fr> To: Nicolas Goaziou X-Mailer: Apple Mail (2.3445.9.7) Received-SPF: none client-ip=2a00:1450:4864:20::344; envelope-from=adam@earth2adam.com; helo=mail-wm1-x344.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, MIME_QP_LONG_LINE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kyle Meyer , "emacs-orgmode@gnu.org" Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1617711699; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=AGWGDZVcMPg0HPpNcJBVYyTD5V14vr2PMm8pHJYZdSU=; b=S6Z562tHUdWEfJfEotQcrb42rS84yUX2Xva1lfC/llW66adZrD1Zks+qnoRI6t5YP3GMf4 kx8aScnpE80GbxLsfvAzqet16FtSPdEAbryZAKaqmolg24QncSQx1tMc8cLLHWGNMVbRH+ jGV85S4E4igRmET6fxx9+9A6klG1pTm/D4V9H1wVrUDv4jXHc+MgrVfpaGgvB4SXxUi1sl /F7UxUSSYprB3HC47kMnp41kDAhY+YV43vflPIILrYSYC1/MxX8pGOohEctTkGyAJf60Gg SLMGAzqnVUn5MFFmOOCbhG+m9pBa6uMSyNpKBRlYtmzgYGCqfSGJkJWHsgSvTA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1617711699; a=rsa-sha256; cv=none; b=CXkIERUIgdrtVmeP5tEqDG8QVlUcZo/IQiiX47AZRTg//GfJ6Gk/5ldC3arzduUiuIxun2 5+njFCQyikLJpZwGUJYYiF4JSPtTflWjXJW8/dnfE9BvK6OCN/bFGy+iaV31I6boHWyofo 1UQmPWkVht8LFtu6TEUchRWZIWkpU7mWmcO9FTRc22JpwoqKKJcNEX9UUWosRh9E+7g0zT ILtBdyQVVqPs6RIbyzyqaK3sEjXoETV4Rap/kGP4wtmY22Gk1LXivv6f8Bbf6p9AHhPMX8 NpKkGn+6OLONpt6In+gglDc8h9052c7r49/3bXmo9lzO+1NrbAgjYwl3BGmcRA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=earth2adam-com.20150623.gappssmtp.com header.s=20150623 header.b=z+eYe2VG; dmarc=none; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Spam-Score: -0.64 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=earth2adam-com.20150623.gappssmtp.com header.s=20150623 header.b=z+eYe2VG; dmarc=none; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: C87B11BBAB X-Spam-Score: -0.64 X-Migadu-Scanner: scn0.migadu.com X-TUID: 1BRPV38LajwD --4aF99Cb75BF81B64b38df31C99efc356aFBD1b5Effac2cAe00e2e2460feE8 Content-Type: multipart/alternative; boundary="1778e50Ae76Bd562Ae4aecb9_F542afFB0E732F05B1fdaAd6Ae6a538A2BEc" --1778e50Ae76Bd562Ae4aecb9_F542afFB0E732F05B1fdaAd6Ae6a538A2BEc Content-Type: text/plain; Content-Transfer-Encoding: quoted-printable Thank you both for the replies! Nicholas - can you recommend how to best implement this with font-lock-add-keywords? Best regards, -Adam > On 6 Apr 2021, at 13:06, Nicolas Goaziou wrote: > > Hello, > > Kyle Meyer 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 --1778e50Ae76Bd562Ae4aecb9_F542afFB0E732F05B1fdaAd6Ae6a538A2BEc Content-Type: text/html
Thank you both for the replies!

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

Best regards,

-Adam

> On 6 Apr 2021, at 13:06, Nicolas Goaziou wrote:
>
> Hello,
>
> Kyle Meyer 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
--1778e50Ae76Bd562Ae4aecb9_F542afFB0E732F05B1fdaAd6Ae6a538A2BEc-- --4aF99Cb75BF81B64b38df31C99efc356aFBD1b5Effac2cAe00e2e2460feE8--