From: Shenghuo ZHU <zsh@cs.rochester.edu>
Subject: Re: 0.50 bug: gnus tries to search for empty line in message
Date: 18 Nov 1998 13:56:50 -0500 [thread overview]
Message-ID: <5bg1bgn825.fsf@schnapps.cs.rochester.edu> (raw)
In-Reply-To: Vladimir Volovich's message of "18 Nov 1998 18:29:24 +0300"
>>>>> "VVV" == Vladimir Volovich <vvv@vvv.vsu.ru> writes:
VVV> Hi,
VVV> when i try to send the following message:
VVV> --------------------------
VVV> To: anybody
VVV> Subject: test
VVV> --text follows this line--
VVV> abc
VVV> def
VVV> --------------------------
VVV> i get an error:
VVV> Signaling: (search-failed "
VVV> ")
VVV> search-forward("\n\n")
VVV> message-encode-message-body()
VVV> message-send-mail(nil)
VVV> message-send-via-mail(nil)
VVV> message-send(nil)
VVV> message-send-and-exit(nil)
VVV> * call-interactively(message-send-and-exit)
VVV> I.e., gnus for some strange reason searches for an empty line in a
VVV> message. If the message does not contain an empty line, it issues an
VVV> error.
VVV> Also, it seems that pgnus 0.50 inserts an additional empty line after
VVV> the first empty line in the message body.
VVV> Best regards, -- Vladimir.
Hope this patch works.
--
Shenghuo
:- cut --------------
--- ChangeLog 1998/11/18 18:45:57 1.2
+++ ChangeLog 1998/11/18 18:46:15
@@ -1,3 +1,7 @@
+Wed Nov 18 13:46:08 1998 Shenghuo ZHU <zsh@cs.rochester.edu>
+
+ * message.el (message-encode-message-body): Rewrite.
+
Wed Nov 18 11:52:19 1998 Shenghuo ZHU <zsh@cs.rochester.edu>
* gnus-art.el (gnus-mime-display-alternative): Set end of
--- message.el 1998/11/18 17:03:07 1.1
+++ message.el 1998/11/18 18:51:13
@@ -4116,27 +4116,32 @@
type file)))
(defun message-encode-message-body ()
- (message-goto-body)
- (save-restriction
- (narrow-to-region (point) (point-max))
- (let ((new (mml-generate-mime)))
- (delete-region (point-min) (point-max))
- (insert new)
- (goto-char (point-min))
- (widen)
- (forward-line -1)
- (let ((beg (point))
- (line (buffer-substring (point) (progn (forward-line 1) (point)))))
- (delete-region beg (point))
- (insert "Mime-Version: 1.0\n")
- (search-forward "\n\n")
- (forward-char -1)
- (insert line)
- (when (save-excursion
- (re-search-backward "^Content-Type: multipart/" nil t))
- (insert "This is a MIME multipart message. If you are reading\n")
- (insert "this, you shouldn't.\n"))))))
-
+ (let (lines multipart-p)
+ (message-goto-body)
+ (save-restriction
+ (narrow-to-region (point) (point-max))
+ (let ((new (mml-generate-mime)))
+ (delete-region (point-min) (point-max))
+ (insert new)
+ (goto-char (point-min))
+ (if (eq (aref new 0) ?\n)
+ (delete-char 1)
+ (search-forward "\n\n")
+ (setq lines (buffer-substring (point-min) (1- (point))))
+ (delete-region (point-min) (point)))))
+ (save-restriction
+ (message-narrow-to-headers-or-head)
+ (goto-char (point-max))
+ (insert "Mime-Version: 1.0\n")
+ (if lines
+ (insert lines))
+ (setq multipart-p
+ (re-search-backward "^Content-Type: multipart/" nil t)))
+ (when multipart-p
+ (message-goto-body)
+ (insert "This is a MIME multipart message. If you are reading\n")
+ (insert "this, you shouldn't.\n"))))
+
(run-hooks 'message-load-hook)
(provide 'message)
next prev parent reply other threads:[~1998-11-18 18:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-11-18 15:29 Vladimir Volovich
1998-11-18 18:56 ` Shenghuo ZHU [this message]
1998-11-19 0:33 ` Katsumi Yamaoka / 山岡 克美
1998-11-19 1:03 ` Katsumi Yamaoka / 山岡 克美
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5bg1bgn825.fsf@schnapps.cs.rochester.edu \
--to=zsh@cs.rochester.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).