Re: incorrect error message when reverting unreadable file

2006-11-22 Thread Richard Stallman
Does this change give good behavior?

*** files.el13 Nov 2006 15:19:14 -0500  1.865
--- files.el21 Nov 2006 21:30:29 -0500  
***
*** 4081,4086 
--- 4081,4091 
  File %s no longer exists!
Cannot revert nonexistent file %s)
  file-name))
+ ((not (file-readable-p file-name))
+  (error (if buffer-file-number
+ File %s no longer readable!
+   Cannot revert unreadable file %s)
+ file-name))
  (t
   ;; Bind buffer-file-name to nil
   ;; so that we don't try to lock the file.


___
emacs-pretest-bug mailing list
emacs-pretest-bug@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug


Re: incorrect error message when reverting unreadable file

2006-11-22 Thread Chris Moore

On 11/22/06, Richard Stallman [EMAIL PROTECTED] wrote:


Does this change give good behavior?

*** files.el13 Nov 2006 15:19:14 -0500  1.865
--- files.el21 Nov 2006 21:30:29 -0500
***
*** 4081,4086 
--- 4081,4091 
  File %s no longer exists!
Cannot revert nonexistent file %s)
  file-name))
+ ((not (file-readable-p file-name))
+  (error (if buffer-file-number
+ File %s no longer readable!
+   Cannot revert unreadable file %s)
+ file-name))
  (t
   ;; Bind buffer-file-name to nil
   ;; so that we don't try to lock the file.




Yes, it does.
___
emacs-pretest-bug mailing list
emacs-pretest-bug@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug


incorrect error message when reverting unreadable file

2006-11-21 Thread Chris Moore
I just did the following:

1. use find-file to visit a file:

   C-x C-f /tmp/file RET

2. in a shell, modify the file and make it unreadable:

   $ date  /tmp/file
   $ chmod 0 /tmp/file

3. back in Emacs, find the file again:

   C-x C-f /tmp/file RET

Emacs tells me File file changed on disk.  Reread from disk?
(yes or no) as I would expect.  I answer yes and I'm told:

  Opening input file, no such file or directory, /tmp/file

But the file does exist.

If I kill the file buffer and try again, then the correct message is
printed:

  File is not readable: /tmp/file




Debugger entered--Lisp error: (file-error Opening input file no such file or 
directory /tmp/file)
  insert-file-contents(/tmp/file t nil nil t)
  revert-buffer(t t)
  find-file-noselect(/tmp/file nil nil t)
  find-file(/tmp/file t)
  call-interactively(find-file)




In GNU Emacs 22.0.91.4 (i686-pc-linux-gnu, GTK+ Version 2.8.20)
 of 2006-11-19 on chrislap
X server distributor `The X.Org Foundation', version 11.0.70101000
configured using `configure '--with-gtk' '--with-xpm' '--with-jpeg' 
'--with-png' '--with-gif''

Important settings:
  value of $LC_ALL: en_GB.UTF-8
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_GB.UTF-8
  locale-coding-system: utf-8
  default-enable-multibyte-characters: t

Major mode: C/l

Minor modes in effect:
  show-paren-mode: t
  display-time-mode: t
  iswitchb-mode: t
  dynamic-completion-mode: t
  shell-dirtrack-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  unify-8859-on-encoding-mode: t
  utf-translate-cjk-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t
  abbrev-mode: t

Recent input:
T h e SPC f u n c t i o n s SPC w h i c h SPC a l l 
o w SPC y o u SPC t o SPC v i e w SPC r e c e n t SPC 
k e y s t r o k e s SPC h a v e SPC b e e n C-j h i 
d d e n SPC b y SPC j - s h e l l , SPC t o SPC p r 
o t e c t SPC p a s s w o r d s SPC e n t e r e d SPC 
i n SPC s h e l l SPC b u f f e r s .

Recent messages:
(New file)
revert-buffer: Opening input file: no such file or directory, /tmp/file
Loading debug...done
Entering debugger...
Type M-x display-buffer RET to restore the other window.  
Making completion list...
Loading cc-mode...done
Loading vc-cvs...done
Mark saved where search started [4 times]
Loading emacsbug...done


___
emacs-pretest-bug mailing list
emacs-pretest-bug@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug