unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* MIME issue: can't set encoding on mail or mml-to-mime
@ 2020-05-05 21:39 Radu Butoi
  2020-05-06  7:52 ` Gregor Zattler
  0 siblings, 1 reply; 10+ messages in thread
From: Radu Butoi @ 2020-05-05 21:39 UTC (permalink / raw)
  To: help-gnu-emacs

Hello all,

Following the message and MIME manuals, I want to change the
`Content-Transfer-Encoding` on outgoing mail to quoted-printable [1].
The "Encoding Customization" section mentions that these variables
control this setting:

(setq
 mm-content-transfer-encoding-defaults
 '((".*" quoted-printable))
 mm-body-charset-encoding-alist
 '((iso-8859-1 . quoted-printable)
   (utf-8      . quoted-printable))
 mm-use-ultra-safe-encoding t) [2]

However, this doesn't work and outgoing mail is not encoded. The
function quoted-printable-encode-region does seem to work, though. To
debug further, in the description for `mm-body-charset-encoding-alist`,
it mentions that encoding can me overridden through the encoding MML
tag. In a new buffer, I call M-: (mml-to-mime) on

<#part type=text/plain encoding=quoted-printable>
test test test <...longer than 78 columns...>
<#/part>

And this doesn't encode or set any encoding header. Setting encoding to
base64 doesn't change anything. I see this on Emacs 26.3, including with
-Q. I tried to edebug this but couldn't get very far. Is anyone familiar
with this library or can provide some pointers to help debug this?

Thank you,
Radu

[1]: This is in order to be able to send long, soft-wrapped lines for
Gmail to display plaintext emails properly on mobile -- I had previously
asked about this here:
https://lists.gnu.org/archive/html/help-gnu-emacs/2020-04/msg00216.html.

[2]: The documentation does state that `mm-use-ultra-safe-encoding` is
an internal variable not to be set; setting it or not makes no
difference, having tested both. Setting it to t does affect
quoted-printable-encode-region, as the description states.



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: MIME issue: can't set encoding on mail or mml-to-mime
  2020-05-05 21:39 MIME issue: can't set encoding on mail or mml-to-mime Radu Butoi
@ 2020-05-06  7:52 ` Gregor Zattler
  2020-05-06 15:10   ` Drew Adams
                     ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Gregor Zattler @ 2020-05-06  7:52 UTC (permalink / raw)
  To: help-gnu-emacs

Hi Radu, emacs users,
* Radu Butoi <rbutoi@gmail.com> [2020-05-05; 17:39]:
> Hello all,
>
> Following the message and MIME manuals, I want to change the
> `Content-Transfer-Encoding` on outgoing mail to quoted-printable [1].

My understanding is that quoted-printable is used if the
message for some reason does not fit the rfc.  So if you
send an email with lines exeeding the length limit of the
rfc your helpful MUA will encode your email.  This email
hopefully proves this point.


How about a paragraph which consists only of a single long line which is much longer than the maximum length the RFC allows for transportation?  Surely the MUA will reformat this somehow?  This line length limit might be well above 1000 charactzers, so we have to fill this space somehow.  How about repetition: How about a paragraph which consists only of a single long line which is much longer than the maximum length the RFC allows for transportation?  Surely the MUA will reformat this somehow?  This line length limit might be well above 1000 charactzers, so we have to fill this space somehow.  How about repetition: How about a paragraph which consists only of a single long line which is much longer than the maximum length the RFC allows for transportation?  Surely the MUA will reformat this somehow?  This line length limit might be well above 1000 charactzers, so we have to fill this space somehow.  How about repetition: How about a paragraph which consists only of a single long line which is much longer than the maximum length the RFC allows for transportation?  Surely the MUA will reformat this somehow?  This line length limit might be well above 1000 charactzers, so we have to fill this space somehow.  How about repetition: How about a paragraph which consists only of a single long line which is much longer than the maximum length the RFC allows for transportation?  Surely the MUA will reformat this somehow?  This line length limit might be well above 1000 charactzers, so we have to fill this space somehow.  How about repetition: How about a paragraph which consists only of a single long line which is much longer than the maximum length the RFC allows for transportation?  Surely the MUA will reformat this somehow?  This line length limit might be well above 1000 charactzers, so we have to fill this space somehow.  How about repetition: How about a paragraph which consists only of a single long line which is much longer than the maximum length the RFC allows for transportation?  Surely the MUA will reformat this somehow?  This line length limit might be well above 1000 charactzers, so we have to fill this space somehow.  How about repetition: How about a paragraph which consists only of a single long line which is much longer than the maximum length the RFC allows for transportation?  Surely the MUA will reformat this somehow?  This line length limit might be well above 1000 charactzers, so we have to fill this space somehow.  How about repetition: How about a paragraph which consists only of a single long line which is much longer than the maximum length the RFC allows for transportation?  Surely the MUA will reformat this somehow?  This line length limit might be well above 1000 charactzers, so we have to fill this space somehow.  How about repetition:

Ciao; Gregor
-- 
 -... --- .-. . -.. ..--.. ...-.-




^ permalink raw reply	[flat|nested] 10+ messages in thread

* RE: MIME issue: can't set encoding on mail or mml-to-mime
  2020-05-06  7:52 ` Gregor Zattler
@ 2020-05-06 15:10   ` Drew Adams
  2020-05-06 15:34     ` tomas
  2020-05-06 18:01   ` MIME issue: can't set encoding on mail or mml-to-mime H. Dieter Wilhelm
  2020-05-06 22:34   ` Radu Butoi
  2 siblings, 1 reply; 10+ messages in thread
From: Drew Adams @ 2020-05-06 15:10 UTC (permalink / raw)
  To: Gregor Zattler, help-gnu-emacs

> > Following the message and MIME manuals, I want to change the
> > `Content-Transfer-Encoding` on outgoing mail to quoted-printable [1].
> 
> My understanding is that quoted-printable is used if the
> message for some reason does not fit the rfc.  So if you
> send an email with lines exeeding the length limit of the
> rfc your helpful MUA will encode your email.  This email
> hopefully proves this point.

FWIW, I received that long-line paragraph as a single long line.
(I'm using Outlook 2016.)

> How about a paragraph which consists only of a single long line...



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: MIME issue: can't set encoding on mail or mml-to-mime
  2020-05-06 15:10   ` Drew Adams
@ 2020-05-06 15:34     ` tomas
  2020-05-06 22:37       ` Radu Butoi
  0 siblings, 1 reply; 10+ messages in thread
From: tomas @ 2020-05-06 15:34 UTC (permalink / raw)
  To: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 442 bytes --]

On Wed, May 06, 2020 at 08:10:55AM -0700, Drew Adams wrote:
> > > Following the message and MIME manuals, I want to change the
> > > `Content-Transfer-Encoding` on outgoing mail to quoted-printable [1].
> > 
> > [...] This email hopefully proves this point.
> 
> FWIW, I received that long-line paragraph as a single long line.
> (I'm using Outlook 2016.)

Same here, and my MUA is more or less the opposite (mutt).

Cheers
-- t

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: MIME issue: can't set encoding on mail or mml-to-mime
  2020-05-06  7:52 ` Gregor Zattler
  2020-05-06 15:10   ` Drew Adams
@ 2020-05-06 18:01   ` H. Dieter Wilhelm
  2020-05-06 22:34   ` Radu Butoi
  2 siblings, 0 replies; 10+ messages in thread
From: H. Dieter Wilhelm @ 2020-05-06 18:01 UTC (permalink / raw)
  To: help-gnu-emacs

Hello,

I'm using Gnus v5.13 under GNU Emacs 26.3 and I've got your line broken
up in a paragraph.

   Dieter        

Gregor Zattler <telegraph@gmx.net> writes:

> Hi Radu, emacs users,
> * Radu Butoi <rbutoi@gmail.com> [2020-05-05; 17:39]:
>> Hello all,
>>
>> Following the message and MIME manuals, I want to change the
>> `Content-Transfer-Encoding` on outgoing mail to quoted-printable [1].
>
> My understanding is that quoted-printable is used if the
> message for some reason does not fit the rfc.  So if you
> send an email with lines exeeding the length limit of the
> rfc your helpful MUA will encode your email.  This email
> hopefully proves this point.
>
>
> How about a paragraph which consists only of a single long line which
> is much longer than the maximum length the RFC allows for
> transportation?  Surely the MUA will reformat this somehow?  This line
> length limit might be well above 1000 charactzers, so we have to fill
> this space somehow.  How about repetition: How about a paragraph which
> consists only of a single long line which is much longer than the
> maximum length the RFC allows for transportation?  Surely the MUA will
> reformat this somehow?  This line length limit might be well above
> 1000 charactzers, so we have to fill this space somehow.  How about
> repetition: How about a paragraph which consists only of a single long
> line which is much longer than the maximum length the RFC allows for
> transportation?  Surely the MUA will reformat this somehow?  This line
> length limit might be well above 1000 charactzers, so we have to fill
> this space somehow.  How about repetition: How about a paragraph which
> consists only of a single long line which is much longer than the
> maximum length the RFC allows for transportation?  Surely the MUA will
> reformat this somehow?  This line length limit might be well above
> 1000 charactzers, so we have to fill this space somehow.  How about
> repetition: How about a paragraph which consists only of a single long
> line which is much longer than the maximum length the RFC allows for
> transportation?  Surely the MUA will reformat this somehow?  This line
> length limit might be well above 1000 charactzers, so we have to fill
> this space somehow.  How about repetition: How about a paragraph which
> consists only of a single long line which is much longer than the
> maximum length the RFC allows for transportation?  Surely the MUA will
> reformat this somehow?  This line length limit might be well above
> 1000 charactzers, so we have to fill this space somehow.  How about
> repetition: How about a paragraph which consists only of a single long
> line which is much longer than the maximum length the RFC allows for
> transportation?  Surely the MUA will reformat this somehow?  This line
> length limit might be well above 1000 charactzers, so we have to fill
> this space somehow.  How about repetition: How about a paragraph which
> consists only of a single long line which is much longer than the
> maximum length the RFC allows for transportation?  Surely the MUA will
> reformat this somehow?  This line length limit might be well above
> 1000 charactzers, so we have to fill this space somehow.  How about
> repetition: How about a paragraph which consists only of a single long
> line which is much longer than the maximum length the RFC allows for
> transportation?  Surely the MUA will reformat this somehow?  This line
> length limit might be well above 1000 charactzers, so we have to fill
> this space somehow.  How about repetition:
>
> Ciao; Gregor

-- 
Best wishes
H. Dieter Wilhelm
Zwingenberg, Germany



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: MIME issue: can't set encoding on mail or mml-to-mime
  2020-05-06  7:52 ` Gregor Zattler
  2020-05-06 15:10   ` Drew Adams
  2020-05-06 18:01   ` MIME issue: can't set encoding on mail or mml-to-mime H. Dieter Wilhelm
@ 2020-05-06 22:34   ` Radu Butoi
  2 siblings, 0 replies; 10+ messages in thread
From: Radu Butoi @ 2020-05-06 22:34 UTC (permalink / raw)
  To: Gregor Zattler, help-gnu-emacs

Hi Gregor,

Gregor Zattler <telegraph@gmx.net> writes:

> Hi Radu, emacs users,
> * Radu Butoi <rbutoi@gmail.com> [2020-05-05; 17:39]:
>> Hello all,
>>
>> Following the message and MIME manuals, I want to change the
>> `Content-Transfer-Encoding` on outgoing mail to quoted-printable [1].
>
> My understanding is that quoted-printable is used if the
> message for some reason does not fit the rfc.  So if you
> send an email with lines exeeding the length limit of the
> rfc your helpful MUA will encode your email.  This email
> hopefully proves this point.
>
>
> How about a paragraph which consists only of a single long line which is much longer than the maximum length the RFC allows for transportation?  Surely the MUA will reformat this somehow?  This line length limit might be well above 1000 charactzers, so we have to fill this space somehow.  How about repetition: [...]

Yes, that did it, thank you! I feel pretty silly right now. I tested sending emails > 78 characters, but not over the absolute limit of 998 (from RFC5322:)

> Each line of characters MUST be no more than 998 characters, and SHOULD be no more than 78 characters, excluding the CRLF.

I've now set up my message-mode to not use auto-fill-mode but visual-fill-column-mode, in order to soft wrap rather than hard wrap.

To answer your other email:

> but isn't this because you send paragraphes as single long
> lines?  Why do you need the encoding changed?

I was trying to manually do so, not knowing it's done automatically.

Thanks a lot for your help and sticking with this!
-Radu



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: MIME issue: can't set encoding on mail or mml-to-mime
  2020-05-06 15:34     ` tomas
@ 2020-05-06 22:37       ` Radu Butoi
  2020-05-06 22:41         ` Drew Adams
  2020-05-08 18:49         ` Gregor Zattler
  0 siblings, 2 replies; 10+ messages in thread
From: Radu Butoi @ 2020-05-06 22:37 UTC (permalink / raw)
  To: tomas, help-gnu-emacs

<tomas@tuxteam.de> writes:

> On Wed, May 06, 2020 at 08:10:55AM -0700, Drew Adams wrote:
>> > > Following the message and MIME manuals, I want to change the
>> > > `Content-Transfer-Encoding` on outgoing mail to quoted-printable [1].
>> > 
>> > [...] This email hopefully proves this point.
>> 
>> FWIW, I received that long-line paragraph as a single long line.
>> (I'm using Outlook 2016.)
>
> Same here, and my MUA is more or less the opposite (mutt).
>
> Cheers
> -- t

There should be an option to soft-wrap incoming long lines to your
preferred width for any reasonable client, as is the default in emacs,
as well as the web page displaying the archives of these lists.

-Radu



^ permalink raw reply	[flat|nested] 10+ messages in thread

* RE: MIME issue: can't set encoding on mail or mml-to-mime
  2020-05-06 22:37       ` Radu Butoi
@ 2020-05-06 22:41         ` Drew Adams
  2020-05-08 18:49         ` Gregor Zattler
  1 sibling, 0 replies; 10+ messages in thread
From: Drew Adams @ 2020-05-06 22:41 UTC (permalink / raw)
  To: Radu Butoi, tomas, help-gnu-emacs

> >> FWIW, I received that long-line paragraph as a single long line.
> >> (I'm using Outlook 2016.)
> 
> There should be an option to soft-wrap incoming long lines to your
> preferred width for any reasonable client, as is the default in emacs,
> as well as the web page displaying the archives of these lists.

It's not a problem for me. The mail received from you, with the one long line, gets wrapped to the Outlook window width automatically.  As I change the window width it gets rewrapped accordingly.

I was just letting you know how I received it (FYI): as one long line.



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: MIME issue: can't set encoding on mail or mml-to-mime
  2020-05-06 22:37       ` Radu Butoi
  2020-05-06 22:41         ` Drew Adams
@ 2020-05-08 18:49         ` Gregor Zattler
  2020-05-15 15:34           ` Comfortably display text in a wide frame (was: MIME issue: can't set encoding on mail or mml-to-mime) Dmitry Alexandrov
  1 sibling, 1 reply; 10+ messages in thread
From: Gregor Zattler @ 2020-05-08 18:49 UTC (permalink / raw)
  To: help-gnu-emacs

Hi Radu, emacs users,
* Radu Butoi <rbutoi@gmail.com> [2020-05-06; 18:37]:
> There should be an option to soft-wrap incoming long lines to your
> preferred width for any reasonable client, as is the default in emacs,
> as well as the web page displaying the archives of these lists.

thanks, your email finally motivated me to search for such
thing and I found "Notmuch Wash Wrap Lines Length" and
configured it.

Much better now.

Ciao; Gregor
--
 -... --- .-. . -.. ..--.. ...-.-




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Comfortably display text in a wide frame (was: MIME issue: can't set encoding on mail or mml-to-mime)
  2020-05-08 18:49         ` Gregor Zattler
@ 2020-05-15 15:34           ` Dmitry Alexandrov
  0 siblings, 0 replies; 10+ messages in thread
From: Dmitry Alexandrov @ 2020-05-15 15:34 UTC (permalink / raw)
  Cc: Radu Butoi, help-gnu-emacs


[-- Attachment #1.1: Type: text/plain, Size: 1351 bytes --]

Gregor Zattler <telegraph@gmx.net> wrote:
> * Radu Butoi <rbutoi@gmail.com> [2020-05-06; 18:37]:
>> There should be an option to soft-wrap incoming long lines to your preferred width for any reasonable client, as is the default in emacs, as well as the web page displaying the archives of these lists.
>
> thanks, your email finally motivated me to search for such thing and I found "Notmuch Wash Wrap Lines Length" and configured it.
>
> Much better now.

I bet, itʼs a port of aforeimplied ‘gnus-treat-fill-long-lines’ and is not window-width-aware.  That is, if the current window is narrower than preconfigured fill-column, it still dumbly wraps on that column.  Let alone following window resizing, when the message is already displayed.

In other words, thatʼs rather a workaround, than a proper solution, which should rely on same display machinery, that soft-wraps lines longer than window.

Actually, depending on how you manage _system_ windows, it may make perfect sense to automatically shrink the frame displaying your MUA to a comfortable width.

Or, if resizing frames is not convenient for you (or even impossible, as on TTY), Iʼd suggest to use major-mode-agnostic ‘visual-fill-column-mode’ (not part of GNU Emacs, available on Melpa).  The following configuration bits are for Gnus, but you got the idea:


[-- Attachment #1.2: Type: application/emacs-lisp, Size: 1155 bytes --]

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 247 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2020-05-15 15:34 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-05-05 21:39 MIME issue: can't set encoding on mail or mml-to-mime Radu Butoi
2020-05-06  7:52 ` Gregor Zattler
2020-05-06 15:10   ` Drew Adams
2020-05-06 15:34     ` tomas
2020-05-06 22:37       ` Radu Butoi
2020-05-06 22:41         ` Drew Adams
2020-05-08 18:49         ` Gregor Zattler
2020-05-15 15:34           ` Comfortably display text in a wide frame (was: MIME issue: can't set encoding on mail or mml-to-mime) Dmitry Alexandrov
2020-05-06 18:01   ` MIME issue: can't set encoding on mail or mml-to-mime H. Dieter Wilhelm
2020-05-06 22:34   ` Radu Butoi

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).