[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#8129: "File exists, but cannot be read" message on Windows with NT E
From: |
Oleksandr Gavenko |
Subject: |
bug#8129: "File exists, but cannot be read" message on Windows with NT Emacs for .gpg files. |
Date: |
Sun, 27 Feb 2011 12:41:08 +0000 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.2.12) Gecko/20101027 Thunderbird/3.1.6 |
I try open file with '.gpg' extension and get message:
File exists, but cannot be read
and file content not shown.
This happen in 'runemacs.exe -q' version 23.1/23.2.
Emacs 22.3 and 21.4 have no this issue.
Problem come from 'e:/opt/emacs-23.2/lisp/files.el':
(defun after-find-file (&optional error warn noauto
after-find-file-from-revert-buffer
nomodes)
(setq buffer-read-only (not (file-writable-p buffer-file-name)))
(if noninteractive
nil
(let* (not-serious
(msg
(cond
((not warn) nil)
((and error (file-attributes buffer-file-name))
(setq buffer-read-only t)
"File exists, but cannot be read")
This function for .gpg file invoked with warn=t, error=t.
For other file ext it invoked as warn=t, error=nil <<==
so work good.
To workaround I try
(fset 'epa-file 'text-mode)
as in 'auto-mode-alist':
("\\.gpg\\(~\\|\\.~[0-9]+~\\)?\\'" nil epa-file)
without happiness.
--
Best regards!
- bug#8129: "File exists, but cannot be read" message on Windows with NT Emacs for .gpg files.,
Oleksandr Gavenko <=