unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: martin rudalics <rudalics@gmx.at>
To: David Reitter <david.reitter@gmail.com>
Cc: bug-gnu-emacs@gnu.org, dashteacup@insightbb.com
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	[thread overview]
Message-ID: <4711D670.6060508@gmx.at> (raw)
In-Reply-To: <70FBB428-1B37-4C3B-A60D-E3A7139E384C@gmail.com>

 > 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 <dashteacup@insightbb.com>
 >> Date: 10 October 2007 05:25:58 BDT
 >> To: aquamacs-bugs@aquamacs.org
 >> 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	other threads:[~2007-10-14  8:42 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <D64B7FD7-2C5F-4A87-8F0B-61EB47217262@insightbb.com>
2007-10-13 17:28 ` View-quit in *Help* restores wrong window when display-buffer-reuse-frames is t David Reitter
2007-10-14  8:42   ` martin rudalics [this message]
2007-10-17 20:58     ` Glenn Morris
2007-10-18  8:20       ` martin rudalics
2007-10-18 16:05         ` Drew Adams
2007-10-18 22:01           ` martin rudalics
2007-10-18 22:58             ` Drew Adams
2007-10-19  8:23               ` martin rudalics
2007-10-19 15:17                 ` Drew Adams
2007-10-20  9:45                   ` martin rudalics
2007-10-18 18:27         ` Glenn Morris
2007-10-18 22:03           ` martin rudalics
2007-10-18 23:44             ` Glenn Morris
2007-10-19  8:14               ` martin rudalics
2007-10-19 17:52                 ` Glenn Morris
2007-10-20  9:45                   ` martin rudalics
2007-10-23 23:30                     ` Glenn Morris
2007-10-24  6:32                       ` martin rudalics
2007-10-22 21:45     ` David Reitter
2007-11-29  9:05     ` David Reitter
2007-11-29 10:22       ` martin rudalics
     [not found]       ` <mailman.4303.1196332542.18990.bug-gnu-emacs@gnu.org>
2007-12-01  8:01         ` David Reitter
2007-12-01  9:20           ` martin rudalics
2007-12-01 14:44             ` David Reitter

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=4711D670.6060508@gmx.at \
    --to=rudalics@gmx.at \
    --cc=bug-gnu-emacs@gnu.org \
    --cc=dashteacup@insightbb.com \
    --cc=david.reitter@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 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).