From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Andreas =?UTF-8?Q?R=C3=B6hler?= Newsgroups: gmane.emacs.bugs Subject: bug#24969: 26.0.50; number-at-point Date: Mon, 21 Nov 2016 07:48:47 +0100 Message-ID: <37f0b2e5-f446-a8c4-635a-5cc120cbb66e@easy-emacs.de> References: <87fumm9uti.fsf@gmx.net> <2b644637-6ade-b00f-aa35-07c390fc92c7@easy-emacs.de> <87twb2jkzs.fsf@users.sourceforge.net> <70732268-f26e-8639-335b-0c58689b2a9d@easy-emacs.de> <4b460e35-7e65-4224-a52b-083f87b24c70@default> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1479710473 17726 195.159.176.226 (21 Nov 2016 06:41:13 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 21 Nov 2016 06:41:13 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux i686; rv:45.0) Gecko/20100101 Icedove/45.4.0 Cc: Stephen Berman , 24969@debbugs.gnu.org To: Drew Adams , Noam Postavsky Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Nov 21 07:41:08 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c8iHs-0003fK-8b for geb-bug-gnu-emacs@m.gmane.org; Mon, 21 Nov 2016 07:41:08 +0100 Original-Received: from localhost ([::1]:47803 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c8iHv-00089R-Nc for geb-bug-gnu-emacs@m.gmane.org; Mon, 21 Nov 2016 01:41:11 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51007) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c8iHp-00089A-7N for bug-gnu-emacs@gnu.org; Mon, 21 Nov 2016 01:41:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c8iHm-0003Iu-4U for bug-gnu-emacs@gnu.org; Mon, 21 Nov 2016 01:41:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:49469) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1c8iHm-0003Il-0Z for bug-gnu-emacs@gnu.org; Mon, 21 Nov 2016 01:41:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1c8iHl-0007fV-IL for bug-gnu-emacs@gnu.org; Mon, 21 Nov 2016 01:41:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Andreas =?UTF-8?Q?R=C3=B6hler?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 21 Nov 2016 06:41:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24969 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: unreproducible Original-Received: via spool by 24969-submit@debbugs.gnu.org id=B24969.147971043029429 (code B ref 24969); Mon, 21 Nov 2016 06:41:01 +0000 Original-Received: (at 24969) by debbugs.gnu.org; 21 Nov 2016 06:40:30 +0000 Original-Received: from localhost ([127.0.0.1]:36635 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c8iHF-0007eZ-Qr for submit@debbugs.gnu.org; Mon, 21 Nov 2016 01:40:30 -0500 Original-Received: from mout.kundenserver.de ([212.227.126.130]:56189) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c8iHC-0007eK-3c for 24969@debbugs.gnu.org; Mon, 21 Nov 2016 01:40:26 -0500 Original-Received: from [192.168.178.35] ([95.119.246.185]) by mrelayeu.kundenserver.de (mreue004 [212.227.15.167]) with ESMTPSA (Nemesis) id 0MLTGA-1c8A2V0vsA-000ZSv; Mon, 21 Nov 2016 07:40:01 +0100 In-Reply-To: <4b460e35-7e65-4224-a52b-083f87b24c70@default> X-Provags-ID: V03:K0:CQwTVbrutbjIYd/Es61M/V2sOhYUPkMHdmdvqszQHmPnmR/BCvz lQKmBPEUgtde6d5ql5A3xdgwWaizKd8OAER9vgXalM+YVjcfD/nVr3T3BEEYAhosjoo77Pq wC0LyHPCMCo3dINS0CwTvQb7ER+qIFmc1CpI0JYLiOL3WOmHhUrKtQmMatdiulginRF/j1I UBTkmsSnPq6YBfK/0KLeg== X-UI-Out-Filterresults: notjunk:1;V01:K0:htk1qCoqMSs=:kYPu4x3VzwRQLvEE+oDuVn 17YUUSadKz272C5Ep0qApmMxn5sKW96DBvSZ+04hjsmyWoi54yO7CDFgeKebXnXflweMbhDMT fFfMf+JwnchCdRhoMhGHcq0fJUT+D17KIDBCCSEXLC+XSqpbDrmMFRZXGfjLnyDXW0cFX7vxW 24eV3F0/1HmiK0OVEWz30v3JCP1vfx3/CcZ/oXaHHmi3/6Yda0pzyiZrMAmrA+aoWRU6EFeQw ApBckz1e7MTxaBWe1cPFuDRBY7/ILJgsxsZ8c07GsDBM6X1IlL5wKWVp3x0tFiknKItspwEmq PnKXpDxzpyJ3oYrQ+1T0xdrTfDby97uaDoKGvLyFZANsn3FPcIXTMrFoSS468Nn/OgiMtPuT7 xV8RUPDzgNHYuG/tCd8MfB5IMf7Bjou7WabDj5hfJ/wmfMDoSdLcSR+tsaLVjDzQU9unL4juV Vtj3SMnDS/3TMM37J0y3SHvHQJUR0mpOwYtrFzVYtmUOapv3TW5lxCWZXvq/eMNn9GC4eppfw cWJcD5dE2BlA6ICPO4uaguYRj6k2pZs+dXo3UG4CZQGb9E7A9a/oQwGgzJuv8dm+NXq1VjgRM PzHMovdeYNQC+VefNUaVJvZ1NmFQSGMrRVZ27COV6CycpuP3UwSWDRWtcsqoy6JLdu/MU3n37 Y8roive+JWaS95VS2DA+qy2XLlhvnhh8kn+j7HhlYtuLJHXCwExwRfpUs5gsvul7G3oIUQJ2S LYEsMQ7tFfFFGLPz X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:125937 Archived-At: On 20.11.2016 22:28, Drew Adams wrote: >>> 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. The perspective of the lisp-programmer and the user of an editor may be different here. The implementation at progress should pick any valid hex- octal- or decimal integer at point. In a related case even characters are raised here, returning a "b" for an "a", an "y" for an "x" etc. Thus smart-inserting a second (loop)-variable given there exist already a first one. > And that would > exclude picking up `2' within `foo-2'. Not, when for example filenames inside shell-scripts etc. are edited. > >> 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). Errrm, ar-add-to-number should DTRT, sorry.