From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Joost Kremers Newsgroups: gmane.emacs.help Subject: Re: Is it ok to use (redisplay), or should this be left to the experts? Date: Tue, 12 Feb 2019 00:43:24 +0100 Message-ID: <87tvh9gacj.fsf@fastmail.fm> References: <871s5ktf9b.fsf@fastmail.fm> <83pnt3hd15.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; format=flowed Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="145114"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: mu4e 1.1.0; emacs 26.1 To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Feb 12 00:48:44 2019 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gtLJc-000bfY-6M for geh-help-gnu-emacs@m.gmane.org; Tue, 12 Feb 2019 00:48:44 +0100 Original-Received: from localhost ([127.0.0.1]:58028 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gtLJb-0002Mg-0l for geh-help-gnu-emacs@m.gmane.org; Mon, 11 Feb 2019 18:48:43 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:60865) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gtLJA-0002IZ-Tc for help-gnu-emacs@gnu.org; Mon, 11 Feb 2019 18:48:17 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gtLEv-0002TG-CA for help-gnu-emacs@gnu.org; Mon, 11 Feb 2019 18:43:54 -0500 Original-Received: from out2-smtp.messagingengine.com ([66.111.4.26]:50595) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gtLEt-0002A2-4f for help-gnu-emacs@gnu.org; Mon, 11 Feb 2019 18:43:51 -0500 Original-Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 68005211D3 for ; Mon, 11 Feb 2019 18:43:28 -0500 (EST) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Mon, 11 Feb 2019 18:43:28 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.fm; h= references:from:to:subject:in-reply-to:date:message-id :mime-version:content-type; s=fm2; bh=SGYzG4FcX3fNEfyZntyANQGGsa pFm5hwgY2AVaW6s+w=; b=XYK8hhl7zUT69mqMnYQyYQB96KmElv9UP2tmwPvMlO 5GdxW2N1BJc6E4/uffZC4uANPF4TB3dlP37glhosUT5f4RoGCy4mbE4YZYZaEtQM 9xqdBZRfLk8UyhMBC5YFzvzsRIR6oOE0SJowQmAfpXjBvpQZSD9tdeBFV+L5Skfx 1d+RG9+B14wDElnnO25MDxBWFGdeZtAVvdjKwWSu00gbFvXLwdf3fdVBxqll5V77 +2L0K4NTM6/1G4vCGQqnFIhVID9/XwFsSr6dRg2y+PAKmpRTb4LCZk8YvJ3Pd9o4 h9BMck+igyz730oKxpLd+5bmq0YlhjtgNvrGB1JxPC5Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=SGYzG4 FcX3fNEfyZntyANQGGsapFm5hwgY2AVaW6s+w=; b=YNSeBcbNTJGFfvM2B74OC+ tFIoOV5d9l323Y1IHpkRyvwDP2UTGGAizuR7cr7RD/FhR4MQIeV0JidQxJORqMtC rwhurinXYeDHHuL4kGP163HgsGuCJuDF+FSQApI+yIPv02jDEJwAr5qbEwHbWFAD EAvVMEOm872P2g036faGTJeGbkRAQHLE3jtCU1BpmeKqN/x/X920d4dY37/EjoLi ogFpIokFCxxpSsZllVSFla08O8BmVL697aNsVJrPsMsNk23ArO79paIyXrXT7EjE Zc52731ZNKwODUp46R7xn3RCYufr2sMwHuvDdCGK3pijuDmbbxJqyHPlxJPPcORg == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedtledruddttddgudefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfquhhtnecuuegrihhlohhuthemucef tddtnecunecujfgurhepfhgfhffvufgjfffkgggtsehttdertddtredtnecuhfhrohhmpe flohhoshhtucfmrhgvmhgvrhhsuceojhhoohhsthhkrhgvmhgvrhhssehfrghsthhmrghi lhdrfhhmqeenucfkphepleehrdeltddrvddtuddrudegnecurfgrrhgrmhepmhgrihhlfh hrohhmpehjohhoshhtkhhrvghmvghrshesfhgrshhtmhgrihhlrdhfmhenucevlhhushht vghrufhiiigvpedt X-ME-Proxy: Original-Received: from Swift.fastmail.com (ip5f5ac90e.dynamic.kabel-deutschland.de [95.90.201.14]) by mail.messagingengine.com (Postfix) with ESMTPA id 842DAE4381 for ; Mon, 11 Feb 2019 18:43:27 -0500 (EST) In-reply-to: <83pnt3hd15.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 66.111.4.26 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:119360 Archived-At: On Fri, Jan 11 2019, Eli Zaretskii wrote: >> It seems that a call to (redisplay) also does the trick, but >> I'm >> hesitant to add this, because, well, I'm not sure why, exactly, >> it's just that I'm not entirely sure when, i.e., in what >> circumstances, (redisplay) is meant to be used, what side >> effects >> to watch out for (in any), etc. > > There should be no problem with invoking 'redisplay', it just > slows > down the program a bit, especially if the code in question will > or > might be executed frequently. It's only called once, when the relevant minor mode is activated for the first time, so that shouldn't be an issue. > However, sit-for is IMO better, because > in some use cases you must allow for the window manager to > respond to > the full-screen request and for Emacs to receive a notification > from > the window manager. And that means waiting for some short time. An unpredictable amount of time, I guess. Although it's unlikely to be very long, if I handle the problem by introducing an artificial delay, it would have to be long enough to handle the slowest of slow computers. Which might be a noticeable delay, which would inconvenience everyone else... >> So I guess what I'm asking is whether someone can tell me >> whether >> (redisplay) is the right way to deal with this issue, or >> whether >> there is a better way. Or perhaps the user is SOL and needs to >> do >> some local configuration to get things to behave? > > I cannot answer this because it isn't clear to me who initiated > full-screen: the user or the package. If it's the package, then > the > package should also accommodate these issues, perhaps only when > the > frame size changes significantly. Yes, it's the package that initiates full-screen. And I suspect that in most cases, it will be a significant size-change. So I'm leaning toward Stefan's proposed solution, which is to use `window-size-change-functions'... Thanks, -- Joost Kremers Life has its moments