Emacs repl sub prompt problems
- Dominant language
- Haskell
- Stars
- 6k
- Forks
- 187
- Avg merge
- 8d 22h
- Merged PRs (30d)
- 4
Description
When using the Carp repl via emacs mode, the "sub prompt" (which currently is five spaces, defined in Repl.hs, line 130) is echoed leading to buggy/messy output, like this:
```
鲤
鲤
```
The alignment issue comes from evaluating a form with line breaks, which activates the sub prompt (printing a bunch of spaces). The idea behind the sub prompt in a normal repl (in the terminal) is to let the user enter multi line expressions in a nice looking way.
In `inf-carp-mode.el` (in the `emacs` dir of the Carp repo) there are two variables with regexps that are supposed to match and remove these spaces:
```elisp
inf-carp-prompt
inf-carp-subprompt
```
But for some reason they don't work. If any emacs expert has the time to look into this it would be great!
Contributor guide
Research direction
Read emacs/inf-carp-mode.el and Repl.hs around line 130, then reproduce a multiline form through Emacs Carp REPL mode. Inspect inf-carp-prompt and inf-carp-subprompt while checking how the REPL emits the sub prompt. Done means multiline output no longer echoes the five-space sub prompt or becomes misaligned.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- emacs, emacs-lisp, haskell
- Domain
- cli, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100