-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Option to automatically chmod .ghci files that GHCi ignores
.ghci files are a convenience facility. GHCi decides out of security concerns that it will simply ignore convenience files. For an interactive application, this is pretty stupid. The better approach is the approach that Emacs takes, which is to prompt the user and allow them to decide conveniently. This patch collects all files that GHCi warns that it has ignored into a list, the user is given a message like this: GHCi is ignoring: /home/chris/foo (run M-x haskell-process-unignore) GHCi is ignoring: /home/chris/foo/.ghci (run M-x haskell-process-unignore) When they run `M-x haskell-process-unignore', they get: Set permissions? /home/chris/foo/.ghci (y, n, v: stop and view file) y Permissions command: chmod 700 /home/chris/foo/.ghci This allows the user to edit the permissions command per file, if desired, or they can just hit RET. They also have the option to stop this procedure and view the file first. At the end, it prompts the user to restart the process for the changes (if any) to take effect. This is not portable to Windows. There apparently is some command for Windows for setting permissions but it's difficult to know how reliable it is and I don't have a Windows machine to test on. Instead, I include a note in the function for Windows-using Emacs hackers to further extend it. @hvr might be of interest.
- Loading branch information
Showing
2 changed files
with
77 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters