Skip to content

Commit

Permalink
Don't change default find-file behaviour
Browse files Browse the repository at this point in the history
Currently, opening any file that is read-only and not owned by the
current user triggers a root login prompt. This occurs for viewing
system files (e.g /etc/fstab), built-in elisp
libraries (e.g. simple.el.gz) and simply viewing files owned by other
users on a shared system.

We can't assume that this is the behaviour users want, and changing
built-in functions without asking is surprising.

Fixes bbatsov#20.
  • Loading branch information
Wilfred committed Apr 5, 2016
1 parent ca62859 commit 2b03f76
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions crux.el
Original file line number Diff line number Diff line change
Expand Up @@ -313,8 +313,6 @@ buffer is not visiting a file."
(crux-file-owned-by-user-p buffer-file-name))
(crux-find-alternate-file-as-root buffer-file-name)))

(add-hook 'find-file-hook #'crux-reopen-as-root)

(defun crux-insert-date ()
"Insert a timestamp according to locale's date and time format."
(interactive)
Expand Down

0 comments on commit 2b03f76

Please sign in to comment.