From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#9246: Scrolling bug with word-wrap in emacs -nw Date: Fri, 30 Dec 2011 20:13:56 +0200 Message-ID: <83ehvmsza3.fsf@gnu.org> 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> <87ipkzvvy2.fsf@gmail.com> <83y5tutnc0.fsf@gnu.org> <87mxaaupjd.fsf@gmail.com> <83hb0it66b.fsf@gnu.org> <87obuqt27q.fsf@gmail.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org X-Trace: dough.gmane.org 1325268857 25000 80.91.229.12 (30 Dec 2011 18:14:17 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 30 Dec 2011 18:14:17 +0000 (UTC) Cc: 9246@debbugs.gnu.org, riccardi.thomas@gmail.com To: Antoine Levitt Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Dec 30 19:14:13 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 1Rggy1-0001aV-WC for geb-bug-gnu-emacs@m.gmane.org; Fri, 30 Dec 2011 19:14:10 +0100 Original-Received: from localhost ([::1]:43335 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rggy1-0001WU-7L for geb-bug-gnu-emacs@m.gmane.org; Fri, 30 Dec 2011 13:14:09 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:58074) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rggxy-0001WL-Ov for bug-gnu-emacs@gnu.org; Fri, 30 Dec 2011 13:14:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rggxx-0006ud-Nq for bug-gnu-emacs@gnu.org; Fri, 30 Dec 2011 13:14:06 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:59230) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rggxx-0006uW-MM for bug-gnu-emacs@gnu.org; Fri, 30 Dec 2011 13:14:05 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1Rgh0n-000475-VE for bug-gnu-emacs@gnu.org; Fri, 30 Dec 2011 13:17:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 30 Dec 2011 18:17:01 +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.132526902015801 (code B ref 9246); Fri, 30 Dec 2011 18:17:01 +0000 Original-Received: (at 9246) by debbugs.gnu.org; 30 Dec 2011 18:17:00 +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 1Rgh0l-00046n-PR for submit@debbugs.gnu.org; Fri, 30 Dec 2011 13:17:00 -0500 Original-Received: from mtaout23.012.net.il ([80.179.55.175]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Rgh0h-00046d-Ls for 9246@debbugs.gnu.org; Fri, 30 Dec 2011 13:16:56 -0500 Original-Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0LX100N003OX4A00@a-mtaout23.012.net.il> for 9246@debbugs.gnu.org; Fri, 30 Dec 2011 20:13:56 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([77.126.18.76]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LX100MAM3Z6WPA0@a-mtaout23.012.net.il>; Fri, 30 Dec 2011 20:13:56 +0200 (IST) In-reply-to: <87obuqt27q.fsf@gmail.com> X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Fri, 30 Dec 2011 13:17:01 -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:55311 Archived-At: > From: Antoine Levitt > Cc: riccardi.thomas@gmail.com, 9246@debbugs.gnu.org > Date: Fri, 30 Dec 2011 18:10:33 +0100 > > >> That works pretty well! (when hooked into post-command-hook) Except that > >> sometimes posn-at-point is nil, presumably because redisplay hasn't > >> taken place yet. > > > > If posn-at-point returns nil, it means point is outside of the > > displayed portion, which in itself is something you may want to know, > > I think. > > In some cases, yes. In other cases, it's just that redisplay hasn't > taken place yet (for instance, beginning-of-buffer, then end-of-buffer, > posn-at-point returns nil on the post-command-hook of end-of-buffer) posn-at-point does not depend on redisplay, it does its job regardless of whether the display is up to date. But if you moved point past the window edge, and redisplay didn't yet happen, you will get nil because point is not visible in the window. > >> I couldn't find a post-redisplay-hook, which might be more > >> appropriate. Is there one? > > > > There's redisplay-end-trigger-functions, but it's deprecated. Stefan > > expressed the desire to have a hook you want many times in the past, > > but no one stepped forward to do the job yet. > > Isn't it just a line at the end of the appropriate function? I don't know, I didn't research the issue. But I wouldn't be surprised if it's not that simple. Nothing is ever simple with Emacs display engine.