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 09:18:41 -0500 Message-ID: References: <20151106093011.17282.48378@vcs.savannah.gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1446819550 29354 80.91.229.3 (6 Nov 2015 14:19:10 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 6 Nov 2015 14:19:10 +0000 (UTC) Cc: Eli Zaretskii To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Nov 06 15:19:03 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 1Zuhqy-0002LG-Am for ged-emacs-devel@m.gmane.org; Fri, 06 Nov 2015 15:18:56 +0100 Original-Received: from localhost ([::1]:39012 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zuhqx-0001cl-KF for ged-emacs-devel@m.gmane.org; Fri, 06 Nov 2015 09:18:55 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56332) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zuhqr-0001cW-2l for emacs-devel@gnu.org; Fri, 06 Nov 2015 09:18:52 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zuhqq-0002OJ-3B for emacs-devel@gnu.org; Fri, 06 Nov 2015 09:18:49 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:4015) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zuhql-0002MI-3Q; Fri, 06 Nov 2015 09:18:43 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0CnHQA731xV/+Z93mhcghl3hAKFVbs3CYQOgz0EAgKBPDkUAQEBAQEBAYEKQQWDXQEBBFYjEAs0EhQYDYhjzyMBAQEBBgEBAQEeizqFBQcWhBcFjDCSZ44Wh1cjgWaCMCCCeAEBAQ X-IPAS-Result: A0CnHQA731xV/+Z93mhcghl3hAKFVbs3CYQOgz0EAgKBPDkUAQEBAQEBAYEKQQWDXQEBBFYjEAs0EhQYDYhjzyMBAQEBBgEBAQEeizqFBQcWhBcFjDCSZ44Wh1cjgWaCMCCCeAEBAQ X-IronPort-AV: E=Sophos;i="5.13,465,1427774400"; d="scan'208";a="176473286" Original-Received: from 104-222-125-230.cpe.teksavvy.com (HELO pastel.home) ([104.222.125.230]) by ironport2-out.teksavvy.com with ESMTP; 06 Nov 2015 09:18:41 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id 79600601CB; Fri, 6 Nov 2015 09:18:41 -0500 (EST) In-Reply-To: (Eli Zaretskii's message of "Fri, 06 Nov 2015 09:30:11 +0000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.181 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:193416 Archived-At: > + ;; 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? 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. That's always been the case for setting line-spacing. Sometimes you get lucky, and after setting line-spacing the change is immediately reflected on screen because you happen to make some other change at the same time, but it's just wrong to rely on that. 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. Stefan