From: Drew Adams <drew.adams@oracle.com>
To: Dmitry Gutov <dgutov@yandex.ru>, 9300@debbugs.gnu.org
Subject: bug#9300: 24.0.50; `bounds-of-thing-at-point' does not return nil when just after THING
Date: Fri, 26 Feb 2016 09:00:27 -0800 (PST) [thread overview]
Message-ID: <c3679a10-fbe1-4b06-8614-6c07ca51f189@default> (raw)
In-Reply-To: <74937597-35e0-4ee9-10dd-cc33eedfb084@yandex.ru>
> > I have much better-behaving list-at-point code. It's in the
> > same file, if you are really interested. It always returns nil
> > if the cursor is not on a list (there is no list at point),
> > including when point is at eob.
>
> I'd be interested in a patch. Especially if it's orthogonal
> (as it should be) to whatever we decide in this bug.
I'm interested in _this_ bug being fixed. Bugs for individual
THINGs are much more minor. This bug affects *all* THINGs - the
basic behavior of thing at point.
This about the basic behavior. But this is a bug that someone will
not notice if their only use of thingatpt.el is, as in your case,
to grab some text near point for completion or for use as a default
value. That is why this bug has gone unnoticed and unreported.
Such uses underestimate the power of thingatpt.el and misunderstand
what it is about. It is about more than trying to maximize the
possibility of getting something near point. It is important that
the functions can actually tell you, accurately, _whether_ there is
a THING at point. If you are looking to grab something near point
then you don't care about this. But that's not all of what
thingatpt.el is about.
If you want to get a THING that is at OR NEAR point then you should
use code that does that (I have such *_nearest_* code, and you are
beginning to work on some too, it seems). But thing-at-point (and
bounds) should not be corrupted to return a THING instead of nil
when there is no THING at point. That is, alas, currently the case.
But as I said, I do not need this bug fix for myself. I use my own
code, which does not have the bug. I had to fix it long ago, to
get reasonable behavior for navigating among and parsing multiple
THING occurrences. The boundary between one THING and another, and
between a THING and non-THING needs to be defined in a way that
is consistent and usable in a general way. That's not the case
if a THING _before_ point is returned when you try to test for
a THING at point.
Likewise for users of my libraries. I let them know that the
Isearch+ and Icicles features that act on successive THINGs in a
buffer will not work for some THINGs if they use only vanilla
thingatpt.el. For consistent and reliable use they will need to
also load thingatpt+.el. (My libraries do not _require_ it.)
I occasionally get a bug report to which I need to reply that
thingatpt.el has this bug and advise them to use thingatpt+.el
for things to work.
For them to take advantage of the code that really uses THINGs for
more than simply grabbing text near point to use as a default value
or for completion, this bug needs to be fixed. Or they need to use
thingatpt+.el. I would prefer that they be able to get the fixed
behavior from vanilla Emacs, but if not, no problem for me.
I filed the bug report for Emacs, not for me. But you know that.
next prev parent reply other threads:[~2016-02-26 17:00 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <<B1052724B2D446C59E233FC1BD437723@us.oracle.com>
2015-07-29 1:44 ` bug#9300: 24.0.50; `bounds-of-thing-at-point' does not return nil when just after THING Drew Adams
2016-01-15 13:33 ` Drew Adams
2016-02-23 1:01 ` Dmitry Gutov
2016-02-23 6:37 ` Drew Adams
2016-02-23 7:59 ` Andreas Röhler
2016-02-23 10:22 ` Dmitry Gutov
2016-02-23 16:15 ` Drew Adams
2016-02-24 0:52 ` Dmitry Gutov
2016-02-24 1:31 ` Drew Adams
2016-02-26 1:03 ` Dmitry Gutov
2016-02-26 1:44 ` Drew Adams
2016-02-26 10:15 ` Dmitry Gutov
2016-02-26 14:39 ` Drew Adams
2016-02-26 15:25 ` Dmitry Gutov
2016-02-26 17:00 ` Drew Adams [this message]
2022-04-28 11:24 ` Lars Ingebrigtsen
2022-04-28 15:49 ` Drew Adams
2011-08-14 22:36 Drew Adams
2016-06-20 9:21 ` Tino Calancha
2016-06-20 12:53 ` Dmitry Gutov
2016-06-20 13:11 ` Tino Calancha
2016-06-20 14:48 ` Eli Zaretskii
2016-06-21 3:01 ` Tino Calancha
[not found] ` <<8337o79arh.fsf@gnu.org>
2016-06-20 17:50 ` Drew Adams
2016-06-20 18:38 ` Andreas Röhler
2016-06-20 20:04 ` Eli Zaretskii
2016-06-21 6:14 ` Andreas Röhler
2016-06-21 12:50 ` Eli Zaretskii
2016-06-21 13:07 ` Andreas Röhler
2016-06-21 15:13 ` Eli Zaretskii
2016-06-21 13:31 ` Drew Adams
2016-06-21 15:16 ` Eli Zaretskii
2016-06-22 5:23 ` Fwd: " Andreas Röhler
2016-07-06 21:21 ` John Wiegley
2016-07-06 21:51 ` Dmitry Gutov
2016-07-06 23:31 ` Drew Adams
2016-07-07 8:00 ` Andreas Röhler
2016-06-21 13:25 ` Drew Adams
[not found] ` <<<8337o79arh.fsf@gnu.org>
[not found] ` <<0e2c9c67-12a2-4712-92d2-e3c204f46838@default>
[not found] ` <<83twgn7hjx.fsf@gnu.org>
2016-06-20 23:34 ` Drew Adams
2016-06-20 23:59 ` Noam Postavsky
2016-06-21 0:47 ` Drew Adams
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c3679a10-fbe1-4b06-8614-6c07ca51f189@default \
--to=drew.adams@oracle.com \
--cc=9300@debbugs.gnu.org \
--cc=dgutov@yandex.ru \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.