From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/84461 Path: news.gmane.org!not-for-mail From: Katsumi Yamaoka Newsgroups: gmane.emacs.gnus.general Subject: Re: spell checking message buffer Date: Mon, 21 Apr 2014 14:38:38 +0900 Organization: Emacsen advocacy group Message-ID: References: <874n1n9urz.fsf@micropit.couberia.selfip.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1398058808 19292 80.91.229.3 (21 Apr 2014 05:40:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 21 Apr 2014 05:40:08 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M32707@lists.math.uh.edu Mon Apr 21 07:40:01 2014 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Wc6xU-0001uE-7e for ding-account@gmane.org; Mon, 21 Apr 2014 07:40:00 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1Wc6wX-0005wM-2Z; Mon, 21 Apr 2014 00:39:01 -0500 Original-Received: from mx1.math.uh.edu ([129.7.128.32]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1Wc6wH-0005w0-UD for ding@lists.math.uh.edu; Mon, 21 Apr 2014 00:38:46 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx1.math.uh.edu with esmtps (TLSv1:AES128-SHA:128) (Exim 4.76) (envelope-from ) id 1Wc6wG-0003GQ-Gg for ding@lists.math.uh.edu; Mon, 21 Apr 2014 00:38:45 -0500 Original-Received: from hampton-mail.hostforweb.net ([205.234.204.210] helo=hampton.hostforweb.net) by quimby.gnus.org with esmtp (Exim 4.80) (envelope-from ) id 1Wc6wE-00071z-U9 for ding@gnus.org; Mon, 21 Apr 2014 07:38:43 +0200 Original-Received: from localhost.localdomain ([127.0.0.1]:48184 helo=localhost) by hampton.hostforweb.net with smtp (Exim 4.80.1) (envelope-from ) id 1Wc6w6-000m3j-JN for ding@gnus.org; Mon, 21 Apr 2014 00:38:35 -0500 X-Face: #kKnN,xUnmKia.'[pp`;Omh}odZK)?7wQSl"4o04=EixTF+V[""w~iNbM9ZL+.b*_CxUmFk B#Fu[*?MZZH@IkN:!"\w%I_zt>[$nm7nQosZ<3eu;B:$Q_:p!',P.c0-_Cy[dz4oIpw0ESA^D*1Lw= L&i*6&( User-Agent: Gnus/5.13001 (=?iso-2022-jp?B?GyRCPz8bKEI=?= Gnus v0.10) Emacs/24.4.50 (i686-pc-cygwin) Cancel-Lock: sha1:IoI4O7fN7Q2JWGV3DEQXA42/6Hg= X-OutGoing-Spam-Status: No, score=-2.9 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - hampton.hostforweb.net X-AntiAbuse: Original Domain - gnus.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - jpl.org X-Get-Message-Sender-Via: hampton.hostforweb.net: acl_c_authenticated_local_user: yamaoka X-Source: X-Source-Args: X-Source-Dir: X-Spam-Score: -1.9 (-) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:84461 Archived-At: --=-=-= Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable On Mon, 21 Apr 2014 06:22:08 +0200, Peter M=FCnster wrote: > How would it be possible to spell-check (M-x ispell) only the subject > line and in the body only the unquoted lines please? > TIA for any hints, A quick hack is here: --=-=-= Content-Type: application/emacs-lisp Content-Disposition: inline Content-Transfer-Encoding: quoted-printable (defun my-ispell-message () "Do ispell on the subject line and the unquoted body lines." (interactive) (let ((case-fold-search t) start end) (message-goto-subject) (setq end (point)) (beginning-of-line) (while (memq (char-after) '(?\t ? )) (forward-line -1)) (when (looking-at "subject:[\t\n ]*\\(?:\\(fwd\\|re\\):[\t\n ]*\\)*") (setq start (match-end 0))) (when (< start end) (ispell-region start end)) (message-goto-body) (while (not (eobp)) (while (and (not (eobp)) (or (looking-at message-cite-prefix-regexp) (looking-at "[\t ]*$"))) (forward-line 1)) (setq start (point)) (while (not (or (eobp) (looking-at message-cite-prefix-regexp) (looking-at "[\t ]*$"))) (forward-line 1)) (setq end (point-marker)) (ispell-region start end) (goto-char end)) (when (markerp end) (set-marker end nil)))) --=-=-=--