bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: View-quit in *Help* restores wrong window when display-buffer-reuse-


From: martin rudalics
Subject: Re: View-quit in *Help* restores wrong window when display-buffer-reuse-frames is t
Date: Sun, 14 Oct 2007 10:42:24 +0200
User-agent: Mozilla Thunderbird 1.0 (Windows/20041206)

> A little investigation traced this to the setting of `display-buffer-
> reuse-frames', which, when t, causes "View-quit" to do the wrong  thing
> when restoring the previous window configuration.
> In this case, the second window in the frame gets deleted, but the
> first window switches to a different buffer.
>
> The following should reproduce it in a 22 branch CVS Emacs (with
> unrelated patches - I tried Aquamacs with -Q) and also in a 23 one (I
> tried Adrian Robert's Cocoa port):
>
> (progn
>   (setq display-buffer-reuse-frames t)
>   (describe-mode)
>   (other-window 1)
>   (View-quit)
> )

Thanks for reporting.  This is one of a couple of known problems with
`View-quit'.  I posted a tentative patch here

http://lists.gnu.org/archive/html/bug-gnu-emacs/2007-09/msg00154.html

and would be very glad if someone could try whether it helps to solve
this and related problems.

> Begin forwarded message:
>
>> From: Paul Curry <address@hidden>
>> Date: 10 October 2007 05:25:58 BDT
>> To: address@hidden
>> Subject: [Aquamacs-bugs] View-quit in *Help* restores wrong window
>>
>> Enter your bug report here.
>>
>> When I quit from a *Help* buffer (key q, command View-quit) in  Aquamacs
>> I do not get the correct (or at least expected) behavior.  In other
>> Emacsen, if you have two buffers open in a frame -- one of which is a
>> *Help* buffer -- and you quit the help buffer, then the frame will  fill
>> out to only include the other visible buffer.  In Aquamacs, however,
>> View-quit fills the frame with a seemingly random unrelated buffer.
>>

Please try the patch cited above.  If you have any problems applying it
tell me immediately.  It would be really important if someone helped me
testing this.

>> For testing purposes I tried the following sequence of commands in
>> both Aquamacs and Carbon Emacs:
>> Start Emacs
>> describe-mode
>> other-window
>> View-quit
>> ---
>> In Carbon Emacs I return to the *scratch* buffer, as expected; in
>> Aquamacs I change to the *Messages* buffer.  This is reproducible
>> every time.
>>
>> Curious, I checked out the source code for View-quit in both Emacsen
>> -- they were the same.  view-mode-exit (called from View-quit) was
>> also the same.  The only difference that I can notice is the value of
>> view-return-to-alist.  In Carbon Emacs it is:
>> ((#<window 8 on *Help*> #<window 3 on *scratch*> . t))
>> and in Aqumacs it's:
>> ((#<window 7 on *Help*> #<window 3 on *scratch*> . quit-window))

Note that `view-mode-exit' just executes something that has been put on
`view-return-to-alist' (maybe a long time) before.  The source of all
problems is how the entry for `view-return-to-alist' is indirectly set
up when creating the "help window" in the first place.

I'm not sure what's causing the difference here.  To find out you could
try to edebug `print-help-return-message' on both systems and look how
the value for `help-return-method' gets assigned.  Maybe some option has
different initial values on your systems.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]