From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Emacs-26.0.91: switch-to-buffer-other-window runs too slowly (about 0.1s) Date: Mon, 26 Mar 2018 16:09:07 -0400 Message-ID: References: <83efk6g93z.fsf@gnu.org> <544b8346-bda9-45eb-9573-1d51d9f768b2@Spark> <83bmfag8gu.fsf@gnu.org> <87y3ie24z1.fsf@gmail.com> <87sh8m23tc.fsf@gmail.com> <87k1ty22p1.fsf@gmail.com> <837epyg30w.fsf@gnu.org> <83370mg0qj.fsf@gnu.org> <5AB94021.8080700@gmx.at> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1522094869 31896 195.159.176.226 (26 Mar 2018 20:07:49 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 26 Mar 2018 20:07:49 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: Eli Zaretskii , emacs-devel@gnu.org To: martin rudalics Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Mar 26 22:07:45 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f0YPB-0008DD-AW for ged-emacs-devel@m.gmane.org; Mon, 26 Mar 2018 22:07:45 +0200 Original-Received: from localhost ([::1]:58919 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f0YRE-0007k2-Kd for ged-emacs-devel@m.gmane.org; Mon, 26 Mar 2018 16:09:52 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48396) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f0YQf-0007jX-UZ for emacs-devel@gnu.org; Mon, 26 Mar 2018 16:09:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f0YQa-0003Ag-Vo for emacs-devel@gnu.org; Mon, 26 Mar 2018 16:09:17 -0400 Original-Received: from chene.dit.umontreal.ca ([132.204.246.20]:40934) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f0YQa-0003AB-OY; Mon, 26 Mar 2018 16:09:12 -0400 Original-Received: from pastel.home (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.7/8.14.1) with ESMTP id w2QK97Ie028286; Mon, 26 Mar 2018 16:09:08 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id C24EE605C1; Mon, 26 Mar 2018 16:09:07 -0400 (EDT) In-Reply-To: <5AB94021.8080700@gmx.at> (martin rudalics's message of "Mon, 26 Mar 2018 20:46:57 +0200") X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 2 Rules triggered EDT_SA_DN_PASS=0, RV6250=0 X-NAI-Spam-Version: 2.3.0.9418 : core <6250> : inlines <6519> : streams <1782345> : uri <2615308> 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.21 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:224072 Archived-At: >> But I think in the case where we move from window A to window B and both >> are on the same frame we should either not call >> window--maybe-raise-frame or else that function should do nothing in >> that case. Basically, I feel like if the movement is intra-frame than >> no frame-level operations should be involved. > There's no guarantee that the selected frame is visible at the time > `display-buffer' is called. If we're already on the destination frame, then I'd argue that if that frame is not visible it's a pre-existing condition and there's no particular reason to "fix" it at that time. IOW I think that in window--maybe-raise-frame ;; Assume the selected frame is already visible enough. (eq frame (selected-frame)) should apply not just to raise-frame but also to make-frame-visible. Stefan