Skip to content

Allow changing attachment file name when saving it - #2964

Open
Tristan02d wants to merge 7 commits into
djcb:masterfrom
Tristan02d:save-one-attachment
Open

Tristan02d wants to merge 7 commits into
djcb:masterfrom
Tristan02d:save-one-attachment

Conversation

@Tristan02d

Copy link
Copy Markdown

Hello, I think there is currently no way to change an attachment file name when saving it. Say
there is an attachment called not Convenient file Name.PDF, I would like to save it as
convenient_file_name.pdf.

Here is my attempt to make it possible, using the new mu4e-view-save-one-attachment
command, tell me what you think.

Tristan Riehs and others added 7 commits October 2, 2026 09:03
@djcb

djcb commented Oct 6, 2026

Copy link
Copy Markdown
Owner

Thanks for your PR.

Note that you can change the name of file when saving the attachment when going through mu4e-view-mime-part-action, i.e., "A", then select the attachment and "s".

But, perhaps we can improve the direct way as well; however, I would not start with a function mirroring the existing mu4e-save-attachments. People may want any combination of custom-dir / custom-name. So perhaps a new combination function that handles all combinations of ask-dir / ask-filename (i.e., a superset of mu4e-save-attachments, and then perhaps some helpers using it.

WDYT?

@Tristan02d

Tristan02d commented Oct 6, 2026 •

Copy link
Copy Markdown
Author

mu4e-view-mime-part-action does exactly what I wanted, thus
mu4e-view-save-one-attachment is kind of pointless now. Thank you for pointing
that out.

Making all the custom-dir / custom-name combination conveniently reachable from the
mu4e-view-mode would indeed be super cool.

The question is how to make them accessible ? I would say the easiest way would
be to add the 4 variants of the "save" action to
mu4e-view-mime-part-action. But I think being able to bind the one we use the
most to a single keystroke in mu4e-view-mode would be very useful, but that
implies providing one command for each of the 4 variant.

@djcb

djcb commented Oct 9, 2026

Copy link
Copy Markdown
Owner

Yeah, I'd expect to have one function to handle the variations, both with custom dir / custom filename, and let user choose influence through prefix-args, and perhaps some user-helpers on top. I'd like to avoid adding too many key-bindings. Have to think a bit about how to best present this to the user.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants