bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#60147: 30.0.50; vc-prepare-patch: Add numbered patch file names


From: Sean Whitton
Subject: bug#60147: 30.0.50; vc-prepare-patch: Add numbered patch file names
Date: Sat, 17 Dec 2022 17:33:30 -0700
User-agent: Gnus/5.13 (Gnus v5.13)

Hello,

On Sat 17 Dec 2022 at 09:33AM GMT, Philip Kaludercic wrote:

>> +                     (filename
>> +                      (concat
>> +                       (string-trim
>> +                        (replace-regexp-in-string
>> +                         "\\W" "-" (if (length> stripped-subject 50)
>> +                                       (substring stripped-subject 0 50)
>> +                                     stripped-subject))
>
> Is limiting the file names to ~50 characters a Git thing?

Git does it, yes, and I thought it seemed like a good idea in general.

>> +                (mml-attach-buffer
>> +                 (buffer-name (plist-get patch :buffer))
>> +                 "text/x-patch"
>> +                 patch-subject
>> +                 "attachment"
>> +                 (format "%04d-%s" (cl-incf i) filename))))))
>
> Is the new additional argument really necessary, or couldn't we just
> rename the generated buffer?  We could specify that the buffer must be
> fresh/renameable.

The description and the filename for an attachment are not the same
thing -- I don't believe MUAs will save the files with the correct name
unless there is the filename= field.  And I think it's a useful general
addition to mml-attach-buffer.

-- 
Sean Whitton





reply via email to

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