[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#24969: 26.0.50; number-at-point
From: |
Drew Adams |
Subject: |
bug#24969: 26.0.50; number-at-point |
Date: |
Sun, 20 Nov 2016 13:28:46 -0800 (PST) |
> > I guess it depends on what a user would expect of a
> > "number-at-point" function. A priori, I don't see why s?he
> > would expect a non-nil answer if the numeral is embedded in
> > text that does not delimit a numeral (e.g. non whitespace text).
> > But maybe it is OK.
> >
> > Would we expect the same kind of behavior for `sexp-at-point'
> > if a sexp were not surrounded by chars that delimit a sexp?
> >
> > In Lisp, at least, there is no number at point, in `foo-2'.
> > That is, the Lisp parser (reader) would never pick up the
> > `2' as a number here.
> >
> > I'm partial to use of thingatpt for Lisp, but I realize that
> > it is used in other contexts too.
>
> In use here for edit-purposes. For example raise all numbers
> in a region - makes it easier sometimes to adapt stuff, which
> doesn't deserve an own template.
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. And that would
exclude picking up `2' within `foo-2'.
> Have a first implementation with ar-add-numbers in
> https://github.com/andreas-roehler/werkstatt/blob/master/misc/misc-
> utils.el - just re-writing it.
There is no `ar-add-numbers' or `add-numbers' in that file
(having downloaded it just now). Perhaps you meant
`ar-add-to-number-cummulative'? That is undefined, without
`ar-bounds-of-number-atpt' (not in the file).
Anyway, my point was made above.
- bug#24969: 26.0.50; number-at-point, Andreas Röhler, 2016/11/20
- bug#24969: 26.0.50; number-at-point, Stephen Berman, 2016/11/20
- bug#24969: 26.0.50; number-at-point, Andreas Röhler, 2016/11/20
- bug#24969: 26.0.50; number-at-point, npostavs, 2016/11/20
- bug#24969: 26.0.50; number-at-point, Drew Adams, 2016/11/20
- bug#24969: 26.0.50; number-at-point, Noam Postavsky, 2016/11/20
- bug#24969: 26.0.50; number-at-point, Drew Adams, 2016/11/20
- bug#24969: 26.0.50; number-at-point, Andreas Röhler, 2016/11/20
- bug#24969: 26.0.50; number-at-point,
Drew Adams <=
- bug#24969: 26.0.50; number-at-point, Andreas Röhler, 2016/11/21
- bug#24969: 26.0.50; number-at-point, Drew Adams, 2016/11/21
- bug#24969: 26.0.50; number-at-point, Tino Calancha, 2016/11/21
- bug#24969: 26.0.50; number-at-point, Drew Adams, 2016/11/21
- bug#24969: 26.0.50; number-at-point, Andreas Röhler, 2016/11/22