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: npostavs <at> users.sourceforge.net
To: "Alex \(QWxleA\)" <qwxlea <at> gmail.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 25521 <at> debbugs.gnu.org
Subject: bug#25521: 26.0.50; After (make-frame '((name . "foo"))) (select-frame-by-name "foo") doesn't see the frame
Date: Thu, 26 Jan 2017 21:02:41 -0500
"Alex (QWxleA)" <qwxlea <at> gmail.com> writes:
>
> Ah, sorry, did not try that. Your above mentioned suggestion works. As I
> needed the name to be set for my window-manager, I ended up with the following (but it
> also works without (name . "foo")):
>
> (defun qw ()
>   (interactive) 
>   (select-frame (make-frame '((name . "foo") 
>                               (width . 120)
>                               (height . 25))))
>   (org-agenda))
>
> This is perfect, it does the same thing as:
>
> (defun qw ()
>   (interactive)
>   (make-frame '( (name . "foo")
>                 (width . 120)
>                 (height . 25)))
>   (sleep-for 0.00134)
>   (select-frame-by-name "foo") 
>   (org-agenda))
>
> But without the time-delay, so for my use it works, and is shorter to
> boot, excellent!

Thanks for confirming.

> Select-frame-by-name is a bit slow, when called right after make-frame, which might be
> a bug or not.

select-frame-by-name only selects frames that are on the current
display, so it doesn't work for frames that haven't been selected yet.
Until recently, Emacs would busy wait until the frame becomes visible,
now that it doesn't, you need to add the wait in lisp code.

Eli Zaretskii <eliz <at> gnu.org> writes:
>
> I wonder whether we should reinstate a wait there, but make it limited
> so that it never infloops.  Otherwise, these issues will continue to
> haunt us and the users.

This case can be solved in a simpler way, and in the other case
(Bug#25511), I believe Martin was saying something similar, so I think
it would be a bit premature to add the busy wait again.

For select-frame-by-name specifically, we could make it check
non-visible frames as well, though I'm inclined to just mark this as
notabug/wontfix.




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

Previous Next


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