Description
Multi-line input containing blank lines is truncated to just the first line when comint-use-prompt-regexp and comint-eol-on-send are both t.
Example: sending "First sentence\n\nSecond sentence" results in only "First sentence" being sent to the process.
Root cause
In Emacs 30's comint-send-input, when comint-use-prompt-regexp is t and comint-eol-on-send is t, the function calls (end-of-line) (instead of (goto-char (field-end))) to position point before capturing input. If point starts at the process mark (not at point-max), (end-of-line) only moves to the end of the first line, truncating the rest.
;; comint-send-input in Emacs 30:
(if comint-eol-on-send
(if comint-use-prompt-regexp
(end-of-line) ;; ← truncates at first newline
(goto-char (field-end)))) ;; ← works correctly
In shell-maker-submit, point is conditionally moved to point-max only when (shell-maker-point-at-last-prompt-p) returns nil. When point is at the process mark (right after the prompt, before the input text), the predicate returns t, so goto-char is skipped. This leaves point at the process mark, where (end-of-line) only captures the first line.
Fix
PR #37: unconditionally move to point-max before calling comint-send-input in shell-maker-submit.
Workaround
Users can set comint-use-prompt-regexp to nil in the shell-maker buffer, or ensure point is at point-max before submitting.
Description
Multi-line input containing blank lines is truncated to just the first line when
comint-use-prompt-regexpandcomint-eol-on-sendare botht.Example: sending "First sentence\n\nSecond sentence" results in only "First sentence" being sent to the process.
Root cause
In Emacs 30's
comint-send-input, whencomint-use-prompt-regexpistandcomint-eol-on-sendist, the function calls(end-of-line)(instead of(goto-char (field-end))) to position point before capturing input. If point starts at the process mark (not at point-max),(end-of-line)only moves to the end of the first line, truncating the rest.In
shell-maker-submit, point is conditionally moved topoint-maxonly when(shell-maker-point-at-last-prompt-p)returns nil. When point is at the process mark (right after the prompt, before the input text), the predicate returns t, sogoto-charis skipped. This leaves point at the process mark, where(end-of-line)only captures the first line.Fix
PR #37: unconditionally move to
point-maxbefore callingcomint-send-inputinshell-maker-submit.Workaround
Users can set
comint-use-prompt-regexptonilin the shell-maker buffer, or ensure point is atpoint-maxbefore submitting.