From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:8:6d80::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 2Ck3DfdObGD4zAAAgWs5BA (envelope-from ) for ; Tue, 06 Apr 2021 14:07:19 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id GBYlB/dObGClOAAA1q6Kng (envelope-from ) for ; Tue, 06 Apr 2021 12:07:19 +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 A72F424534 for ; Tue, 6 Apr 2021 14:07:18 +0200 (CEST) Received: from localhost ([::1]:40998 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lTkUH-0005Lo-So for larch@yhetil.org; Tue, 06 Apr 2021 08:07:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:32932) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lTkTP-0005L2-2X for emacs-orgmode@gnu.org; Tue, 06 Apr 2021 08:06:23 -0400 Received: from relay6-d.mail.gandi.net ([217.70.183.198]:42715) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lTkTM-0002lx-Hj for emacs-orgmode@gnu.org; Tue, 06 Apr 2021 08:06:22 -0400 X-Originating-IP: 185.131.40.67 Received: from localhost (40-67.ipv4.commingeshautdebit.fr [185.131.40.67]) (Authenticated sender: admin@nicolasgoaziou.fr) by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id AE687C0008; Tue, 6 Apr 2021 12:06:16 +0000 (UTC) From: Nicolas Goaziou To: Kyle Meyer Subject: Re: Can no longer org-set-link-parameters with "fuzzy" link types References: <9F561A9A-264D-4AED-AC4F-4FBB6D04516D@ms2.digital> <874kgkcjx1.fsf@kyleam.com> Mail-Followup-To: Kyle Meyer , Adam Sneller , "emacs-orgmode@gnu.org" Date: Tue, 06 Apr 2021 14:06:15 +0200 In-Reply-To: <874kgkcjx1.fsf@kyleam.com> (Kyle Meyer's message of "Mon, 05 Apr 2021 20:54:02 -0400") Message-ID: <877dlfmxc8.fsf@nicolasgoaziou.fr> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=217.70.183.198; envelope-from=mail@nicolasgoaziou.fr; helo=relay6-d.mail.gandi.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-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: Adam Sneller , "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=1617710838; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=QmxU8rf2LGCVGjUQ0UStCq0rlAFCDJpExW3i/xTZqOI=; b=reNbIyCO+ETsOKaHv44W3Hgj+NRptbbqCUFWEEgqlLgMgFOgG9W0Seoa36pq8sduHLFrUv u1PtekX2dpT3aPJA3ayC64+B7h0ZeEaolVVp8YB6RT5rSD3lHRQe6aCMeRQbxdZBFDNzur Ykwc9RNKlbkjJqGqXqYreKbPOvRxJ1IJwkUynFezXTifENpI5j5YKNPXMNhAehl4aNov8v Hofu/M9E24e8Div6HMUuTMwWks2jGqozDbG+ZgWnc8QXIQFkmek9XTBODG06ePFE80EUev mllEHE2IPGA5lHEv/j03PSinTiRiUWaTl9kdNKhGNrmK4H5Ff6Hj2s/JVsg4Ug== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1617710838; a=rsa-sha256; cv=none; b=U/lQRlaWuCBGYsu8Xaz3hsz2hbY1tZaMHYeA7urvYydJBxUIYaxpEz97MJtQzT0xjmuCjQ HYPd/9DRvAsGRvHVay0p+poPzFsM07wfDoNU4z+lXYTPek0iAp5DcQbdTLzb3PzW519I2Y +46Ls7w+XQoo7Zri4TBMdF85heu5Quf6QtN8q+vUy8QdePVSBz8VoTTOslGR+4a0ha8wV+ 1nDfrho0oLp7pY7PYG+JvwuNRlU5dE+KM6MUmSfyHggFRH8Oj1dLwNLGjVPwgS/EjLHuCY V6qekvwGTYtbzLThZ230VoCszfdB4YaU8BIiZ78pYUC+gTNWGWN0h36A5DpkjQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; 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.94 Authentication-Results: aspmx1.migadu.com; dkim=none; 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: A72F424534 X-Spam-Score: -0.94 X-Migadu-Scanner: scn0.migadu.com X-TUID: MrvXGsEBatpD 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