From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Antoine Levitt Newsgroups: gmane.emacs.bugs Subject: bug#11697: 24.1.50; ERC scroll-to-bottom functionality 'broken' in emacs 24.1.x Date: Thu, 14 Jun 2012 11:49:13 +0200 Message-ID: <87ehpiz0iu.fsf@gmail.com> References: <87ipevji6m.fsf@pringles.terranpro.org> <4FD8F1F4.6080809@dogan.se> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1339667432 3474 80.91.229.3 (14 Jun 2012 09:50:32 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 14 Jun 2012 09:50:32 +0000 (UTC) To: 11697@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jun 14 11:50:30 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Sf6h8-0005BY-3q for geb-bug-gnu-emacs@m.gmane.org; Thu, 14 Jun 2012 11:50:26 +0200 Original-Received: from localhost ([::1]:40575 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sf6h8-00033b-3U for geb-bug-gnu-emacs@m.gmane.org; Thu, 14 Jun 2012 05:50:26 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:46560) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sf6h0-00033H-8x for bug-gnu-emacs@gnu.org; Thu, 14 Jun 2012 05:50:24 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Sf6gs-0002mM-LP for bug-gnu-emacs@gnu.org; Thu, 14 Jun 2012 05:50:17 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:60598) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sf6gs-0002m7-Hh for bug-gnu-emacs@gnu.org; Thu, 14 Jun 2012 05:50:10 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1Sf6jd-0004wF-W4 for bug-gnu-emacs@gnu.org; Thu, 14 Jun 2012 05:53:02 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: <87ipevji6m.fsf@pringles.terranpro.org> Resent-From: Antoine Levitt Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 14 Jun 2012 09:53:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11697 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.133966757718972 (code B ref -1); Thu, 14 Jun 2012 09:53:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 14 Jun 2012 09:52:57 +0000 Original-Received: from localhost ([127.0.0.1]:41911 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Sf6jY-0004vx-CB for submit@debbugs.gnu.org; Thu, 14 Jun 2012 05:52:56 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:43027) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Sf6jV-0004vp-A5 for submit@debbugs.gnu.org; Thu, 14 Jun 2012 05:52:54 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Sf6gc-0002ZF-Ke for submit@debbugs.gnu.org; Thu, 14 Jun 2012 05:50:00 -0400 Original-Received: from lists.gnu.org ([208.118.235.17]:50124) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sf6gc-0002Z8-He for submit@debbugs.gnu.org; Thu, 14 Jun 2012 05:49:54 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:36352) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sf6gW-0002xV-8j for bug-gnu-emacs@gnu.org; Thu, 14 Jun 2012 05:49:54 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Sf6gP-0002XI-PA for bug-gnu-emacs@gnu.org; Thu, 14 Jun 2012 05:49:47 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:43056) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sf6gP-0002X8-IZ for bug-gnu-emacs@gnu.org; Thu, 14 Jun 2012 05:49:41 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Sf6gL-0002cP-1B for bug-gnu-emacs@gnu.org; Thu, 14 Jun 2012 11:49:37 +0200 Original-Received: from portable48.ceremade.dauphine.fr ([193.48.71.48]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 14 Jun 2012 11:49:36 +0200 Original-Received: from antoine.levitt by portable48.ceremade.dauphine.fr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 14 Jun 2012 11:49:36 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 65 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: portable48.ceremade.dauphine.fr User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:60967 Archived-At: 13/06/12 22:03, Deniz Dogan > On 2012-06-13 18:22,, Brian Fransioli wrote: >> >> After updating to emacs 24.1.x I noticed ERC scroll functionality >> changed. Originally, it would recenter to force the prompt to be near >> the bottom of the screen (according to `erc-input-line-position'). Now, >> this recentering only happens when I enter text, or perform a mouse >> event. Channel joins/parts and new messages hit the bottom of the >> screen, and recentering moves the bottom line to the center of the >> buffer. >> >> The overall effect is input by the user moves the screen to the bottom, >> while channel/server inputs bounce around from middle to bottom and back >> again. >> >> Looking in erc-goodies.el at `erc-add-scroll-bottom', it's easy to see >> the documentation is also out of date. It states it uses >> `window-scroll-functions' but instead adds the hook to >> `post-command-hook'. >> >> Examining commits, I found the culprit: >> >> commit: >> a1d63e03c3eda51dcec158d6027adf9dbdcfd8dd >> >> view changes via git emacs web: >> http://git.savannah.gnu.org/cgit/emacs.git/commit/lisp/erc/erc-goodies.el?id=a1d63e03c3eda51dcec158d6027adf9dbdcfd8dd >> >> >> I see that the changes were reported to fix a bug on tty's, but the >> results are severe motion sickness for even moderately chatty channels. >> >> Reproduce by: >> (erc-scrolltobottom-mode) >> (setq erc-input-line-position -2) >> >> Regards, >> Brian >> > > Firstly, I agree with you completely that scrolltobottom needs > improvements. I can't be sure why they changed the behavior, since > the new method is clearly inferior, but I believe it's because > window-scroll-functions is never meant to change "the way the window > is scrolled". Hi, I'm responsible for the mess. Sorry, I don't customize erc-input-line-position, and it didn't occur to me that it might mess things up. I tried to think of something better for erc-scrolltobottom, but I'm not familiar with erc internals and that was the best I could do. The reason for the change was that as you said, window-scroll-functions is not intended to be used like that, and it caused weird bugs. > I've monkey-patched ERC myself to handle the whole thing better. I've > attached the Lisp. Just evaluate all the code and you'll be all > set. (I know it's not production-quality code, but it does the job and > relieves you from ever thinking about it again.) Great! Could you submit a proper patch, so that Someone (tm; there seems to be a lack of maintainers for ERC) can review it and merge it into trunk? erc-scrolltobottom has been broken for years, with weird bugs and excessive CPU consumption, and it's high time it changed.