unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
To: "'Stefan Monnier'" <monnier@iro.umontreal.ca>
Cc: 'Juanma Barranquero' <lekktu@gmail.com>, 8911@debbugs.gnu.org
Subject: bug#8911: bs-cycle-next deletes window in some cases.
Date: Wed, 22 Jun 2011 15:01:13 -0700	[thread overview]
Message-ID: <8E864413162C4814BE8EFFD0C1FA1989@us.oracle.com> (raw)
In-Reply-To: <jwvaad9bpm4.fsf-monnier+emacs@gnu.org>

> > As I also said earlier, to me (and per the doc string and the
> > function's past behavior) `bury-buffer' is not about display.  (That
> > is, it is only secondarily about display, and only in the one
> > particular case quoted above.)
> 
> There are two ways to call bury-buffer, which correspond to two fairly
> different behaviors.  One is with a non-nil argument, where it only
> touches the order in the buffer-list.  This one is uncontroversial and
> doesn't matter much to me.

Right.  Glad that at least in this case you're OK with not doing anything wrt
display.

> The other is when the argument is nil, in which case it is
> *specifically* meant to make the buffer disappear

I'm sure I won't be able to convince you, but that is not what the doc string
indicates.  It speaks only about removing the current buffer _from the selected
window_ (if displayed there).

To you maybe that suggests something about "disappearing" in the case of a
dedicated window.

To me it suggests nothing of the kind.  To me it suggests on the contrary that
this is not at all about that particular case, but is instead _ONLY_ about the
case where the buffer _CAN_ be removed from the window.  

To me, that sentence, which has been around since Day One, covers only the
special case that does _not_ include dedicated windows, since the current buffer
cannot be removed from such a window.

Dedicated windows have also been around a long time, yet the `bury-buffer' doc
never said anything about doing anything to a dedicated window or its frame.

Never UNTIL, that is, Emacs 23, when you (Emacs Dev) changed it - in the manual.
You added this: "But if the selected window is dedicated to its buffer, it
deletes that window if there are other windows left on its frame.  Otherwise, if
the selected window is the only window on its frame, it iconifies that frame."

That was never the behavior or the interpretation (doc) before that.  AFAIK,
before Emacs 23 `bury-buffer' never did anything about the window in the
dedicated case.  It certainly never made the buffer "disappear" in any way for
that case.

Instead, it raised the error "Cannot switch buffers in a dedicated window",
which to me sounds right.  No doubt you consider that previous behavior a bug,
but I expect it was by design, and I think it was not a bad choice.

> (additionally to changing the buffer-list order).  This case is
> very much about display, not just secondarily so.

Not for the dedicated case - not until Emacs 23, that is.  That behavior was
grafted on, and IMO it was a mistake.

> > The reason is primarily the annoyance that iconifying can 
> > produce - on Windows it is kind of animated, essentially
> > sweeping across the display down to the task bar.  With
> > frame deletion it just disappears instantly - poof.
> 
> Then we could add an option so that bury-buffer uses delete-frame
> instead of iconify-frame.

Or `ignore' instead of `iconify-frame'...

But why not instead do as I suggested earlier:

1. Return to the pre-23 behavior, so that `bury-buffer' is once again not about
display. 

2. Add a `bury-buffer-hook', to let people tack on any behavior they like,
whether related to display or not.

You might tack on `iconify-frame'.  I might (or might not) tack on
`delete-frame'.  Joe Lambda might tack on a logging function to record buffer
activity or something.

I agree that it will not be uncommon to want to associate some display behavior
with `bury-buffer'.  I don't think the right idea is to try to decide on one
display behavior that fits all.  And I would opt for a hook (keeping
`bury-buffer' display-free) rather than an option whose default value is some
display behavior (e.g. `iconify-frame').

> But doing nothing is not an option since the caller
> specifically asked to undisplay the buffer.

Not until you changed the meaning to that.  A caller of `bury-buffer' wants to
change the buffer order.  Why mix in additional behavior, so that a caller must
now "want" to do a particular mix of things that don't necessarily go together?

FWIW.






  reply	other threads:[~2011-06-22 22:01 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 [this message]
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
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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=8E864413162C4814BE8EFFD0C1FA1989@us.oracle.com \
    --to=drew.adams@oracle.com \
    --cc=8911@debbugs.gnu.org \
    --cc=lekktu@gmail.com \
    --cc=monnier@iro.umontreal.ca \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).