unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Deniz Dogan <deniz@dogan.se>
To: Antoine Levitt <antoine.levitt@gmail.com>
Cc: 11697@debbugs.gnu.org
Subject: bug#11697: 24.1.50; ERC scroll-to-bottom functionality 'broken' in emacs 24.1.x
Date: Thu, 14 Jun 2012 22:51:08 +0200	[thread overview]
Message-ID: <4FDA4EBC.2080703@dogan.se> (raw)
In-Reply-To: <87ehpiz0iu.fsf@gmail.com>

On 2012-06-14 11:49,, Antoine Levitt wrote:
> 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.
>

The excessive CPU consumption comes from the fact that it nowadays uses 
post-command-hook, which is executed just about all the time.  :)

Unfortunately, my patch (ab)uses window-scroll-functions, so it's really 
no better than the way ERC was before.





  reply	other threads:[~2012-06-14 20:51 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-13 16:22 bug#11697: 24.1.50; ERC scroll-to-bottom functionality 'broken' in emacs 24.1.x Brian Fransioli
2012-06-13 20:03 ` Deniz Dogan
2012-06-14  7:35   ` Kevin Rodgers
2012-06-14  9:49   ` Antoine Levitt
2012-06-14 20:51     ` Deniz Dogan [this message]
2012-06-14 21:03       ` Antoine Levitt
2012-06-14 21:10         ` Deniz Dogan
2012-06-15  2:00         ` Stefan Monnier
2012-06-15  6:49           ` Antoine Levitt
     [not found]           ` <mailman.2844.1339743011.855.bug-gnu-emacs@gnu.org>
2013-02-08  5:06             ` maden.ldm

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4FDA4EBC.2080703@dogan.se \
    --to=deniz@dogan.se \
    --cc=11697@debbugs.gnu.org \
    --cc=antoine.levitt@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).