emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Emacs-diffs] master efa6f10: .gitignore tweaks


From: Paul Eggert
Subject: Re: [Emacs-diffs] master efa6f10: .gitignore tweaks
Date: Sun, 24 May 2015 10:30:48 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0

Dmitry Gutov wrote:
Where does that convention come from? I wish people didn't use .txt for patches.

Using .txt for attached patches works around a Thunderbird bug noted by Ivan Shmakov on this list. See:

http://bugs.gnu.org/20499#108
https://lists.gnu.org/archive/html/emacs-devel/2015-05/msg00416.html

You can see the problem in the email I'm sending to you now. It has two attachments of identical files with different names, one ending in ".patch" and the other in ".txt".

The .patch attachment has a header like this:

Content-Type: text/x-patch;
 name="0045-Prefer-this-to-this-in-doc-strings.patch"
Content-Transfer-Encoding: 8bit
Content-Disposition: attachment;
 filename="0045-Prefer-this-to-this-in-doc-strings.patch"

and contents that start like this:

From f743819b57ef519109c1b9d520d358d19a197086 Mon Sep 17 00:00:00 2001
From: Paul Eggert <address@hidden>
Date: Tue, 19 May 2015 19:08:11 -0700
Subject: [PATCH 045/100] =?UTF-8?q?Prefer=20"this"=20to=20=E2=80=9Cthis?=
 =?UTF-8?q?=E2=80=9D=20in=20doc=20strings?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Here, Thunderbird has given up on worrying about encoding, and is just passing it through without specifying encoding. The contents are another email, which has a proper header. This doesn't conform well to the relevant RFCs, since it's a text attachment that isn't ASCII but doesn't declare its charset.


The .txt attachment has a header like this:

Content-Type: text/plain; charset=UTF-8;
 name="0045-Prefer-this-to-this-in-doc-strings.txt"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
 filename="0045-Prefer-this-to-this-in-doc-strings.txt"

and contents that start like this:

RnJvbSBmNzQzODE5YjU3ZWY1MTkxMDljMWI5ZDUyMGQzNThkMTlhMTk3MDg2IE1vbiBTZXAg
MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBQYXVsIEVnZ2VydCA8ZWdnZXJ0QGNzLnVjbGEuZWR1

Here, the contents are a base64 representation of exactly the same file as before, but Thunderbird has labeled the attachment as UTF-8. This is more likely to work in practice.

Attachment: 0045-Prefer-this-to-this-in-doc-strings.patch
Description: Text Data

Attachment: 0045-Prefer-this-to-this-in-doc-strings.txt
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]