haskell / haskell/haskell-mode
Improve error handling of exec of external programs if they are absent and handle list of params
- Dominant language
- Emacs Lisp
- Stars
- 1.4k
- Forks
- 354
- Avg merge
- 5d 10h
- Merged PRs (30d)
- 2
Description
When haskell-mode tries to execute external program, the executable might not be found in PATH or for some other reason executing it might be impossible. Common issues are a mismatch between shell PATH and Emacs PATH or access rights.
We get regular reports of confused users why haskell mode is not able to execute programs.
Basically we need to render this page useless:
https://github.com/haskell/haskell-mode/wiki/PATH
We would like to have more informative error handling in case an external program cannot be executed, with clear presentation to the user.
Tasks to do:
- [ ] implement exec function that handles errors `haskell-mode-start-process`
- [ ] exec function should detect when external program is absent
- [ ] it should use `display-error` with information about
- [ ] what program we looked for
- [ ] which customization variable can be used to adjust it
- [ ] what is the current `PATH` or `exec-path` variable
- [ ] info that `PATH` may differ if Emacs was run from command line vs from GUI
- [ ] change all invocations to use this canned procedure
- [ ] customization variable should accept both `string` and `(list string)` as its type
- [ ] remove wiki page
When customization variable is a string then it is just path to executable, if it is a list then first element is path to exec, rest is cmd line arguments that should go jsut after executable. Note: this should _never_ go through any kind of shell, this is a recipe for a disaster.
Contributor guide
Assessment
This issue has not been assessed yet.