From: john muhl via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Noah Peart <noah.v.peart@gmail.com>
Cc: 67616@debbugs.gnu.org
Subject: bug#67616: [PATCH] Fix: add comint hook locally in lua-ts-inferior-lua
Date: Mon, 04 Dec 2023 12:17:27 -0600 [thread overview]
Message-ID: <87r0k192pd.fsf@pub.pink> (raw)
In-Reply-To: <CAPVBTSckqHnegi4SqQ-vafpbTTw133iMST4JAO4WU-UZ6Q_65w@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 351 bytes --]
Noah Peart <noah.v.peart@gmail.com> writes:
> Yea, that looks good to me. Is it necessary to set
> `comint-use-prompt-regexp` to `t`?
> The behaviour of `comint-previous/next-prompt` seems better when
> that is nil.
> Thanks!
You’re right. I wasn’t able to get creative enough to merge them
into a single commit so it’s separate.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Fix-add-comint-hook-locally-in-lua-ts-inferior-lua.patch --]
[-- Type: text/x-patch, Size: 1758 bytes --]
From a354925d561725b1df310ca036519c26fb7f081a Mon Sep 17 00:00:00 2001
From: nverno <noah.v.peart@gmail.com>
Date: Sun, 3 Dec 2023 19:21:04 -0800
Subject: [PATCH] Fix: add comint hook locally in lua-ts-inferior-lua
* lisp/progmodes/lua-ts-mode.el (lua-ts-inferior-lua): Add
comint-preoutput-filter-functions hook locally. (bug#67616)
---
lisp/progmodes/lua-ts-mode.el | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/lisp/progmodes/lua-ts-mode.el b/lisp/progmodes/lua-ts-mode.el
index 7307a5b13f1..5318144a057 100644
--- a/lisp/progmodes/lua-ts-mode.el
+++ b/lisp/progmodes/lua-ts-mode.el
@@ -560,9 +560,7 @@ lua-ts-inferior-lua
(comint-read-input-ring t)
(add-hook 'comint-preoutput-filter-functions
(lambda (string)
- (if (or (not (equal (buffer-name) lua-ts-inferior-buffer))
- (equal string
- (concat lua-ts-inferior-prompt-continue " ")))
+ (if (equal string (concat lua-ts-inferior-prompt-continue " "))
string
(concat
;; Filter out the extra prompt characters that
@@ -576,7 +574,8 @@ lua-ts-inferior-lua
(group (* nonl))))
"\\1" string)
;; Re-add the prompt for the next line.
- lua-ts-inferior-prompt " "))))))
+ lua-ts-inferior-prompt " ")))
+ nil t)))
(select-window (display-buffer lua-ts-inferior-buffer
'((display-buffer-reuse-window
display-buffer-pop-up-frame)
--
2.41.0
[-- Attachment #3: 0001-Fix-comint-next-previous-prompt-in-lua-ts-mode.patch --]
[-- Type: text/x-patch, Size: 1140 bytes --]
From 939c0d0144551b664f03ea5ac9486c2f02f295e1 Mon Sep 17 00:00:00 2001
From: john muhl <jm@pub.pink>
Date: Mon, 4 Dec 2023 12:03:34 -0600
Subject: [PATCH] Fix comint-next/previous-prompt in lua-ts-mode
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
* lisp/progmodes/lua-ts-mode.el (lua-ts-inferior-lua): Don’t set
`comint-use-prompt-regexp'. (bug#67616)
---
lisp/progmodes/lua-ts-mode.el | 1 -
1 file changed, 1 deletion(-)
diff --git a/lisp/progmodes/lua-ts-mode.el b/lisp/progmodes/lua-ts-mode.el
index 5318144a057..cbf0e573e37 100644
--- a/lisp/progmodes/lua-ts-mode.el
+++ b/lisp/progmodes/lua-ts-mode.el
@@ -552,7 +552,6 @@ lua-ts-inferior-lua
(with-current-buffer lua-ts-inferior-buffer
(setq-local comint-input-ignoredups t
comint-input-ring-file-name lua-ts-inferior-history
- comint-use-prompt-regexp t
comint-prompt-read-only t
comint-prompt-regexp (rx-to-string `(: bol
,lua-ts-inferior-prompt
--
2.41.0
next prev parent reply other threads:[~2023-12-04 18:17 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-04 3:26 bug#67616: [PATCH] Fix: add comint hook locally in lua-ts-inferior-lua Noah Peart
2023-12-04 4:18 ` john muhl via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-12-04 7:58 ` Noah Peart
2023-12-04 18:17 ` john muhl via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2023-12-16 9:39 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87r0k192pd.fsf@pub.pink \
--to=bug-gnu-emacs@gnu.org \
--cc=67616@debbugs.gnu.org \
--cc=jm@pub.pink \
--cc=noah.v.peart@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.