unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#8129: "File exists, but cannot be read" message on Windows with NT Emacs for .gpg files.
@ 2011-02-27 12:41 Oleksandr Gavenko
  2011-02-27 19:29 ` Glenn Morris
  0 siblings, 1 reply; 2+ messages in thread
From: Oleksandr Gavenko @ 2011-02-27 12:41 UTC (permalink / raw)
  To: 8129

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!





^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#8129: "File exists, but cannot be read" message on Windows with NT Emacs for .gpg files.
  2011-02-27 12:41 bug#8129: "File exists, but cannot be read" message on Windows with NT Emacs for .gpg files Oleksandr Gavenko
@ 2011-02-27 19:29 ` Glenn Morris
  0 siblings, 0 replies; 2+ messages in thread
From: Glenn Morris @ 2011-02-27 19:29 UTC (permalink / raw)
  To: gavenko; +Cc: 8129

Oleksandr Gavenko wrote:

> I try open file with '.gpg' extension and get message:
>
>   File exists, but cannot be read

Perhaps this issue:

http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3829





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-02-27 19:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-27 12:41 bug#8129: "File exists, but cannot be read" message on Windows with NT Emacs for .gpg files Oleksandr Gavenko
2011-02-27 19:29 ` Glenn Morris

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).