From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#64739: (forward-thing 'number) doesn't work with decimal numbers Date: Mon, 24 Jul 2023 14:25:48 +0300 Message-ID: <83351dtutf.fsf@gnu.org> References: <87cz0n6qvp.fsf@breatheoutbreathe.in> <831qh33x46.fsf@gnu.org> <87o7k54ff6.fsf@gnu.org> <83tttxzb08.fsf@gnu.org> <83r0p1zatl.fsf@gnu.org> <878rb94ahz.fsf@gnu.org> <83bkg5banh.fsf@gnu.org> <87pm4j9tzm.fsf@breatheoutbreathe.in> <83mszn6vjs.fsf@gnu.org> <87o7k2xv6h.fsf@breatheoutbreathe.in> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3313"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 64739@debbugs.gnu.org, winkler@gnu.org To: Joseph Turner , Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jul 24 13:26:32 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qNthw-0000hS-A4 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 24 Jul 2023 13:26:32 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qNthf-0006y2-Li; Mon, 24 Jul 2023 07:26:18 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qNthT-0006xl-1i for bug-gnu-emacs@gnu.org; Mon, 24 Jul 2023 07:26:03 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qNthS-0001dm-QJ for bug-gnu-emacs@gnu.org; Mon, 24 Jul 2023 07:26:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qNthS-0005DM-2E for bug-gnu-emacs@gnu.org; Mon, 24 Jul 2023 07:26:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 24 Jul 2023 11:26:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64739 X-GNU-PR-Package: emacs Original-Received: via spool by 64739-submit@debbugs.gnu.org id=B64739.169019792920005 (code B ref 64739); Mon, 24 Jul 2023 11:26:02 +0000 Original-Received: (at 64739) by debbugs.gnu.org; 24 Jul 2023 11:25:29 +0000 Original-Received: from localhost ([127.0.0.1]:41908 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qNtgv-0005Cb-4X for submit@debbugs.gnu.org; Mon, 24 Jul 2023 07:25:29 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59546) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qNtgt-0005CN-4O for 64739@debbugs.gnu.org; Mon, 24 Jul 2023 07:25:28 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qNtgm-0001Nn-K1; Mon, 24 Jul 2023 07:25:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=GaUBWJclHlXadjD6WRezAcPZInURWidgWoXDqdA4Yg0=; b=E2Lib1FMthsH AVRRyjBOHl8yZmtcwhSD+3byn/HPeOTwMk7HNlAiZIGRmahETmv5ZCEhfB0bTA0r0aPOoMchCRGUB bXOnzG6o6SXNRLk4jnRlpx14Yy94BXHZe71oQ9CXdTIpb9TQCqw+Sv2Mpa+l+L8dAz2iACSOnslr0 Ex/793hpdZGlc00FNB8B3CTImz0tnvyOCP7Pl507yLQ03Xx9BUo3WbUw7tq+RVtwRuGTdCaDpDURK 0M+/J4ZS1Vk5FmL80LNkTsDxIlO5m3jge2LAqLQQTHxWN3tQmOWC/MwlmDAJZwSX2KVglAhI6OjIP JU2qYeN1P5+L3qndi5CNXQ==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qNtgX-0000eR-BM; Mon, 24 Jul 2023 07:25:18 -0400 In-Reply-To: <87o7k2xv6h.fsf@breatheoutbreathe.in> (message from Joseph Turner on Sun, 23 Jul 2023 12:03:50 -0700) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:265948 Archived-At: > From: Joseph Turner > Cc: winkler@gnu.org, 64739@debbugs.gnu.org > Date: Sun, 23 Jul 2023 12:03:50 -0700 > > > Eli Zaretskii 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.