unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Philip Kaludercic <philipk@posteo.net>
To: Sean Whitton <spwhitton@spwhitton.name>
Cc: 60147@debbugs.gnu.org
Subject: bug#60147: 30.0.50; vc-prepare-patch: Add numbered patch file names
Date: Sun, 18 Dec 2022 10:45:17 +0000	[thread overview]
Message-ID: <87cz8hyoqq.fsf@posteo.net> (raw)
In-Reply-To: <87r0wxv9d1.fsf@melete.silentflame.com> (Sean Whitton's message of "Sat, 17 Dec 2022 17:33:30 -0700")

Sean Whitton <spwhitton@spwhitton.name> writes:

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

OK, then it should be a good convention.  And if the file names are
numbered, then there shouldn't be any conflicts when downloading
patches.

>>> +                (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.

I see, in that case this should be fine.  Can you apply the patch?





  reply	other threads:[~2022-12-18 10:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-17  5:40 bug#60147: 30.0.50; vc-prepare-patch: Add numbered patch file names Sean Whitton
2022-12-17  9:33 ` Philip Kaludercic
2022-12-18  0:33   ` Sean Whitton
2022-12-18 10:45     ` Philip Kaludercic [this message]
2022-12-20  0:17       ` Sean Whitton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87cz8hyoqq.fsf@posteo.net \
    --to=philipk@posteo.net \
    --cc=60147@debbugs.gnu.org \
    --cc=spwhitton@spwhitton.name \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).