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: Native line numbers landed on master Date: Wed, 2 Oct 2019 15:56:01 +0200 Message-ID: <20191002135601.4gw4aubu2s3g7adp@Ergus> References: <83eezycce5.fsf@gnu.org> <87muekj0i9.fsf@wavexx.thregr.org> <87d0fgagjl.fsf@gnus.org> <20191001225254.mwjnxlynjdc3mz7y@Ergus> <20191002034151.p3crynpqf5npx7yk@Ergus> 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="7601"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: NeoMutt/20180716 Cc: Yuri D'Elia , Lars Ingebrigtsen , Eli Zaretskii , Emacs developers To: Juanma Barranquero Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Oct 02 15:57:04 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 1iFf7n-0001qt-Rm for ged-emacs-devel@m.gmane.org; Wed, 02 Oct 2019 15:57:04 +0200 Original-Received: from localhost ([::1]:55576 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFf7m-000309-Nd for ged-emacs-devel@m.gmane.org; Wed, 02 Oct 2019 09:57:02 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33327) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFf75-0002wc-E1 for emacs-devel@gnu.org; Wed, 02 Oct 2019 09:56:21 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFf73-0006SJ-R0 for emacs-devel@gnu.org; Wed, 02 Oct 2019 09:56:18 -0400 Original-Received: from sonic313-20.consmr.mail.ir2.yahoo.com ([77.238.179.187]:35625) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iFf73-0006PE-Fo for emacs-devel@gnu.org; Wed, 02 Oct 2019 09:56:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aol.com; s=a2048; t=1570024575; bh=nA9VzQaDeI7XwkQE5W+dRGDibBLT6xO02y4133KPqgY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From:Subject; b=AT7WR6RDNET0uX4WY0VcyiUt+2ujIR7i0Qt55H89l7n3ERYnl3rOq/oF96ojFsdDzEizYZHRKGVIkRepiyzcPBhj4EvfppgdFPHzQU8PJ1HvVZZEc/CDAxrKvBNBmKxeQru3td7gWyMcf8afnUEqy46A90QXggagBi1rP8fLep39z5YQTWp8LzESUvqX2RkI1+gZBZg++P4rfHPAGRA0Nf7PcHJgnl7wmm2OcsP3Jw2MyRORlQ/EEGx3tHsQGiPgLBWzwzNWw3dobIZChvHS5+zGVxsjB3N1UH2uNDsF018SEcA+Heg+conBdbzRrdUVoW9o/wtvYblfkiz3TrQj0w== X-YMail-OSG: zrqboGsVM1m1ls5ycFTkuNFHccluI9UZYtTzPai4lEbwML1CGWI50Zcd6hwVQc0 v3Mqr996zb9U_aOBd8qzmS2lejKgPk1Jkx1nS51JMMazd3I4ZYA1fHNi.Q5dYqLe.CWEu2q4yMLX zw2GUvkSqqSYo_HFD0onRFW_QpTawVDh.YHaYu3ZTBRx8AGdNfSYV2Xudw.NP_j4GpkQa_mnIdGB w__Tu7t1OmsQl_xDhzEZ0Y7k.MoMY_0FqZP_tdNwSrZOVDRKEY8c_KK4LtPfGqULHNOU4jG6r798 63pXAh7WBsUPhLA3BuTLDJh6OeQL7NTY62pJp_bYpddbEQHDR.30.s0WLi.R8JFzuhsNZ3.QcutO lX8U90aQ9zS4rZiGv6F9Oq.kWj_98q_6eDOqZNy9qGAJf7KTXqKSOYzhy7LG7m_JRqYRs8DCNJMW Iw0T1BShHs8uYExLu1Ec_umYhmSdkofrN0DpctVLgGKxK7I84aj5tZ6BlfXikGUAGE2WjDJ_oycj 8Im00VWoZ1uTAiV5Ed_blY28L7MGI60rkhkH_TS0tHPMWwEJPXSyFwGjxuMAnYcT1Go1giLiqjge PE.V3MXPCRtkhZvroDTkoci6N2XijsYsCdZeYosNQet7CVaS_u5lqz7jAfUhlITX3DhRFNQF5XZg SaQhtwoJAIBjqK6jS5w30i3TYy9L6MjIs_6.88s3GogvP12mhUv2MQub9L5J8ZfrWi5o7sl5FcsP kX5gcj4OVN1ncv6MYGyuo_En_0.EDKFp4nRWcD0mxSKnmHA0V6WwghMarQHGW79CPR7wH_kJ3fDf bEf78625ZFhi9.O4pkd_fAfVmsNwmIvsvoTln91Pg2 Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic313.consmr.mail.ir2.yahoo.com with HTTP; Wed, 2 Oct 2019 13:56:15 +0000 Original-Received: by smtp418.mail.ir2.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 46ee9d0856dc842bbf5f1f18547693d8; Wed, 02 Oct 2019 13:56:14 +0000 (UTC) Content-Disposition: inline In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 77.238.179.187 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:240470 Archived-At: On Wed, Oct 02, 2019 at 11:40:12AM +0200, Juanma Barranquero wrote: >On Wed, Oct 2, 2019 at 5:42 AM Ergus wrote: > >> if so, the code does nothing. > >That's what I'm asking. Not how to check for an integer, but what to do >when/if it's not. I don't have the foggiest idea what's usually done with >errors during redisplay. Usually the default is not to do anything if the values are invalid, unset or null. So, if the user sets the values to something that cannot be converted to a valid int within the valid range then the function will return false and nothing needs to be done. The "if else" chain will do nothing or will set the face to the default value (if not already). This has a nice side effect to disable your feature easily just setting the values (or the faces) to nil, but also to for the values zero (which is invalid) for example. I think that what Eli tries to avoid is to parse a const pair array, lisp lists or some other complex lisp data structures from withing the display engine because it is very error prone, inefficient and hard to maintain. So we only do that if it is really needed. But he will confirm in any case. Best, Ergus