all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* q in *Help* buffer deletes another window
@ 2007-07-21 22:37 Drew Adams
  2007-07-22 18:36 ` Richard Stallman
  0 siblings, 1 reply; 4+ messages in thread
From: Drew Adams @ 2007-07-21 22:37 UTC (permalink / raw)
  To: Bug-Gnu-Emacs

emacs -Q
C-x d RET
C-x 3
C-x C-f <some file>
M-x set-variable pop-up-frames t
C-h f forward-char
q (in *Help* buffer)

The *Help* buffer is iconified, and the window of the buffer visiting
file <some-file> is deleted. The window of <some-file> should not be
deleted.

(It is also a bug, IMO, that *Help* is iconified. When pop-up-frames
is non-nil, the frame should be deleted. Other users have also
reported this awful behavior.)


In GNU Emacs 22.1.1 (i386-mingw-nt5.1.2600)
 of 2007-06-02 on RELEASE
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (3.4) --cflags -Ic:/gnuwin32/include'

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: ENU
  locale-coding-system: cp1252
  default-enable-multibyte-characters: t

Major mode: Dired by name

Minor modes in effect:
  encoded-kbd-mode: t
  tooltip-mode: t
  tool-bar-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  unify-8859-on-encoding-mode: t
  utf-translate-cjk-mode: t
  auto-compression-mode: t
  line-number-mode: t

Recent input:
<help-echo> <help-echo> <down-mouse-1> <mouse-1> M-x
s e t - v a r <return> p o p - u p - f r a m <tab>
s <return> t <return> C-x 3 C-x C-f f o <backspace>
i t - f <tab> <return> C-h f f o r w a r d - c h a
r <return> <switch-frame> q C-x C-b <switch-frame>
q <help-echo> <help-echo> <help-echo> <help-echo> <help-echo>
<help-echo> <help-echo> <help-echo> <menu-bar> <help-menu>
<report-emacs-bug>

Recent messages:
("C:\\Emacs-22.1\\bin\\emacs.exe" "-q" "--no-site-file" "--debug-init"
"C:\\drews-lisp-20")
Loading encoded-kb...done
For information about the GNU Project and its goals, type C-h C-p.
Loading dired...
Loading regexp-opt...done
Loading dired...done
For information about the GNU Project and its goals, type C-h C-p.
Loading help-fns...done
Loading easymenu...done
Loading emacsbug...done

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: q in *Help* buffer deletes another window
  2007-07-21 22:37 q in *Help* buffer deletes another window Drew Adams
@ 2007-07-22 18:36 ` Richard Stallman
  2007-07-28 12:56   ` martin rudalics
  0 siblings, 1 reply; 4+ messages in thread
From: Richard Stallman @ 2007-07-22 18:36 UTC (permalink / raw)
  To: Drew Adams; +Cc: emacs-devel

The code that handles exiting from view mode is complex,
and apparently needs redesign.  This isn't the only recent
complaint.

Is anyone interested?


X-Spam-Status: No, score=0.0 required=5.0 tests=UNPARSEABLE_RELAY 
	autolearn=failed version=3.1.0
From: "Drew Adams" <drew.adams@oracle.com>
To: "Bug-Gnu-Emacs" <bug-gnu-emacs@gnu.org>
Date: Sat, 21 Jul 2007 15:37:59 -0700
MIME-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-1"
Subject: q in *Help* buffer deletes another window

emacs -Q
C-x d RET
C-x 3
C-x C-f <some file>
M-x set-variable pop-up-frames t
C-h f forward-char
q (in *Help* buffer)

The *Help* buffer is iconified, and the window of the buffer visiting
file <some-file> is deleted. The window of <some-file> should not be
deleted.

(It is also a bug, IMO, that *Help* is iconified. When pop-up-frames
is non-nil, the frame should be deleted. Other users have also
reported this awful behavior.)


In GNU Emacs 22.1.1 (i386-mingw-nt5.1.2600)
 of 2007-06-02 on RELEASE
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (3.4) --cflags -Ic:/gnuwin32/include'

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: ENU
  locale-coding-system: cp1252
  default-enable-multibyte-characters: t

Major mode: Dired by name

Minor modes in effect:
  encoded-kbd-mode: t
  tooltip-mode: t
  tool-bar-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  unify-8859-on-encoding-mode: t
  utf-translate-cjk-mode: t
  auto-compression-mode: t
  line-number-mode: t

Recent input:
<help-echo> <help-echo> <down-mouse-1> <mouse-1> M-x
s e t - v a r <return> p o p - u p - f r a m <tab>
s <return> t <return> C-x 3 C-x C-f f o <backspace>
i t - f <tab> <return> C-h f f o r w a r d - c h a
r <return> <switch-frame> q C-x C-b <switch-frame>
q <help-echo> <help-echo> <help-echo> <help-echo> <help-echo>
<help-echo> <help-echo> <help-echo> <menu-bar> <help-menu>
<report-emacs-bug>

Recent messages:
("C:\\Emacs-22.1\\bin\\emacs.exe" "-q" "--no-site-file" "--debug-init"
"C:\\drews-lisp-20")
Loading encoded-kb...done
For information about the GNU Project and its goals, type C-h C-p.
Loading dired...
Loading regexp-opt...done
Loading dired...done
For information about the GNU Project and its goals, type C-h C-p.
Loading help-fns...done
Loading easymenu...done
Loading emacsbug...done



_______________________________________________
bug-gnu-emacs mailing list
bug-gnu-emacs@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-gnu-emacs

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: q in *Help* buffer deletes another window
  2007-07-22 18:36 ` Richard Stallman
@ 2007-07-28 12:56   ` martin rudalics
  2007-07-28 15:03     ` Drew Adams
  0 siblings, 1 reply; 4+ messages in thread
From: martin rudalics @ 2007-07-28 12:56 UTC (permalink / raw)
  To: rms; +Cc: Drew Adams, emacs-devel

 > The code that handles exiting from view mode is complex,
 > and apparently needs redesign.  This isn't the only recent
 > complaint.

These problems are caused by help and help-mode.  They only become
manifest when exiting view-mode.

 > emacs -Q
 > C-x d RET
 > C-x 3
 > C-x C-f <some file>
 > M-x set-variable pop-up-frames t
 > C-h f forward-char
 > q (in *Help* buffer)
 >
 > The *Help* buffer is iconified, and the window of the buffer visiting
 > file <some-file> is deleted. The window of <some-file> should not be
 > deleted.

C-h f creates an entry (W1 W2 . t) in `view-return-to-alist' where W1 is
the window displaying *Help* in a separate frame, W2 the original
window, and t means delete W1 when you are done.  This is due to the
change

2005-12-03  Eli Zaretskii  <eliz@gnu.org>

	* help.el (print-help-return-message): If pop-up-frames is
	non-nil, set up help-return-method to delete the help window and,
	possibly, its frame as well, and don't display message about
	scrolling the help window.  Doc fix.
	(help-return-method): Doc fix.

Since by default `view-remove-frame-by-deleting' is nil, q (in *Help*
buffer) will not delete that frame but rather iconify it.  In addition
`view-mode-exit' will select W2 since that window is still alive.
Finally, `view-mode-exit' runs the `view-exit-action' formerly installed
by `help-mode' during C-h f:

   (setq view-exit-action (lambda (buffer)
			   (or (window-minibuffer-p (selected-window))
			       (one-window-p t)
			       (delete-window))))

This code will (disregarding BUFFER) delete the selected window W2 and
leave you with that frame's other window (earlier created by C-x 3).

A partial remedy would be using

   (setq view-exit-action (lambda (buffer)
			   (or (window-minibuffer-p (selected-window))
			       (one-window-p t)
			       (not (eq (window-buffer) buffer))
			       (delete-window))))

as explained in another thread.

Comments welcome.

 > (It is also a bug, IMO, that *Help* is iconified. When pop-up-frames
 > is non-nil, the frame should be deleted. Other users have also
 > reported this awful behavior.)

Setting `view-remove-frame-by-deleting' to non-nil should solve this.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: q in *Help* buffer deletes another window
  2007-07-28 12:56   ` martin rudalics
@ 2007-07-28 15:03     ` Drew Adams
  0 siblings, 0 replies; 4+ messages in thread
From: Drew Adams @ 2007-07-28 15:03 UTC (permalink / raw)
  To: martin rudalics, rms; +Cc: emacs-devel

>  > emacs -Q
>  > C-x d RET
>  > C-x 3
>  > C-x C-f <some file>
>  > M-x set-variable pop-up-frames t
>  > C-h f forward-char
>  > q (in *Help* buffer)
>  >
>  > The *Help* buffer is iconified, and the window of the buffer visiting
>  > file <some-file> is deleted. The window of <some-file> should not be
>  > deleted.

> A partial remedy would be using
>
>    (setq view-exit-action (lambda (buffer)
> 	 (or (window-minibuffer-p (selected-window))
> 		(one-window-p t)
> 		(not (eq (window-buffer) buffer))
> 		(delete-window))))

Thanks for looking into this, Martin. Setting that (in the *Help* buffer)
seems to work, at least in this case.

> Setting `view-remove-frame-by-deleting' to non-nil should solve this.

Yes, I forgot that I already had that in my code - I forgot to do it also
for the emacs -Q bug report.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-07-28 15:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-21 22:37 q in *Help* buffer deletes another window Drew Adams
2007-07-22 18:36 ` Richard Stallman
2007-07-28 12:56   ` martin rudalics
2007-07-28 15:03     ` Drew Adams

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.