From: Drew Adams <drew.adams@oracle.com>
To: Jean Louis <bugs@gnu.support>
Cc: Robert Pluim <rpluim@gmail.com>,
"help-gnu-emacs@gnu.org" <help-gnu-emacs@gnu.org>
Subject: RE: [External] : Re: (bounds-of-thing-at-point 'number) ⇒ nil
Date: Sun, 6 Feb 2022 08:44:21 +0000 [thread overview]
Message-ID: <SJ0PR10MB5488E9284BDFE0782474EB83F32B9@SJ0PR10MB5488.namprd10.prod.outlook.com> (raw)
In-Reply-To: <Yf9m1V2kNHA13Ri9@protected.localdomain>
> What was the reason why the library is not included,
> or was it maybe rejected, to improve the built-in
> thingatpt.el?
It wasn't wanted. And in particular the fix to
return nil when there's no such thing at point
but there is such a thing at (1- point) wasn't
wanted.
The bug for that is bug #9300:
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=9300
If someone uses thing-at-point only to get a
default value then they might not care that
it's bugged, and they might insist that it's
good that it returns a thing when there's no
thing at point - more chance to get a default
value.
But the bug of returning non-nil when there's no
thing at point makes other uses of thing-at-point
impossible. With that bug you have only the
forward/backward commands, but no way to define
zones of text that correspond to the presence
of things. With that bug you can't have a
workable notion of next- or previous-thing.
With Isearch+ you can search the text of things
(sexps, lists, defuns, lines, pages, sentences,
file names, strings, comments, xml/html elements,
symbols,...)
This means search within THING search contexts.
Search through the zones of text that correspond
to a given kind of thing. Or the complement:
search the contexts outside the things.
As mentioned in bug #9300, for that Isearch+
code to work also for vanilla thingatpt.el, it
needs a tweak to compensate for the off-by-one
bug that returns the thing at (1- point) when
there's no thing at point.
I put it this way in bug #21391:
I really disagree with what seems to be your view of
thingatpt.el functionality.
I disagreed with it strongly in the context of bug
#9300, where you were the lone voice proclaiming it.
You apparently view the only use of this functionality
as returning a string near (not at) point that can be
used as an input default value. thingatpt.el is much
more than that. It is very important that it be able
to be used to test whether there (really) is a given
THING _at_ point (not just somewhere near point).
next prev parent reply other threads:[~2022-02-06 8:44 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-04 12:47 (bounds-of-thing-at-point 'number) ⇒ nil Jean Louis
2022-02-04 13:20 ` tomas
2022-02-04 14:20 ` Emanuel Berg via Users list for the GNU Emacs text editor
2022-02-04 14:41 ` Robert Pluim
2022-02-04 14:50 ` Emanuel Berg via Users list for the GNU Emacs text editor
2022-02-04 21:29 ` [External] : " Drew Adams
2022-02-06 6:12 ` Jean Louis
2022-02-06 8:44 ` Drew Adams [this message]
2022-02-06 8:43 ` Drew Adams
2022-02-04 15:19 ` [External] : " Drew Adams
2022-02-04 15:35 ` Jean Louis
2022-02-04 15:50 ` Drew Adams
2022-02-04 16:55 ` Jean Louis
2022-02-04 21:29 ` Drew Adams
2022-02-04 21:46 ` Drew Adams
2022-02-05 0:54 ` Emanuel Berg via Users list for the GNU Emacs text editor
2022-02-05 1:36 ` Drew Adams
2022-02-05 1:56 ` Emanuel Berg via Users list for the GNU Emacs text editor
2022-02-05 17:27 ` Drew Adams
2022-02-06 15:48 ` Emanuel Berg via Users list for the GNU Emacs text editor
2022-02-06 6:08 ` Jean Louis
2022-02-06 7:02 ` Drew Adams
2022-02-06 8:10 ` Jean Louis
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=SJ0PR10MB5488E9284BDFE0782474EB83F32B9@SJ0PR10MB5488.namprd10.prod.outlook.com \
--to=drew.adams@oracle.com \
--cc=bugs@gnu.support \
--cc=help-gnu-emacs@gnu.org \
--cc=rpluim@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.
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).