all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: npostavs@users.sourceforge.net
To: "Alex \(QWxleA\)" <qwxlea@gmail.com>
Cc: 25521@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	[thread overview]
Message-ID: <87ziids1j2.fsf@users.sourceforge.net> (raw)
In-Reply-To: <877f5hq0tl.fsf@gmail.com> (Alex's message of "Thu, 26 Jan 2017 17:48:38 +0200")

"Alex (QWxleA)" <qwxlea@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@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.





  reply	other threads:[~2017-01-27  2:02 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-24 21:05 bug#25521: 26.0.50; After (make-frame '((name . "foo"))) (select-frame-by-name "foo") doesn't see the frame Alex 'QWxleA' Poslavsky
2017-01-24 23:35 ` npostavs
2017-01-25  3:37   ` Eli Zaretskii
2017-01-25  3:31 ` Eli Zaretskii
2017-01-25  6:47   ` Alex (QWxleA)
2017-01-25 23:43     ` npostavs
2017-01-26 11:40       ` Alex (QWxleA)
2017-01-26 14:37         ` npostavs
2017-01-26 15:48           ` Alex (QWxleA)
2017-01-27  2:02             ` npostavs [this message]
2017-01-27  7:56               ` Eli Zaretskii
2017-06-30  3:08                 ` npostavs
2017-06-30  6:09                   ` Eli Zaretskii
2017-06-30  6:52                   ` martin rudalics
2017-09-01  3:13                     ` npostavs
2017-09-01  6:56                       ` Eli Zaretskii
2017-09-01 13:02                       ` martin rudalics
2017-09-01 13:41                         ` npostavs
2017-09-01 15:45                           ` martin rudalics
2017-09-26  2:54                             ` Noam Postavsky
2017-09-27  8:11                               ` martin rudalics
2017-09-27 12:13                                 ` Noam Postavsky
2017-09-29  8:33                                   ` martin rudalics
2017-09-29 12:48                                     ` Noam Postavsky
2017-09-29 18:19                                       ` martin rudalics
2017-09-29 22:47                                         ` Noam Postavsky
2017-09-29 13:39                                 ` Eli Zaretskii
2017-10-14  2:14                                 ` Noam Postavsky
2017-10-14  8:36                                   ` martin rudalics
2017-10-15 18:22                                     ` Noam Postavsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ziids1j2.fsf@users.sourceforge.net \
    --to=npostavs@users.sourceforge.net \
    --cc=25521@debbugs.gnu.org \
    --cc=qwxlea@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.