From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms1.migadu.com with LMTPS id aIHZI29mSGbyUAAAqHPOHw:P1 (envelope-from ) for ; Sat, 18 May 2024 10:27:27 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id aIHZI29mSGbyUAAAqHPOHw (envelope-from ) for ; Sat, 18 May 2024 10:27:27 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gnu.org header.s=fencepost-gnu-org header.b=bgsGTjr3; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1716020847; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=ku7sdAT2JjFb2f6X/r6WZZIBR3MlL68q/SeSsgB3/k0=; b=ElZkK17BxI/MsuTWcIV8sfGynmWdofAW5blLTTJn/bh06nW9ay0DDNSNVfVH7orJX0WH/N gEpotA9/Sp3TpCrcO2i5b9JQTSlRDqlYvEhBJlhez5aWFqdcYIA1vCeb0Bmfi6RREa8qWV B8IhMFUPhvBndUKJvZ3VDOfZJJEpYcgQpAuogC3VzPE7rtFG6vvDUHek6gqayfEtEP5bix Vxz+HxY9ULRiiOIt36CaGdYMhbpcjAP1mnGYuNak5oYxFhnozsheJNRXiLaviRiF6mOzju aUXm6V//LQ3/X4rlILfxV+et/3vWkMFjF6lIW9+IWhB5K/EmwcYi8KbBbyiXfA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gnu.org header.s=fencepost-gnu-org header.b=bgsGTjr3; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Seal: i=1; s=key1; d=yhetil.org; t=1716020847; a=rsa-sha256; cv=none; b=IjC+iLb7hno0gPkYrDsMpsZXlYjR/39eiVH+yCM/kpvkVrZD6vue1SXAsQHwgicsGKRVRe msXXqoVsp+Z4YP2h0taLTNjEatt433WtsBQt29SRYGQk1Llg+q2V6nSZPGh/r9hSe5DaWv 0i6C2VWfoOiTdHvi5BwNSlt3As9aLANu1NDa8xo+Hp+emIbXrp/OLqLMIPooSu5BkKuc6Y FoiBYsIDWqFSKcMTL2comvlBjLKccVNGvi8oKEWc5P+HCO7X5FbycwbyNSyLTWPZgzj/QS K6TK4SS3xJmCyLPF/yL2vCGN2QtxK/3ohA0G5sMyPUhOIIeNR05zozsk2ueqfA== 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 0D1626FAB4 for ; Sat, 18 May 2024 10:27:27 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s8FOl-0003sW-Li; Sat, 18 May 2024 04:26:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s8FOj-0003s3-OL; Sat, 18 May 2024 04:26:33 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s8FOj-00020i-6h; Sat, 18 May 2024 04:26:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=ku7sdAT2JjFb2f6X/r6WZZIBR3MlL68q/SeSsgB3/k0=; b=bgsGTjr3ixM5 jLiUrtTACkyQI6DbAI5m6hnkTHu9s6r0QkpfO2riCmhNlM1+n+kR2QLIc/+d1DnArdYQL/3g1dGUo 3cM6wcpLG3O2IHNNvSwBNCoUQjRjuRgxlhkJmN7GQswoCLQMR7OX0PRvZrGgLCFzuT/7KrUFI8Coo ygqjTXLyg83KOculiCgecxe9pLWSX9yjhcji5HfR1uu4ewzVqdicmAl33OBGl5jAOkfI6ZNn5a2Z+ +ik6zXtNGgZoo10RpfII7U5OM2zsPe+lXwFyc+BZhPNS9ljDfers18ZXBB3aG6YUe41wuILZ1UX87 L44DTiX3syKlXFssEWxyzA==; Date: Sat, 18 May 2024 11:26:29 +0300 Message-Id: <868r07fruy.fsf@gnu.org> From: Eli Zaretskii To: Jim Porter Cc: yantar92@posteo.net, emacs-devel@gnu.org, emacs-orgmode@gnu.org In-Reply-To: <2f344439-d0d6-a3e5-963c-773bb5c833d6@gmail.com> (message from Jim Porter on Tue, 30 Apr 2024 11:27:04 -0700) Subject: Re: Adding custom providers for thingatpt.el (was: [PATCH] Add support for 'thing-at-point' to get URL at point) References: <87leba3ame.fsf@localhost> <88435424-afa3-d7a3-56ff-df9f0a2ca6ba@gmail.com> <875xz39cgp.fsf@localhost> <87ttk6da89.fsf@localhost> <673a0f71-c91f-8461-7388-9efbed6ba24f@gmail.com> <0c66ae28-7088-3ac7-be39-7714b8f80455@gmail.com> <87mspcave3.fsf@localhost> <253c058a-d349-41a7-7733-c73075bffcb6@gmail.com> <87sez36pvl.fsf@localhost> <2f344439-d0d6-a3e5-963c-773bb5c833d6@gmail.com> X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Spam-Score: -10.96 X-Migadu-Queue-Id: 0D1626FAB4 X-Migadu-Scanner: mx10.migadu.com X-Migadu-Spam-Score: -10.96 X-TUID: H78M9Epwkm0C > Date: Tue, 30 Apr 2024 11:27:04 -0700 > Cc: eliz@gnu.org, emacs-devel@gnu.org, emacs-orgmode@gnu.org > From: Jim Porter > > On 4/30/2024 4:39 AM, Ihor Radchenko wrote: > > What happens if you have multiple providers for an URL? > > You add the provider to the end, so it will have the lower priority in > > this scenario. I guess that you want the opposite - EWW provider to take > > precedence. Same for other changes. > > That's probably reasonable. I was just keeping things the way they were > historically here, but we might as well fix this now. > > > It would make sense to add tests for "first wins" behaviour. > > Done. > > I've also fixed a bug in EWW and bug-reference-mode where it would > return nil for (thing-at-point 'url) if point was at the *end* of a URL. > It's now consistent with how 'thing-at-point' works by default. (If you > have two consecutive URLs and point is between them - only possible with > the custom provider function, I think - it'll prefer the second one.) I think you can install this now.