From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] master 29c360e: Ensure redisplay after "C-x C-e" Date: Fri, 06 Nov 2015 16:47:58 -0500 Message-ID: References: <20151106093011.17282.48378@vcs.savannah.gnu.org> <83vb9fqjvr.fsf@gnu.org> <83oaf7qgd6.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1446846513 27509 80.91.229.3 (6 Nov 2015 21:48:33 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 6 Nov 2015 21:48:33 +0000 (UTC) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Nov 06 22:48:25 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Zuorw-0005G4-Ok for ged-emacs-devel@m.gmane.org; Fri, 06 Nov 2015 22:48:24 +0100 Original-Received: from localhost ([::1]:41289 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zuorw-0005lM-3D for ged-emacs-devel@m.gmane.org; Fri, 06 Nov 2015 16:48:24 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40592) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zuore-0005l6-7I for emacs-devel@gnu.org; Fri, 06 Nov 2015 16:48:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZuorZ-0005hA-70 for emacs-devel@gnu.org; Fri, 06 Nov 2015 16:48:06 -0500 Original-Received: from chene.dit.umontreal.ca ([132.204.246.20]:54170) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZuorZ-0005h6-0R; Fri, 06 Nov 2015 16:48:01 -0500 Original-Received: from pastel.home (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id tA6Llw7w032277; Fri, 6 Nov 2015 16:47:59 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id CC3D46036F; Fri, 6 Nov 2015 16:47:58 -0500 (EST) In-Reply-To: <83oaf7qgd6.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 06 Nov 2015 17:47:49 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV5482=0 X-NAI-Spam-Version: 2.3.0.9393 : core <5482> : inlines <3977> : streams <1533844> : uri <2077740> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 132.204.246.20 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:193475 Archived-At: >> - live with the apparent regression, telling users that they should >> simply be happy to have enjoyed this accident in the past. > I don't like this alternative. Redisplay should be correct before it > is fast. We agree in general, of course. But it's always been the case that some changes require a call to force-mode-line-update. Notice that > Users rightfully expect changes to such variables to have > effect immediately, so not doing that looks like a bug. How do you > explain that, after evaluating (setq line-spacing 1.0) nothing > happens, but as soon as you type "M-x", the new setting takes effect? I explain it saying that this variable value is only taken into account if something is redisplayed. And the user moves on very happy. E.g. note how in bug#21835, the lack of redisplay is not a cause for reporting a bug. It's just a minor surprise worthy of a "Note" in passing to the actual problem of how the cursor is displayed. If you don't like this answer, how 'bout I return the question: How do you explain to the user that when he used C-x C-e the display was immediately updated, but when I put that same code into his hand-made interactive function, it stopped working and started to only take effect after something like M-x? I really can't see why we should hide this weakness of our redisplay system in the case of C-x C-e. Either this weakness exists and the Elisp coder will have to know about it sooner or later, or we fix it for real. > This is not the only such variable, there are others. Adding ad-hoc > code for each one sounds _really_ hacky. Agreed. > I cannot take the other possibilities seriously, and I don't think you > do, either. A `set-line-spacing' function, no, but a write-barrier, yes. We've already had discussions on emacs-devel to add such a generic feature cheaply, even with patches submitted. >> > Why should we care about performance of "C-x C-e"? >> Why not? > Because it's not performance-critical, and cannot be, ever. Of course it can be performance critical in keyboard-macros. >> I just think your addition of force-mode-line-update will be wasted >> work in 99.9% of the cases, and it will only cover very few of the >> cases where a force-mode-line-update is needed. > Please show at least a couple of other cases. "grep force-mode-line-update" shows it's still needed at tons of other places. Adding it in C-x C-e won't help them. Stefan