[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#17281: 24.4.50; emacs hangs in next-line

From: Stefan-W. Hahn
Subject: bug#17281: 24.4.50; emacs hangs in next-line
Date: Thu, 17 Apr 2014 13:00:47 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

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.


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."
  (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))

Is there a better mode for writing emails (I use mutt calling emacs for

With kind regards,

Stefan-W. Hahn                          It is easy to make things.
                                        It is hard to make things simple.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]