* bs-show breaks and get confused about the minibuffer
@ 2008-08-28 15:15 Alex Bennee
0 siblings, 0 replies; 6+ messages in thread
From: Alex Bennee @ 2008-08-28 15:15 UTC (permalink / raw)
To: help-gnu-emacs
Hi,
I'm not sure what causes it but once it breaks it makes my current emacs
session very hard to use as I can't switch buffers. Basically once it
starts any attempt to execute:
(bs-show "all")
Causes emacs to complain that I "Cannot switch buffers in minibuffer
window" despite not being in the minibuffer. Has anyone ever come across
this sticky minibuffer behaviour and how to get out of it?
--
Alex Bennee, Software Engineer
Wow, I'm being shot at from both sides. That means I *must* be
right. :-) -- Larry Wall in <199710211959.MAA18990@wall.org>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: bs-show breaks and get confused about the minibuffer
@ 2008-08-29 9:26 martin rudalics
2008-08-29 13:49 ` Nikolaj Schumacher
0 siblings, 1 reply; 6+ messages in thread
From: martin rudalics @ 2008-08-29 9:26 UTC (permalink / raw)
To: help-gnu-emacs
> I'm not sure what causes it but once it breaks it makes my current emacs
> session very hard to use as I can't switch buffers. Basically once it
> starts any attempt to execute:
>
> (bs-show "all")
>
> Causes emacs to complain that I "Cannot switch buffers in minibuffer
> window" despite not being in the minibuffer. Has anyone ever come across
> this sticky minibuffer behaviour and how to get out of it?
Good catch, I suppose. I've eliminated this stuff in my Emacs for some
time. Basically, the function no_switch_window defined in buffer.c has
if (EQ (minibuf_window, window))
return "Cannot switch buffers in minibuffer window";
which prints the error message. Surprisingly no_switch_window is called
by `switch-to-buffer' as
err = no_switch_window (selected_window);
if (err)
/* If can't display in current window, let pop-to-buffer
try some other window. */
return call3 (intern ("pop-to-buffer"), buffer, Qnil, norecord);
so Emacs should ignore this but God knows what really happens.
Please file a bug report and we will (hopefully) take care of it.
martin
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: bs-show breaks and get confused about the minibuffer
2008-08-29 9:26 martin rudalics
@ 2008-08-29 13:49 ` Nikolaj Schumacher
2008-08-29 14:34 ` martin rudalics
0 siblings, 1 reply; 6+ messages in thread
From: Nikolaj Schumacher @ 2008-08-29 13:49 UTC (permalink / raw)
To: martin rudalics; +Cc: help-gnu-emacs
martin rudalics <rudalics@gmx.at> wrote:
> err = no_switch_window (selected_window);
> if (err)
> /* If can't display in current window, let pop-to-buffer
> try some other window. */
> return call3 (intern ("pop-to-buffer"), buffer, Qnil, norecord);
>
> so Emacs should ignore this but God knows what really happens.
Hmm. Doesn't `pop-to-buffer' use `display-buffer'? Maybe the error is
caused in there. My `display-buffer' starts like this:
(defun my-display-buffer (buffer &optional not-this-window)
(if (minibufferp)
(with-selected-window (minibuffer-selected-window)
(my-display-buffer buffer nil))
...))
So it's conceivable I've worked around the same error, once.
regards,
Nikolaj Schumacher
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: bs-show breaks and get confused about the minibuffer
2008-08-29 13:49 ` Nikolaj Schumacher
@ 2008-08-29 14:34 ` martin rudalics
2008-08-29 16:44 ` Nikolaj Schumacher
0 siblings, 1 reply; 6+ messages in thread
From: martin rudalics @ 2008-08-29 14:34 UTC (permalink / raw)
To: Nikolaj Schumacher; +Cc: help-gnu-emacs
>> err = no_switch_window (selected_window);
>> if (err)
>> /* If can't display in current window, let pop-to-buffer
>> try some other window. */
>> return call3 (intern ("pop-to-buffer"), buffer, Qnil, norecord);
>>
>> so Emacs should ignore this but God knows what really happens.
>
> Hmm. Doesn't `pop-to-buffer' use `display-buffer'? Maybe the error is
> caused in there. My `display-buffer' starts like this:
>
> (defun my-display-buffer (buffer &optional not-this-window)
> (if (minibufferp)
> (with-selected-window (minibuffer-selected-window)
> (my-display-buffer buffer nil))
> ...))
Do you use this as `display-buffer-function'?
> So it's conceivable I've worked around the same error, once.
Maybe. I forgot that the C version of `display-buffer' used to call
no_switch_window. Hence the error might result from there since
`bs-tmp-select-other-window' calls `display-buffer'. With Emacs 23
no_switch_window is exclusively called by `switch-to-buffer' which is
still in C (I moved mine to Elisp and don't have no_switch_window any
more).
In any case signalling that bug in no_switch_window doesn't make sense
IMHO since thereafter `pop-to-buffer' is called anyway.
martin
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: bs-show breaks and get confused about the minibuffer
2008-08-29 14:34 ` martin rudalics
@ 2008-08-29 16:44 ` Nikolaj Schumacher
2008-08-30 8:20 ` martin rudalics
0 siblings, 1 reply; 6+ messages in thread
From: Nikolaj Schumacher @ 2008-08-29 16:44 UTC (permalink / raw)
To: martin rudalics; +Cc: help-gnu-emacs
martin rudalics <rudalics@gmx.at> wrote:
> Do you use this as `display-buffer-function'?
Yes, that's what I meant to type...
regards,
Nikolaj Schumacher
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: bs-show breaks and get confused about the minibuffer
2008-08-29 16:44 ` Nikolaj Schumacher
@ 2008-08-30 8:20 ` martin rudalics
0 siblings, 0 replies; 6+ messages in thread
From: martin rudalics @ 2008-08-30 8:20 UTC (permalink / raw)
To: Nikolaj Schumacher; +Cc: help-gnu-emacs
>> Do you use this as `display-buffer-function'?
>
> Yes, that's what I meant to type...
If you use Emacs 23 then please try without that workaround. If, as a
consequence, you get an error let's try to fix it.
martin
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2008-08-30 8:20 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-28 15:15 bs-show breaks and get confused about the minibuffer Alex Bennee
-- strict thread matches above, loose matches on Subject: below --
2008-08-29 9:26 martin rudalics
2008-08-29 13:49 ` Nikolaj Schumacher
2008-08-29 14:34 ` martin rudalics
2008-08-29 16:44 ` Nikolaj Schumacher
2008-08-30 8:20 ` martin rudalics
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).