From: Michael Heerdegen <michael_heerdegen@web.de>
To: "C. Michailidis" <signal3@gmail.com>
Cc: 56110@debbugs.gnu.org, Stefan Monnier <monnier@iro.umontreal.ca>
Subject: bug#56110: 27+; switching from line-mode to char-mode
Date: Tue, 21 Jun 2022 13:47:27 +0200 [thread overview]
Message-ID: <87wndaw84w.fsf@web.de> (raw)
In-Reply-To: <875ykvs9gq.fsf@electra.home.arpa> (C. Michailidis's message of "Mon, 20 Jun 2022 10:20:05 -0400")
[-- Attachment #1: Type: text/plain, Size: 680 bytes --]
"C. Michailidis" <signal3@gmail.com> writes:
> I recently updated a few machines and noticed that term.el in Emacs
> version 27+ forcibly submits my pasted commands to the shell sub-process
> when switching to char-mode (from line-mode). In prior versions of Emacs
> term.el didn't do this; I could further modify the command in char-mode
> even if it was pasted from line-mode and submit it myself by pressing
> enter.
Thanks for the report.
This issue is a side effect of this change:
5653b76d0b * lisp/term.el: Fix minor compilation issues with cl-lib and lexbind
Stefan Monnier <monnier@iro.umontreal.ca> 2019-02-24
When I revert the part that changes `term-char-mode':
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-WIP-Fix-56110.patch --]
[-- Type: text/x-diff, Size: 1230 bytes --]
From 3ebb78f622453623a406d4413cbee421ae57ad84 Mon Sep 17 00:00:00 2001
From: Michael Heerdegen <michael_heerdegen@web.de>
Date: Tue, 21 Jun 2022 13:41:51 +0200
Subject: [PATCH] WIP: Fix 56110
---
lisp/term.el | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/lisp/term.el b/lisp/term.el
index 94bf13e973..eec78707e7 100644
--- a/lisp/term.el
+++ b/lisp/term.el
@@ -1463,14 +1463,16 @@ term-char-mode
(add-hook 'post-command-hook #'term-goto-process-mark-maybe nil t)
;; Send existing partial line to inferior (without newline).
- (let ((pmark (process-mark (get-buffer-process (current-buffer)))))
+ (let ((pmark (process-mark (get-buffer-process (current-buffer))))
+ (save-input-sender term-input-sender))
(when (> (point) pmark)
(unwind-protect
(progn
- (add-function :override term-input-sender #'term-send-string)
+ (setq term-input-sender
+ (symbol-function 'term-send-string))
(end-of-line)
(term-send-input))
- (remove-function term-input-sender #'term-send-string))))
+ (setq term-input-sender save-input-sender))))
(term-update-mode-line)))
(defun term-line-mode ()
--
2.30.2
[-- Attachment #3: Type: text/plain, Size: 113 bytes --]
the original behavior is restored.
Stefan, how would a fix look like that fits your intention?
TIA,
Michael.
next prev parent reply other threads:[~2022-06-21 11:47 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-20 14:20 bug#56110: 27+; switching from line-mode to char-mode C. Michailidis
2022-06-21 11:47 ` Michael Heerdegen [this message]
2022-06-21 12:20 ` Michael Heerdegen
2022-06-22 17:23 ` Michael Heerdegen
2022-06-22 19:22 ` signal3
2022-06-22 21:14 ` Basil L. Contovounesios via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-06-22 22:23 ` signal3
2022-06-23 0:02 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-06-23 16:56 ` Michael Heerdegen
2022-06-23 21:45 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-06-25 12:17 ` Michael Heerdegen
2022-06-26 8:17 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-06-26 11:24 ` Michael Heerdegen
2022-06-26 12:23 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-06-26 13:04 ` Michael Heerdegen
2022-06-26 15:15 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-06-26 14:49 ` Michael Heerdegen
2022-06-26 15:08 ` Andreas Schwab
2022-06-26 15:30 ` Michael Heerdegen
2022-06-26 16:01 ` signal3
2022-06-26 18:00 ` Michael Heerdegen
2022-06-26 18:39 ` Michael Heerdegen
2022-06-26 18:40 ` Lars Ingebrigtsen
2022-06-26 18:44 ` Michael Heerdegen
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87wndaw84w.fsf@web.de \
--to=michael_heerdegen@web.de \
--cc=56110@debbugs.gnu.org \
--cc=monnier@iro.umontreal.ca \
--cc=signal3@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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).