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

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

ffap other-(window|frame) fns switch in same window first


From: Drew Adams
Subject: ffap other-(window|frame) fns switch in same window first
Date: Wed, 8 Feb 2006 14:28:43 -0800

In ffap.el, the functions that use other-window and other-frame first
switch to the new buffer in the same window, then restore the window
config and switch to the new buffer in another window (via
switch-to-buffer-other-window or -frame).

There are no analogs of find-file-noselect. There is this comment in
the code about that:

;;; ffap-other-*, ffap-read-only-*, ffap-alternate-* commands:
;; There could be a real `ffap-noselect' function, but we would need
;; at least two new user variables, and there is no w3-fetch-noselect.
;; So instead, we just fake it with a slow save-window-excursion.

This has a negative effect for me. It might not affect others, but
then again it might, for different reasons (I don't know).

In my case, I use pop-up-frames=t, so other-window is effectively
other-frame. I have also redefined switch-to-buffer to fit the new
frame to its buffer (if it is alone in the frame). Because the buffer
of the new file is first visited in the same window (so, same frame),
my switch-to-buffer resizes that frame to fit the new buffer. Then,
ffap-* restores the window config (putting back the original buffer),
and calls switch-to-buffer-other-window on the new buffer. The result
is that the original frame ends up resized just like the new frame -
to fit the new buffer. This is almost always inappropriate.

I can't immediately see how the ffap code might be bad for others, but
I think it could be. Could ffap perhaps be fixed to use a -noselect
function?

In GNU Emacs 22.0.50.1 (i386-mingw-nt5.1.2600)
 of 2005-06-26 on NONIQPC
X server distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc
(3.3) --cflags -I../../jpeg-6b-3/include -I../../libpng-1.2.8/include -I../.
./tiff-3.6.1-2/include -I../../xpm-nox-4.2.0/include -I../../zlib-1.2.2/incl
ude'





reply via email to

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