From: Drew Adams <drew.adams@oracle.com>
To: Rodrigo Morales <moralesrodrigo1100@gmail.com>,
"54555@debbugs.gnu.org" <54555@debbugs.gnu.org>
Subject: bug#54555: 28.0.91; number is not an accepted value for THING in bounds-of-thing-at-point
Date: Thu, 24 Mar 2022 21:13:22 +0000 [thread overview]
Message-ID: <SJ0PR10MB5488A9F50A30B3BFD6A2ABE1F3199@SJ0PR10MB5488.namprd10.prod.outlook.com> (raw)
In-Reply-To: <87wngjdrbg.fsf@gmail.com>
> 2. Insert the number "123" in any buffer (preferably, the current one,
> "*scratch*")
> 3. Place the cursor on any digit in the number that was written in the
> previous step
> 5. Evaluate this sexp (bounds-of-thing-at-point 'number) in a number.
>
> Current result
> "nil" is returned
> Expected result
> The boundaries of the number should be returned.
Yeah, `bounds-of-thing-at-point' is still somewhat broken
- at least neglected.
____
If you use `thing-at-point+.el' then
(bounds-of-thing-at-point 'number) and similar just work.
https://www.emacswiki.org/emacs/download/thingatpt%2b.el
____
In this case, you can code a fix yourself, with just this
(or similar):
(defun my-bounds-of-number-at-point ()
"Return the bounds of the number represented by the numeral at point.
Return nil if none is found."
(and (number-at-point) (bounds-of-thing-at-point 'sexp)))
(put 'number 'bounds-of-thing-at-point 'my-bounds-of-number-at-point)
next prev parent reply other threads:[~2022-03-24 21:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-24 20:32 bug#54555: 28.0.91; number is not an accepted value for THING in bounds-of-thing-at-point Rodrigo Morales
2022-03-24 21:13 ` Drew Adams [this message]
2022-03-25 16:32 ` Lars Ingebrigtsen
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=SJ0PR10MB5488A9F50A30B3BFD6A2ABE1F3199@SJ0PR10MB5488.namprd10.prod.outlook.com \
--to=drew.adams@oracle.com \
--cc=54555@debbugs.gnu.org \
--cc=moralesrodrigo1100@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).