From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms1.migadu.com with LMTPS id oL6ADDZ/OWbTGAAAe85BDQ:P1 (envelope-from ) for ; Tue, 07 May 2024 03:09:10 +0200 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id oL6ADDZ/OWbTGAAAe85BDQ (envelope-from ) for ; Tue, 07 May 2024 03:09:10 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=kt5KzELA; 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=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1715044150; 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=OmjW/rIbjmiGi6dE4RS/gEemyAuAEkALlBuOJEd8gQ4=; b=l6FATpjguND8efXSZW9BqV58T9krH7lD/yKreij0hL/z8VJX9tpwXXt5tY1rZYkuxr0N2j YBHk+JaYtiTaHB2QHc3EJKhzz+0HrZNEauVmQ4ERplbFLHvjI0ioCtUq7YlNjaOUH9Kh80 93C6SdAaKGnOrkfWRCP6JkPN6RjIf/8N1AEMuuMaGmNoSemJdqti5bnLgPutEmHyCpRTTT wJFWUrT2eOJpm73WTKp+LKDkvCSKPj+m0ScZxsmSCk6mA8MJFyzd0YTOPkLi1LjvLN/2dQ a2bFnyfSZloeNUoiU0B4Z33JqxJfT/AZLJjZ97w5L/eoYuVUflfGuAwXTuAdUA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=kt5KzELA; 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=gmail.com ARC-Seal: i=1; s=key1; d=yhetil.org; t=1715044150; a=rsa-sha256; cv=none; b=RqTj6g1LLpH5gC4Bt1IjSmBooSZQ3Qjx7/VCbztuALYGH06oQ1Lt5R2pEGvc2D8zJ9As0F C12X77PtLgbTO/Nz2+a6S1gKsZHSKKJpG5hws2DSsHNbzAUH/fxhDnD/CTSvJCzbif/rab vJvsMujcDIHP4h7LGMqlzz6vYV0GDGzZsNFW7Ei3SsCxai3iGZRWCe4LKWvL5PZWQHV6wV DDdq4rRGiJqHIfnfi9SFM2ArUvs7WFhTXgIbOfpIadQsF3TZD+EYu0DQygXMEhQa8fOhIe 8K79778709YRIgkxELfyRsZI50ay8KFPSHvjChNmF4UbGSykDB8rxmYVTog+wA== 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 C80253C0EE for ; Tue, 7 May 2024 03:09:09 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s49Jb-0005ul-EM; Mon, 06 May 2024 21:08:19 -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 1s49JV-0005se-DW; Mon, 06 May 2024 21:08:13 -0400 Received: from mail-pg1-x532.google.com ([2607:f8b0:4864:20::532]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s49JT-0002ra-EP; Mon, 06 May 2024 21:08:13 -0400 Received: by mail-pg1-x532.google.com with SMTP id 41be03b00d2f7-5d3907ff128so2051602a12.3; Mon, 06 May 2024 18:08:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715044088; x=1715648888; 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=OmjW/rIbjmiGi6dE4RS/gEemyAuAEkALlBuOJEd8gQ4=; b=kt5KzELANMtg7iy47SbOdP4/OPV+NAxFxDgLvfzIoi5M0Psygjy3B7W0POikIVOokD dC4BCBW22yPkXWsuVTDq/TLFT9/lnEx7cBAqUXhB7GbTwFz9znFBVb12/qQz2VZOePdX o/Xcp/8ad6XZmb9ipabPCeL9UViT1Q44GuF/y2scQLyrcx/7/KbdCyCq8w76pFxbKzx9 Cc+xb5fa2038hT8mtB4r+aVcxIf1zoCzlYmf+hubXpIEiBcq7IXzYlw6AxqzKszOdrr3 YWCHtYBpSYzemE3WLmx0CBwfnOu6rWVBPJycXKtB1zYg2xVlcz99E7nsBNRs9Wfs25Pj WAbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715044088; x=1715648888; 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=OmjW/rIbjmiGi6dE4RS/gEemyAuAEkALlBuOJEd8gQ4=; b=t7XzIRk19M1/Lh0jlUIdKnuqQWjRBWFyC7Dlc3Gj6PsBz8HU2cWn+JLOBuJG2JpRQS uSXgF+4iBuUNvsTmKp/ZKKk9cJc3sbIugCO02H4k9Inmv+5BVOfe17vPkEr5EvZW0FtH jrXI/6hXU5ecWTOxENT+pBT6rmoKCsj0Zp8MRSSOr4BfANmi0l4NFJZ9mmwdtDfv1WVE KO/0wLwBP+gh5SlnOTDBEYYb2BEQCsaCs+S6l1RNmDpFt1Jf500JEZNLDYKdSmn+E6Nv nvFpXY7hLykdcBHCQVzIuna0g5OP+jKDPZ9viy/Xi9yNFIXd2vn/+NDOvdrngWBvwNj1 Sf2Q== X-Forwarded-Encrypted: i=1; AJvYcCXL8PKz8+AL6oahu0IqN4ZtX7GzfOCLqfknMGepmxxWDtXlAMqvnzwgZQh8/HLRtfdWwEhCp8417AiDE2Sbt0S5yBaJE+TLnH/P57YK1DlIXQe/IJSCR+y3klI= X-Gm-Message-State: AOJu0YyPVjveGk3r/pCrpoS7wazEQNjgebSt3SJ9HLy9SJo9qaunHWRh Wqf5JkxBCpImPUvSbS1Hm9me5Jc7/h3HM6ZTTL/8ZlPRo7AYuZtV X-Google-Smtp-Source: AGHT+IHE2JP/znPrWEXgUc3I2oGe9OngM/QJzBvBGV8/ejEd9cx/eDoKWvqHHrnAUrJaPO7CzGWTyQ== X-Received: by 2002:a05:6a21:3417:b0:1ad:6c36:ee82 with SMTP id yn23-20020a056a21341700b001ad6c36ee82mr16000734pzb.13.1715044087968; Mon, 06 May 2024 18:08:07 -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 kp4-20020a056a00464400b006e580678dfbsm8334621pfb.193.2024.05.06.18.08.07 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 06 May 2024 18:08:07 -0700 (PDT) Message-ID: Date: Mon, 6 May 2024 18:08:06 -0700 MIME-Version: 1.0 Subject: Re: RE: [External] : 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: Drew Adams , Ihor Radchenko Cc: "eliz@gnu.org" , "emacs-devel@gnu.org" , "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> From: Jim Porter In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Received-SPF: pass client-ip=2607:f8b0:4864:20::532; envelope-from=jporterbugs@gmail.com; helo=mail-pg1-x532.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-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -9.71 X-Spam-Score: -9.71 X-Migadu-Queue-Id: C80253C0EE X-Migadu-Scanner: mx13.migadu.com X-TUID: 6wQgOpgiYrJI On 4/30/2024 2:10 PM, Drew Adams wrote: >> 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. > > By "at the end" I assume you really mean just > _after_ a URL, i.e., no longer on/at the URL. > > FWIW, that's actually _superior_ behavior. > > Unfortunately however, Emacs has chosen the > behavior you describe here: > >> It's now consistent with how 'thing-at-point' >> works by default. > >> (If you have two consecutive URLs and point >> is between them...it'll prefer the second one.) > > Which is better! It's what "at point" means. [snip] > See bug #9300, " `bounds-of-thing-at-point' > does not return nil when just after THING". I agree overall that your proposed behavior is more correct, and it's probably how I'd have implemented 'thing-at-point' if I were doing it from scratch. However, I think an even worse outcome than "thing-at-point looks at point or before-point" is "sometimes thing-at-point just looks at point, and other times it looks at point or before-point" (which is what it does today). I'd even be open to something like a 'thing-at-point-is-strict' defvar that people could let-bind as wanted, but I'm not going to *argue* for that myself. Ultimately though, this patch is really just about providing the necessary defcustoms for org-mode to be able to use 'thing-at-point' (and for Ihor to feel ok about it ;)). Changing 'thing-at-point's behavior should probably be handled separately, especially since there'd be an uphill battle to revisit the decision in bug#9300.