From: Uday S Reddy <u.s.reddy@cs.bham.ac.uk>
To: martin rudalics <rudalics@gmx.at>
Cc: 5405@debbugs.gnu.org, Uday S Reddy <u.s.reddy@cs.bham.ac.uk>
Subject: bug#5405: select-frame losing current-buffer
Date: Mon, 18 Jan 2010 15:32:16 +0000 [thread overview]
Message-ID: <19284.32512.819000.521256@gargle.gargle.HOWL> (raw)
In-Reply-To: <4B5417C0.4030706@gmx.at>
I didn't understand this message entirely, but I can confirm that the
problem arises in interactive use as well. If you have the focus on a
non-hidden buffer and create a new-frame, then this buffer is
displayed in the new frame. If it is a "hidden" buffer then it is
ignored and some other buffer is displayed in the new frame. This can
be confusing and perhaps annoying to the users, but it is probably not
a serious problem during interactive use.
Buf if the same problem occurs inside application code, then it can be
more dangerous because the code might errorneously assume that the
correct buffer is in place and modify it. The fact that it is a
*special case* means that it might go unnoticed during testing and
faulty application code gets delivered.
So, I recommend that no special case should be made for "hidden"
buffers. As Drew has argued cogently, the case for the special case
is weak.
Cheers,
Uday
martin rudalics writes:
> > The documentation of make-frame says that current-buffer continues to
> > selected in the new frame.
>
> The documentation also says that
>
> The previously selected frame remains selected. However, the
> window system may select the new frame for its own reasons, for
> instance if the frame appears under the mouse pointer and your
> setup is for focus to follow the pointer.
>
> so the current buffer may change (as described below) in some cases.
>
> > The documentation of select-frame doesn't
> > say anything about the matter, but one would normally expect that the
> > current-buffer should still remain the same.
>
> The documentation of `select-frame' says
>
> Subsequent editing commands apply to its selected window.
>
> which inherently means that that frame's selected window becomes the
> selected window. Selecting a window WINDOW means to assure that
>
> If WINDOW is not already selected, make WINDOW's buffer current
> and make WINDOW the frame's selected window.
>
> Which doesn't mean that the documentation can't be improved ;-)
>
> > I presume that the space at the beginning of the buffer name is
> > a partial cause of this misbehaviour.
>
> It's not related.
>
> martin
>
next prev parent reply other threads:[~2010-01-18 15:32 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-17 18:26 bug#5405: select-frame losing current-buffer Uday S Reddy
2010-01-17 20:02 ` Chong Yidong
2010-01-17 20:21 ` Uday S Reddy
2010-01-17 21:26 ` Drew Adams
2010-01-18 8:11 ` martin rudalics
2010-01-18 15:32 ` Uday S Reddy [this message]
2011-09-18 11:45 ` Lars Magne Ingebrigtsen
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=19284.32512.819000.521256@gargle.gargle.HOWL \
--to=u.s.reddy@cs.bham.ac.uk \
--cc=5405@debbugs.gnu.org \
--cc=rudalics@gmx.at \
/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.