* bug#17488: 24.3; mail-sendmail-undelimit-header doesn't respect mail-header-separator
@ 2014-05-14 1:28 Katsumi Yamaoka
2018-04-15 18:09 ` Lars Ingebrigtsen
0 siblings, 1 reply; 6+ messages in thread
From: Katsumi Yamaoka @ 2014-05-14 1:28 UTC (permalink / raw)
To: 17488; +Cc: Russ Allbery
Hi,
This is probably a rare case, so I'm not sure if it's worth
fixing, though. If one sets `mail-header-separator' to
" ."
it causes a mail corruption. It is because `rfc822-goto-eoh'
doesn't respect `mail-header-separator' and the first line of
a message body, rather than the separator, is deleted.
`smtpmail-send-it' and `mailclient-send-it' use it by way of
`mail-sendmail-undelimit-header'. And `sendmail-send-it' uses
it by way of `mail-header-end'.
Thanks.
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#17488: 24.3; mail-sendmail-undelimit-header doesn't respect mail-header-separator
2014-05-14 1:28 bug#17488: 24.3; mail-sendmail-undelimit-header doesn't respect mail-header-separator Katsumi Yamaoka
@ 2018-04-15 18:09 ` Lars Ingebrigtsen
2018-04-16 2:28 ` Katsumi Yamaoka
0 siblings, 1 reply; 6+ messages in thread
From: Lars Ingebrigtsen @ 2018-04-15 18:09 UTC (permalink / raw)
To: Katsumi Yamaoka; +Cc: Russ Allbery, 17488
Katsumi Yamaoka <yamaoka@jpl.org> writes:
> This is probably a rare case, so I'm not sure if it's worth
> fixing, though. If one sets `mail-header-separator' to
>
> " ."
>
> it causes a mail corruption. It is because `rfc822-goto-eoh'
> doesn't respect `mail-header-separator' and the first line of
> a message body, rather than the separator, is deleted.
Hm... I think `rfc822-goto-eoh' does the right thing: It doesn't care
about `mail-header-separator', because that's a user setting for mail
composition buffers, not something that should be consulted after making
that buffer into an RFC2822 mail.
> `smtpmail-send-it' and `mailclient-send-it' use it by way of
> `mail-sendmail-undelimit-header'. And `sendmail-send-it' uses
> it by way of `mail-header-end'.
So `mail-sendmail-undelimit-header' should consult that variable, I
think, instead of using `rfc822-goto-eoh'?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#17488: 24.3; mail-sendmail-undelimit-header doesn't respect mail-header-separator
2018-04-15 18:09 ` Lars Ingebrigtsen
@ 2018-04-16 2:28 ` Katsumi Yamaoka
2018-04-16 11:52 ` Lars Ingebrigtsen
0 siblings, 1 reply; 6+ messages in thread
From: Katsumi Yamaoka @ 2018-04-16 2:28 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: Russ Allbery, 17488
On Sun, 15 Apr 2018 20:09:45 +0200, Lars Ingebrigtsen wrote:
> Hm... I think `rfc822-goto-eoh' does the right thing: It doesn't care
> about `mail-header-separator', because that's a user setting for mail
> composition buffers, not something that should be consulted after making
> that buffer into an RFC2822 mail.
I see. It got obvious that `rfc822-goto-eoh' shouldn't respect
`mail-header-separator' after having understood what
`mail-sendmail-delimit-header' does --- it looks for *eoh* using
`rfc822-goto-eoh' and then inserts `mail-header-separator'. So,
it's a function that converts an RFC2822 mail into the one usable
in a mail composition buffer. Although there is no program that
uses `mail-sendmail-delimit-header' in Emacs.
>> `smtpmail-send-it' and `mailclient-send-it' use it by way of
>> `mail-sendmail-undelimit-header'. And `sendmail-send-it' uses
>> it by way of `mail-header-end'.
> So `mail-sendmail-undelimit-header' should consult that variable, I
> think, instead of using `rfc822-goto-eoh'?
I think it will work, but I changed my mind. That is,
`rfc822-goto-eoh' should be used with an RFC2822 mail, and a mail
composing software should replace the `mail-header-separator' with
an empty line before sending a mail to the `sendmail-function',
like Gnus does.
Regards,
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#17488: 24.3; mail-sendmail-undelimit-header doesn't respect mail-header-separator
2018-04-16 2:28 ` Katsumi Yamaoka
@ 2018-04-16 11:52 ` Lars Ingebrigtsen
2018-04-17 6:26 ` Katsumi Yamaoka
0 siblings, 1 reply; 6+ messages in thread
From: Lars Ingebrigtsen @ 2018-04-16 11:52 UTC (permalink / raw)
To: Katsumi Yamaoka; +Cc: Russ Allbery, 17488
Katsumi Yamaoka <yamaoka@jpl.org> writes:
>> So `mail-sendmail-undelimit-header' should consult that variable, I
>> think, instead of using `rfc822-goto-eoh'?
>
> I think it will work, but I changed my mind. That is,
> `rfc822-goto-eoh' should be used with an RFC2822 mail, and a mail
> composing software should replace the `mail-header-separator' with
> an empty line before sending a mail to the `sendmail-function',
> like Gnus does.
Yes, they should, so `mail-sendmail-undelimit-header' will normally be a
function that does absolutely nothing (as it is today :-)). So it
should either be removed, or adjusted to do what it says it does (i.e.,
find the delimited and remove it). I'll do the latter, and we can
contemplate the former...
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#17488: 24.3; mail-sendmail-undelimit-header doesn't respect mail-header-separator
2018-04-16 11:52 ` Lars Ingebrigtsen
@ 2018-04-17 6:26 ` Katsumi Yamaoka
2018-04-17 11:46 ` Lars Ingebrigtsen
0 siblings, 1 reply; 6+ messages in thread
From: Katsumi Yamaoka @ 2018-04-17 6:26 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: Russ Allbery, 17488
On Mon, 16 Apr 2018 13:42:02 -0400, Lars Ingebrigtsen wrote:
> branch: scratch/prop-search
> commit e1a0cbbcf8389c76f67048e69139b5b0adf2cf38
> Author: Lars Ingebrigtsen <larsi@gnus.org>
> Commit: Lars Ingebrigtsen <larsi@gnus.org>
> Make mail-sendmail-undelimit-header actually remove the delimiter
> * lisp/mail/sendmail.el (mail-sendmail-undelimit-header): Actually
> remove the mail header separator (bug#17488). In all the cases
> where this is called, the separator will probably already have
> been removed, so the only thing this does is place point at the
> end of the headers.
This change caused the following error:
Debugger entered--Lisp error: (search-failed "^--text follows this line--\n")
re-search-forward("^--text follows this line--\n")
mail-sendmail-undelimit-header()
smtpmail-send-it()
message-smtpmail-send-it()
So, I've added ``nil t'' to the re-search form. ;-)
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2018-04-17 11:46 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-14 1:28 bug#17488: 24.3; mail-sendmail-undelimit-header doesn't respect mail-header-separator Katsumi Yamaoka
2018-04-15 18:09 ` Lars Ingebrigtsen
2018-04-16 2:28 ` Katsumi Yamaoka
2018-04-16 11:52 ` Lars Ingebrigtsen
2018-04-17 6:26 ` Katsumi Yamaoka
2018-04-17 11:46 ` Lars Ingebrigtsen
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).