GNU bug report logs -
#8954
23.3.50; flymake handles read-only directories badly
Previous Next
Reported by: Reuben Thomas <rrt <at> sc3d.org>
Date: Tue, 28 Jun 2011 21:44:02 UTC
Severity: normal
Found in version 23.3.50
Done: Stefan Monnier <monnier <at> iro.umontreal.ca>
Bug is archived. No further changes may be made.
Full log
Message #10 received at 8954-done <at> debbugs.gnu.org (full text, mbox):
> If I open a system include file, and have flymake-mode in my
> c-mode-hook, I get:
> Note: file is write protected
> flymake-save-buffer-in-file: Opening output file: permission denied, /usr/include/regex_flymake.h
> and (the actual bug) the buffer displayed is not regex.h
I've installed the patch below which should fix the worst part of
this bug.
Stefan
=== modified file 'lisp/ChangeLog'
--- lisp/ChangeLog 2012-04-10 23:34:25 +0000
+++ lisp/ChangeLog 2012-04-11 00:20:36 +0000
@@ -1,3 +1,7 @@
+2012-04-11 Stefan Monnier <monnier <at> iro.umontreal.ca>
+
+ * progmodes/flymake.el (flymake-mode): Beware read-only dirs (bug#8954).
+
2012-04-10 Sébastien Gross <seb <at> chezwam.org> (tiny change)
* progmodes/hideshow.el (hs-hide-all): Don't infloop on comments
=== modified file 'lisp/progmodes/flymake.el'
--- lisp/progmodes/flymake.el 2012-02-08 02:12:24 +0000
+++ lisp/progmodes/flymake.el 2012-04-10 23:06:08 +0000
@@ -1356,8 +1356,12 @@
(setq flymake-timer
(run-at-time nil 1 'flymake-on-timer-event (current-buffer)))
- (when flymake-start-syntax-check-on-find-file
- (flymake-start-syntax-check)))))
+ (when (and flymake-start-syntax-check-on-find-file
+ ;; Since we write temp files in current dir, there's no point
+ ;; trying if the directory is read-only (bug#8954).
+ (file-writable-p (file-name-directory buffer-file-name)))
+ (with-demoted-errors
+ (flymake-start-syntax-check))))))
;; Turning the mode OFF.
(t
This bug report was last modified 13 years and 101 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.