From unknown Wed Aug 20 02:46:50 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#16834 <16834@debbugs.gnu.org> To: bug#16834 <16834@debbugs.gnu.org> Subject: Status: 24.3.50; num3-mode detects long hex numbers as decimal Reply-To: bug#16834 <16834@debbugs.gnu.org> Date: Wed, 20 Aug 2025 09:46:50 +0000 retitle 16834 24.3.50; num3-mode detects long hex numbers as decimal reassign 16834 emacs submitter 16834 Alex Benn=C3=A9e severity 16834 minor thanks From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 21 12:12:30 2014 Received: (at submit) by debbugs.gnu.org; 21 Feb 2014 17:12:30 +0000 Received: from localhost ([127.0.0.1]:34949 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WGteH-0001DP-QB for submit@debbugs.gnu.org; Fri, 21 Feb 2014 12:12:29 -0500 Received: from eggs.gnu.org ([208.118.235.92]:44013) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WGteF-0001DA-2o for submit@debbugs.gnu.org; Fri, 21 Feb 2014 12:12:27 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WGte1-0005Gq-FM for submit@debbugs.gnu.org; Fri, 21 Feb 2014 12:12:21 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:37543) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WGte1-0005Gm-C4 for submit@debbugs.gnu.org; Fri, 21 Feb 2014 12:12:13 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45732) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WGtdv-0006Lt-Cb for bug-gnu-emacs@gnu.org; Fri, 21 Feb 2014 12:12:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WGtdp-0005EW-Ca for bug-gnu-emacs@gnu.org; Fri, 21 Feb 2014 12:12:07 -0500 Received: from static.88-198-71-155.clients.your-server.de ([88.198.71.155]:44362 helo=socrates.bennee.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WGtdp-0005Df-69 for bug-gnu-emacs@gnu.org; Fri, 21 Feb 2014 12:12:01 -0500 Received: from localhost ([127.0.0.1] helo=zen.linaro.local) by socrates.bennee.com with esmtp (Exim 4.80) (envelope-from ) id 1WGtdj-00019t-UU for bug-gnu-emacs@gnu.org; Fri, 21 Feb 2014 18:11:56 +0100 User-agent: mu4e 0.9.9.6pre2; emacs 24.3.50.7 From: Alex =?utf-8?Q?Benn=C3=A9e?= To: bug-gnu-emacs@gnu.org Subject: 24.3.50; num3-mode detects long hex numbers as decimal Date: Fri, 21 Feb 2014 17:12:00 +0000 Message-ID: <87k3cobdb3.fsf@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: kernel-hacker@bennee.com X-SA-Exim-Scanned: No (on socrates.bennee.com); SAEximRunCond expanded to false X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) When dealing with large hex numbers the default regex of num3-mode can detect them as decimals. For example given: V28 : 00000000000000000007fc0000000000 vs 0000000000000000000bfc000000000 the follow is high-lighted V28 : __xxx___xxx___xxx_____x___xxx___ vs _xxx___xxx___xxx_________xxx___ which is obviously wrong. In the end I just reset num3--number-re to: (setq num3--number-re "\\([[:xdigit:]]+\\)\\|\\([0-9]+\\)\\|\\.\\([0-9]+\\)") but perhaps a slightly more clever solution that maintains old behaviour for very long decimal numbers unless there is a hex digit in there would be better. It wouldn't hurt to have customisable faces as well as the default can look quite harsh depending on the theme. Regards, -- Alex Bennée From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 21 13:06:32 2014 Received: (at 16834) by debbugs.gnu.org; 21 Feb 2014 18:06:32 +0000 Received: from localhost ([127.0.0.1]:35006 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WGuUZ-0003oL-Cu for submit@debbugs.gnu.org; Fri, 21 Feb 2014 13:06:32 -0500 Received: from mercure.iro.umontreal.ca ([132.204.24.67]:55578) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WGuUW-0003oB-PI for 16834@debbugs.gnu.org; Fri, 21 Feb 2014 13:06:29 -0500 Received: from hidalgo.iro.umontreal.ca (hidalgo.iro.umontreal.ca [132.204.27.50]) by mercure.iro.umontreal.ca (Postfix) with ESMTP id AE9FF84CA9; Fri, 21 Feb 2014 13:06:27 -0500 (EST) Received: from lechon.iro.umontreal.ca (lechon.iro.umontreal.ca [132.204.27.242]) by hidalgo.iro.umontreal.ca (Postfix) with ESMTP id 6BA651E5913; Fri, 21 Feb 2014 13:05:56 -0500 (EST) Received: by lechon.iro.umontreal.ca (Postfix, from userid 20848) id 47068B40E2; Fri, 21 Feb 2014 13:05:56 -0500 (EST) From: Stefan Monnier To: Alex =?windows-1252?Q?Benn=E9e?= Subject: Re: bug#16834: 24.3.50; num3-mode detects long hex numbers as decimal Message-ID: References: <87k3cobdb3.fsf@linaro.org> Date: Fri, 21 Feb 2014 13:05:56 -0500 In-Reply-To: <87k3cobdb3.fsf@linaro.org> ("Alex =?windows-1252?Q?Benn=E9e?= =?windows-1252?Q?=22's?= message of "Fri, 21 Feb 2014 17:12:00 +0000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-DIRO-MailScanner-Information: Please contact the ISP for more information X-DIRO-MailScanner: Found to be clean X-DIRO-MailScanner-SpamCheck: n'est pas un polluriel, SpamAssassin (score=-2.71, requis 5, autolearn=not spam, ALL_TRUSTED -2.82, MC_COPYWRT 0.11, MC_TSTLAST 0.00) X-DIRO-MailScanner-From: monnier@iro.umontreal.ca X-Spam-Status: No X-Spam-Score: -3.3 (---) X-Debbugs-Envelope-To: 16834 Cc: 16834@debbugs.gnu.org, Michal Nazarewicz X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > When dealing with large hex numbers the default regex of num3-mode can > detect them as decimals. For example given: > V28 : 00000000000000000007fc0000000000 vs 0000000000000000000bfc000000000 > the follow is high-lighted > V28 : __xxx___xxx___xxx_____x___xxx___ vs _xxx___xxx___xxx_________xxx___ > which is obviously wrong. I guess we could use the patch below. Michal, what do you think? > It wouldn't hurt to have customisable faces as well as the default can > look quite harsh depending on the theme. Hmmm... they are, AFAICT (faces num3-face-odd and num3-face-even). Stefan diff --git a/packages/num3-mode/num3-mode.el b/packages/num3-mode/num3-mode.el index b890c89..ae3289a 100644 --- a/packages/num3-mode/num3-mode.el +++ b/packages/num3-mode/num3-mode.el @@ -1,6 +1,6 @@ ;;; num3-mode.el --- highlight groups of digits in long numbers -*- lexical-binding: t -*- -;; Copyright (C) 2012 Free Software Foundation, Inc. +;; Copyright (C) 2012, 2014 Free Software Foundation, Inc. ;; Author: Felix Lee , Michal Nazarewicz ;; Maintainer: Michal Nazarewicz @@ -98,7 +98,10 @@ where) decimal point (would be) is." (define-globalized-minor-mode global-num3-mode num3-mode num3-mode) (defconst num3--number-re - (concat "\\(?:0[xX]\\|#\\)\\([0-9a-fA-F]+\\)" ; 1 = hexadecimal + ;; Recognize "0x" and "#x" as prefixes announcing hexadecimal (from C and + ;; Elisp, respectively). + (concat "[0#][xX]\\([[:xdigit:]]+\\)" ; 1 = hexadecimal + "\\|\\(?1:[[:xdigit:]]*[a-fA-F][[:xdigit:]]*\\)" ; 1 = hexadecimal "\\|\\([0-9]+\\)" ; 2 = decimal "\\|\\.\\([0-9]+\\)")) ; 3 = fraction From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 21 14:49:44 2014 Received: (at 16834) by debbugs.gnu.org; 21 Feb 2014 19:49:44 +0000 Received: from localhost ([127.0.0.1]:35068 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WGw6R-0007f9-HJ for submit@debbugs.gnu.org; Fri, 21 Feb 2014 14:49:44 -0500 Received: from mail-ee0-f51.google.com ([74.125.83.51]:56439) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WGw6O-0007eu-5Y for 16834@debbugs.gnu.org; Fri, 21 Feb 2014 14:49:40 -0500 Received: by mail-ee0-f51.google.com with SMTP id b57so1834996eek.24 for <16834@debbugs.gnu.org>; Fri, 21 Feb 2014 11:49:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=sender:from:to:cc:subject:in-reply-to:organization:references :user-agent:face:date:message-id:mime-version:content-type; bh=WKmTUp8YJbKjV7ARwiWB9rsg448D5QMv4NYX2eNEZ3M=; b=HntjF1IcfbS8MY6k3QhVZotoQV5xh+qAUCCgRZF/I1JnGAVAYmiQxFqef8mfcskYoz kEckLD4jTAGlH8alU+zpr12t9hoHUvAGm3sJJx1DTJpE3Bo7lMPYVfZEUPoD5k0OApGB OR8iU6lCtlBsiBUNtKmQXA/3wk33pdaz0ZR/M+GXhCyCeoZv9ImxevTupyFCc4vhqaMa mkC43IYcssCphhzp6ku6WHsLmORhNdyGlNlmHWunwxrtIdlEYPpiciZUactEuXHxVzXf st4vKC7Kpb419WZ3yTLTdpeXvzte4Tcit7VO6x1P6/GWhTJGz+Zn3qBH4IHkL2RZIsY5 uN5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:in-reply-to :organization:references:user-agent:face:date:message-id :mime-version:content-type; bh=WKmTUp8YJbKjV7ARwiWB9rsg448D5QMv4NYX2eNEZ3M=; b=ECeIEfPtwbEot8KoTF61JSPQiQ5/ZpBQu+z1PsOVka+T9lmhlia+yyxfgfNWrrSzYW ZgPOJjBwKMoYRGdKh33cydehK7RM9DWUrnQKB4Zm8czHFye86hUKct5XyBmRaJtbFWzu coIgmWw6M2pDZ6WteiK6wtXNAoTc6GUwpR1YhC/CKlV3V/dTNMR5FBRZYElxozb390IW mUN4C/jqcGRH7ZELYNZqvIPsfaJmupCXyaIgbQG4fc8MEXmTVgVI4rab0wyfKmuS81Iz 1y4xY5Si5rHavHiwPkeiaelE7FgSr3U2mwoAK61RCbtNsGjnFLgkESjUWI7F89vnK6bH bdDQ== X-Gm-Message-State: ALoCoQkxvb1/JFyBvH8WYZxXkQ1WaVQPcXtcIW4/2rOsYRr1aNAzo3iz9hcYdMsLY9d7mFVfSYDhos5MU2Xiq9wHEirA9hAgkmYUkxBtlN9SnW2IHHIAetC8Udko2zrAIkxbsL+MN/Gw6na96OKb2wYMGiq19Ec2B3BiDMJnPfOhY55MgBeyta94KBkLfvCZaAj7CDMd71+GjFh9n0/qs+vrvcOPPTHfju6eZB5pLjPCrdYbN5bKFOY= X-Received: by 10.14.110.68 with SMTP id t44mr10468721eeg.74.1393012174088; Fri, 21 Feb 2014 11:49:34 -0800 (PST) Received: from mpn-glaptop.roam.corp.google.com ([2620:0:105f:311:11c7:67ea:c501:4eb0]) by mx.google.com with ESMTPSA id o43sm30057048eef.12.2014.02.21.11.49.31 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 21 Feb 2014 11:49:32 -0800 (PST) From: Michal Nazarewicz To: Stefan Monnier , Alex =?utf-8?Q?Benn=C3=A9e?= Subject: Re: bug#16834: 24.3.50; num3-mode detects long hex numbers as decimal In-Reply-To: Organization: http://mina86.com/ References: <87k3cobdb3.fsf@linaro.org> User-Agent: Notmuch/0.17+15~gb65ca8e (http://notmuchmail.org) Emacs/24.3.50.1 (x86_64-unknown-linux-gnu) X-Face: PbkBB1w#)bOqd`iCe"Ds{e+!C7`pkC9a|f)Qo^BMQvy\q5x3?vDQJeN(DS?|-^$uMti[3D*#^_Ts"pU$jBQLq~Ud6iNwAw_r_o_4]|JO?]}P_}Nc&"p#D(ZgUb4uCNPe7~a[DbPG0T~!&c.y$Ur,=N4RT>]dNpd; KFrfMCylc}gc??'U2j,!8%xdD Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAJFBMVEWbfGlUPDDHgE57V0jUupKjgIObY0PLrom9mH4dFRK4gmjPs41MxjOgAAACQElEQVQ4jW3TMWvbQBQHcBk1xE6WyALX1069oZBMlq+ouUwpEQQ6uRjttkWP4CmBgGM0BQLBdPFZYPsyFUo6uEtKDQ7oy/U96XR2Ux8ehH/89Z6enqxBcS7Lg81jmSuujrfCZcLI/TYYvbGj+jbgFpHJ/bqQAUISj8iLyu4LuFHJTosxsucO4jSDNE0Hq3hwK/ceQ5sx97b8LcUDsILfk+ovHkOIsMbBfg43VuQ5Ln9YAGCkUdKJoXR9EclFBhixy3EGVz1K6eEkhxCAkeMMnqoAhAKwhoUJkDrCqvbecaYINlFKSRS1i12VKH1XpUd4qxL876EkMcDvHj3s5RBajHHMlA5iK32e0C7VgG0RlzFPvoYHZLRmAC0BmNcBruhkE0KsMsbEc62ZwUJDxWUdMsMhVqovoT96i/DnX/ASvz/6hbCabELLk/6FF/8PNpPCGqcZTGFcBhhAaZZDbQPaAB3+KrWWy2XgbYDNIinkdWAFcCpraDE/knwe5DBqGmgzESl1p2E4MWAz0VUPgYYzmfWb9yS4vCvgsxJriNTHoIBz5YteBvg+VGISQWUqhMiByPIPpygeDBE6elD973xWwKkEiHZAHKjhuPsFnBuArrzxtakRcISv+XMIPl4aGBUJm8Emk7qBYU8IlgNEIpiJhk/No24jHwkKTFHDWfPniR4iw5vJaw2nzSjfq2zffcE/GDjRC2dn0J0XwPAbDL84TvaFCJEU4Oml9pRyEUhR3Cl2t01AoEjRbs0sYugp14/4X5n4pU4EHHnMAAAAAElFTkSuQmCC X-PGP: 50751FF4 X-PGP-FP: AC1F 5F5C D418 88F8 CC84 5858 2060 4012 5075 1FF4 X-Hashcash: 1:20:140221:16834@debbugs.gnu.org::2fAovG17a37SvVN2:00000000000000000000000000000000000000001ONN X-Hashcash: 1:20:140221:kernel-hacker@bennee.com::STrqwwsMQkmHtFwE:00000000000000000000000000000000000002/T+ X-Hashcash: 1:20:140221:monnier@iro.umontreal.ca::obTq+Ru4xE9A3r4x:00000000000000000000000000000000000008Nsf Date: Fri, 21 Feb 2014 20:49:26 +0100 Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -1.7 (-) X-Debbugs-Envelope-To: 16834 Cc: 16834@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Fri, Feb 21 2014, Stefan Monnier wrote: >> When dealing with large hex numbers the default regex of num3-mode can >> detect them as decimals. For example given: >> V28 : 00000000000000000007fc0000000000 vs 0000000000000000000bfc000000= 000 >> the follow is high-lighted >> V28 : __xxx___xxx___xxx_____x___xxx___ vs _xxx___xxx___xxx_________xxx= ___ >> which is obviously wrong. > > I guess we could use the patch below. Michal, what do you think? Looks good in general, but this leads to some interesting results: =E2=80=9CAaaaaaa=E2=80=9D he screamed as the dentist pulled his teeth out. And if someone sets num3-threshold to 1 and changes num3-face-odd, all the hexadecimal digits will get highlighted in a regular text even when they are inside of a word. I also hope engineers won't get mad when 1000A starts being treated as a hexadecimal number. (They should know to put a non-break space between the number an the unit anyway). Perhaps this would be better: (defconst num3--number-re (concat "[0#][xX]\\([[:xdigit:]]+\\)" ; 1 =3D hexadecimal "\\|\\(?1:\\b\\(?:[0-9]+[a-fA-F]\\|" ; 1 =3D hexadecimal "[a-fA-F]+[0-9]\\)[[:xdigit:]]*\\b\\)"=20=20 "\\|\\([0-9]+\\)" ; 2 =3D decimal "\\|\\.\\([0-9]+\\)")) ; 3 =3D fraction So there would have to be at least one decimal digit and the whole sequence would have to be a complete word (i.e. 1000Ah, which would be a pretty big battery, won't be highlighted as a hexadecimal number). >> It wouldn't hurt to have customisable faces as well as the default can >> look quite harsh depending on the theme. > > Hmmm... they are, AFAICT (faces num3-face-odd and num3-face-even). Yep, I have this in my custom.el: '(num3-face-even ((t (:foreground "#CFF" :underline nil :weight normal)))) I don't particularly like the defaults myself, but that was what Felix used in his original code, so I kept it. > diff --git a/packages/num3-mode/num3-mode.el b/packages/num3-mode/num3-mo= de.el > index b890c89..ae3289a 100644 > --- a/packages/num3-mode/num3-mode.el > +++ b/packages/num3-mode/num3-mode.el > @@ -1,6 +1,6 @@ > ;;; num3-mode.el --- highlight groups of digits in long numbers -*- lex= ical-binding: t -*- >=20=20 > -;; Copyright (C) 2012 Free Software Foundation, Inc. > +;; Copyright (C) 2012, 2014 Free Software Foundation, Inc. >=20=20 > ;; Author: Felix Lee , Michal Nazarewicz > ;; Maintainer: Michal Nazarewicz > @@ -98,7 +98,10 @@ where) decimal point (would be) is." > (define-globalized-minor-mode global-num3-mode num3-mode num3-mode) >=20=20 > (defconst num3--number-re > - (concat "\\(?:0[xX]\\|#\\)\\([0-9a-fA-F]+\\)" ; 1 =3D hexadecimal > + ;; Recognize "0x" and "#x" as prefixes announcing hexadecimal (from C = and > + ;; Elisp, respectively). > + (concat "[0#][xX]\\([[:xdigit:]]+\\)" ; 1 =3D hexadecimal > + "\\|\\(?1:[[:xdigit:]]*[a-fA-F][[:xdigit:]]*\\)" ; 1 =3D hexad= ecimal > "\\|\\([0-9]+\\)" ; 2 =3D decimal > "\\|\\.\\([0-9]+\\)")) ; 3 =3D fraction >=20=20 --=20 Best regards, _ _ .o. | Liege of Serenely Enlightened Majesty of o' \,=3D./ `o ..o | Computer Science, Micha=C5=82 =E2=80=9Cmina86=E2=80=9D Nazarewicz = (o o) ooo +------ooO--(_)--Ooo-- --=-=-= Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" --==-=-= Content-Type: text/plain --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iQIcBAEBAgAGBQJTB63GAAoJECBgQBJQdR/0dEcP/2sCXoRLv/jADqsIQI/CVJcj lc74gdwCNzpN6K+ELH0OFn3UaMrYtrVW6OBuASwrn7uoSsiyrF7NImkj44bDJYGD qxr4PICJjD25nrkEWcWd5TI7q6M3tSEvAMjmVwG3/nIQD/PWWjjRZv8BdDo5cvZV YrjUha7HbvI+Yr/oCUjBSY1/8M8plzk1t3FmLy1wYxb76A9E5IRh3ij6pjw6QgQg duglEEWuZxP/Rx2ygq0KT80VbzDgEtORAoaXGso+l0dGPMACetF7/si8bS2AS/rf 8WML3pSCQMbCcQbKnmvBQk7VcA8RRNyS1jpycPpPW6nkoZqT2AVMUabEdCVyWy70 gwUoMjcLw2qn12+5pVK+SM2t7xybfAOqHwwb+3Nw4f32pNR06I8sKT/ATCmeQAWy rMU86ssY32e2jtU3fSTRyxFTMkEDOKrHczC+Lo3TJ+gwthYD2wRvVqTU4izqBhDX bgfNdYFC9qY+ztY6iWA/PVc85/pQI+pKqKK92n591RLM3oy1L1boHvaOwRUytZqL 3gfOjh+gE1PcmMPaCFjegNl/BCXEGn8mgH9urdnmmbb1jn/bXBjgtMnUrlLBJx7p LWzJdelVbXG/VJD+GwXKQ86ImtDjpGh+yaoYpDXnipoO7rCACUgEZ25GQ5ctz/FJ /uCbYVHDJmLapv/pJyvZ =qB12 -----END PGP SIGNATURE----- --==-=-=-- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 21 15:53:16 2014 Received: (at 16834) by debbugs.gnu.org; 21 Feb 2014 20:53:16 +0000 Received: from localhost ([127.0.0.1]:35087 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WGx5v-0000oF-TW for submit@debbugs.gnu.org; Fri, 21 Feb 2014 15:53:16 -0500 Received: from mercure.iro.umontreal.ca ([132.204.24.67]:56718) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WGx5s-0000o6-TJ for 16834@debbugs.gnu.org; Fri, 21 Feb 2014 15:53:13 -0500 Received: from hidalgo.iro.umontreal.ca (hidalgo.iro.umontreal.ca [132.204.27.50]) by mercure.iro.umontreal.ca (Postfix) with ESMTP id F1F3E84C73; Fri, 21 Feb 2014 15:53:11 -0500 (EST) Received: from lechon.iro.umontreal.ca (lechon.iro.umontreal.ca [132.204.27.242]) by hidalgo.iro.umontreal.ca (Postfix) with ESMTP id 33DDE1E5913; Fri, 21 Feb 2014 15:52:48 -0500 (EST) Received: by lechon.iro.umontreal.ca (Postfix, from userid 20848) id 09775B4510; Fri, 21 Feb 2014 15:52:47 -0500 (EST) From: Stefan Monnier To: Michal Nazarewicz Subject: Re: bug#16834: 24.3.50; num3-mode detects long hex numbers as decimal Message-ID: References: <87k3cobdb3.fsf@linaro.org> Date: Fri, 21 Feb 2014 15:52:47 -0500 In-Reply-To: (Michal Nazarewicz's message of "Fri, 21 Feb 2014 20:49:26 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-DIRO-MailScanner-Information: Please contact the ISP for more information X-DIRO-MailScanner: Found to be clean X-DIRO-MailScanner-SpamCheck: n'est pas un polluriel, SpamAssassin (score=-2.82, requis 5, autolearn=not spam, ALL_TRUSTED -2.82, MC_TSTLAST 0.00) X-DIRO-MailScanner-From: monnier@iro.umontreal.ca X-Spam-Status: No X-Spam-Score: -3.3 (---) X-Debbugs-Envelope-To: 16834 Cc: 16834@debbugs.gnu.org, Alex =?windows-1252?Q?Benn=E9e?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Perhaps this would be better: > (defconst num3--number-re > (concat "[0#][xX]\\([[:xdigit:]]+\\)" ; 1 = hexadecimal > "\\|\\(?1:\\b\\(?:[0-9]+[a-fA-F]\\|" ; 1 = hexadecimal > "[a-fA-F]+[0-9]\\)[[:xdigit:]]*\\b\\)" > "\\|\\([0-9]+\\)" ; 2 = decimal > "\\|\\.\\([0-9]+\\)")) ; 3 = fraction > So there would have to be at least one decimal digit and the whole > sequence would have to be a complete word (i.e. 1000Ah, which would be > a pretty big battery, won't be highlighted as a hexadecimal number). Sounds good. Can you install that? Stefan From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 23 19:31:34 2014 Received: (at 16834) by debbugs.gnu.org; 24 Feb 2014 00:31:34 +0000 Received: from localhost ([127.0.0.1]:37046 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WHjSH-0006Oq-W2 for submit@debbugs.gnu.org; Sun, 23 Feb 2014 19:31:34 -0500 Received: from mail-ee0-f51.google.com ([74.125.83.51]:59849) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WHjSF-0006OY-5w for 16834@debbugs.gnu.org; Sun, 23 Feb 2014 19:31:32 -0500 Received: by mail-ee0-f51.google.com with SMTP id b57so2802778eek.38 for <16834@debbugs.gnu.org>; Sun, 23 Feb 2014 16:31:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=sender:from:to:cc:subject:in-reply-to:organization:references :user-agent:face:date:message-id:mime-version:content-type; bh=oobyhjAsUb5MHeE9PXGD/DUXvcH1rYQl+Ol4Ivx9W50=; b=Reui5BGh3x0ZodzJLoNK7Y+wNp/W6eG5MQeZ4WjR4gGQt+wlgkmwsjlZmLCdfN8Y3X AwD4f03QIhe2cMxtIRDWm7hs+8Pg6P6jT9mX5Omui4HwxEW4kSBa6ohFWg5KaSLenHA1 Cp/n3jocLNj7IjaoYdByALAqMorb/Bhy7JVVfUZW9lr7DoLglR4/HgyOWyiuxuUCCOIJ v7QCHT+coImjdCN51hitEnEPsC1pp4WC2QFQhRc3RWDclPSNwaaORFibO8wluSYYBgBd Rr4cZ4MOaHjeT8stlgHXkGHHyf3tRh9vKCEEAQkDL6O+LmHZraVzD6mBAqd8B4FV5ot9 psKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:in-reply-to :organization:references:user-agent:face:date:message-id :mime-version:content-type; bh=oobyhjAsUb5MHeE9PXGD/DUXvcH1rYQl+Ol4Ivx9W50=; b=BjTwSuJJBd/iLDSLQS+m3xrECEJK8hlIgeB6tNDu8RRwljNqFcn6drPyo0HChrV7IL nNV9qXGNDUPh7j4U7VTWoClBGtg3LdbToAz0TuigKIKwHyG2ZOelOnZKxhaFBKftAc7F X8Jwm+QlNG7rGIow0Wrvs6Dae4Tl0t2DxYRfKeosa0aQZ0qjdtH4bWzoQm9iTozYLcQl WmTgWqJEglkz/5SaTgciGngqGWvq4WyjQt6y9zZNZXTUbA4KAIvEuPvFEqEzzOSNzD84 +v8KPc3kXOzkIXYzIg5nixXwRnKIVL/GoIkWZKvIhrqhjgxMV2pbKtrVVPNu3bqR2vJ7 WqhA== X-Gm-Message-State: ALoCoQkvjXazIvUHvXTwtpZNYOQy9aJInL72TPSD4H+VMXUqzTFHVfJF8FYVObBbamXRnwIYY0o0jQBAj/63hmW68RDkorAWWvGfn1f1nseJ9jyb4GIgRgPQedO8KawkAmgRMRpMR71c9wF/S65h7WKuMbfvWs5Ni1uM0DREcuz4/kSzCZYToWM66N5rcTgDtt0ooPKgsIaQjzU3oERuY0JxvDCKe8Ct7Gcr++Ulc3wswVKP6S01Mow= X-Received: by 10.14.223.201 with SMTP id v49mr21105592eep.31.1393201885341; Sun, 23 Feb 2014 16:31:25 -0800 (PST) Received: from mpn-glaptop.roam.corp.google.com (178-82-34-113.dynamic.hispeed.ch. [178.82.34.113]) by mx.google.com with ESMTPSA id u6sm57089995eep.11.2014.02.23.16.31.23 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sun, 23 Feb 2014 16:31:23 -0800 (PST) From: Michal Nazarewicz To: Stefan Monnier Subject: Re: bug#16834: 24.3.50; num3-mode detects long hex numbers as decimal In-Reply-To: Organization: http://mina86.com/ References: <87k3cobdb3.fsf@linaro.org> User-Agent: Notmuch/0.17+15~gb65ca8e (http://notmuchmail.org) Emacs/24.3.50.1 (x86_64-unknown-linux-gnu) X-Face: PbkBB1w#)bOqd`iCe"Ds{e+!C7`pkC9a|f)Qo^BMQvy\q5x3?vDQJeN(DS?|-^$uMti[3D*#^_Ts"pU$jBQLq~Ud6iNwAw_r_o_4]|JO?]}P_}Nc&"p#D(ZgUb4uCNPe7~a[DbPG0T~!&c.y$Ur,=N4RT>]dNpd; KFrfMCylc}gc??'U2j,!8%xdD Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAJFBMVEWbfGlUPDDHgE57V0jUupKjgIObY0PLrom9mH4dFRK4gmjPs41MxjOgAAACQElEQVQ4jW3TMWvbQBQHcBk1xE6WyALX1069oZBMlq+ouUwpEQQ6uRjttkWP4CmBgGM0BQLBdPFZYPsyFUo6uEtKDQ7oy/U96XR2Ux8ehH/89Z6enqxBcS7Lg81jmSuujrfCZcLI/TYYvbGj+jbgFpHJ/bqQAUISj8iLyu4LuFHJTosxsucO4jSDNE0Hq3hwK/ceQ5sx97b8LcUDsILfk+ovHkOIsMbBfg43VuQ5Ln9YAGCkUdKJoXR9EclFBhixy3EGVz1K6eEkhxCAkeMMnqoAhAKwhoUJkDrCqvbecaYINlFKSRS1i12VKH1XpUd4qxL876EkMcDvHj3s5RBajHHMlA5iK32e0C7VgG0RlzFPvoYHZLRmAC0BmNcBruhkE0KsMsbEc62ZwUJDxWUdMsMhVqovoT96i/DnX/ASvz/6hbCabELLk/6FF/8PNpPCGqcZTGFcBhhAaZZDbQPaAB3+KrWWy2XgbYDNIinkdWAFcCpraDE/knwe5DBqGmgzESl1p2E4MWAz0VUPgYYzmfWb9yS4vCvgsxJriNTHoIBz5YteBvg+VGISQWUqhMiByPIPpygeDBE6elD973xWwKkEiHZAHKjhuPsFnBuArrzxtakRcISv+XMIPl4aGBUJm8Emk7qBYU8IlgNEIpiJhk/No24jHwkKTFHDWfPniR4iw5vJaw2nzSjfq2zffcE/GDjRC2dn0J0XwPAbDL84TvaFCJEU4Oml9pRyEUhR3Cl2t01AoEjRbs0sYugp14/4X5n4pU4EHHnMAAAAAElFTkSuQmCC X-PGP: 50751FF4 X-PGP-FP: AC1F 5F5C D418 88F8 CC84 5858 2060 4012 5075 1FF4 X-Hashcash: 1:20:140224:16834@debbugs.gnu.org::vEd7CvSSJWavZQIr:000000000000000000000000000000000000000007sZ X-Hashcash: 1:20:140224:monnier@iro.umontreal.ca::Rb0kV2IpAWjO/ZoG:00000000000000000000000000000000000001TC6 X-Hashcash: 1:20:140224:kernel-hacker@bennee.com::A/MYcji77UmWjOEO:00000000000000000000000000000000000001tzy Date: Mon, 24 Feb 2014 01:31:16 +0100 Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -1.2 (-) X-Debbugs-Envelope-To: 16834 Cc: 16834@debbugs.gnu.org, Alex =?utf-8?Q?Benn=C3=A9e?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.2 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Fri, Feb 21 2014, Stefan Monnier wrote: >> Perhaps this would be better: > >> (defconst num3--number-re >> (concat "[0#][xX]\\([[:xdigit:]]+\\)" ; 1 =3D hexadecimal >> "\\|\\(?1:\\b\\(?:[0-9]+[a-fA-F]\\|" ; 1 =3D hexadecimal >> "[a-fA-F]+[0-9]\\)[[:xdigit:]]*\\b\\)"=20=20 >> "\\|\\([0-9]+\\)" ; 2 =3D decimal >> "\\|\\.\\([0-9]+\\)")) ; 3 =3D fraction > >> So there would have to be at least one decimal digit and the whole >> sequence would have to be a complete word (i.e. 1000Ah, which would be >> a pretty big battery, won't be highlighted as a hexadecimal number). > > Sounds good. Can you install that? Pushed. --=20 Best regards, _ _ .o. | Liege of Serenely Enlightened Majesty of o' \,=3D./ `o ..o | Computer Science, Micha=C5=82 =E2=80=9Cmina86=E2=80=9D Nazarewicz = (o o) ooo +------ooO--(_)--Ooo-- --=-=-= Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" --==-=-= Content-Type: text/plain --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iQIcBAEBAgAGBQJTCpLUAAoJECBgQBJQdR/0BssP/ibSYPXSQiEpi/AYrZJ3IAdh 0u7Qj8Ru6VxGDDUf5Cty6O6CtgTDnuq+4ShjnbcdN/iVrbVz5m8zK2trEMlz8Ckp EtMl3V/4bhDKdEkLleVDiTnvbzIm5egMOua7Nu0du7KLMVj1ssMoneKO8knUFTrn KoE06Qwc7qrjc/y0PIBPNKyce5152neG1W5wRAkjCNMZQp07KNXy3E9CKGOwr3Nx rGDvSz1PlOX+3LlEke6TlW6Nt3wXJTmi9cT3A0iDWcrzxM7jZ3842M9NpwYzxkpL mfvrwmRKXuN5jz8jnCHqAJZ0vK4QwO/VJopWZc7X8lMhdjk5QyYtFEsCQ4IhJgJQ 9Yk6xAH0yOVuQFtRuFbjwceOCLerTVwycGyWEPCxMRhTiwXmnSjVzT7BTfnTJ6HR ggVJq3pR1ldtIPkltWDzEVgW458sTXD4JTqV9EG92JAvpijl065GTvjflIWzphJB xPiXMCxkKiCGqUXdEwIvCPPABNyUumAzmI0yllwIPpyAOzJEH/p6aZU2+HAEJYtx 7cIFhD91CjlsPzLNC4Eo8Hrr1nsYcWAGlcsgNtrse4ilQYHtbpYxKZiVoZ9cCgHB 346ESEyDGRiPlHpogfsdJ1Cg57QbPRz6/ytRrkN28Nzgwgo3yn4J3gbtWQuarRa9 WN/9McqoOamCg76C8zt5 =LdEe -----END PGP SIGNATURE----- --==-=-=-- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 23 20:08:39 2014 Received: (at control) by debbugs.gnu.org; 24 Feb 2014 01:08:39 +0000 Received: from localhost ([127.0.0.1]:37077 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WHk2A-0007PU-Mn for submit@debbugs.gnu.org; Sun, 23 Feb 2014 20:08:38 -0500 Received: from fencepost.gnu.org ([208.118.235.10]:39141 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WHk28-0007PN-Si for control@debbugs.gnu.org; Sun, 23 Feb 2014 20:08:37 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1WHk28-0007Dm-M8 for control@debbugs.gnu.org; Sun, 23 Feb 2014 20:08:36 -0500 Date: Sun, 23 Feb 2014 20:08:36 -0500 Message-Id: Subject: control message for bug 16834 To: X-Mailer: mail (GNU Mailutils 2.1) From: Glenn Morris X-Spam-Score: -5.5 (-----) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.5 (-----) close 16834 From unknown Wed Aug 20 02:46:50 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 24 Mar 2014 11:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator