bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#64739: (forward-thing 'number) doesn't work with decimal numbers


From: Eli Zaretskii
Subject: bug#64739: (forward-thing 'number) doesn't work with decimal numbers
Date: Mon, 24 Jul 2023 14:25:48 +0300

> From: Joseph Turner <joseph@breatheoutbreathe.in>
> Cc: winkler@gnu.org, 64739@debbugs.gnu.org
> Date: Sun, 23 Jul 2023 12:03:50 -0700
> 
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> > That's probably one idea, yes.  (But note that those regexps don't
> > support numbers like "1.0e2".)
> 
> I agree that the regexp solution is not ideal.
> 
> > Another idea is to define a special-purpose syntax table and use that
> > with forward-word.
> 
> Did you have something like this in mind?

More or less.  TBH, I didn't think about this too much, so maybe this
idea doesn't "hold water".

> > Yet another idea is to use 'read', since the Lisp reader already knows
> > how to read numbers.
> 
> Sounds interesting! I'm not sure how to approach a solution like that.
> How would you let the Lisp reader know where to start and stop reading?

Start is easy: 'read' always starts at point.  End might give us
trouble, but in general 'read' reads one expression, so it should stop
at the end of the number, no?

Anyway, I was just brain-storming.  A real solution will need more
thought and more testing.  Perhaps Stefan (CC'ed) has some ideas or
inputs.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]