GNU bug report logs - #25521
26.0.50; After (make-frame '((name . "foo"))) (select-frame-by-name "foo") doesn't see the frame

Previous Next

Package: emacs;

Reported by: Alex 'QWxleA' Poslavsky <qwxlea <at> gmail.com>

Date: Tue, 24 Jan 2017 21:11:01 UTC

Severity: normal

Tags: fixed, patch

Found in version 26.0.50

Done: Noam Postavsky <npostavs <at> users.sourceforge.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: martin rudalics <rudalics <at> gmx.at>
To: npostavs <at> users.sourceforge.net
Cc: Eli Zaretskii <eliz <at> gnu.org>, 25521 <at> debbugs.gnu.org, qwxlea <at> gmail.com
Subject: bug#25521: 26.0.50; After (make-frame '((name . "foo"))) (select-frame-by-name "foo") doesn't see the frame
Date: Fri, 01 Sep 2017 15:02:45 +0200
> Hmm, I thought I could get away with using an existing hook.  But
> looking at all the places where x_make_frame_visible is called, I'm
> feeling reluctant to introduce lisp evaluation into them.  I think we
> should go with Eli's idea, bring back the busy wait but add a timeout.

I'm not very convinced.  First, the present bug should not motivate this
change.  ‘select-frame-by-name’ is a pretty obscure function.  It fails
in the OP's case because the display info for the new frame has not been
yet set up.  In the interactive call, suggesting a default frame on the
current terminal makes sense; so consulting that info is useful.  But
the info is useless in a non-interactive call: Nothing should prevent
that function from selecting a frame with a given name on any display.

Second, we'll then have a third way how to wait on X for something to
happen: We already have x_wait_for_event with a fixed 0.1 second timeout
for frame resizing.  And we have x_sync_with_move which counts till 50,
may return early when the frame is within some fuzzy distance from the
expected position and waits another 0.5 seconds if the frame hasn't made
it there till then.

martin





This bug report was last modified 7 years and 275 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.