From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Ergus Newsgroups: gmane.emacs.devel Subject: Re: Face for literal numbers. Date: Sun, 8 Sep 2019 16:49:21 +0200 Message-ID: <20190908144921.47sedsd6ireqiuwu@Ergus> References: <20190908024146.mcswvhkh7yzmvjyl@Ergus> <20190908132539.GC4443@ACM> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="4511"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: NeoMutt/20180716 Cc: Paul Eggert , emacs-devel@gnu.org To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Sep 08 16:50:25 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1i6yWG-00012C-4W for ged-emacs-devel@m.gmane.org; Sun, 08 Sep 2019 16:50:24 +0200 Original-Received: from localhost ([::1]:49086 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i6yWE-0003Qf-B7 for ged-emacs-devel@m.gmane.org; Sun, 08 Sep 2019 10:50:22 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41288) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i6yVS-0003QN-Tq for emacs-devel@gnu.org; Sun, 08 Sep 2019 10:49:36 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i6yVQ-0004pw-96 for emacs-devel@gnu.org; Sun, 08 Sep 2019 10:49:33 -0400 Original-Received: from sonic304-22.consmr.mail.ir2.yahoo.com ([77.238.179.147]:42607) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i6yVQ-0004iW-1U for emacs-devel@gnu.org; Sun, 08 Sep 2019 10:49:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aol.com; s=a2048; t=1567954170; bh=zU23hW9HN2t5cPdXFha5fQckLbQuQqPzc5UQRUuFdZ0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From:Subject; b=c2uLV8rIzae5DVIxNZFbd/GxSkEOFcLU9Zh8naaGpMiAqs8+uIFjZvHgNBiG7QG/iHKmTZ1blYrbP3B0tpSHIztnElfuKBYHhSTX1jgrF1Gxj3fNWnhVDjqmz8TvcreGn1NTyk7MAz98gO1KC7D2rmJ1J/r1ncm8CHwPGxxTSevBc/nQudp6iIY4NV2Azb6b/JhWVDAWhlNZshoKZr9Cz500INwgYY05vXRDQxIRdFrEaIX9R9aRgyUcNcfEvXEzh8VwFpiYF7X0gYdqBhZEhmKlahZxvGCDam/I5NmTmO79jBuYgoX+AiLfc2DL9Bt6q5+04TVOKqMvnrEjFoJGbw== X-YMail-OSG: AcnQMxgVM1nuILmkHPiTkey9gGUZny0iADMCC_HHtKIXI56IetqGdc2nuQjJHjs FbIhIMf5AZdC2ksW4hzVrutD2zgw.DH88gEs84EjaxEJ2cDVOKRAhjElFURh7T.nqpbv9jUfzNEk YWaxHk1mV.FntwLA9K3VfT87kWS4hFHmt1pvszgQDmKB45eJIK5gIB4eNvb53YRkoPfXpyFHBKGb kHqMd2QEZHtODfmFIVfzP4cSxgT2Y.tBlddZBqogkPf8.x.jpudT7ZooD_nJizLyW2TsvrCSnZ8_ gcIKf1Y0oybs961.ndQiPO5zwoje1Z1sj6GG8pF9ExYla950V_qCoivGVT6lf1Y1gU359eu0tugB h0DFvxj.DoN6JYhMDooSFI6H2SKQJ7ZDjcJpTRoMNqa.sQu55FTYT_lsIRa5NxqEywydsR9CGuEN IOQxwDyRN4bjqMpbQ4t93j.eIW37sf0qm9WIqp9oUt5seu7soiZdG_ac6ez858gMw.5n08PP.nYP Cqm6EYrCrteAFxtLvi3R9aE8DLOROMjwyPCwhrUIyU.Wm9aPlouUXmKqYeC5UXGFN00nkTjLn666 87lIRqHlnIrl6X2b..oG9h3IOQhu8_wSO.GKy3rWiZ3BNR0zVe3pWGeS1vSX8Se9GS4CYf42RiUS UJ_tQrdolBRsff27oaKUUnkijmIPC0_V58h7se4m0hrFtk1dsz58yvc4uqOs6JE6fPdz9xtoInDE 5L6hf8gmLlzxHFfIf2CpFQR5rVHBRvqDIqNsIjfA4z6WD.IYuqeNKwjURiWAiUasu2GrpqAHYmtA RSv5EyxpZ0yZioi4wvNs30zF5O82ZjBFgx1lTPVhXy Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic304.consmr.mail.ir2.yahoo.com with HTTP; Sun, 8 Sep 2019 14:49:30 +0000 Original-Received: by smtp416.mail.ir2.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 1925446f82ae84a00fc06a60b60ff061; Sun, 08 Sep 2019 14:49:28 +0000 (UTC) Content-Disposition: inline In-Reply-To: <20190908132539.GC4443@ACM> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 77.238.179.147 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:239940 Archived-At: On Sun, Sep 08, 2019 at 01:25:39PM +0000, Alan Mackenzie wrote: >Hello, Ergus. > >On Sun, Sep 08, 2019 at 04:41:46 +0200, Ergus wrote: >> Hi I have seen that vim provides a color for the literal numbers in >> prog-modes. I was looking for something similar en emacs and >> surprisingly there is nothing within emacs or at least in elpa. The only >> similar (fully functional) package is in melpa: > >> https://github.com/Fanael/highlight-numbers > >> Could we provide some basic support for this without depending of >> melpa. Such simple functionalities must be at least in elpa right? > >I'm against such a feature. "Because vim has it" doesn't seem like a >sufficient justification. > Hi Alan: I will not insist on this too much because it is basically an aesthetic preference. I find it more "elegant" and up to now the package works pretty fine for me (and it is not so complex actually). And it is not only vim, but many other editors do (even very dumb ones) at least for simple numeric constants. >I'm against such a feature because it would be complicated. All of the >following would need to get the new face: > 5 > -5 > 0x27 > 0xffff'ffff /* in C++ Mode */ > 'a' /* in C Mode, etc. */ > ?a ; Emacs Lisp Mode > The code in the link supports most of those. And it is mode dependent already. And it doesn't look to be very complex actually. >The last two of these would be controversial: should an C or Elisp >literal character count as a number for this purpose or not? > I don't think so; but there will be many opinions about if we ask, so I won't ask again. I promise. But in my opinion it makes more sense to support at least the most general ones (the ones supported in the package, for example) than not support anything. >We could spend quite a lot of time bikeshedding about this proposed >feature. Do we need it? I don't think we do. > >-- >Alan Mackenzie (Nuremberg, Germany). > I know how it works actually... So I will just ask the author if he is fine adding it to elpa... half a loaf is better than no bread.