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

Previous Next

Package: emacs;

Reported by: Sean Whitton <spwhitton <at> spwhitton.name>

Date: Sat, 17 Dec 2022 05:42:01 UTC

Severity: normal

Found in version 30.0.50

Done: Sean Whitton <spwhitton <at> spwhitton.name>

Bug is archived. No further changes may be made.

Full log


Message #11 received at 60147 <at> debbugs.gnu.org (full text, mbox):

From: Sean Whitton <spwhitton <at> spwhitton.name>
To: Philip Kaludercic <philipk <at> posteo.net>
Cc: 60147 <at> debbugs.gnu.org
Subject: Re: bug#60147: 30.0.50; vc-prepare-patch: Add numbered patch file
 names
Date: Sat, 17 Dec 2022 17:33:30 -0700
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




This bug report was last modified 2 years and 211 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.