From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#69239: 30.0.50; number-at-point and bounds-of-thing-at-point disagree Date: Sat, 24 Feb 2024 11:17:20 +0200 Message-ID: <86o7c6z0f3.fsf@gnu.org> References: <871q9c4mtv.fsf@gmail.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21897"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 69239@debbugs.gnu.org To: Visuwesh Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Feb 24 10:19:22 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rdoBm-0005RX-1n for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 24 Feb 2024 10:19:22 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rdoB6-0000Ro-5f; Sat, 24 Feb 2024 04:18:40 -0500 Original-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 1rdoB4-0000Qa-Dk for bug-gnu-emacs@gnu.org; Sat, 24 Feb 2024 04:18:38 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rdoB4-0000yO-5V for bug-gnu-emacs@gnu.org; Sat, 24 Feb 2024 04:18:38 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rdoBS-0006RX-4J for bug-gnu-emacs@gnu.org; Sat, 24 Feb 2024 04:19:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 24 Feb 2024 09:19:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69239 X-GNU-PR-Package: emacs Original-Received: via spool by 69239-submit@debbugs.gnu.org id=B69239.170876628224579 (code B ref 69239); Sat, 24 Feb 2024 09:19:02 +0000 Original-Received: (at 69239) by debbugs.gnu.org; 24 Feb 2024 09:18:02 +0000 Original-Received: from localhost ([127.0.0.1]:41654 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rdoAQ-0006Ny-NK for submit@debbugs.gnu.org; Sat, 24 Feb 2024 04:18:02 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:59200) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rdoAL-0006NR-Gn for 69239@debbugs.gnu.org; Sat, 24 Feb 2024 04:17:57 -0500 Original-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 1rdo9s-0000hc-2f; Sat, 24 Feb 2024 04:17:24 -0500 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=j9WWoeSWX/EVm+aSoe44f1bswFkVyU/OSRW+BOwp/jY=; b=KiCoK1KNfCwC D4exb45gXxRST4jBxSG4OSwr+2WmqUSnrOc/t2RNwhDzoMpFfaKkdRJ4+IaVDMD/LX2KYUDk2yODW 3+0K53PyE8thiFpOWcoXzgRhd0sRAOe1H1EFo8Km6QDFDQeGj8aIc7OgJ1DPfXSiLs1nQ/08h49+z WJ2S5Od9QRhUeHhd/KQRqFj8jVMGBI81WDXPzYIy+6E2ZNvkfZ++SaCo3E4i7JodX7Erfy3a9dUK8 htHhjojSqPRVHysPLDalkoZFe+ocxMHhGUP03AE0V5AWajnpxM7m0uLRw/Tog5ATCQ2HZvXqYWEiA /QI1CfnIJrc4tLTVS9DVTA==; In-Reply-To: <871q9c4mtv.fsf@gmail.com> (message from Visuwesh on Fri, 16 Feb 2024 17:56:20 +0530) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:280529 Archived-At: > From: Visuwesh > Date: Fri, 16 Feb 2024 17:56:20 +0530 > > > The bounds returned by (bounds-of-thing-at-point 'number) does not match > the bounds of the number returned by number-at-point. To demonstrate: > > 1. emacs -Q > 2. Write any number in the scratch buffer, say 14.6. > 3. With point on the number, say M-: (number-at-point) RET and > observe 14.6 being returned. > 4. Now say, > > M-: (let ((x (bounds-of-thing-at-point 'number))) (buffer-substring (car x) (cdr x))) RET > > and observe the incorrect value of 14 being returned. > > This is because the 'forward-op' property for 'number' thing is > forward-word which fails in certain modes (not just in Elisp buffers, > but also in LaTeX buffers). What do you think about a patch like below > that adds an explicit bounds-of-thing-at-point property to 'number' > thing? We could perhaps add something like this, but I don't think bounds-of-thing-at-point can call THING-at-point for some THING, because thing-at-point will cal bounds-of-thing-at-point, so this could lead to an infinite recursion, right? So the implementation will need to change not to call number-at-point.