From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: select-frame-set-input-focus fails to raise the frame Date: Sat, 16 Dec 2017 21:45:35 +0200 Message-ID: <83r2ruqwww.fsf@gnu.org> References: <20171213204737.GA1621@breton.holly.idiocy.org> <20171213222634.GA2144@breton.holly.idiocy.org> <831sjwt1jf.fsf@gnu.org> <83tvwrsouc.fsf@gnu.org> <83d13espny.fsf@gnu.org> <83a7yisl6t.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1513453557 22361 195.159.176.226 (16 Dec 2017 19:45:57 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 16 Dec 2017 19:45:57 +0000 (UTC) Cc: alan@idiocy.org, emacs-devel@gnu.org To: rswgnu@gmail.com Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Dec 16 20:45:54 2017 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 1eQIPB-0005UN-6h for ged-emacs-devel@m.gmane.org; Sat, 16 Dec 2017 20:45:53 +0100 Original-Received: from localhost ([::1]:51838 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eQIPI-0000On-E5 for ged-emacs-devel@m.gmane.org; Sat, 16 Dec 2017 14:46:00 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46091) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eQIP5-0000N9-8n for emacs-devel@gnu.org; Sat, 16 Dec 2017 14:45:48 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eQIP1-0007MM-BJ for emacs-devel@gnu.org; Sat, 16 Dec 2017 14:45:47 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:38201) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eQIP1-0007M4-6w; Sat, 16 Dec 2017 14:45:43 -0500 Original-Received: from [176.228.60.248] (port=3832 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1eQIOz-0001is-7u; Sat, 16 Dec 2017 14:45:43 -0500 In-reply-to: (message from Robert Weiner on Sat, 16 Dec 2017 13:57:34 -0500) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e 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:221147 Archived-At: > From: Robert Weiner > Date: Sat, 16 Dec 2017 13:57:34 -0500 > Cc: Alan Third , emacs-devel > > > ​Ok, that is an example of why I am advocating for a potentially > > new function that let's a programmer say "display the latest > > contents of this window with no other Emacs window or frame > > obscuring it". > > That cannot be done in general, because redisplaying a window could > very well affect other windows. One example of that is TTY frame > display; > > ​Only one frame is visible on a tty at a time, so in > my use case, this would have to be the frame that > displays the window. Why is this a problem? TTY redisplay deals with the entire frame, so it cannot redraw a single window. > ​​another is a case where the window was shrunk. > > ​Why can a shrunk window not be displayed within the > topmost frame? You are giving examples without explaining > why they conflict with the desired goal? I gave examples that explain why Emacs cannot be in general told to redraw a single window. Maybe I misunderstood, but I thought this is what you were trying to accomplish ("display the latest contents of this window"). > ​So you are saying Emacs provides no way for the programmer > to ensure that a window is wholly displayed on screen and > fully updated even when Emacs is the only application in use? Not if you want to tell Emacs to display _only_ one window. The display engine has its own logic that decides what needs to be redrawn, and Lisp programs should not interfere with those decisions. That is why we don't provide APIs to achieve that. Needless to say, the decisions of the display engine are required to be correct, i.e. the redrawn display must always reflect the contents of the shown buffers and their associated Lisp data (properties, overlays, etc.) as they were found when redisplay was entered. Any disparity between the two is a display bug. > Under what window managers is Emacs unable to raise > a frame or set input focus reliably? As Stefan already mentioned, focus policies are very different, and some of them are affected by user customizations outside of Emacs. I'm not an expert on window managers to call out specific ones, but they are all on X, AFAIR. > I had just dealt with many multi-frame scenarios > before and never had to call redisplay directly so it seemed > odd that I had to now. That's because normally, you don't need to. Having to display changes during the command's execution is a rare use case.