From: Drew Adams <drew.adams@oracle.com>
To: "Andreas Röhler" <andreas.roehler@easy-emacs.de>,
"Noam Postavsky" <npostavs@users.sourceforge.net>
Cc: Stephen Berman <stephen.berman@gmx.net>, 24969@debbugs.gnu.org
Subject: bug#24969: 26.0.50; number-at-point
Date: Mon, 21 Nov 2016 06:22:20 -0800 (PST) [thread overview]
Message-ID: <7ed070bc-e4a7-468f-98e6-ac3b9660ed08@default> (raw)
In-Reply-To: <37f0b2e5-f446-a8c4-635a-5cc120cbb66e@easy-emacs.de>
> > But the question is, "What constitutes a numeral?" in the given
> > context. Whatever the context, I would expect some kind of
> > well-defined delimiting. In Lisp I would expect what the Lisp
> > reader would pick up as a number - nothing more.
>
> The perspective of the lisp-programmer and the user of an editor may
> be different here.
Too vague.
> The implementation at progress should pick any valid hex- octal- or
> decimal integer at point.
I disagree. Users should control whether they want a decimal,
octal, or hex number at point - or any kind of number. Those
are different things. In my code I define hex and decimal number
at point functions. When code wants to get only a decimal number
it does not want to pick up `FACE'. When code wants an octal
number it does not want `987'.
And nothing prevents a given context from defining a "number"
category. That's we had, for Lisp numbers. Other modes are
free to define a number syntax such that the (previous)
implementation of `number-at-point' - or any local,
mode/context-specific implementation, is in charge.
> In a related case even characters are raised here, returning
> a "b" for an "a", an "y" for an "x" etc.
Far too loose and useless. Thingatpt lets you define any number
of specific kinds of things. A predefined catch-all that does
lots of things that are not clear is not helpful.
> > In Lisp I would expect what the Lisp reader would pick up
> > as a number - nothing more. And that would exclude picking
> > up `2' within `foo-2'.
>
> Not, when for example filenames inside shell-scripts etc. are
> edited.
What part of Lisp reader was not clear? The (previous)
implementation uses what the current mode considers a number.
It is based on the Lisp reader, but users (or Emacs) can define
other number readings.
next prev parent reply other threads:[~2016-11-21 14:22 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-20 12:47 bug#24969: 26.0.50; number-at-point Andreas Röhler
2016-11-20 12:53 ` Stephen Berman
2016-11-20 13:53 ` Andreas Röhler
2016-11-20 14:15 ` npostavs
2016-11-20 16:19 ` Drew Adams
2016-11-20 16:35 ` Noam Postavsky
2016-11-20 16:58 ` Drew Adams
2016-11-20 19:26 ` Andreas Röhler
2016-11-20 21:28 ` Drew Adams
2016-11-21 6:48 ` Andreas Röhler
2016-11-21 14:22 ` Drew Adams [this message]
2016-11-21 13:09 ` Tino Calancha
2016-11-21 23:07 ` Drew Adams
2016-11-22 8:45 ` Andreas Röhler
2021-08-10 16:18 ` 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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7ed070bc-e4a7-468f-98e6-ac3b9660ed08@default \
--to=drew.adams@oracle.com \
--cc=24969@debbugs.gnu.org \
--cc=andreas.roehler@easy-emacs.de \
--cc=npostavs@users.sourceforge.net \
--cc=stephen.berman@gmx.net \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).