Subject: Re: bug#21391: 24.5; `thing-at-point' should return a string

From: Andreas Röhler <[email-masked]>
Date: Mon, 14 Nov 2016 11:26:54 +0100

On 14.11.2016 03:43, Drew Adams wrote:
>>> I can suggest adding a new function, with the features you
>>> mention.   We could even deprecate thing-at-point and advise
>>> to use the new one instead.
>> In this vein, I would propose deprecating `thing-at-point' in favor
>> of `bounds-of-thing-at-point', which should provide all the necessary
>> information for a `buffer-substring' call anyway (when it works).
> This is really going from bad to worse.  But I can't say I'm
> surprised.
>
> Eli suggested to keep the behavior backward-compatible, rather
> than ensuring that the return value is a string.  That is a
> reasonable approach.  It's OK by me.

IMHO the current design is really confusing and shouldn't be kept.

Look at the start of thing-at-point implementation:

if (get thing 'thing-at-point)
              (funcall (get thing 'thing-at-point))

AFAIU an arbitrary function might  be stored here, no real relation to 
thing-at-point at all.

Next clause deals with buffer-substring - which is thing-at-point about 
in my understanding.