From: Reiner Steib <reinersteib+gmane@imap.cc>
To: ding@gnus.org
Subject: Set temp files (viewing attachments) read-only?
Date: Sat, 05 Apr 2008 19:37:15 +0200 [thread overview]
Message-ID: <v9y77si4ok.fsf@marauder.physik.uni-ulm.de> (raw)
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:
<news12f4e$47f4f7ee$3e63fcfd$26586@news.inode.at> ff
<https://bugzilla.mozilla.org/show_bug.cgi?id=191239#c0>
[2] <https://bugzilla.mozilla.org/show_bug.cgi?id=191239#c13>
--
,,,
(o o)
---ooO-(_)-Ooo--- | PGP key available | http://rsteib.home.pages.de/
next reply other threads:[~2008-04-05 17:37 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-05 17:37 Reiner Steib [this message]
2008-04-07 3:50 ` Daniel Pittman
2008-04-07 4:19 ` Katsumi Yamaoka
2008-04-13 20:39 ` Reiner Steib
2008-04-08 16:22 ` Magnus Henoch
2008-04-08 17:05 ` Reiner Steib
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=v9y77si4ok.fsf@marauder.physik.uni-ulm.de \
--to=reinersteib+gmane@imap.cc \
--cc=Reiner.Steib@gmx.de \
--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).