GNU bug report logs - #8911
bs-cycle-next deletes window in some cases.

Previous Next

Package: emacs;

Reported by: Juanma Barranquero <lekktu <at> gmail.com>

Date: Tue, 21 Jun 2011 11:03:01 UTC

Severity: normal

Done: Juanma Barranquero <lekktu <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #101 received at 8911 <at> debbugs.gnu.org (full text, mbox):

From: Juanma Barranquero <lekktu <at> gmail.com>
To: martin rudalics <rudalics <at> gmx.at>
Cc: 8911 <at> debbugs.gnu.org, Stefan Monnier <monnier <at> iro.umontreal.ca>,
	Drew Adams <drew.adams <at> oracle.com>
Subject: Re: bug#8911: bs-cycle-next deletes window in some cases.
Date: Mon, 27 Jun 2011 16:01:12 +0200
On Mon, Jun 27, 2011 at 14:46, martin rudalics <rudalics <at> gmx.at> wrote:

> If the user wants to change the default behavior, yes.

Ah. Current documentation for display-buffer-alist is less than clear to me.

> I'm not sure whether we want to do that.

Well, I'm not sure whether *we* want, either, but I'm definitely sure
I want (locally, I mean).

> If so, there are two ways.
> Either, in `bs-cycle-next' write something like:
>
>  (if (and (window-dedicated-p) (not (eq (window-buffer) next)))
>      (error "Selected window is dedicated to its buffer")
>    (display-buffer-same-window next))
>
> which gives the user no choice wrt what to do when the selected window
> is dedicated

I supose this is a no-no.

>  or write
>
> (defun reuse-same-window-unless-dedicated (buffer &rest args)
>  "..."
>  (if (and (window-dedicated-p) (not (eq (window-buffer) next)))
>      (error "Selected window is dedicated to its buffer")
>    (display-buffer-same-window buffer)))
>
> (display-buffer
>  next '((fun-with-args reuse-same-window-unless-dedicated)) 'bs-cycle-next)
>
> and allow the user to specify her own deviant behavior when the selected
> window is dedicated.

I don't follow you. reuse-same-window-unless-dedicated is throwing an
error unconditionally. How would the user specifiy her own behavior?

    Juanma




This bug report was last modified 13 years and 324 days ago.

Previous Next


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