From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Deniz Dogan Newsgroups: gmane.emacs.devel Subject: Re: Emacs scrolling past the end of buffer Date: Thu, 09 Feb 2012 13:01:55 +0100 Message-ID: <4F33B5B3.7080508@dogan.se> References: <4F32E763.1060104@dogan.se> <877gzxufq3.fsf@gmail.com> <4F330620.7060201@dogan.se> <87wr7we2xp.fsf_-_@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1328788956 4494 80.91.229.3 (9 Feb 2012 12:02:36 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 9 Feb 2012 12:02:36 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Feb 09 13:02:30 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RvShq-0008JB-F5 for ged-emacs-devel@m.gmane.org; Thu, 09 Feb 2012 13:02:30 +0100 Original-Received: from localhost ([::1]:36399 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RvShq-0001nF-2O for ged-emacs-devel@m.gmane.org; Thu, 09 Feb 2012 07:02:30 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:58397) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RvShh-0001mz-2W for emacs-devel@gnu.org; Thu, 09 Feb 2012 07:02:28 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RvShY-00014s-19 for emacs-devel@gnu.org; Thu, 09 Feb 2012 07:02:21 -0500 Original-Received: from mailout.ownit.se ([94.137.96.140]:54441 helo=spamgw2.ownit.se) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RvShX-00013o-Gs for emacs-devel@gnu.org; Thu, 09 Feb 2012 07:02:11 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ownit.se; s=2010.dkim; h=received:received:message-id:date:from:user-agent:mime-version:to:subject: references:in-reply-to:content-type:content-transfer-encoding; bh=+JlcPXXAUbVpNQ66XxgfQRe3rxApZvu9LEabM9AeK9o=; b=zvI3CLStVjB6XXZsDMKjbmFyMIWTaEzcWXGtQdM5DZkZBzf8/rSLt1aybHjiqlSG2eiH0dVvtg9BE wcCdKSVd+xm2SnYe8ZhfrPe2KYusEsPW0Zy+foXiCTHeTJ8NhlXuA/VtHbbJIaEg+ne7b8lfYNTuXk n1KiUQ11Z+lt+AtE= Original-Received: from mail.ownit.nu (unknown [109.104.0.111]) by mailout.ownit.se (Halon Mail Gateway) with ESMTPS for ; Thu, 9 Feb 2012 13:02:06 +0100 (CET) Original-Received: from [10.10.6.128] (92-244-16-130.customers.ownit.se [92.244.16.130]) by mail.ownit.nu (Postfix) with ESMTP id 820B3FD2D6 for ; Thu, 9 Feb 2012 13:02:06 +0100 (CET) User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0) Gecko/20111105 Thunderbird/8.0 In-Reply-To: <87wr7we2xp.fsf_-_@gmail.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 94.137.96.140 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:148399 Archived-At: Antoine Levitt skrev 2012-02-09 11:06: > 09/02/12 00:32, Deniz Dogan >> A good compromise, in my opinion, would be to basically _not_ "scroll >> to bottom" on every single character insertion. With the addition of >> the post-display hook, when the user hits RET, the message will be >> sent, ERC will display that message, the new hook will run, and it >> will be recentered to the bottom again. This method is something I've >> personally used in rcirc for quite some time and I'm very happy with >> it. > > But then it sometimes happen that you see past the end of the buffer > when scrolling (the horror!). I'd rather have excessive CPU consumption. > Fair enough! This makes me wonder, though, whether there is any other useful hook we can use in combination with my suggestion, to properly recenter whenever point goes outside of the currently viewed part of the buffer.