From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 30540 invoked from network); 16 Dec 2020 18:33:25 -0000 Received: from mx1.math.uh.edu (129.7.128.32) by inbox.vuxu.org with ESMTPUTF8; 16 Dec 2020 18:33:25 -0000 Received: from lists1.math.uh.edu ([129.7.128.208]) by mx1.math.uh.edu with esmtps (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.94) (envelope-from ) id 1kpbc2-00AKyx-DW for ml@inbox.vuxu.org; Wed, 16 Dec 2020 12:33:22 -0600 Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by lists1.math.uh.edu with smtp (Exim 4.94) (envelope-from ) id 1kpbc1-0008oN-SV for ml@inbox.vuxu.org; Wed, 16 Dec 2020 12:33:21 -0600 Received: from mx2.math.uh.edu ([129.7.128.33]) by lists1.math.uh.edu with esmtps (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.94) (envelope-from ) id 1kpbc0-0008oH-UX for ding@lists.math.uh.edu; Wed, 16 Dec 2020 12:33:20 -0600 Received: from quimby.gnus.org ([95.216.78.240]) by mx2.math.uh.edu with esmtps (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.94) (envelope-from ) id 1kpbbz-00GTc0-5l for ding@lists.math.uh.edu; Wed, 16 Dec 2020 12:33:20 -0600 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Transfer-Encoding:Content-Type:Mime-Version:References :Message-ID:Date:Subject:From:To:Sender:Reply-To:Cc:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=4YERKxYYIaGWLnv73jT+T5Kj4P1a1TMxN+Rea1Z+WII=; b=fjtt0Sx7Z5reTnR+zz6+F15Bmd XePgZAASAkGYNnV3QCdUzuLDk6PhHwaT5HBGW02NcqQCXhbCruTgiifxa0cdxfy7m9HasPgVtxv31 41FyG+bM7UKOBnAv7/Ed1iflKpXa3v8GMTulZooNAHZKWMl5etZYXfCtLQZv3mIZUMko=; Received: from ciao.gmane.io ([116.202.254.214]) by quimby.gnus.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kpbbr-0003kd-PB for ding@gnus.org; Wed, 16 Dec 2020 19:33:15 +0100 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1kpbbp-0005ei-Ot for ding@gnus.org; Wed, 16 Dec 2020 19:33:09 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: ding@gnus.org From: Eric Abrahamsen Subject: Re: download attachment and do chmod for certain files Date: Wed, 16 Dec 2020 10:33:04 -0800 Message-ID: <87a6udvbxb.fsf@ericabrahamsen.net> References: <87v9d2g14c.fsf@zoho.eu> <87mtydvdfn.fsf@ericabrahamsen.net> <877dphsjdn.fsf@tullinup.koldfront.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cancel-Lock: sha1:T7D+9yCD3Xr4FUtUCbo8Y9iX1Bg= List-ID: Precedence: bulk Adam Sjøgren 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