Gnus development mailing list
 help / color / mirror / Atom feed
From: Eric Abrahamsen <eric@ericabrahamsen.net>
To: ding@gnus.org
Subject: Re: download attachment and do chmod for certain files
Date: Wed, 16 Dec 2020 10:33:04 -0800	[thread overview]
Message-ID: <87a6udvbxb.fsf@ericabrahamsen.net> (raw)
In-Reply-To: <877dphsjdn.fsf@tullinup.koldfront.dk>

Adam Sjøgren <asjo@koldfront.dk> writes:

> Eric writes:
>
>> I expected there would be some sort of "save MIME handle alist" thing
>> where you could have it automatically kick in when you saved an image,
>> but I didn't immediately see anything like that.
>
> There is a generic variable for setting the permissions of a saved
> attachment, regardless of type:
>
> ,----[ C-h v mm-attachment-file-modes RET ]
> | mm-attachment-file-modes is a variable defined in ‘mm-decode.el’.
> | Its value is 420
> | Original value was 384
> | 
> |   You can customize this variable.
> |   This variable was introduced, or its default value was changed, in
> |   version 22.1 of Emacs.
> | 
> | Documentation:
> | Set the mode bits of saved attachments to this integer.
> `----
>
> It is used in the function mm-save-part-to-file, which could either be
> replaced or advice'd to only have the permissions applied to specific
> types of attachments.

Excellent! In fact I glanced over this a second ago, when poking around
in the code, but somehow didn't tweak to the fact that this does exactly
what Emanuel is after.

Thanks,
Eric



  reply	other threads:[~2020-12-16 18:33 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-15 22:23 Emanuel Berg
2020-12-16 18:00 ` Eric Abrahamsen
2020-12-16 18:08   ` Eric Abrahamsen
2020-12-16 18:20   ` Adam Sjøgren
2020-12-16 18:33     ` Eric Abrahamsen [this message]
2020-12-18 13:19     ` Emanuel Berg
2020-12-18 21:16     ` Emanuel Berg
2020-12-18 21:49       ` Andreas Schwab
2020-12-18 22:36         ` Emanuel Berg
2020-12-18 22:55           ` Jason L Tibbitts III
2020-12-18 22:38         ` Emanuel Berg
2020-12-18 22:47           ` Emanuel Berg
2020-12-21  9:06             ` Eric S Fraga

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

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

  git send-email \
    --in-reply-to=87a6udvbxb.fsf@ericabrahamsen.net \
    --to=eric@ericabrahamsen.net \
    --cc=ding@gnus.org \
    /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.
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 NNTP newsgroup(s).