From unknown Sat Aug 09 15:54:36 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#64664 <64664@debbugs.gnu.org> To: bug#64664 <64664@debbugs.gnu.org> Subject: Status: [PATCH] Ensure 'existing-filename' has 'bounds-of-thing-at-point' Reply-To: bug#64664 <64664@debbugs.gnu.org> Date: Sat, 09 Aug 2025 22:54:36 +0000 retitle 64664 [PATCH] Ensure 'existing-filename' has 'bounds-of-thing-at-po= int' reassign 64664 emacs submitter 64664 Philip Kaludercic severity 64664 normal tag 64664 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Sun Jul 16 08:03:43 2023 Received: (at submit) by debbugs.gnu.org; 16 Jul 2023 12:03:43 +0000 Received: from localhost ([127.0.0.1]:46989 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qL0TX-0000Pk-3Y for submit@debbugs.gnu.org; Sun, 16 Jul 2023 08:03:43 -0400 Received: from lists.gnu.org ([2001:470:142::17]:51906) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qL0TT-0000PV-HN for submit@debbugs.gnu.org; Sun, 16 Jul 2023 08:03:42 -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 1qL0TO-0001bt-88 for bug-gnu-emacs@gnu.org; Sun, 16 Jul 2023 08:03:34 -0400 Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qL0TM-0002wn-1r for bug-gnu-emacs@gnu.org; Sun, 16 Jul 2023 08:03:34 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id A9503240104 for ; Sun, 16 Jul 2023 14:03:29 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1689509009; bh=pPV02xhTmrseLcT4jpLFpkQ2sAOsk7VHOM/2a2J7S/Q=; h=From:To:Subject:Autocrypt:Date:Message-ID:MIME-Version:From; b=qnlnMieX6uR/E984xJ/02FtJxeJC2pXbKhC9057Zg8C6kEjcgUWc/TB0svuhsEYO7 f/oAC9kN5fBouk3j1SMFo3Zb1TptKI+w5p5j4vqvc7Rm7quNR4ZOfn/rrcqCb9Llq9 OmTgfj1Th+zYP7DIT+dX/G1MraMxYO/Ogn7jMB9giXt7UQer48Z2rmj9k27ofFdP5F T1RD/1BqvrkV0p1sqbq64x4rvXdMODILDOfTOHUzHbY26mDxtrQwwBxiGcWElY8wtq tlnS3uPdMkT7cTLJsPJc/NISCuzESiDSRIjUHouBOPZRAo7J6d0YmfsSs34frQSZQa yxaYxvcLr6kvw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4R3kPs2pwvz6trs for ; Sun, 16 Jul 2023 14:03:29 +0200 (CEST) From: Philip Kaludercic To: bug-gnu-emacs@gnu.org Subject: [PATCH] Ensure 'existing-filename' has 'bounds-of-thing-at-point' Autocrypt: addr=philipk@posteo.net; keydata= mDMEZBBQQhYJKwYBBAHaRw8BAQdAHJuofBrfqFh12uQu0Yi7mrl525F28eTmwUDflFNmdui0QlBo aWxpcCBLYWx1ZGVyY2ljIChnZW5lcmF0ZWQgYnkgYXV0b2NyeXB0LmVsKSA8cGhpbGlwa0Bwb3N0 ZW8ubmV0PoiWBBMWCAA+FiEEDg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwMFCQHhM4AFCwkI BwIGFQoJCAsCBBYCAwECHgECF4AACgkQ8xYDWXahwulikAEA77hloUiSrXgFkUVJhlKBpLCHUjA0 mWZ9j9w5d08+jVwBAK6c4iGP7j+/PhbkxaEKa4V3MzIl7zJkcNNjHCXmvFcEuDgEZBBQQhIKKwYB BAGXVQEFAQEHQI5NLiLRjZy3OfSt1dhCmFyn+fN/QKELUYQetiaoe+MMAwEIB4h+BBgWCAAmFiEE Dg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwwFCQHhM4AACgkQ8xYDWXahwukm+wEA8cml4JpK NeAu65rg+auKrPOP6TP/4YWRCTIvuYDm0joBALw98AMz7/qMHvSCeU/hw9PL6u6R2EScxtpKnWof z4oM Date: Sun, 16 Jul 2023 12:03:28 +0000 Message-ID: <875y6k12sv.fsf@posteo.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=185.67.36.66; envelope-from=philipk@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -53 X-Spam_score: -5.4 X-Spam_bar: ----- X-Spam_report: (-5.4 / 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, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H5=-1, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) --=-=-= Content-Type: text/plain Tags: patch Currently, it seems that (bounds-of-thing-at-point 'existing-filename) ;=> nil even if at the same time. (thing-at-point 'existing-filename) ;=> non-nil To reproduce in emacs -Q, write some existing filename into *scratch* and then using M-: evaluate the above expressions. I propose a simple fix in the patch below. In GNU Emacs 29.0.92 (build 4, x86_64-pc-linux-gnu, GTK+ Version 3.24.37, cairo version 1.16.0) of 2023-07-16 built on quetzal Repository revision: 17073af84d7eaedc81d84fc16f8aa0db215c6a31 Repository branch: emacs-29 System Description: Debian GNU/Linux 12 (bookworm) Configured using: 'configure --with-pgtk --with-native-compilation --with-imagemagick --with-tree-sitter' --=-=-= Content-Type: text/patch Content-Disposition: attachment; filename=0001-Ensure-existing-filename-has-bounds-of-thing-at-poin.patch >From fcde115d5748880ad7ebbf43a10753fb7014a6e1 Mon Sep 17 00:00:00 2001 From: Philip Kaludercic Date: Sun, 16 Jul 2023 13:56:23 +0200 Subject: [PATCH] Ensure 'existing-filename' has 'bounds-of-thing-at-point' * lisp/thingatpt.el (existing-filename): Define 'bounds-of-thing-at-point' for 'existing-filename'. --- lisp/thingatpt.el | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lisp/thingatpt.el b/lisp/thingatpt.el index 9363a474cb5..5b6f706bd15 100644 --- a/lisp/thingatpt.el +++ b/lisp/thingatpt.el @@ -359,6 +359,10 @@ thing-at-point-file-at-point (and (file-exists-p filename) filename))) +(put 'existing-filename 'bounds-of-thing-at-point + (lambda () + (and (thing-at-point 'existing-filename) + (bounds-of-thing-at-point 'filename)))) (put 'existing-filename 'thing-at-point 'thing-at-point-file-at-point) ;; Faces -- 2.39.2 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 22 03:22:03 2023 Received: (at control) by debbugs.gnu.org; 22 Jul 2023 07:22:04 +0000 Received: from localhost ([127.0.0.1]:35372 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qN6wF-0000Au-Lt for submit@debbugs.gnu.org; Sat, 22 Jul 2023 03:22:03 -0400 Received: from mout01.posteo.de ([185.67.36.65]:51789) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qN6wD-00009w-WC for control@debbugs.gnu.org; Sat, 22 Jul 2023 03:22:02 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 74E1B240027 for ; Sat, 22 Jul 2023 09:21:56 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1690010516; bh=evpE9E1EyzRQaZW5DyZDKnqgznAhHelLLjn8DIyoUBU=; h=Date:Message-Id:To:From:Subject:From; b=HbF+abvtVdNeGBCUusvyIVx5yeGT66z68DvmuqyR4vy05nnfqTQ+10AdUK1kIupLI AUVZiYU6XnqGmK5jsZP/NF39Nkpm4ed+hZS52UU7+0DNOYbBxgfFvI8mPI97rx87Zv bZFmuIe6ywyChn9NNEU7VVggpjI9fPvCS8rxRK3BMVlL+L1UfieIJhSuJWUx0bc211 pPO675qxwezBOFypdofGHiT19jVAF6L7DL7s5Uv4gMn2259u7xAZuUg5rnArKJLTJG WL9IaarZX05/cBkBGYcLXGWVdlDyPLf1a3Z8VOopo3B49SpFlZGr3bND4RB6VPdSd9 Poh6lR6zcH+DA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4R7HtD1N41z6ty9 for ; Sat, 22 Jul 2023 09:21:56 +0200 (CEST) Date: Sat, 22 Jul 2023 07:21:55 +0000 Message-Id: <87o7k4if70.fsf@posteo.net> To: control@debbugs.gnu.org From: Philip Kaludercic Subject: control message for bug #64664 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) close 64664 30.0 quit From unknown Sat Aug 09 15:54:36 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 19 Aug 2023 11:24:09 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator