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#9246: Scrolling bug with word-wrap in emacs -nw Date: Thu, 29 Dec 2011 23:45:25 +0100 Message-ID: <87ipkzvvy2.fsf@gmail.com> References: <8762mb1jq1.fsf@gmail.com> <1312839728.2986.6.camel@kiwi-pc2> <83fwgaxkdu.fsf@gnu.org> <87ehvudqcs.fsf@gmail.com> <8362h6xc0q.fsf@gnu.org> <877h1m56ob.fsf@gmail.com> <8339cax74g.fsf@gnu.org> <87ty4p3nr0.fsf@gmail.com> <83wr9lx4u6.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1325198779 16384 80.91.229.12 (29 Dec 2011 22:46:19 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 29 Dec 2011 22:46:19 +0000 (UTC) Cc: 9246@debbugs.gnu.org, riccardi.thomas@gmail.com To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Dec 29 23:46:15 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RgOjm-0002Jt-Pq for geb-bug-gnu-emacs@m.gmane.org; Thu, 29 Dec 2011 23:46:15 +0100 Original-Received: from localhost ([::1]:52086 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RgOjm-0001zx-DB for geb-bug-gnu-emacs@m.gmane.org; Thu, 29 Dec 2011 17:46:14 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:51614) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RgOjk-0001zg-31 for bug-gnu-emacs@gnu.org; Thu, 29 Dec 2011 17:46:13 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RgOji-0007Ui-SG for bug-gnu-emacs@gnu.org; Thu, 29 Dec 2011 17:46:12 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:58076) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RgOji-0007Ue-PP for bug-gnu-emacs@gnu.org; Thu, 29 Dec 2011 17:46:10 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1RgOmU-0006u8-Ex for bug-gnu-emacs@gnu.org; Thu, 29 Dec 2011 17:49:02 -0500 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, 29 Dec 2011 22:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 9246 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 9246-submit@debbugs.gnu.org id=B9246.132519890626491 (code B ref 9246); Thu, 29 Dec 2011 22:49:02 +0000 Original-Received: (at 9246) by debbugs.gnu.org; 29 Dec 2011 22:48:26 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RgOlt-0006tE-Uc for submit@debbugs.gnu.org; Thu, 29 Dec 2011 17:48:26 -0500 Original-Received: from mail-wi0-f172.google.com ([209.85.212.172]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RgOlr-0006t6-S6 for 9246@debbugs.gnu.org; Thu, 29 Dec 2011 17:48:24 -0500 Original-Received: by wibhj6 with SMTP id hj6so7134586wib.3 for <9246@debbugs.gnu.org>; Thu, 29 Dec 2011 14:45:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=wUdsMUf9Ez2whUSlcrFF+pEzlFmSAFssIb9Vr5ogQGA=; b=Bfq6ZAwQ2ublxRPuEGdq80o7BXMfNawZI1oN1FqBAvG2jYvaEPdOlfERiXUspV6epJ cZgjdMSdGBiP1Qvpn8BBnP0fIS8o8WtufERF7Vk/DfWXqbzQUrbwgvpc6hP3fqJC1wuj Xnk2NmQp1VyZapck7JcT4LMx6O4lLPi8I7RMI= Original-Received: by 10.180.78.101 with SMTP id a5mr25350176wix.19.1325198730970; Thu, 29 Dec 2011 14:45:30 -0800 (PST) Original-Received: from lambda (cab14-1-88-177-9-245.fbx.proxad.net. [88.177.9.245]) by mx.google.com with ESMTPS id di5sm87087268wib.3.2011.12.29.14.45.27 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 29 Dec 2011 14:45:28 -0800 (PST) In-Reply-To: <83wr9lx4u6.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 24 Dec 2011 19:22:09 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Thu, 29 Dec 2011 17:49:02 -0500 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:55284 Archived-At: 24/12/11 18:22, Eli Zaretskii >> From: Antoine Levitt >> Cc: riccardi.thomas@gmail.com, 9246@debbugs.gnu.org >> Date: Sat, 24 Dec 2011 18:04:03 +0100 >> >> > -- Variable: window-scroll-functions >> > [...] >> > *Warning:* don't use this feature to alter the way the window is >> > scrolled. It's not designed for that, and such use probably won't >> > work. >> > >> > But erc does precisely that which the manual says not to do. It >> > shouldn't. >> > >> > Incidentally, all this trickery is no longer needed with Emacs 24: >> > just setting scroll-conservatively to a value larger than 100 will do >> > the job nicely and without any problems. >> >> So, should erc-scrollbottom be changed? > > Definitely. It shouldn't use window-scroll-functions. So is there a hook it could use? Incidentally, this warning doesn't get displayed on C-h v, it might be a good idea to move it. > >> Only using scroll-conservatively instead of erc-scrolltobottom has a few >> disadvantages. erc-scrolltobottom has the advantage that one can never >> see past the end of a buffer, similar to other IRC clients (and indeed, >> text editors). With scroll-conservatively, if a window has say 2/3 the >> height of the buffer, scrolling up and down results in one seeing the >> bottom of the buffer around the middle of the window. > > Only if you scroll by scroll bar or by C-v with a numeric argument. > Just typing will never get you past the buffer end (obviously). No need for a numeric argument before C-v, just doing it recenters the view past the buffer end. > >> Actually, this is a behavior I'd like for emacs as a whole, to make it >> behave more like other editors that never display anything past the end >> of text. Is there any way to do it, some other variable one could set in >> addition to scroll-conservatively? > > Maybe, I don't know. If you don't know, it probably means there isn't ;) I tried to hack something together, but I couldn't make it work, because I couldn't find an appropriate way to express "if the window is displaying stuff past the end of buffer" (using window-end and buffer-end does not work, because window-end can never be past buffer-end). Ideally, it'd hook up after scroll-up-command, and recenter appropriately. With that in place, I don't think anything can get past the end of the buffer.