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#17281: 24.4.50; emacs hangs in next-line Date: Thu, 17 Apr 2014 13:16:52 +0300 Message-ID: <83r44wi7l7.fsf@gnu.org> References: <20140417061037.GB23131@pille.home> <834n1sjuo1.fsf@gnu.org> <20140417072523.GC23131@pille.home> <83y4z4idx6.fsf@gnu.org> <20140417082931.GD23131@pille.home> <83wqeoib08.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1397729851 6276 80.91.229.3 (17 Apr 2014 10:17:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 17 Apr 2014 10:17:31 +0000 (UTC) Cc: 17281@debbugs.gnu.org To: stefan.hahn@s-hahn.de, Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Apr 17 12:17:24 2014 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 1WajNh-00057U-9H for geb-bug-gnu-emacs@m.gmane.org; Thu, 17 Apr 2014 12:17:21 +0200 Original-Received: from localhost ([::1]:59316 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WajNg-0003Zn-H3 for geb-bug-gnu-emacs@m.gmane.org; Thu, 17 Apr 2014 06:17:20 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47111) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WajNW-0003ZF-8l for bug-gnu-emacs@gnu.org; Thu, 17 Apr 2014 06:17:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WajNO-0005aP-PJ for bug-gnu-emacs@gnu.org; Thu, 17 Apr 2014 06:17:10 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:42205) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WajNO-0005aL-Mc for bug-gnu-emacs@gnu.org; Thu, 17 Apr 2014 06:17:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1WajNO-0006F4-Az for bug-gnu-emacs@gnu.org; Thu, 17 Apr 2014 06:17:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 17 Apr 2014 10:17:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17281 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 17281-submit@debbugs.gnu.org id=B17281.139772980923971 (code B ref 17281); Thu, 17 Apr 2014 10:17:02 +0000 Original-Received: (at 17281) by debbugs.gnu.org; 17 Apr 2014 10:16:49 +0000 Original-Received: from localhost ([127.0.0.1]:50362 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WajNB-0006EY-3U for submit@debbugs.gnu.org; Thu, 17 Apr 2014 06:16:49 -0400 Original-Received: from mtaout25.012.net.il ([80.179.55.181]:37019) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WajN7-0006EF-Va for 17281@debbugs.gnu.org; Thu, 17 Apr 2014 06:16:47 -0400 Original-Received: from conversion-daemon.mtaout25.012.net.il by mtaout25.012.net.il (HyperSendmail v2007.08) id <0N4600B006SWM900@mtaout25.012.net.il> for 17281@debbugs.gnu.org; Thu, 17 Apr 2014 13:14:49 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout25.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0N46007P174ORP50@mtaout25.012.net.il>; Thu, 17 Apr 2014 13:14:49 +0300 (IDT) In-reply-to: <83wqeoib08.fsf@gnu.org> X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x 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:88087 Archived-At: Btw, just FYI, this code: (defun test () (interactive) (goto-char (point-min)) (save-match-data (re-search-forward "^$" nil t)) (next-line 1)) doesn't do what you think. next-line does TRT for the selected window, but in this case the mode function 'test' runs when the buffer that visits the file is not yet displayed in any window, certainly not in the selected one. You want to call forward-line instead. Stefan (Monnier), this raises a general issue with next-line: is it supposed to work accurately in a buffer that is not the currently selected window's buffer? If so, the call to line-pixel-height should be made after switching to the current buffer in the selected window. Right now, line-pixel-height returns its result computed for the selected window, which is OK when next-line is invoked interactively, but not if it is part of some non-interactive code, such as the mode function in this case.