GNU bug report logs - #21391
24.5; `thing-at-point' returns error when called with arguments 'number t

Previous Next

Package: emacs;

Reported by: Tino Calancha <f92capac <at> gmail.com>

Date: Tue, 1 Sep 2015 01:57:01 UTC

Severity: minor

Found in version 24.5

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #106 received at 21391 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: 21391 <at> debbugs.gnu.org, tino.calancha <at> gmail.com
Subject: Re: bug#21391: 24.5; `thing-at-point' should return a string
Date: Wed, 09 Nov 2016 17:45:08 +0200
> Cc: tino.calancha <at> gmail.com, 21391 <at> debbugs.gnu.org
> From: Dmitry Gutov <dgutov <at> yandex.ru>
> Date: Wed, 9 Nov 2016 02:04:20 +0200
> 
> On 08.11.2016 17:05, Eli Zaretskii wrote:
> 
> > But then somehow the discussion shifted to be about whether to _force_
> > thing-at-point value to be a string, even if it isn't for some reason.
> 
> I'd suggest trying to fix that from the other end, as one alternative. 
> If we agree that the return value of thing-at-point should be a string, 
> (get 'number 'thing-at-point) can't return `number-at-point', it should 
> return a function that will return the said number as a string.
> 
> And of all things enumerated in thing-at-point's docstring, IIUC only 
> number has such problem. Which leaves third-party things, but, they will 
> either need to be fixed, or people will have to remain content not to 
> use thing-at-point with NO-PROPERTIES argument on them.

I don't think I understand what you are suggesting.  Can you show a
proposed patch, so I could see the light?

> > If
> > there is such code, why would we want to break it?  To what end?  And
> > if no code uses this loophole, why do we care that it exists?
> 
> To make thing-at-point behavior more consistent.

It is consistent now.  The only way to make it inconsistent is to have
a 'thing-at-point' property that violates that, but we never do that
in Emacs proper, so if someone else does that, it would be their bug.

> > IOW, thing-at-point no longer has any known bugs, and we are talking
> > about forcibly breaking a use case that does no harm to us, and can
> > only happen if someone abuses the 'thing-at-point' property, which
> > would make it that someone's bug/misfeature, for them to fix.
> 
> Yes. The fix is very easy, though, for projects that retain at least 
> somewhat active maintainer.

I might agree when I see a concrete proposal.

Thanks.




This bug report was last modified 4 years and 329 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.