GNU bug report logs - #37458
27.0.50; number-at-point misses hex

Previous Next

Package: emacs;

Reported by: Andreas Röhler <andreas.roehler <at> easy-emacs.de>

Date: Thu, 19 Sep 2019 11:25:02 UTC

Severity: wishlist

Tags: fixed

Found in version 27.0.50

Fixed in version 27.1

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: Andreas Röhler <andreas.roehler <at> easy-emacs.de>
To: 37458 <at> debbugs.gnu.org
Subject: bug#37458: 27.0.50; number-at-point misses hex
Date: Thu, 19 Sep 2019 13:18:51 +0200
number-at-point from thingatpt.el doesn't recognize hex-numbers.

Currently defined like that:

(defun number-at-point ()
  "Return the number at point, or nil if none is found."
  (when (thing-at-point-looking-at "-?[0-9]+\\.?[0-9]*" 500)
    (string-to-number
     (buffer-substring (match-beginning 0) (match-end 0)))))

Maybe make the regexp customizable?

Thanks,

Andreas

In GNU Emacs 27.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 2.24.32)
 of 2019-09-12





This bug report was last modified 5 years and 263 days ago.

Previous Next


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