all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Juanma Barranquero <lekktu@gmail.com>
Cc: 8911@debbugs.gnu.org
Subject: bug#8911: bs-cycle-next deletes window in some cases.
Date: Tue, 28 Jun 2011 23:27:22 -0400	[thread overview]
Message-ID: <jwvsjqtb9t5.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <BANLkTim7PThfXQNSHT9YqN-SD3LNcC+Smw@mail.gmail.com> (Juanma Barranquero's message of "Mon, 27 Jun 2011 03:53:29 +0200")

>> I'm not sure about the third (isn't it also fixed by passing a non-nil
>> arg to bury-buffer?)
> Well, yes, but that means "fixing" it everywhere; I mean:
> emacs -Q
> M-: (set-window-dedicated-p (selected-window) t) <RET>
> M-x bury-buffer <RET>
> and the frame is iconified.  It shouldn't.

As mentioned earlier, maybe the single-frame case is special, but I'd
really first like to know how you get into such a state.  For any other
case, M-x bury-buffer RET *should* iconify the current frame if it shows
a single dedicated window (with the caveat that Drew wants it to delete
the frame instead).

> If switch-to-buffer is changed not to fallback on pop-to-buffer, why
> shouldn't it be called from elisp?

Because 99% of the calls are wrong (they just want to display
a specific buffer and the author did not consider what should happen if
called in a minibuffer-only frame or in a dedicated window).

> In the case of bs-cycle-next:

>         (unless (window-dedicated-p (selected-window))
>           ;; We don't want the frame iconified if the only window in the frame
>           ;; happens to be dedicated
>           (bury-buffer (current-buffer)))
>         (switch-to-buffer next)

> the current switch-to-buffer causes the unwanted-splitting behavior.
> Changing it to pop-to-buffer-same-window, as its docstring suggests,
> would still cause the same problem.

Yes, bs-cycle-next would be one of the very rare cases where calling
switch-to-buffer is the right thing to do.


        Stefan





  parent reply	other threads:[~2011-06-29  3:27 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-21 11:01 bug#8911: bs-cycle-next deletes window in some cases Juanma Barranquero
2011-06-21 13:37 ` martin rudalics
2011-06-21 14:00   ` Juanma Barranquero
2011-06-21 14:42     ` martin rudalics
2011-06-21 15:02       ` Juanma Barranquero
2011-06-21 16:12         ` martin rudalics
2011-06-21 16:21           ` Juanma Barranquero
2011-06-21 16:28         ` Stefan Monnier
2011-06-21 16:37           ` Juanma Barranquero
2011-06-22  2:14           ` Stefan Monnier
2011-06-22  2:31             ` Juanma Barranquero
2011-06-22 20:11               ` Stefan Monnier
2011-06-21 16:22     ` Stefan Monnier
2011-06-21 16:28       ` Juanma Barranquero
2011-06-21 17:15         ` Drew Adams
2011-06-22  2:11           ` Stefan Monnier
2011-06-22  2:53             ` Drew Adams
2011-06-22  3:13               ` Drew Adams
2011-06-22 20:07               ` Stefan Monnier
2011-06-22 22:01                 ` Drew Adams
2011-06-23 21:55                   ` Stefan Monnier
2011-06-25 21:24                     ` Juanma Barranquero
2011-06-26  9:29                       ` martin rudalics
2011-06-26 11:25                         ` Juanma Barranquero
2011-06-27  1:30                           ` Stefan Monnier
2011-06-27  1:53                             ` Juanma Barranquero
2011-06-27  7:00                               ` martin rudalics
2011-06-27  9:38                                 ` Juanma Barranquero
2011-06-27 12:46                                   ` martin rudalics
2011-06-27 14:01                                     ` Juanma Barranquero
2011-06-27 14:12                                       ` martin rudalics
2011-06-27 14:22                                         ` Juanma Barranquero
2011-06-27 20:11                                           ` Juanma Barranquero
2011-06-29  3:27                               ` Stefan Monnier [this message]
2011-06-29  3:57                                 ` Juanma Barranquero
2011-06-30 17:02                                   ` Stefan Monnier
2011-06-30 18:50                                     ` Juanma Barranquero
2011-07-01 12:07                                       ` Juanma Barranquero
2011-06-29  7:11                                 ` martin rudalics
2011-06-30 17:06                                   ` Stefan Monnier
2011-06-29 11:36                                 ` Juanma Barranquero
2011-06-29 15:36                                 ` Drew Adams
2011-06-29 18:21                                   ` Drew Adams
2011-06-30  7:00                                     ` martin rudalics
2011-06-30 15:31                                       ` Drew Adams
2011-06-22  2:07         ` Stefan Monnier
2011-06-21 16:36       ` martin rudalics
2011-06-21 17:07       ` Drew Adams

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=jwvsjqtb9t5.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=8911@debbugs.gnu.org \
    --cc=lekktu@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.