all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#858: Conflict between ERC mode tracking and ibuffer window shrinking
@ 2008-09-01 23:26 Antoine Levitt
  0 siblings, 0 replies; 7+ messages in thread
From: Antoine Levitt @ 2008-09-01 23:26 UTC (permalink / raw
  To: bug-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 688 bytes --]

Hi,
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.

Antoine Levitt

[-- Attachment #2: Type: text/html, Size: 750 bytes --]

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

* bug#858: Conflict between ERC mode tracking and ibuffer window shrinking
@ 2008-09-02 16:30 Chong Yidong
  2008-09-02 16:46 ` Antoine Levitt
  2008-09-03  9:36 ` martin rudalics
  0 siblings, 2 replies; 7+ messages in thread
From: Chong Yidong @ 2008-09-02 16:30 UTC (permalink / raw
  To: John Paul Wallington, Michael Olson; +Cc: 858

Hi guys,

Could you take a look at this bug report?  I'm not sure whether ERC or
ibuffer needs fixing.

> 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.






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

* bug#858: Conflict between ERC mode tracking and ibuffer window shrinking
  2008-09-02 16:30 bug#858: Conflict between ERC mode tracking and ibuffer window shrinking Chong Yidong
@ 2008-09-02 16:46 ` Antoine Levitt
  2008-09-03  9:36 ` martin rudalics
  1 sibling, 0 replies; 7+ messages in thread
From: Antoine Levitt @ 2008-09-02 16:46 UTC (permalink / raw
  To: Chong Yidong; +Cc: 858, Michael Olson, John Paul Wallington

[-- Attachment #1: Type: text/plain, Size: 1045 bytes --]

Another related problem (fixing one will probably fix the other, but I'm
posting just in case) : doing the same manipulation resets the count of
unseen messages
2008/9/2 Chong Yidong <cyd@stupidchicken.com>

> Hi guys,
>
> Could you take a look at this bug report?  I'm not sure whether ERC or
> ibuffer needs fixing.
>
> > 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.
>

[-- Attachment #2: Type: text/html, Size: 1423 bytes --]

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

* bug#858: Conflict between ERC mode tracking and ibuffer window shrinking
  2008-09-02 16:30 bug#858: Conflict between ERC mode tracking and ibuffer window shrinking Chong Yidong
  2008-09-02 16:46 ` Antoine Levitt
@ 2008-09-03  9:36 ` martin rudalics
  2008-09-04 14:14   ` Antoine Levitt
  1 sibling, 1 reply; 7+ messages in thread
From: martin rudalics @ 2008-09-03  9:36 UTC (permalink / raw
  To: Chong Yidong, 858
  Cc: Keegan Carruthers-Smith, Michael Olson, John Paul Wallington

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







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

* bug#858: Conflict between ERC mode tracking and ibuffer window shrinking
  2008-09-03  9:36 ` martin rudalics
@ 2008-09-04 14:14   ` Antoine Levitt
  2008-09-04 22:48     ` John Paul Wallington
  0 siblings, 1 reply; 7+ messages in thread
From: Antoine Levitt @ 2008-09-04 14:14 UTC (permalink / raw
  To: martin rudalics, 858
  Cc: Keegan Carruthers-Smith, Chong Yidong, Michael Olson,
	John Paul Wallington

[-- Attachment #1: Type: text/plain, Size: 2293 bytes --]

Hi,
I did some testing, and the bug was not in tracker as I suspected, it's in
scrolltobottom, in erc-goodies.el. This should be much easier for you to
debug: it's only a few lines long. I strongly suspect the part following
this comment is responsible :
      ;; Temporarily bind resize-mini-windows to nil so that users who have
it
      ;; set to a non-nil value will not suffer from premature minibuffer
      ;; shrinkage due to the below recenter call.  I have no idea why this
      ;; works, but it solves the problem, and has no negative side effects.
      ;; (Fran Litterio, 2003/01/07)

Looks like it does have side effects after all :-)
2008/9/3 martin rudalics <rudalics@gmx.at>

> 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
>
>
>
>
>
>

[-- Attachment #2: Type: text/html, Size: 3182 bytes --]

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

* bug#858: Conflict between ERC mode tracking and ibuffer window shrinking
  2008-09-04 14:14   ` Antoine Levitt
@ 2008-09-04 22:48     ` John Paul Wallington
  2008-09-04 23:09       ` Antoine Levitt
  0 siblings, 1 reply; 7+ messages in thread
From: John Paul Wallington @ 2008-09-04 22:48 UTC (permalink / raw
  To: Antoine Levitt; +Cc: 858, mwolson, cyd, keegan.csmith

> Hi,

Hi Antoine,

> I did some testing, and the bug was not in tracker as I suspected, it's in
> scrolltobottom, in erc-goodies.el. This should be much easier for you to
> debug: it's only a few lines long. I strongly suspect the part following
> this comment is responsible :
>       ;; Temporarily bind resize-mini-windows to nil so that users who have
> it
>       ;; set to a non-nil value will not suffer from premature minibuffer
>       ;; shrinkage due to the below recenter call.  I have no idea why this
>       ;; works, but it solves the problem, and has no negative side effects.
>       ;; (Fran Litterio, 2003/01/07)
> 
> Looks like it does have side effects after all :-)

Sorry, I'm having difficulties reproducing the bug.

Could you try getting rid of the code that binds
`resize-mini-windows', perhaps using the function below, and test
whether your suspicion is correct?


(defun erc-scroll-to-bottom (window display-start)
  "Changed to see whether not let binding `resize-mini-windows' to nil
doesn't cause the bug."
  (if (window-live-p window)
      (erc-with-selected-window window
        (save-restriction
          (widen)
          (when (and erc-insert-marker
                     ;; we're editing a line. Scroll.
                     (> (point) erc-insert-marker))
            (save-excursion
              (goto-char (point-max))
              (recenter (or erc-input-line-position -1))
              (sit-for 0)))))))






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

* bug#858: Conflict between ERC mode tracking and ibuffer window shrinking
  2008-09-04 22:48     ` John Paul Wallington
@ 2008-09-04 23:09       ` Antoine Levitt
  0 siblings, 0 replies; 7+ messages in thread
From: Antoine Levitt @ 2008-09-04 23:09 UTC (permalink / raw
  To: John Paul Wallington; +Cc: 858, mwolson, cyd, keegan.csmith

[-- Attachment #1: Type: text/plain, Size: 2017 bytes --]

My suspicion was wrong, the binding doesn't change anything. I just said
that by looking at the comment, but didn't try. Sorry about that.
However, (defun erc-scroll-to-bottom (window display-start) nil) removes the
bug.
The bug should be reproducable with emacs -Q, the ibuffer configuration
lines I gave in the first bug report, and scroll-to-bottom mode on. I'm
using latest CVS, the bug also happens with a build from july.
Best of luck
Antoine
2008/9/5 John Paul Wallington <jpw@pobox.com>

> > Hi,
>
> Hi Antoine,
>
> > I did some testing, and the bug was not in tracker as I suspected, it's
> in
> > scrolltobottom, in erc-goodies.el. This should be much easier for you to
> > debug: it's only a few lines long. I strongly suspect the part following
> > this comment is responsible :
> >       ;; Temporarily bind resize-mini-windows to nil so that users who
> have
> > it
> >       ;; set to a non-nil value will not suffer from premature minibuffer
> >       ;; shrinkage due to the below recenter call.  I have no idea why
> this
> >       ;; works, but it solves the problem, and has no negative side
> effects.
> >       ;; (Fran Litterio, 2003/01/07)
> >
> > Looks like it does have side effects after all :-)
>
> Sorry, I'm having difficulties reproducing the bug.
>
> Could you try getting rid of the code that binds
> `resize-mini-windows', perhaps using the function below, and test
> whether your suspicion is correct?
>
>
> (defun erc-scroll-to-bottom (window display-start)
>  "Changed to see whether not let binding `resize-mini-windows' to nil
> doesn't cause the bug."
>  (if (window-live-p window)
>      (erc-with-selected-window window
>        (save-restriction
>          (widen)
>          (when (and erc-insert-marker
>                     ;; we're editing a line. Scroll.
>                     (> (point) erc-insert-marker))
>            (save-excursion
>              (goto-char (point-max))
>              (recenter (or erc-input-line-position -1))
>              (sit-for 0)))))))
>

[-- Attachment #2: Type: text/html, Size: 2912 bytes --]

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

end of thread, other threads:[~2008-09-04 23:09 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-02 16:30 bug#858: Conflict between ERC mode tracking and ibuffer window shrinking Chong Yidong
2008-09-02 16:46 ` Antoine Levitt
2008-09-03  9:36 ` martin rudalics
2008-09-04 14:14   ` Antoine Levitt
2008-09-04 22:48     ` John Paul Wallington
2008-09-04 23:09       ` Antoine Levitt
  -- strict thread matches above, loose matches on Subject: below --
2008-09-01 23:26 Antoine Levitt

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.