emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#56110: closed (27+; switching from line-mode to char-mode)


From: GNU bug Tracking System
Subject: bug#56110: closed (27+; switching from line-mode to char-mode)
Date: Sun, 26 Jun 2022 14:51:02 +0000

Your message dated Sun, 26 Jun 2022 16:49:49 +0200
with message-id <8735frqy2a.fsf@web.de>
and subject line Re: bug#56110: 27+; switching from line-mode to char-mode
has caused the debbugs.gnu.org bug report #56110,
regarding 27+; switching from line-mode to char-mode
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
56110: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=56110
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: 27+; switching from line-mode to char-mode Date: Mon, 20 Jun 2022 10:20:05 -0400
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.

See also:
https://lists.gnu.org/archive/html/help-gnu-emacs/2022-06/msg00452.html



--- End Message ---
--- Begin Message --- Subject: Re: bug#56110: 27+; switching from line-mode to char-mode Date: Sun, 26 Jun 2022 16:49:49 +0200 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)
Stefan Monnier <monnier@iro.umontreal.ca> writes:

> Personally, I prefer using `add/remove-function` and stop worrying about
> those risks.  After all, that's part of the reason why I developed them.

Ok - I have now installed this fix:

From edf6f5d0cae97de10c914c6e94dc5b35f06ec33c 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] Fix Bug#56110 (switching from line-mode to char-mode)

* lisp/term.el (term-char-mode): Make `add-function' override the
correct place (the buffer local variable `term-input-sender').
---
 lisp/term.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lisp/term.el b/lisp/term.el
index 94bf13e973..a8e44b4c34 100644
--- a/lisp/term.el
+++ b/lisp/term.el
@@ -1467,10 +1467,10 @@ term-char-mode
       (when (> (point) pmark)
        (unwind-protect
            (progn
-             (add-function :override term-input-sender #'term-send-string)
+             (add-function :override (local 'term-input-sender) 
#'term-send-string)
              (end-of-line)
              (term-send-input))
-         (remove-function term-input-sender #'term-send-string))))
+         (remove-function (local 'term-input-sender) #'term-send-string))))
     (term-update-mode-line)))

 (defun term-line-mode  ()
--
2.30.2

Thanks,

Michael.

--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]