From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/66687 Path: news.gmane.org!not-for-mail From: Reiner Steib Newsgroups: gmane.emacs.gnus.general Subject: Set temp files (viewing attachments) read-only? Date: Sat, 05 Apr 2008 19:37:15 +0200 Message-ID: Reply-To: Reiner Steib NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1207417200 21394 80.91.229.12 (5 Apr 2008 17:40:00 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 5 Apr 2008 17:40:00 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M15171@lists.math.uh.edu Sat Apr 05 19:40:32 2008 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by lo.gmane.org with esmtp (Exim 4.50) id 1JiCNS-0002Bz-1w for ding-account@gmane.org; Sat, 05 Apr 2008 19:40:30 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1JiCLm-0004dY-Nc; Sat, 05 Apr 2008 12:38:46 -0500 Original-Received: from mx1.math.uh.edu ([129.7.128.32]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1JiCLl-0004dJ-Dl for ding@lists.math.uh.edu; Sat, 05 Apr 2008 12:38:45 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx1.math.uh.edu with esmtp (Exim 4.67) (envelope-from ) id 1JiCLf-0006TO-1w for ding@lists.math.uh.edu; Sat, 05 Apr 2008 12:38:45 -0500 Original-Received: from mail.uni-ulm.de ([134.60.1.11]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1JiCLo-0003ax-00 for ; Sat, 05 Apr 2008 19:38:48 +0200 Original-Received: from bridgekeeper.physik.uni-ulm.de (bridgekeeper.physik.uni-ulm.de [134.60.41.37]) by mail.uni-ulm.de (8.14.2/8.14.2) with ESMTP id m35Hcb0L010928 for ; Sat, 5 Apr 2008 19:38:38 +0200 (MEST) Original-Received: from localhost (bridgekeeper.physik.uni-ulm.de [134.60.41.37]) by bridgekeeper.physik.uni-ulm.de (Postfix) with ESMTP id 67B501C618 for ; Sat, 5 Apr 2008 19:38:36 +0200 (CEST) X-Face: 1;h7XMU[7l}$T@J.D}5z*w8Tg'}B5ArAWc8>2X~otB;kOjKs8X%|hTC#dG:%Vpx")x7S/`v :VXU#fZW$X$zdhEU.RfVQ@<-m9IuN{Hm"fW{,5]6kR'M*vEs+{5Cj!L(JTRzA$(},?5J=sm;%Od Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:66687 Archived-At: Hi, when a user views an attachment, modifies and saves it with the helper application (say OpenOffice), after quitting the helper application Gnus deletes the temp file. I.e. all modifications made by the user are lost. (Similar to Mozilla: [1]) Setting the temp file read-only[2] should make it clear, that editing it might be a bad idea. It also forces the user to choose a different file name or location when saving. What do you think? --8<---------------cut here---------------start------------->8--- --- mm-decode.el 02 Mar 2008 18:05:57 +0100 7.64 +++ mm-decode.el 05 Apr 2008 13:31:01 +0200 @@ -815,6 +815,10 @@ nil suffix)))) (let ((coding-system-for-write mm-binary-coding-system)) (write-region (point-min) (point-max) file nil 'nomesg)) + ;; The file is deleted after the viewer exists. If the users edits + ;; the file, changes will be lost. Set file to read-only to make it + ;; clear. + (set-file-modes file (string-to-number "400" 8)) (message "Viewing with %s" method) (cond (needsterm --8<---------------cut here---------------end--------------->8--- Bye, Reiner. [1] This is currently discussed in a German-language Mozilla newsgroup: ff [2] -- ,,, (o o) ---ooO-(_)-Ooo--- | PGP key available | http://rsteib.home.pages.de/