From: Eli Zaretskii <eliz@gnu.org>
To: Visuwesh <visuweshm@gmail.com>
Cc: 69239@debbugs.gnu.org
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 [thread overview]
Message-ID: <86o7c6z0f3.fsf@gnu.org> (raw)
In-Reply-To: <871q9c4mtv.fsf@gmail.com> (message from Visuwesh on Fri, 16 Feb 2024 17:56:20 +0530)
> From: Visuwesh <visuweshm@gmail.com>
> 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.
next prev parent reply other threads:[~2024-02-24 9:17 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-16 12:26 bug#69239: 30.0.50; number-at-point and bounds-of-thing-at-point disagree Visuwesh
2024-02-24 9:17 ` Eli Zaretskii [this message]
2024-02-25 4:42 ` Visuwesh
2024-02-25 6:38 ` Eli Zaretskii
2024-03-09 9:48 ` Visuwesh
2024-03-14 9:42 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=86o7c6z0f3.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=69239@debbugs.gnu.org \
--cc=visuweshm@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).