From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] master 29c360e: Ensure redisplay after "C-x C-e" Date: Fri, 06 Nov 2015 16:31:52 +0200 Message-ID: <83vb9fqjvr.fsf@gnu.org> References: <20151106093011.17282.48378@vcs.savannah.gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1446820343 11091 80.91.229.3 (6 Nov 2015 14:32:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 6 Nov 2015 14:32:23 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Nov 06 15:32:14 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 1Zui3p-0003sT-N8 for ged-emacs-devel@m.gmane.org; Fri, 06 Nov 2015 15:32:13 +0100 Original-Received: from localhost ([::1]:39076 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zui3o-0008IS-Uv for ged-emacs-devel@m.gmane.org; Fri, 06 Nov 2015 09:32:12 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59775) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zui3h-0008Cc-RH for emacs-devel@gnu.org; Fri, 06 Nov 2015 09:32:09 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zui3e-0006Fk-Kh for emacs-devel@gnu.org; Fri, 06 Nov 2015 09:32:05 -0500 Original-Received: from mtaout20.012.net.il ([80.179.55.166]:36108) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zui3e-0006Ff-Di for emacs-devel@gnu.org; Fri, 06 Nov 2015 09:32:02 -0500 Original-Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0NXE00200DLG9G00@a-mtaout20.012.net.il> for emacs-devel@gnu.org; Fri, 06 Nov 2015 16:32:00 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([84.94.185.246]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NXE0028VDPC6R20@a-mtaout20.012.net.il>; Fri, 06 Nov 2015 16:32:00 +0200 (IST) In-reply-to: X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-Received-From: 80.179.55.166 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:193418 Archived-At: > From: Stefan Monnier > Cc: Eli Zaretskii > Date: Fri, 06 Nov 2015 09:18:41 -0500 > > > + ;; If we are going to display the result in the echo area, force > > + ;; a more thorough redisplay, in case the sexp we evaluated > > + ;; changes something that should affect the display of the > > + ;; current window. Otherwise, Emacs might decide that only the > > + ;; echo area needs to be redisplayed. > > + (if (eq standard-output t) > > + (force-mode-line-update 'all))))) > > What does this have to do with elisp--eval-last-sexp? "C-x C-e" > Some changes aren't immediately reflected on screen (e.g. toggling > a minor-mode variable) unless one explicitly requests a redisplay or > call force-mode-line-update. It's IMO confusing and unexpected to have this when you evaluate that. > That's always been the case for setting line-spacing. No, it worked correctly before Emacs 24.4, according to my testing. Probably because we used to trigger thorough redisplay "for other reasons". > So I think the above change is a bad idea. If we want to "fix it > right", then we should look for ways to automatically react to changes > to line-spacing, rather than doing (force-mode-line-update 'all) in > elisp--eval-last-sexp, which only catches this problem when it goes > through elisp--eval-last-sexp, and which causes unnecessary redisplay > work in the 99.9% of the cases where elisp--eval-last-sexp does > something else. Why should we care about performance of "C-x C-e"?