haskell / haskell/haskell-mode
Unexpected interaction: haskell-process-load-file/haskell-interactive-mode-run-expr
- Dominant language
- Emacs Lisp
- Stars
- 1.4k
- Forks
- 354
- Avg merge
- 5d 10h
- Merged PRs (30d)
- 2
Description
haskell-mode version: 20151015
The following function when run in a buffer editing a Haskell file, say Main.hs, inserts a newline in Main.hs. If I remove the call to haskell-process-load-file, the problem goes away, but I lose the load-file functionality. The other load file functions behave similarly.
In my haskell-mode-hook, the only setup is calling (interactive-haskell-mode). I have tested this with emacs -q to verify that it's not an interaction with other state in my environment.
```
(defun haskell-run-main ()
(interactive)
(haskell-process-load-file)
(let* ((session (haskell-interactive-session))
(buffer (haskell-session-interactive-buffer session))
(with-current-buffer buffer
(haskell-interactive-mode-run-expr "main"))))
```
Contributor guide
Research direction
Reproduce the issue with the provided haskell-run-main function under emacs -q, focusing on haskell-process-load-file and haskell-interactive-mode-run-expr. Trace how loading Main.hs changes the current buffer and verify that running main no longer inserts an unwanted newline while preserving load-file functionality.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- emacs-lisp
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100