all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: "Drew Adams" <drew.adams@oracle.com>
Cc: 8634@debbugs.gnu.org
Subject: bug#8634: 24.0.50; `number-at-point' returns char value for `?' constructs - 1) doc, 2) new fns
Date: Sat, 08 Feb 2014 22:45:02 -0800	[thread overview]
Message-ID: <87lhxk7pjl.fsf@building.gnus.org> (raw)
In-Reply-To: <458B95C58F7348C2AA62A340071C6E1C@us.oracle.com> (Drew Adams's message of "Sat, 7 May 2011 08:30:22 -0700")

"Drew Adams" <drew.adams@oracle.com> writes:

> `number-at-point' is defined like this:
>
> (defun number-at-point ()
>   "Return the number at point, or nil if none is found."
>   (form-at-point 'sexp 'numberp))
>
> That uses `read-from-string' for the sexp at point, and testing whether the
> result is `numberp'.
>
> That's fine, I guess, but it means that with buffer text such as ?A or ?\A-\^@
> you get a non-nil result: the character value (wholenump) for ?A, which is 65,
> and 4194304, respectively.  If you are depending on code to find _numerals_ in
> text and return their numeric values then this is not what you want.  In that
> case, you want a function that returns nil when point is not on a numeral.

Looks like this is fixed now.  Closing.  Please reopen if you're still
seeing this.

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/





  parent reply	other threads:[~2014-02-09  6:45 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-07 15:30 bug#8634: 24.0.50; `number-at-point' returns char value for `?' constructs - 1) doc, 2) new fns Drew Adams
2011-05-07 15:34 ` bug#8634: 24.0.50; `number-at-point' returns char value for `?' constructs - 1) doc, 2)new fns Drew Adams
2014-02-09  6:45 ` Lars Ingebrigtsen [this message]
2014-02-09 16:17   ` bug#8634: 24.0.50; `number-at-point' returns char value for `?' constructs - 1) doc, 2) new fns Eli Zaretskii
2014-02-10  1:04     ` Lars Ingebrigtsen
2014-02-10  1:20       ` Drew Adams
2014-02-10  2:20         ` Lars Ingebrigtsen
2014-02-10  3:20           ` Drew Adams
2014-02-10  3:59             ` Eli Zaretskii
2014-02-10  3:41       ` Eli Zaretskii
2014-02-10  3:59         ` Lars Ingebrigtsen
2014-02-10  4:06           ` Drew Adams
2014-02-10 14:27             ` Nicolas Richard
2016-04-28 10:38               ` Lars Ingebrigtsen

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=87lhxk7pjl.fsf@building.gnus.org \
    --to=larsi@gnus.org \
    --cc=8634@debbugs.gnu.org \
    --cc=drew.adams@oracle.com \
    /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.