Subject: Re: bug#858: Conflict between ERC mode tracking and ibuffer window shrinking

From: martin rudalics <[email-masked]>
Date: Wed, 03 Sep 2008 11:36:17 +0200

CC-ing Keegan because Bug #466 describes another problem with ERC and
windows.

 >> There is a bug when using conjointly these two features. Here are the
 >> relevant portions of configuration :
 >>
 >> ;;make ibuffer resize itself to its buffer size
 >> (setq ibuffer-use-other-window t)
 >> (setq ibuffer-default-shrink-to-minimum-size t)
 >>
 >> No specific configuration for erc, just enabling tracker is enough.
 >> Then, run erc, and, in any erc buffer, call ibuffer. The screen
 >> briefly flashes as an ERC window opens then disappears, and the
 >> ibuffer window is reduced to a much smaller size than what it would be
 >> outside ERC. I think the issue is erc's hook to
 >> window-configuration-change somehow messing with ibuffer, but I'm not
 >> experienced enough to find where the bug is.

Can't offer much insight but processing window-configuration-change
hooks has changed with Emacs 23.  So this

(defun erc-track-modified-channels ()
   "Hook function for `erc-insert-post-hook' to check if the current
buffer should be added to the modeline as a hidden, modified
channel.  Assumes it will only be called when current-buffer
is in `erc-mode'."
   (let ((this-channel (or (erc-default-target)
			  (buffer-name (current-buffer)))))
     ...			

might have been broken for some reason.  To verify, someone would have
to try with Emacs 22 and 23 inserting just before the `let' something
like

(unless (eq major-mode 'erc-mode)
   (message "Not in erc-mode ..."))

and look whether it triggers.

martin