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


View this message in rfc822 format

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Drew Adams <drew.adams <at> oracle.com>, Eli Zaretskii <eliz <at> gnu.org>
Cc: 21391 <at> debbugs.gnu.org, tino.calancha <at> gmail.com
Subject: bug#21391: 24.5; `thing-at-point' should return a string
Date: Thu, 10 Nov 2016 10:55:47 +0200
On 10.11.2016 02:40, Drew Adams wrote:

> What do YOU think is the point of putting property `thing-at-point'
> on a THING type?

Being lazy or unable to make up your mind. Or maybe some kind of 
micro-optimization.

> You will see things like this in thingatpt.el:
>
> (put 'url 'thing-at-point 'thing-at-point-url-at-point)
>
> (put 'email 'thing-at-point
>      (lambda ()
>        (let ((boundary-pair (bounds-of-thing-at-point 'email)))
>          (if boundary-pair
>              (buffer-substring-no-properties
>               (car boundary-pair) (cdr boundary-pair))))))

Try removing these two in your local Emacs, save and restart (maybe do a 
rebuild as well, to be sure).

(thing-at-point 'url) and (thing-at-point 'email) will continue to work 
fine.

> (put 'number 'thing-at-point 'number-at-point)
>
> And that's only a few predefined uses of it.  One of the main
> points of the library is to provide tools that you can use to
> define your functions that implement providing a THING at point.

Search my messages for the word "third-party".




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.