From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:1008:1e59::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms1.migadu.com with LMTPS id aEV4IKmzS2ZGCAEAA41jLg (envelope-from ) for ; Mon, 20 May 2024 22:33:45 +0200 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id mER0HamzS2ae7wAA62LTzQ (envelope-from ) for ; Mon, 20 May 2024 22:33:45 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=mQFFPzuA; dmarc=pass (policy=none) header.from=gmail.com; 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" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1716237225; a=rsa-sha256; cv=none; b=qq2kFG5soBJki1+riEWdjgGqjj0PYwC8x/G7RMVXQoy3VZ0mJGGpblBFZOh8z3O9uLbySo zay7JPq02JoSnbHuWy2hrxZ/YloZTFDPB2mq8I4Uu7o6m820NMlBhRDJgUzvAx/aWtAMWE x6nWtXKy5JzVdejy+OC3JY4ddroxvEHp5FLANb2qsNLNcoUnLptl4p+Bwc6vIhF4S9XbrH r/5+SuGOb5XQYUAfNyyy3IvTy+Gkuse7PA3gS6d0VQaEjLP+WsTF0mvXecb1AkpxzCyw0E ksneE76CbtHz+M6v8mrtJNF7FzRS+A3j2vBxJ7RIGTioNwCrsuXJxRt2sJjvBQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=mQFFPzuA; dmarc=pass (policy=none) header.from=gmail.com; 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1716237225; 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=c3FJNMEM5Lex1HkdgJpjf/QlgkdasjLsBvRcOEdLi3U=; b=pOTqUFd3HdQZdPYcmfG74PmiZsUwdnxUGBmBSgpmYedNnZRkWajkBcz+Kt7oQjtZmNaPgf URD2x+j0asFBj/cg3LR332E8qcJMmKbSCtp0NBfqsADzmS3KpwsiZNNKQmqOrnpTWmw6Do zWtk4IPU5hTOyNGP05RwbypN23hwrf06gjniMBeyTKvHNSq2g7nLzCuHyCRYqEhZO//j4i PVpSdeLW/Gt6lEABwgemd7J2egIYYmdklrYy02s1b0Ozz3wZAppnrVihY1fWX/dtoHrivt dtNx/RZb5hCxl0xnIaN5i8JZxT88C3yVqieTrGiUMnla+YMG4tbAjeiaoR6EHg== 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 58DB9353E3 for ; Mon, 20 May 2024 22:33:45 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s99gl-00050Y-LR; Mon, 20 May 2024 16:32:55 -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 1s99gU-000504-Je for emacs-orgmode@gnu.org; Mon, 20 May 2024 16:32:40 -0400 Received: from mail-pl1-x630.google.com ([2607:f8b0:4864:20::630]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s99gT-0000Yb-0t for emacs-orgmode@gnu.org; Mon, 20 May 2024 16:32:38 -0400 Received: by mail-pl1-x630.google.com with SMTP id d9443c01a7336-1ee954e0aa6so57170125ad.3 for ; Mon, 20 May 2024 13:32:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1716237152; x=1716841952; darn=gnu.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:mime-version:date:message-id:from:to:cc :subject:date:message-id:reply-to; bh=c3FJNMEM5Lex1HkdgJpjf/QlgkdasjLsBvRcOEdLi3U=; b=mQFFPzuAHHp6WXOkFrvh5YcCcGpNmL3mOAnc4VG3WwI02Z6PGsAxlthCaWWDkmlnKb Iu72DUDUjHNqyeL6dSClK8JdEcOOS6xwE4ifXZTQ25lvtQsywJa4L0nCERwdHMeqkiCA nv+Cz1EwH+eY+s4pZZTCyfBiHWLrEnPNcI8EKUXAQczFCoQfxgYMX51KcsPLikixoaWJ VNaXYTmIhosSnrdeNNLvzsHR24VJccPeS0Kb5jWSUd8/IEP4Bsd2sld/0Rj/pPV/jV1t DI6UCjg5jPreAZ+iVsvWqsL1m2NYKkSKBa20G6yauBUdyXocoaqw+V2TEjTFqdlY+Gq8 c8Lg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716237152; x=1716841952; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=c3FJNMEM5Lex1HkdgJpjf/QlgkdasjLsBvRcOEdLi3U=; b=Y5+91MFs0ZSf3e2ANYz7+/SV1QOQrlU4gwRPYCwXMkrCRukdjzfOImUVlE9OSz0smv 45KxK17WX2LeClKbnVA7+snIaK4CG1K/aQHajDfXn6wPgDq2r7ato9KUParWAeMZEzJA 4IMMEQyKhWKuBP3K/JlQut+VfhuWWdXUHMchU50a1SrKWCywQBbTep6sdGUpl84D5HFX tzJkH8onhvNbNVOFQKakENj4NrEETx6vm6JMZI9BJEF0OWBvx3HWgjmcGKPs/vmv6GhK 9nYxgTUVg0s0RwPNCJvLdDhWsYtQZGsNZxnC6mVQChmTXEBiqPoHy1THOpehnQGAf4S+ +KKA== X-Gm-Message-State: AOJu0Yw6nxkq2JjeAAqAzuj3avQWphzcfwKFR/ZHYIUTqlT4YA4F7iQ9 upV6/Qbj9LMH2wwDped/W9Locv63aFz8XFOlls8b6fhyE3oFkentd4sBVw== X-Google-Smtp-Source: AGHT+IGb0HBP/3Sb5jSjtu5MS/+2hgp2fGW+QuNbbfOzj9HVoabUcv0GYGPq0OwIlu3Cz71eMDI7SA== X-Received: by 2002:a17:90b:1110:b0:2ba:3ed8:5113 with SMTP id 98e67ed59e1d1-2ba3ed85204mr12124440a91.3.1716237151895; Mon, 20 May 2024 13:32:31 -0700 (PDT) Received: from [192.168.1.2] (syn-023-240-098-037.res.spectrum.com. [23.240.98.37]) by smtp.googlemail.com with ESMTPSA id d9443c01a7336-1f306dd2f1fsm15636375ad.282.2024.05.20.13.32.31 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 20 May 2024 13:32:31 -0700 (PDT) Message-ID: <9a9eb3b1-9a48-4868-fb80-7a7b23c535e3@gmail.com> Date: Mon, 20 May 2024 13:32:30 -0700 MIME-Version: 1.0 Subject: Re: Adding custom providers for thingatpt.el (was: [PATCH] Add support for 'thing-at-point' to get URL at point) Content-Language: en-US To: Ihor Radchenko Cc: emacs-orgmode@gnu.org 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> <868r07fruy.fsf@gnu.org> <2a1c5aa9-9ede-3024-fd93-56251a01f68f@gmail.com> <87seycrci8.fsf@localhost> From: Jim Porter In-Reply-To: <87seycrci8.fsf@localhost> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Received-SPF: pass client-ip=2607:f8b0:4864:20::630; envelope-from=jporterbugs@gmail.com; helo=mail-pl1-x630.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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.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-Migadu-Queue-Id: 58DB9353E3 X-Migadu-Scanner: mx12.migadu.com X-Migadu-Spam-Score: -7.80 X-Spam-Score: -7.80 X-TUID: 8jBT5EDYgBRq On 5/20/2024 3:41 AM, Ihor Radchenko wrote: > Jim Porter writes: > >> + (when (boundp 'forward-thing-provider-alist) >> + (setq-local forward-thing-provider-alist >> + (cons '(url . org-next-link) >> + forward-thing-provider-alist))) > > According to the docstring, functions in `forward-thing-provider-alist' > should accept a single argument - the number of "things" to skip > forward/backward. But it is not what `org-next-link' expects. In a twist, it turns out *this* patch for Org-mode was correct, and my prior patch for thingatpt.el was wrong. In short, 'forward-thing' now calls the functions in 'forward-thing-provider-alist' with a BACKWARD flag, rather than an integer N. That's because 'forward-thing' needs to account for the case where you have multiple providers for the same "thing", and so it needs to go one at a time checking all the providers for the best match (read: the one that moves point by the smallest non-zero amount). I've now pushed the thingatpt fix to the Emacs master branch.