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 23:03:46 +0200 Message-ID: <87sjdxobbh.fsf@gmail.com> References: <87ipevji6m.fsf@pringles.terranpro.org> <4FD8F1F4.6080809@dogan.se> <87ehpiz0iu.fsf@gmail.com> <4FDA4EBC.2080703@dogan.se> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1339707863 16130 80.91.229.3 (14 Jun 2012 21:04:23 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 14 Jun 2012 21:04:23 +0000 (UTC) Cc: 11697@debbugs.gnu.org To: Deniz Dogan Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jun 14 23:04:21 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 1SfHDE-00028I-BW for geb-bug-gnu-emacs@m.gmane.org; Thu, 14 Jun 2012 23:04:16 +0200 Original-Received: from localhost ([::1]:50387 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SfHDD-0006jb-Uf for geb-bug-gnu-emacs@m.gmane.org; Thu, 14 Jun 2012 17:04:15 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:52708) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SfHD7-0006ix-OR for bug-gnu-emacs@gnu.org; Thu, 14 Jun 2012 17:04:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SfHD5-0007sn-TO for bug-gnu-emacs@gnu.org; Thu, 14 Jun 2012 17:04:09 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:33159) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SfHD5-0007sZ-I2 for bug-gnu-emacs@gnu.org; Thu, 14 Jun 2012 17:04:07 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1SfHFu-0006MR-3P for bug-gnu-emacs@gnu.org; Thu, 14 Jun 2012 17:07:02 -0400 X-Loop: help-debbugs@gnu.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 21:07:02 +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: Original-Received: via spool by 11697-submit@debbugs.gnu.org id=B11697.133970801624440 (code B ref 11697); Thu, 14 Jun 2012 21:07:02 +0000 Original-Received: (at 11697) by debbugs.gnu.org; 14 Jun 2012 21:06:56 +0000 Original-Received: from localhost ([127.0.0.1]:42705 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SfHFk-0006M4-6M for submit@debbugs.gnu.org; Thu, 14 Jun 2012 17:06:56 -0400 Original-Received: from mail-wg0-f46.google.com ([74.125.82.46]:44301) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SfHFd-0006Lt-Pw for 11697@debbugs.gnu.org; Thu, 14 Jun 2012 17:06:50 -0400 Original-Received: by wgbdq10 with SMTP id dq10so2118059wgb.15 for <11697@debbugs.gnu.org>; Thu, 14 Jun 2012 14:03:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=YIgqGNez2vQvRLIe9pwJ8BXaZimDJPVi6HTXBXQJ/VE=; b=zcCJGwTfupLWHtma8YNGWYYx+gf4n2yzwOsMYx1PL0CaxjzqXEgedyI1cJvjHqWWWb 9cRMxAvTS5xCmzvhD8JCLzvQf91oS7X5MqrL2ytYIv2sCohu2unJtCFB546xpeKkGVzR a5Ab9Hmwer3yg6XrZLSKcjpiP+MAf6ynKBQAeR258vbf5zIMbowiyw45zd87fjCLrFjk 4FZ+wJ3RgwQ1qpLYfXFpM+1q2bHaUt8zqNIoGDkZ6bPC83hCj+pJFXZ0Y03/3XEs0nn5 m7lPCwRC03gUZpGS/rWBegVXiAxC73dKshcOuqrFkX8v2NChCwzxc8RChT2lvOAuBxh3 ouag== Original-Received: by 10.180.103.42 with SMTP id ft10mr49480849wib.18.1339707829817; Thu, 14 Jun 2012 14:03:49 -0700 (PDT) Original-Received: from lambda (ney92-7-78-233-218-202.fbx.proxad.net. [78.233.218.202]) by mx.google.com with ESMTPS id gc6sm20930802wib.0.2012.06.14.14.03.47 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 14 Jun 2012 14:03:48 -0700 (PDT) In-Reply-To: <4FDA4EBC.2080703@dogan.se> (Deniz Dogan's message of "Thu, 14 Jun 2012 22:51:08 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) 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:60987 Archived-At: 14/06/12 22:51, Deniz Dogan >>> 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. :) I don't think so, I had excessive CPU consumption before the code used post-command-hook (main way to trigger is to hold a random key down while watching the result of top. It's already appalling in ERC without erc-scrolltobottom, but it's even worth with it). The way I see it, this scrolltobottom thing is a problem that is global to emacs and has nothing to do with ERC in particular. For instance, I also want my shell buffers not to scroll past the end of buffers. Actually I think (but am not sure ; it would require testing) I'd want all buffers to behave that way, and never, ever display anything past the end of the buffer. An ideal solution would be a local variable, that'd inhibit "bad" recentering (and therefore would not incur any performance loss, as I believe the main loss is when a hook recenters after it has already been recentered). But that's more ambitious.