* Re: Patch for headerless messages
[not found] <m2heyupupr.fsf@boreas.yi.org.>
@ 2001-06-21 17:50 ` ShengHuo ZHU
0 siblings, 0 replies; 2+ messages in thread
From: ShengHuo ZHU @ 2001-06-21 17:50 UTC (permalink / raw)
John Fremlin <chief@bandits.org> writes:
> I don't like seeing any headers at all, so I
>
> (setq gnus-ignored-headers "[\n.]*"
> gnus-visible-headers 'nil)
>
> But the trouble with this is that if you reply to a message without
> headers, the first paragraph of the message doesn't get
> yanked. Further, the message-goto-body command doesn't work: it skips
> the first paragraph.
>
> The following patch against today's CVS fixes both problems. It's my
> second bit of elisp and the regexps took a bit of figuring out, so be
> gentle :-)
Thank. I'll install it.
ShengHuo
^ permalink raw reply [flat|nested] 2+ messages in thread
* Patch for headerless messages
@ 2001-05-09 12:34 John Fremlin
0 siblings, 0 replies; 2+ messages in thread
From: John Fremlin @ 2001-05-09 12:34 UTC (permalink / raw)
[-- Attachment #1: Type: text/plain, Size: 478 bytes --]
I don't like seeing any headers at all, so I
(setq gnus-ignored-headers "[\n.]*"
gnus-visible-headers 'nil)
But the trouble with this is that if you reply to a message without
headers, the first paragraph of the message doesn't get
yanked. Further, the message-goto-body command doesn't work: it skips
the first paragraph.
The following patch against today's CVS fixes both problems. It's my
second bit of elisp and the regexps took a bit of figuring out, so be
gentle :-)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: gnus-20010508-no-headers.patch --]
[-- Type: text/x-patch, Size: 1539 bytes --]
Index: lisp/gnus-msg.el
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/gnus-msg.el,v
retrieving revision 6.32
diff -u -r6.32 gnus-msg.el
--- lisp/gnus-msg.el 2001/04/12 23:14:50 6.32
+++ lisp/gnus-msg.el 2001/05/09 12:32:31
@@ -523,11 +523,11 @@
(while (looking-at message-unix-mail-delimiter)
(forward-line 1))
(setq beg (point))
- (setq end (or (search-forward "\n\n" nil t) (point)))
+ (setq end (or (message-goto-body) point))
;; Delete the headers from the displayed articles.
(set-buffer gnus-article-copy)
(delete-region (goto-char (point-min))
- (or (search-forward "\n\n" nil t) (point-max)))
+ (or (message-goto-body) (point-max)))
;; Insert the original article headers.
(insert-buffer-substring gnus-original-article-buffer beg end)
(article-decode-encoded-words))))
Index: lisp/message.el
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/message.el,v
retrieving revision 6.81
diff -u -r6.81 message.el
--- lisp/message.el 2001/05/07 16:12:00 6.81
+++ lisp/message.el 2001/05/09 12:32:49
@@ -1705,7 +1705,8 @@
(expand-abbrev))
(goto-char (point-min))
(or (search-forward (concat "\n" mail-header-separator "\n") nil t)
- (search-forward "\n\n" nil t)))
+ (search-forward-regexp "[^:]+:\\([^\n]\\|\n[ \t]\\)+\n\n" nil t)
+ (point-min)))
(defun message-goto-eoh ()
"Move point to the end of the headers."
[-- Attachment #3: Type: text/plain, Size: 25 bytes --]
--
http://ape.n3.net
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2001-06-21 17:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <m2heyupupr.fsf@boreas.yi.org.>
2001-06-21 17:50 ` Patch for headerless messages ShengHuo ZHU
2001-05-09 12:34 John Fremlin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).