From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/4250 Path: main.gmane.org!not-for-mail From: steve@miranova.com (Steven L. Baur) Newsgroups: gmane.emacs.gnus.general Subject: Re: Found no mail! [sgnus 0.17] Date: 03 Dec 1995 19:52:27 -0800 Organization: Miranova Systems, Inc. Sender: steve@miranova.com Message-ID: References: NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 (generated by tm-edit 7.27) Content-Type: text/plain; charset=US-ASCII X-Trace: main.gmane.org 1035145023 28974 80.91.224.250 (20 Oct 2002 20:17:03 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 20 Oct 2002 20:17:03 +0000 (UTC) Return-Path: ding-request@ifi.uio.no Original-Received: from ifi.uio.no (ifi.uio.no [129.240.64.2]) by miranova.com (8.6.11/8.6.9) with ESMTP id UAA22310 for ; Sun, 3 Dec 1995 20:31:21 -0800 Original-Received: from miranova.com (steve@miranova.com [204.212.162.100]) by ifi.uio.no with ESMTP (8.6.11/ifi2.4) id for ; Mon, 4 Dec 1995 04:52:17 +0100 Original-Received: (from steve@localhost) by miranova.com (8.6.11/8.6.9) id TAA21582; Sun, 3 Dec 1995 19:52:31 -0800 Original-To: ding@ifi.uio.no X-Url: http://www.miranova.com/%7Esteve/ In-Reply-To: larsi@ifi.uio.no's message of 03 Dec 1995 17:50:56 -0800 Original-Lines: 99 X-Mailer: September Gnus v0.17/XEmacs 19.13 Xref: main.gmane.org gmane.emacs.gnus.general:4250 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:4250 >>>>> "Lars" == Lars Magne Ingebrigtsen writes: Lars> steve@miranova.com (Steven L. Baur) writes: >> If you don't set mail-use-rfc822 to t ...(Emacs can barf) Lars> How odd. But when does Gnus use functions that have this... Lars> interesting (yuck) feature? The one that bit me was gnus-summary-save-in-mail, but anything which calls rmail-output. The only other function I see doing it is gnus-author-copy-saver. Lars> And... why does this happen? As near as I can tell it strips exactly one level of quotes out at the most nested level. This works quite well unless someone is taking full advantage of RFC822 syntax ... Lars> The documentation to that variable doesn't say anything Lars> specific about when it's used: I just did a grep on mail-use-rfc822 in the emacs lisp directories, and I've changed my mind. It is a Gnus bug. The variable itself is only read in mail-utils.el, in the function mail-strip-quoted-names, which is used to build From_ lines. It is set to t temporarily in rmail.el in rmail-make-in-reply-to-field. It is also set to t in a pair of (let)s in vm-reply.el and vm-summary.el. [From vm-reply.el] (let ((mail-use-rfc822 t)) (and to (setq to (mail-strip-quoted-names to))) (and cc (setq cc (mail-strip-quoted-names cc))))) I think you *should* protect all calls to rmail-output in gnus in the same fashion. (Patch appended). Lars> mail-use-rfc822's value is nil Lars> Documentation: *If non-nil, use a full, hairy RFC822 parser Lars> on mail addresses. Otherwise, (the default) use a smaller, Lars> somewhat faster, and often correct parser. It works exactly as advertised. I vote for correctness since the consequences are so unpleasant. Patch follows: =================================================================== RCS file: RCS/ChangeLog,v retrieving revision 1.8 diff -u -r1.8 ChangeLog --- 1.8 1995/12/03 20:10:13 +++ ChangeLog 1995/12/04 03:42:21 @@ -1,5 +1,10 @@ Sun Dec 3 11:44:08 1995 Steven L. Baur + * gnus-msg.el (gnus-inews-do-fcc): Protect call to rmail-output by + temporarily setting mail-use-rfc822 to t. + + * gnus.el (gnus-summary-save-in-mail): Ditto. + * gnus.el (gnus-slave-no-server): New Function. (gnus-no-server): Add optional slave parameter. =================================================================== RCS file: RCS/gnus.el,v retrieving revision 1.9 diff -u -r1.9 gnus.el --- 1.9 1995/12/03 20:44:46 +++ gnus.el 1995/12/04 03:41:34 @@ -11670,7 +11670,8 @@ (widen) (if (and (file-readable-p filename) (mail-file-babyl-p filename)) (gnus-output-to-rmail filename) - (rmail-output filename 1 t t))))) + (let ((mail-use-rfc822 t)) + (rmail-output filename 1 t t)))))) ;; Remember the directory name to save articles. (setq gnus-newsgroup-last-mail filename))) =================================================================== RCS file: RCS/gnus-msg.el,v retrieving revision 1.6 diff -u -r1.6 gnus-msg.el --- 1.6 1995/12/04 03:37:10 +++ gnus-msg.el 1995/12/04 03:39:19 @@ -1286,7 +1286,8 @@ (funcall gnus-author-copy-saver file) (if (and (file-readable-p file) (mail-file-babyl-p file)) (gnus-output-to-rmail file) - (rmail-output file 1 t t))))))))) + (let ((mail-use-rfc822 t)) + (rmail-output file 1 t t)))))))))) (defun gnus-inews-path () "Return uucp path." -- steve@miranova.com baur