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 14:25:40 +0300 Message-ID: <83k3aoi4ej.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> <83r44wi7l7.fsf@gnu.org> <20140417110047.GE23131@pille.home> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1397733987 4334 80.91.229.3 (17 Apr 2014 11:26:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 17 Apr 2014 11:26:27 +0000 (UTC) Cc: 17281@debbugs.gnu.org To: "Stefan-W. Hahn" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Apr 17 13:26:19 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 1WakSQ-0000mx-IX for geb-bug-gnu-emacs@m.gmane.org; Thu, 17 Apr 2014 13:26:18 +0200 Original-Received: from localhost ([::1]:59841 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WakSQ-0003hW-6f for geb-bug-gnu-emacs@m.gmane.org; Thu, 17 Apr 2014 07:26:18 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34814) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WakSI-0003g7-2m for bug-gnu-emacs@gnu.org; Thu, 17 Apr 2014 07:26:15 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WakSD-0003qh-7t for bug-gnu-emacs@gnu.org; Thu, 17 Apr 2014 07:26:10 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:42236) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WakSD-0003qb-46 for bug-gnu-emacs@gnu.org; Thu, 17 Apr 2014 07:26:05 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1WakSA-0008GY-G9 for bug-gnu-emacs@gnu.org; Thu, 17 Apr 2014 07:26:03 -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 11:26: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.139773393931738 (code B ref 17281); Thu, 17 Apr 2014 11:26:02 +0000 Original-Received: (at 17281) by debbugs.gnu.org; 17 Apr 2014 11:25:39 +0000 Original-Received: from localhost ([127.0.0.1]:50393 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WakRm-0008Fp-Ne for submit@debbugs.gnu.org; Thu, 17 Apr 2014 07:25:39 -0400 Original-Received: from mtaout24.012.net.il ([80.179.55.180]:40955) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WakRi-0008FY-SV for 17281@debbugs.gnu.org; Thu, 17 Apr 2014 07:25:36 -0400 Original-Received: from conversion-daemon.mtaout24.012.net.il by mtaout24.012.net.il (HyperSendmail v2007.08) id <0N4600B009Y8AD00@mtaout24.012.net.il> for 17281@debbugs.gnu.org; Thu, 17 Apr 2014 14:23:38 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout24.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0N46005PKABEXE70@mtaout24.012.net.il>; Thu, 17 Apr 2014 14:23:38 +0300 (IDT) In-reply-to: <20140417110047.GE23131@pille.home> 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:88092 Archived-At: > Date: Thu, 17 Apr 2014 13:00:47 +0200 > From: "Stefan-W. Hahn" > Cc: Stefan Monnier , 17281@debbugs.gnu.org > > Mail von Eli Zaretskii, Thu, 17 Apr 2014 at 13:16:52 +0300: > > 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. > > Thx. > > It's just an excerpt from > > ; $Id: post.el,v 1.10 2008/02/24 23:49:23 rreid Exp $ > ;; post.el --- Use (X?)Emacs(client) as an external editor for mail and news. > > #+BEGIN_SRC elisp > (defun post-goto-body () > "Go to the beginning of the message body." > (interactive) > (goto-char (point-min)) > ;; If the message has header, slide downward. > (and header-mode (save-match-data (re-search-forward "^$" nil t)) > (next-line 1)) > ) > #+END_SRC If this function can be invoked when the message is not displayed in the currently selected window, next-line will not work correctly, because it assumes it's invoked in the selected window. (It will still do a perfect job in many cases, though, as long as the selected window doesn't use any fonts or faces that significantly change the size of the current line.) > Is there a better mode for writing emails (I use mutt calling emacs for > that). There are many ways of using Emacs for email, but that's tangential to the issue at point. Is the original problem solved by the patch I showed?