Juanma Barranquero wrote:
The issue is that `fit-window-to-buffer', when called from
`occur-hook', changes the current buffer.
Yes, this seems like a real bug. I have noticed some other strange
behaviour lately with things taking place in the wrong buffer.
I use BBDB along with Gnus, and when I quit Gnus, there is a hook to
offer to save ~/.bbdb if it has changed. Recently, this started to
prompt me for the filename to save to, which I thought was strange, and
when I investigated I discovered it was trying to save the Gnus
"*Groups*" buffer instead of ~/.bbdb. I tried to trace through, but this
just resulted in the correct behaviour.
Another place I have noticed this is auto-insert. Sometimes (not
consistently), when executing C-x C-f new-file.h, the auto-insert text
for new-file.h is inserted into the buffer that was current before the
C-x C-f, and that buffer stays current. Again, whenever I have tried to
trace through the code, everything works perfectly.
Both of these also involve hooks, which leads me to think something has
changed with the ways hooks are run. If we continue to insist that it is
the hooks that are wrong, not Emacs, then this will cause a lot of
disruption to users.
_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel