GNU bug report logs - #56110
27+; switching from line-mode to char-mode

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: "C. Michailidis" <signal3@HIDDEN>; Done: Michael Heerdegen <michael_heerdegen@HIDDEN>; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 56110 <at> debbugs.gnu.org:


Received: (at 56110) by debbugs.gnu.org; 26 Jun 2022 15:30:17 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jun 26 11:30:17 2022
Received: from localhost ([127.0.0.1]:48723 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1o5UDI-0005FY-V0
	for submit <at> debbugs.gnu.org; Sun, 26 Jun 2022 11:30:17 -0400
Received: from mout.web.de ([217.72.192.78]:50927)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <michael_heerdegen@HIDDEN>) id 1o5UDE-0005EA-EJ
 for 56110 <at> debbugs.gnu.org; Sun, 26 Jun 2022 11:30:16 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de;
 s=dbaedf251592; t=1656257404;
 bh=XQFIRjN8fDjlt+84J6Oo3d9JmrroXK7Nd7oJj3qT2AA=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To;
 b=B39txWJ3DNxmappaKBETAfFTKsIgHxGsTd0F+XOXws07bpBmxyhtOXgGh+n8d7HwU
 QkjNMgS+wlzKgaEj+Pz2dl3zV+zG2fZi95VsMyKvBEJHtG6BOZk6bUe5gdfCT+gOsU
 uJ5Qti5orDfXmT8f1b6H3UdAul3RXwESSDqHgqfc=
X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9
Received: from drachen.dragon ([88.66.201.45]) by smtp.web.de (mrweb105
 [213.165.67.124]) with ESMTPSA (Nemesis) id 1MkVsa-1nN2Is0QPu-00mJTo; Sun, 26
 Jun 2022 17:30:04 +0200
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
To: Andreas Schwab <schwab@HIDDEN>
Subject: Re: bug#56110: 27+; switching from line-mode to char-mode
References: <875ykvs9gq.fsf@HIDDEN> <87wndaw84w.fsf@HIDDEN>
 <87sfnyw6m7.fsf@HIDDEN> <877d58obnn.fsf@HIDDEN>
 <jwv1qvgqmeu.fsf-monnier+emacs@HIDDEN> <87k097mi81.fsf@HIDDEN>
 <jwvwnd7njko.fsf-monnier+emacs@HIDDEN> <8735frqy2a.fsf@HIDDEN>
 <87pmivcvi4.fsf@HIDDEN>
Date: Sun, 26 Jun 2022 17:30:03 +0200
In-Reply-To: <87pmivcvi4.fsf@HIDDEN> (Andreas Schwab's message of "Sun, 26
 Jun 2022 17:08:51 +0200")
Message-ID: <87tu87h284.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V03:K1:xd4V49+boPGV9C820sRiA4hD2GU2/Nj1t1rj8GWYP06Y+VbTyvB
 6NWTcaA+yG93w5mHzNT96It4mDSULIqy0jRoOdB4iTtgiW42FhjTf+VUIgC6yUONCQdimAf
 9I8uzQRPjG0t5AsiEGSkc4pVoe6Sdzvnngb+3Dqg5L+kUYZm658+PD13r2cGKAUJIEVJalU
 Lbuh5OA/7cow/9MyWstnQ==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:qPpZrsNkW28=:uqyomiPd+4QEszYFnSSj8s
 GQXbv+S7HZpyMEMAOnJLcqMrBPwkmoh+2fCqpqqEjtdVbrHmAjyZxCYXzANJ8eYDMoIUGld3x
 Z/xC3z4mIF55g3w1NLxzlQXGxIthaOZrw9TJrMhjjfq6TOJeU6HKYvXV4aeRDiZV6UsiK56/8
 fF0sIABLZiH4WRMRd4lDTOAuuzh9Dv0cI5zDxf4pgVrrtDhm1zwaSHbMbBXLOg7eFLkgnUPVv
 E2xu0+YpxIqeyfGkK0T8hHtGJ74MCUJcYlLeC0xWNQNpwInzUVKaKWbjWzfq+/nA3cRtBqxw+
 4btEmHRryvFcirxlkhavdOKOLX7ry5FQBsljcw2c+w0S265qY8scjFwYgLpdsFkTyVM1d0Z1X
 Na7Y81KYeDid7UT9kQA0I/ftH9ydm4T4VIdYLQrqcSJZZI7QQ9adId5stlwNwCCk4fUHt9hcf
 D0Hw9d+L1uC2etDQe3gEOKrAlmwAhoxI2oiNXzwGmgMdovoKqNp9CeBXq7MAb6vYjdqbq+Nf/
 B6sNUmC0N75BSikCr/t/U907/zQtTEY9eCH5IF+1VVLt9itTZbrKdZHge1aSPCMLdKbCCfXs/
 DAMnUOT1RxT6SG2ogJoIKgtpypPYwrfAoOPPsHyRa/xFi3iSMFX19aDfCc5pjrv0cYIoNW7zd
 loGqwPWPkDV4E045fOMEdtmtPaP1LiClY54XsDh8FQmibi3X44qPMFpAntTswQy54I5I/YMiK
 Fs+AhXH5iOr07OnyWQJ0HxISAIHmFe2C6Z1/cuM9kGASSleuOuCIz8eb9lLs0/hFoisnmgU4F
 xr3YoRjwLkORMy96B8ZA47zJ31ZqPZOhzmONA+S026VfcS27XAfK50qOCewHrU/8dLO7t2eSn
 2pW8FVCF/uf5TXwNDcJMioxUbLRxEI2l22E+cqaJm55uzGMb5dwgo88Ve/EzCaV+JToSCh36G
 b72v1VLuQc3/v9/cwrFeUbJ0Mpn869swSbQgm90LZ767EbAuZ8VZ2jmxqYlGg6rPv8D3uXo7H
 2k2vKjrbkMApQ0yxO9bzz9eCe06UPwftiXVU/Q6fTZZVtxgo6YvT24UpublkWky57Q5WPDIAy
 ayVedxPzOEggT726BWPJLE8YN30HUfv/D0Bk23rbCyvyOa2v1/rJzs3Gw==
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 56110
Cc: signal3@HIDDEN, 56110 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Andreas Schwab <schwab@HIDDEN> writes:

> Why can't that simply use let?

I asked the same question in <877d58obnn.fsf@HIDDEN> above in this bug's
thread.

Michael.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#56110; Package emacs. Full text available.

Message received at 56110 <at> debbugs.gnu.org:


Received: (at 56110) by debbugs.gnu.org; 26 Jun 2022 15:16:00 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jun 26 11:16:00 2022
Received: from localhost ([127.0.0.1]:48689 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1o5TzU-0003dy-39
	for submit <at> debbugs.gnu.org; Sun, 26 Jun 2022 11:16:00 -0400
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:29547)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <monnier@HIDDEN>) id 1o5TzQ-0003TP-1f
 for 56110 <at> debbugs.gnu.org; Sun, 26 Jun 2022 11:15:59 -0400
Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1])
 by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 4753D805C8;
 Sun, 26 Jun 2022 11:15:50 -0400 (EDT)
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 0793D80626;
 Sun, 26 Jun 2022 11:15:49 -0400 (EDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1656256549;
 bh=UZIh8PMhP2bmLdu6mVWrlYrHTDe4Eeffdivo36ODWi8=;
 h=From:To:Cc:Subject:References:Date:In-Reply-To:From;
 b=D5GL5B1oI9aBMMFcpq67r7BPZ2+9KUgnM2h/26wDqc+M6X6B2lL52jpOYm/BCN9MT
 LiGIRH8vsjgE5s+SrpaZQ+vSLZWSI+wnRamUcYU7RlNEQDP4EtlC7czAxU8lM63Lb+
 Oq+3fg8d26FsZuMNR16tsSatqNnqukFq6gyRxHZSfncPvsYEIBR4YZL+makNuYJ4uD
 KVd9Ijm0mvh5W+VnX5LQQKMBGpUyxvlYosvcE/2RE5XL1kJTRR+e7jTn4UO31lUJN6
 mkHGC+Oc87T8cRr+atOGFBLz6bngCQjg6zPNh7Dnv3a8mY1OJsV8o7RMeEsHDKP5P+
 YLrAKxy1aswrA==
Received: from alfajor (165.63.10.93.rev.sfr.net [93.10.63.165])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 4F9E71205A2;
 Sun, 26 Jun 2022 11:15:48 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: Michael Heerdegen <michael_heerdegen@HIDDEN>
Subject: Re: bug#56110: 27+; switching from line-mode to char-mode
Message-ID: <jwvwnd3a2b3.fsf-monnier+emacs@HIDDEN>
References: <875ykvs9gq.fsf@HIDDEN> <87wndaw84w.fsf@HIDDEN>
 <87sfnyw6m7.fsf@HIDDEN> <877d58obnn.fsf@HIDDEN>
 <jwv1qvgqmeu.fsf-monnier+emacs@HIDDEN> <87k097mi81.fsf@HIDDEN>
 <jwvwnd7njko.fsf-monnier+emacs@HIDDEN> <87wnd5aqdq.fsf@HIDDEN>
 <jwvh747dew4.fsf-monnier+emacs@HIDDEN> <87bkuf8y6r.fsf@HIDDEN>
 <jwv8rpjbol4.fsf-monnier+emacs@HIDDEN> <877d538tkv.fsf@HIDDEN>
Date: Sun, 26 Jun 2022 11:15:46 -0400
In-Reply-To: <877d538tkv.fsf@HIDDEN> (Michael Heerdegen's message of "Sun, 26
 Jun 2022 15:04:00 +0200")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-SPAM-INFO: Spam detection results:  0
 ALL_TRUSTED                -1 Passed through trusted hosts only via SMTP
 AWL 0.139 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DKIM_SIGNED               0.1 Message has a DKIM or DK signature,
 not necessarily valid
 DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
 DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
 domain T_SCC_BODY_TEXT_LINE    -0.01 -
X-SPAM-LEVEL: 
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 56110
Cc: "C. Michailidis" <signal3@HIDDEN>, 56110 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

>> > Simply speaking I meant one has to figure out whether one wants to
>> > `add-function' to var or to 'var.
>> `add-function` expects a "place", like `setf`.
> Thanks, I had an error in my mental model, partly induced by the SYMBOL
> without quote vs. (local 'SYMBOL) with quote thing.

Right, that's because for the argument to `local`, we can actually
accept any expression (i.e. an rvalue) as long as it returns a symbol
(just like for `(setf (car EXP) ..)` where can accept an expression EXP
as long as it returns a cons-cell).

I did hesitate to restrict the syntax to (local SYMBOL) because of the
asymmetry it between "SYMBOL" for the global case and "(local 'SYMBOL)"
for the local case, but there is no technical reason to restrict it
this way.

> Do we want a let-like environment (`let-function'?) that does the same
> as `add-function' temporarily?

I'm not sure it's common enough to be worthwhile.  But if we do, then
we'd also want to add something for the `add/remove-hook` version of
the problem.


        Stefan





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#56110; Package emacs. Full text available.

Message received at 56110 <at> debbugs.gnu.org:


Received: (at 56110) by debbugs.gnu.org; 26 Jun 2022 15:08:59 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jun 26 11:08:59 2022
Received: from localhost ([127.0.0.1]:48659 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1o5Tsh-0002UB-1j
	for submit <at> debbugs.gnu.org; Sun, 26 Jun 2022 11:08:59 -0400
Received: from mail-out.m-online.net ([212.18.0.9]:45155)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <whitebox@HIDDEN>) id 1o5Tsc-0002Tx-2V
 for 56110 <at> debbugs.gnu.org; Sun, 26 Jun 2022 11:08:57 -0400
Received: from frontend01.mail.m-online.net (unknown [192.168.8.182])
 by mail-out.m-online.net (Postfix) with ESMTP id 4LWDlS69VZz1qy4C;
 Sun, 26 Jun 2022 17:08:52 +0200 (CEST)
Received: from localhost (dynscan1.mnet-online.de [192.168.6.70])
 by mail.m-online.net (Postfix) with ESMTP id 4LWDlS3tLNz1qqkB;
 Sun, 26 Jun 2022 17:08:52 +0200 (CEST)
X-Virus-Scanned: amavisd-new at mnet-online.de
Received: from mail.mnet-online.de ([192.168.8.182])
 by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new,
 port 10024)
 with ESMTP id PUfCE1yLhUus; Sun, 26 Jun 2022 17:08:51 +0200 (CEST)
X-Auth-Info: rMx3JCE+j+MhEgeH/tTaPKxU165tNLism92ae/c8Ge4rzat/sbK3//iOzF8TcsMa
Received: from igel.home (ppp-46-244-183-26.dynamic.mnet-online.de
 [46.244.183.26])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (No client certificate requested)
 by mail.mnet-online.de (Postfix) with ESMTPSA;
 Sun, 26 Jun 2022 17:08:51 +0200 (CEST)
Received: by igel.home (Postfix, from userid 1000)
 id 37B062C3A04; Sun, 26 Jun 2022 17:08:51 +0200 (CEST)
From: Andreas Schwab <schwab@HIDDEN>
To: 56110 <at> debbugs.gnu.org
Subject: Re: bug#56110: 27+; switching from line-mode to char-mode
References: <875ykvs9gq.fsf@HIDDEN> <87wndaw84w.fsf@HIDDEN>
 <87sfnyw6m7.fsf@HIDDEN> <877d58obnn.fsf@HIDDEN>
 <jwv1qvgqmeu.fsf-monnier+emacs@HIDDEN> <87k097mi81.fsf@HIDDEN>
 <jwvwnd7njko.fsf-monnier+emacs@HIDDEN> <8735frqy2a.fsf@HIDDEN>
X-Yow: I want another RE-WRITE on my CAESAR SALAD!!
Date: Sun, 26 Jun 2022 17:08:51 +0200
In-Reply-To: <8735frqy2a.fsf@HIDDEN> (Michael Heerdegen's message of "Sun, 26
 Jun 2022 16:49:49 +0200")
Message-ID: <87pmivcvi4.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.5 (/)
X-Debbugs-Envelope-To: 56110
Cc: michael_heerdegen@HIDDEN, signal3@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.5 (-)

On Jun 26 2022, Michael Heerdegen wrote:

> 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)))

Why can't that simply use let?

-- 
Andreas Schwab, schwab@HIDDEN
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#56110; Package emacs. Full text available.

Message received at 56110-done <at> debbugs.gnu.org:


Received: (at 56110-done) by debbugs.gnu.org; 26 Jun 2022 14:50:04 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jun 26 10:50:04 2022
Received: from localhost ([127.0.0.1]:48563 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1o5TaO-00089U-JF
	for submit <at> debbugs.gnu.org; Sun, 26 Jun 2022 10:50:04 -0400
Received: from mout.web.de ([212.227.15.4]:43759)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <michael_heerdegen@HIDDEN>) id 1o5TaJ-00088g-NV
 for 56110-done <at> debbugs.gnu.org; Sun, 26 Jun 2022 10:50:02 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de;
 s=dbaedf251592; t=1656254990;
 bh=OgdILGEsT/KgLrR/Ph3foOAPvdBUKopraGkO8expThc=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To;
 b=MT1ZbD9W65ZeVEvPXdqytCAB6bfOaBZ5fWnK6loqZDFzY6TMsRMGSGkIBQV+qtZqh
 a9Rr5Zb5T3Ga5cM9wGRedfFjdLlQdWx6mziHQzU/gswqZvLJYjG4yunyCAa222+itV
 hmx3tOTYAatLlKCKIHjRD8r6GIqtA3jze6Onlkf4=
X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9
Received: from drachen.dragon ([88.66.201.45]) by smtp.web.de (mrweb006
 [213.165.67.108]) with ESMTPSA (Nemesis) id 1MJWsm-1oKobe12Lo-00JxTR; Sun, 26
 Jun 2022 16:49:50 +0200
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
Subject: Re: bug#56110: 27+; switching from line-mode to char-mode
References: <875ykvs9gq.fsf@HIDDEN> <87wndaw84w.fsf@HIDDEN>
 <87sfnyw6m7.fsf@HIDDEN> <877d58obnn.fsf@HIDDEN>
 <jwv1qvgqmeu.fsf-monnier+emacs@HIDDEN> <87k097mi81.fsf@HIDDEN>
 <jwvwnd7njko.fsf-monnier+emacs@HIDDEN>
Date: Sun, 26 Jun 2022 16:49:49 +0200
In-Reply-To: <jwvwnd7njko.fsf-monnier+emacs@HIDDEN> (Stefan Monnier's message
 of "Thu, 23 Jun 2022 17:45:55 -0400")
Message-ID: <8735frqy2a.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Provags-ID: V03:K1:ag//ZSHjiV6tkPLPjzgvYzeMC/bjkEnTR6Xv3nYi274EKJ/kazV
 mgauFIvuRx195H2SMM9hjcCDGZTezM8kPC28AdhUm+aLrPNusLE/0iCQpUMovCPmNsM9ruS
 gSapsCP3nsWYZzQPW2v19CI2oTEkCLAlHRCa+TmlqPbyaFMpIMTh/JI58p4xoMLZ7mcWq+S
 9bjQTMKAwA/nnw45X/d9A==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:TAg38SAiG2w=:vhRzL39/JDxSo9u/v6u0H2
 oEOX/+qcR8/cE3l9ExG0AAUlQAJJIJIW8a3/7v0XQSIFjmsEWgoWySF2cwS7GEW1kaNR38LSY
 KLHx/9c4es3wWSWAZvAK4f8Ci59EuLtG63t/gL5ikdntI6CFuw+vbDgeZBZ0qlilqDbrAh0PQ
 Lfuny8PlLzPdnNBh8z/lKx/+i8L9pkn0Br0iSgB8sjqnjJEeMO0fQZb2LAd+ShVDk1NHx1h0V
 lx5GbpVbBadeMb3oNRK6xO2gUB7RkwPdqtDfR9ohfq+S6Sbtq4bxOKSwhxQV6gIhtBFica05N
 Q6KGcPgahox8UPc9Z8h7IMxudNAxWIw08glSgma3vhZHxaok9ioRbXF4JJZpJdgCQrYsisqAl
 CnqjMTtdMBWda+xxocGH5ynClkweIF5AuMqqS+q4iQJ5qjsAbigl99mdqtci/lMtevS+mTys8
 tatCqaRyFOVUHYqRIaueX7gSniBQsjYWD43VEU0WqdRjnQG9vCFRuYfgYDKlXmiJ0oivnmt1t
 gmXm8bSjXh1kZVVt9cs/0pC8kF/VIoYXvRASKsmqe1mtCaSqb17roGtysE4MG4iWAFim+bTKy
 bG6VF7rvIT7sdFtJQhApcrnasbhzr1YuUWc3KR54QHPl7+q1r+UV/EXb3s9sSVc40yfqafjpP
 I40FSZYGJRboEAyDMqzcswh19nPls2iEytpfXNoL+7g+ucW6+07dVVKf2Nos5FNSyQp7O0wLj
 fwj6QoFeJ2cjDfrhSuytWv+Sn8m8qluinzZduwKQ9+i2oQht5HVV56Ue2J1X/sBEv+mhC/Xse
 m9lT5e3C4QvD1unnaC5gYgp1lYO7qVcc1tdL63n1ZqeC+PoSo+UfJKSEHvpLzsWfZnBwI/Y6O
 +xI38cA+8lkDbkNiF3KLVzGazSfBgQVchGPa2oIqWBMLi4bHtaJ+LrI5cLKbIB0tZ48NNFi0Y
 hfSaVsyf1/q0L4mGZevvWBd5sSwgtxddenYjnKsbAW8ZkrlcaVF0bJ9E+4Jur6fno7FzSre15
 ZnVy/iMPWCoFAvPFOPGt21vLpslIaAMepXa2gQEk4bdBuHl3DiStlSN5i/QAhSt8MKovQ8hd7
 t1HqwedRSrDtH9SYsZ3QUQfVxg4z9LnvENNap474lPjIQMdW1/WRRbUMw==
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 56110-done
Cc: "C. Michailidis" <signal3@HIDDEN>, 56110-done <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

--=-=-=
Content-Type: text/plain

Stefan Monnier <monnier@HIDDEN> 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:


--=-=-=
Content-Type: text/x-diff
Content-Disposition: inline;
 filename=0001-Fix-Bug-56110-switching-from-line-mode-to-char-mode.patch
Content-Transfer-Encoding: quoted-printable

=46rom edf6f5d0cae97de10c914c6e94dc5b35f06ec33c Mon Sep 17 00:00:00 2001
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
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').
=2D--
 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
=2D-- 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-str=
ing)
 	      (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  ()
=2D-
2.30.2


--=-=-=
Content-Type: text/plain


Thanks,

Michael.

--=-=-=--




Notification sent to "C. Michailidis" <signal3@HIDDEN>:
bug acknowledged by developer. Full text available.
Reply sent to Michael Heerdegen <michael_heerdegen@HIDDEN>:
You have taken responsibility. Full text available.

Message received at 56110 <at> debbugs.gnu.org:


Received: (at 56110) by debbugs.gnu.org; 26 Jun 2022 13:04:14 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jun 26 09:04:14 2022
Received: from localhost ([127.0.0.1]:46924 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1o5Rvy-0002sQ-0t
	for submit <at> debbugs.gnu.org; Sun, 26 Jun 2022 09:04:14 -0400
Received: from mout.web.de ([212.227.15.3]:36461)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <michael_heerdegen@HIDDEN>) id 1o5Rvu-0002sA-L3
 for 56110 <at> debbugs.gnu.org; Sun, 26 Jun 2022 09:04:13 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de;
 s=dbaedf251592; t=1656248641;
 bh=lFnGzjkViN/yDmw/dcLylPax/Hp3/xV/mYxv/9SJPC0=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To;
 b=jIW42XaSRClgy0i0B7aRlw/DA3RdXC2UFO1ODDZd4/qndhwwyeISdcJb54cvazfei
 u7FHF5kvN4mIr50il0ZPlH4tDEZl7JHDRZjVsyZ0zquT022U4QtVvzFvdCVoAttlo8
 WtRiTvkBa6S3nlPKd//BaxfqldNzd4iDaWixQI6U=
X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9
Received: from drachen.dragon ([88.66.201.45]) by smtp.web.de (mrweb006
 [213.165.67.108]) with ESMTPSA (Nemesis) id 1MIL4K-1ntN7l2hdc-00EY3Y; Sun, 26
 Jun 2022 15:04:01 +0200
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
Subject: Re: bug#56110: 27+; switching from line-mode to char-mode
References: <875ykvs9gq.fsf@HIDDEN> <87wndaw84w.fsf@HIDDEN>
 <87sfnyw6m7.fsf@HIDDEN> <877d58obnn.fsf@HIDDEN>
 <jwv1qvgqmeu.fsf-monnier+emacs@HIDDEN> <87k097mi81.fsf@HIDDEN>
 <jwvwnd7njko.fsf-monnier+emacs@HIDDEN> <87wnd5aqdq.fsf@HIDDEN>
 <jwvh747dew4.fsf-monnier+emacs@HIDDEN> <87bkuf8y6r.fsf@HIDDEN>
 <jwv8rpjbol4.fsf-monnier+emacs@HIDDEN>
Date: Sun, 26 Jun 2022 15:04:00 +0200
In-Reply-To: <jwv8rpjbol4.fsf-monnier+emacs@HIDDEN> (Stefan Monnier's message
 of "Sun, 26 Jun 2022 08:23:57 -0400")
Message-ID: <877d538tkv.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V03:K1:d0o6V9EeH24t28q+lYfJQDm7kvlkHHswWD9J+3EHHd+aUPUwe6q
 obPfjpdA/WVjsXeQMPPxTgHC9s/RexzG1SM1c7eoKE4t7K1z36BH1zNAFURzc2ozAb4Xr6i
 sBGGFy+VQzEWFvuhioMx/8xETEIcpFqP/UeYVkPU85oOGM8qEOun3dXjQtJwxB/309cxYmx
 VYgWucsMEFnH8QgtaHbjQ==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:X1n4Vq7Bo8w=:MI+3kxL/OgmFpzuSg7wAcA
 j74cJg1hWGBF+Y/5b69a0VQ25ZGJe+XTYNA4oakls2jkOTTBR/gHdU8qaTwXfVePnkLZaq+xw
 iVnVfWaUb4dlPzbm1eBSIKI8uqQuwGMq9G5sPAEBXP7sZFcruQPcgpin3neZfPAVf9ZwJVxiB
 wLikvtEAgVraNJVbm6807mHmTTXvr4ihMwkSjn5atyvzeYsRzbb7pV5BVa/g80VhaSAUjGJR6
 OwxVkrOWBOFnoS/8rp+EHllS6RXhL4acliJicZbUq3ydJvj4Rsb7c0XO4nCxBgCKicJi9lys2
 Y6tNxlEwWcDwE/JVTl1rTfrE0vcHNxzU1IQ3+5EYScFEmcGABzP0NvhtElBGGQQE32ty1qSNI
 zFI2QbStuBC7L+S3H/mYtsu2eNlBRhKK4PPuynnNGpxtHE7dKYM8Hj6c7BSCwcSqWPnG2Y74k
 c5a0HMUeeOY9qRGGby1UW7qftoL0ZoC6wE8hIfeNLNcezWbPzPlDLpa3NUHwWuDqN5uNB3UOi
 UibnrPhfiQqsDxzaupKFu/ppPpGyZTM01Il2uA4ZzEUNrE3sgf+cXiIeEdlcK3+KK/oItupOy
 TZeoNBKe+tONQ9H/x0rHfNWGz3oGZIQUv6lIjO86wk8ckCmjbHvDn7HysD+4/jIZx4SJtufuU
 2JFU/ggka5AwDvRW+7z2hTDRYoDZmOF+tQppdd8My/xHfv7YySfgbAXcZ8vE09Dd7SePPlO0S
 NRnLm2pAFwilujNIBVm5LZqH6eEUq/vjxOzJKuTVQGX2YQxbIIrBpa6h+gCuiMVvF+hmPFalr
 J+bngbhbnwei7ty0Jn4wZ/5mnOVYVY+wUEZzA8ruQhZSqGKyyNoou1yNuibxa22sSzVvuO1Uk
 nFx7jT/LhNraBDEQXFX8hOhEc32oYuDbPG7gTy4BpEOm/Oha/b0pCoOAO+LdoX3TK2DqESqHO
 /6CQwixb0w15+A0I4LE97qDZedTcmH8o/kLUGBZSOx6ERpHMMcsINrYVO8ElkYZ6Gu0wT9nB4
 3R9N3gJ4bzke/3sNIBOQlwBaG1N3/0eNRAiS3nxI89Zm6cU8Q2clKajCuc0XyGGs2w9LFkuvo
 fkooP7hhoe0tvWXk7qPWKIsr7LWhQoLgXUaYdldGvWj+uJ0CYuBcCRdnA==
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 56110
Cc: "C. Michailidis" <signal3@HIDDEN>, 56110 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Stefan Monnier <monnier@HIDDEN> writes:

> > Simply speaking I meant one has to figure out whether one wants to
> > `add-function' to var or to 'var.
>
> `add-function` expects a "place", like `setf`.

Thanks, I had an error in my mental model, partly induced by the SYMBOL
without quote vs. (local 'SYMBOL) with quote thing.

Do we want a let-like environment (`let-function'?) that does the same
as `add-function' temporarily?

Michael.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#56110; Package emacs. Full text available.

Message received at 56110 <at> debbugs.gnu.org:


Received: (at 56110) by debbugs.gnu.org; 26 Jun 2022 12:24:08 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jun 26 08:24:08 2022
Received: from localhost ([127.0.0.1]:46885 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1o5RJA-0005wi-Id
	for submit <at> debbugs.gnu.org; Sun, 26 Jun 2022 08:24:08 -0400
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:40231)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <monnier@HIDDEN>) id 1o5RJ8-0005wF-P7
 for 56110 <at> debbugs.gnu.org; Sun, 26 Jun 2022 08:24:07 -0400
Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1])
 by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 4EF7180699;
 Sun, 26 Jun 2022 08:24:01 -0400 (EDT)
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id B697280626;
 Sun, 26 Jun 2022 08:23:59 -0400 (EDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1656246239;
 bh=zTbQ8BVh21X7k90TiAaF5ZXaSE+QU61tmsr9Tx0ZQRI=;
 h=From:To:Cc:Subject:References:Date:In-Reply-To:From;
 b=KELRwwDpgoS4nVgvnkRJLBLzgxkCYCmfiki0Fpi6dwqHiImiSeK0qm48MOtYzjSqg
 d73CIdzzc0lood9iANA8Ua0lm/phZxhEa1bXBjvIqExlaMkI/pfJ6ZIhGlLJpILUYr
 icG2fFWjwbVb0S16cMBBt8FkAVTO/2D0XHJl4hdt7zUJqZitkiqCLbYPmbMjx0NLlU
 piL0OTmpsKEErHgcXA3eWJI7mJjhs4ZBefzC8lLkWosli/uGbL+DTLAeJYCMPGFpqa
 4OSCe6EgeWrjZjcthUKqn7H1610c9Hg/yqZ05Uje2BauUkvE7mgvu+Dhvqlui7y9rN
 kHJ+G158iIVqw==
Received: from alfajor (165.63.10.93.rev.sfr.net [93.10.63.165])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id EB540120388;
 Sun, 26 Jun 2022 08:23:58 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: Michael Heerdegen <michael_heerdegen@HIDDEN>
Subject: Re: bug#56110: 27+; switching from line-mode to char-mode
Message-ID: <jwv8rpjbol4.fsf-monnier+emacs@HIDDEN>
References: <875ykvs9gq.fsf@HIDDEN> <87wndaw84w.fsf@HIDDEN>
 <87sfnyw6m7.fsf@HIDDEN> <877d58obnn.fsf@HIDDEN>
 <jwv1qvgqmeu.fsf-monnier+emacs@HIDDEN> <87k097mi81.fsf@HIDDEN>
 <jwvwnd7njko.fsf-monnier+emacs@HIDDEN> <87wnd5aqdq.fsf@HIDDEN>
 <jwvh747dew4.fsf-monnier+emacs@HIDDEN> <87bkuf8y6r.fsf@HIDDEN>
Date: Sun, 26 Jun 2022 08:23:57 -0400
In-Reply-To: <87bkuf8y6r.fsf@HIDDEN> (Michael Heerdegen's message of "Sun, 26
 Jun 2022 13:24:28 +0200")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-SPAM-INFO: Spam detection results:  0
 ALL_TRUSTED                -1 Passed through trusted hosts only via SMTP
 AWL 0.232 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DKIM_SIGNED               0.1 Message has a DKIM or DK signature,
 not necessarily valid
 DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
 DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
 domain T_SCC_BODY_TEXT_LINE    -0.01 -
X-SPAM-LEVEL: 
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 56110
Cc: "C. Michailidis" <signal3@HIDDEN>, 56110 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Simply speaking I meant one has to figure out whether one wants to
> `add-function' to var or to 'var.

`add-function` expects a "place", like `setf`.


        Stefan





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#56110; Package emacs. Full text available.

Message received at 56110 <at> debbugs.gnu.org:


Received: (at 56110) by debbugs.gnu.org; 26 Jun 2022 11:24:44 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jun 26 07:24:43 2022
Received: from localhost ([127.0.0.1]:46849 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1o5QNf-0002Lk-OZ
	for submit <at> debbugs.gnu.org; Sun, 26 Jun 2022 07:24:43 -0400
Received: from mout.web.de ([212.227.17.12]:47415)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <michael_heerdegen@HIDDEN>) id 1o5QNa-0002LQ-Kp
 for 56110 <at> debbugs.gnu.org; Sun, 26 Jun 2022 07:24:42 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de;
 s=dbaedf251592; t=1656242669;
 bh=3DDUr0KDmIx509+BDLUNNnOnxnaL7Ao2zovSJbbVNAw=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To;
 b=giskQrpJbOh0d3G4xrm3hF3qg6y0MEBlS4Tr40b/LPjO4ko2IO9CBVWwbgzEQyrWm
 t7RygUkop7x8BIK+1HBPwNhqsGzdHrAdR1xo95d2SsTz4mgxWajznctbNO0J1aIH4F
 mYxRZSEvobq6SiDpYfZ99JWPAgsjz1fkGXXVpEPg=
X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9
Received: from drachen.dragon ([88.66.201.45]) by smtp.web.de (mrweb105
 [213.165.67.124]) with ESMTPSA (Nemesis) id 1N79N8-1nZeu90d5g-017omb; Sun, 26
 Jun 2022 13:24:29 +0200
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
Subject: Re: bug#56110: 27+; switching from line-mode to char-mode
References: <875ykvs9gq.fsf@HIDDEN> <87wndaw84w.fsf@HIDDEN>
 <87sfnyw6m7.fsf@HIDDEN> <877d58obnn.fsf@HIDDEN>
 <jwv1qvgqmeu.fsf-monnier+emacs@HIDDEN> <87k097mi81.fsf@HIDDEN>
 <jwvwnd7njko.fsf-monnier+emacs@HIDDEN> <87wnd5aqdq.fsf@HIDDEN>
 <jwvh747dew4.fsf-monnier+emacs@HIDDEN>
Date: Sun, 26 Jun 2022 13:24:28 +0200
In-Reply-To: <jwvh747dew4.fsf-monnier+emacs@HIDDEN> (Stefan Monnier's message
 of "Sun, 26 Jun 2022 04:17:26 -0400")
Message-ID: <87bkuf8y6r.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V03:K1:zA2X5ch7lwZmCrnCzI3yRx5oWFwYZvtmU5p0CqF9BG2EN/jFbdr
 qpF/uHST7WD/z+3LxBMl+fDmZ6lXkutrxUvV94gNxIaqo5C1VzSmoWo/BA7sda6dTw3zd24
 N59WKO9NuIB9YDLvrMZI5lq8Zl8kCiuzSKWd3aGxYNDkOvDRK55IlRrHuAV2EuoHkLm8bNb
 CV2RQiZgp3v3tN0BgF5Eg==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:DqoxUCa+pZ4=:iXE8AFFUvRR2swyv6/tL4N
 1Fq+O9hN02enpTRGuTGktsZCyWuhRQhfFozmd/bvivBWjuSrm9mABDf9kC3wo5S5h4DP02Pbn
 anCjPXB6eHF9JhxOk1EECc5HMub0MTcn+PYDCyWOQ9O7rW33HUO86qKd6WfsBWAQxk7NMafxa
 Yl3AzjtW2uXR2Q/Z58H4nAKacbX3he7vDA3xPuKMjiJoknDx52FMrW+FJZDDciJB8H5detni5
 MUsKUH9UOaheKOimDmFjOFjkaYmkd9CrR7nobdWjppWdWJq7DzU6m4nkRtFnG3YQJlFm7eU26
 MQtnGFJlVtaRlBYQM4E1FLqLxQZZPAAb1gKXf/Uh+dEhukatZRG50MD6CrrtB6hHInQDc7by9
 8uM+XXgDn3jaIfOshUwoSrBLMZ7PaR7bhRrV/2QLDUu6ZSWFddUhVYc9pbKvv2OFakxlUbNeF
 u93D0o2q8M9UbLPEsyoF4aQm101lgsep5DASVueGh1pXENG8U1lZs8hpwQdSsqijb7H8i/R2n
 j4uKj26PDX6k90L2472aEavp9C/LGhq8AMuVmzU3d0us/NHLEyy0LmEmr/0tRLziToWYZ3I8l
 drE4PMQUA4yuGhiklFQDpd6bQ9NBk8fWBxUe1SFMn2oxAPUGpdS1dgmGWh6SOr6TpbPeet24z
 qFbxlV2iYv1ch+7O+YWw9kpE4yHPsbuIr01zN4wXLKUVIXhzegnriVAFSxGJT3DoejS79R6Qv
 pMt0RM/XSwz9w/qi24KMjSZq8fdSUQJK+Hoez/v8fJ3uJkuOSLt3oSQ9w0haPf7Qzl2ll/hLy
 RcaYrd/W6Gana7luCAOBjvcoqO+5HNnEO7mYkxVSKlLbGuHS1nD8yu14JGBzsMJTXYLsiOhgU
 d03dS6VMSpMzdt21BQFCXjTG3uasSfWwZnTVgoqLIiY+se23DmB92uH8mE20XoH8+jo8DF/8k
 wV05GjNcFl6aqqx59Br3bhitGYGVEjNiDzIgTUZvua5iRoijGZhzuvC+GZ1o5PUWCRCYKe1H0
 MtSmuOnMp31Si2hmduThsAmKkVnt1QPLyRfGNbQx3F/CzC8vcmi0rVUJD2P2KYXr2qQ5j1jcY
 TjxXF39ZfzikQcW1qqMESx/vt5Weio22sKDh0f7RrnhaOm4oVy3FJN0Qw==
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 56110
Cc: "C. Michailidis" <signal3@HIDDEN>, 56110 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Stefan Monnier <monnier@HIDDEN> writes:

> > Then one has to figure out if the binding (variable), or the value is to
> > be modified.
>
> I don't understand what you mean by that.

Simply speaking I meant one has to figure out whether one wants to
`add-function' to var or to 'var.

Michael.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#56110; Package emacs. Full text available.

Message received at 56110 <at> debbugs.gnu.org:


Received: (at 56110) by debbugs.gnu.org; 26 Jun 2022 08:17:45 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jun 26 04:17:45 2022
Received: from localhost ([127.0.0.1]:46682 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1o5NSj-00060u-Bq
	for submit <at> debbugs.gnu.org; Sun, 26 Jun 2022 04:17:45 -0400
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:39163)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <monnier@HIDDEN>) id 1o5NSg-00060g-Qu
 for 56110 <at> debbugs.gnu.org; Sun, 26 Jun 2022 04:17:43 -0400
Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1])
 by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id C8834440858;
 Sun, 26 Jun 2022 04:17:36 -0400 (EDT)
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 89342440218;
 Sun, 26 Jun 2022 04:17:35 -0400 (EDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1656231455;
 bh=TRU9B1ndUtcQkN7U95fZzw1oqRr33mcSm44v62dhh4c=;
 h=From:To:Cc:Subject:References:Date:In-Reply-To:From;
 b=JzpPN0J2NdwlIUwri6wChaTVLrooj3qP3gNquPJtslwZ7Ju7Htdl4+BmCjONRhBY8
 gqhcZzwW9MQKbutQK9UFW7fpnLQeCzwfMIXaYyGynbxbvM+bF+PtU6kG/Qibg7SI/D
 QGGGjvN5DqCoeJtUILDiQVi4MFong+aAtd6odEqxdFEAx4A+weAMlBWSIkb4UtAQIK
 zmHcVyA+hpJ4Ic1ypN+zOggnQwlckx6r+TX87/62DEiJleuU5JYLxde2ZOf8aHpkEt
 El2XmodI125GeGsEtLJkX7FLcQB/tWrdcq/RO5hBGDc2jELzagNGgzYkGYemPZ4Pqt
 XY0MERGy+Bt8w==
Received: from alfajor (165.63.10.93.rev.sfr.net [93.10.63.165])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id C218712020D;
 Sun, 26 Jun 2022 04:17:34 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: Michael Heerdegen <michael_heerdegen@HIDDEN>
Subject: Re: bug#56110: 27+; switching from line-mode to char-mode
Message-ID: <jwvh747dew4.fsf-monnier+emacs@HIDDEN>
References: <875ykvs9gq.fsf@HIDDEN> <87wndaw84w.fsf@HIDDEN>
 <87sfnyw6m7.fsf@HIDDEN> <877d58obnn.fsf@HIDDEN>
 <jwv1qvgqmeu.fsf-monnier+emacs@HIDDEN> <87k097mi81.fsf@HIDDEN>
 <jwvwnd7njko.fsf-monnier+emacs@HIDDEN> <87wnd5aqdq.fsf@HIDDEN>
Date: Sun, 26 Jun 2022 04:17:26 -0400
In-Reply-To: <87wnd5aqdq.fsf@HIDDEN> (Michael Heerdegen's message of "Sat, 25
 Jun 2022 14:17:53 +0200")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-SPAM-INFO: Spam detection results:  0
 ALL_TRUSTED                -1 Passed through trusted hosts only via SMTP
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DKIM_SIGNED               0.1 Message has a DKIM or DK signature,
 not necessarily valid
 DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
 DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
 domain T_SCC_BODY_TEXT_LINE    -0.01 -
X-SPAM-LEVEL: 
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 56110
Cc: "C. Michailidis" <signal3@HIDDEN>, 56110 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> First: Don't buffer local variables come with the same problem?

The problem is somewhat orthogonal to buffer-local vs global, yes.

> Second: When somebody changes a binding using `add/remove-function` with
> a scope limited to the scope of my `let', we have no problem.

Indeed.

> So let's assume a global scope is wanted.  Then that somebody still has
> to figure out what exactly to add-function to, and if the currently seen
> value is not the global one, or what the scope of the currently seen
> binding is.  Bindings can be local or buffer local.

The same holds if they want to use `let` (except that it's a lot more
difficult to let-bind the global value of a variable when there is
a buffer-local value).

> Then one has to figure out if the binding (variable), or the value is to
> be modified.

I don't understand what you mean by that.

> You yourself got it wrong in this case.  So using
> `add/remove-function` is still absolutely nontrivial if I used
> `add-function' instead of `let'.

Yup.  The purpose is not to protect you from your own errors, but to let
you write code whose semantics is more precisely the ones you need such
that the interaction with other code out there will be correct even for
"unexpected" code.

> Finally, what about variables that can be bound to functions but also
> other types like strings?  You can't use `add-function' on them, right?

That's right (well, you still can if the variable currently holds
a function, but it's less convenient in any case).


        Stefan





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#56110; Package emacs. Full text available.

Message received at 56110 <at> debbugs.gnu.org:


Received: (at 56110) by debbugs.gnu.org; 25 Jun 2022 12:18:06 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jun 25 08:18:06 2022
Received: from localhost ([127.0.0.1]:44330 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1o54jl-0000eA-VI
	for submit <at> debbugs.gnu.org; Sat, 25 Jun 2022 08:18:06 -0400
Received: from mout.web.de ([212.227.17.12]:56755)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <michael_heerdegen@HIDDEN>) id 1o54jj-0000dg-VI
 for 56110 <at> debbugs.gnu.org; Sat, 25 Jun 2022 08:18:05 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de;
 s=dbaedf251592; t=1656159474;
 bh=mbFE46ljd07dcLpiKAs5YSqF+rhm3GP19qGhmnVCxTw=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To;
 b=OPq0e560OAigdkCiy/yaTzFOgrRlSt3ZJhaiknFrQUMUUiHyIxx1kiomZsB7alNyg
 WyU5N3cw82ucZlt0B+GC7j8DirPBNHP7fEzAHf/aB1v7ZpgDdhvvGVONGP0rNsNQkL
 0g5J2jJriEhphX/R0ypoI9VVSMwTZepG3v2X/nWU=
X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9
Received: from drachen.dragon ([88.66.201.45]) by smtp.web.de (mrweb105
 [213.165.67.124]) with ESMTPSA (Nemesis) id 1N3ouw-1neR3y1TUm-0108j9; Sat, 25
 Jun 2022 14:17:54 +0200
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
Subject: Re: bug#56110: 27+; switching from line-mode to char-mode
References: <875ykvs9gq.fsf@HIDDEN> <87wndaw84w.fsf@HIDDEN>
 <87sfnyw6m7.fsf@HIDDEN> <877d58obnn.fsf@HIDDEN>
 <jwv1qvgqmeu.fsf-monnier+emacs@HIDDEN> <87k097mi81.fsf@HIDDEN>
 <jwvwnd7njko.fsf-monnier+emacs@HIDDEN>
Date: Sat, 25 Jun 2022 14:17:53 +0200
In-Reply-To: <jwvwnd7njko.fsf-monnier+emacs@HIDDEN> (Stefan Monnier's message
 of "Thu, 23 Jun 2022 17:45:55 -0400")
Message-ID: <87wnd5aqdq.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V03:K1:2AjbnqWYuQ3kaVS1Y7XU49MGSZ8NVK05SlADtgy1d7jJPvv8Elb
 P8HU9NtwR+kOPx+PDoLbvsYpsmjzmHhezKWqr8AAri6tNPEfgBrUY2hr5vrO5IA9hMQiGdt
 QU65rQzUD/PRG7eMPs75AdaXytoloMtfKmZFuq6HUY+DGQHFMNXZP704AB8NsZiQHwhhepi
 hHL/dtgWK+Vsdpb6+REEg==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:YGDRpC5dsBk=:LDDkAgkrCWE7K9kAuqsmR+
 aueiAs9lTn+kqzquAa+uzUVXpRXff3owR3fnnwbT15iWic/BPmSOS7fKI4LXczx1uafPHfgjw
 sEXNF3ZoWlQ5WLmAXTne6+WqHZDY5obf7/gIeo6mqG12hGrOJ2JQX8SXY8lZtwPWmuX0j3hYf
 4KCPlQ7kMsX1ljfuP+49wa1+pwf6E5SpOm3sQM80hQld7FThlf72mnuCGs04NXBzR5expFTFI
 5GW5imetJbRcGkpFcGtjwNTK8V+hIIzVW2H7RhdbBL+RVBRyNg9TaLi7H+qOMKfU/8k1NsYfE
 6tlV5n7dQYAVKkz3oU2/aqx5MVoxcEad8V/zTed4h0ooBor+XQxvmndkPrfgjL6s/DBXhMbUm
 tAIdlNkNzb4THnBEZLmfgMIyesW4RBpNgqK0TFvQ7HxJ0zsF7vYNLXgqU/FEjnqAfCd9vpHWy
 8un0hQAztqMBra1c4EMdeyexHUSEfnIyp3QDki0aPlcnH+8AXeOja2xgR0u2WC2l55JiNK92f
 PEmHusFqQKtC90FwZFI9sNR/7bcfhmapofmT6C6dRFys+bNn+6MCqqM8XX5tavBhQ4LuQkvTx
 8uDJutfcr993R03fbSKK5GhzvK5QgcP8MNKYeQzJKJ0g68TZoxgrLv0oV1SSFcldcZkNcNBDt
 7+bDgSaH2OtO/6zjW85g1xzWfZCEAZX1t1BWslpNB06V7Gzz8Ep3Ovb9h2/FTho8s6SUPSfyz
 tL+1uQP+J4XQCaKMMQbM8N4Fo27M1IdZpEPffFIFrp4DhJ0gh53u8YjD26B9EK5FNbbVMegEW
 43v9ySXE8bs0Qr8zxyz8uDpfs4ZX1HV6IBUZ2cKPuMg8EPhoOk6BXujPjravwM3jK+AkUw2AD
 lvmm5TKoSbGhTecophABL9jvY6qSXDikM/X9pwkHOfRwhahIgaiev/bhjXUDhX622hx9/poxX
 xbJVLYaQFRPs/f04x4DjbOSoPH60vnt3btRebF+nhKthOA2zVGpfYvxnvlnb47DpP+s7tzWXi
 kl2vH8lkQzWSTa9FYuXi/5/rj0WlLGaKH7zZ4bYMf/WBBI9/TtSoph72EbREjTJ+U5cXla8HK
 zQ9mcUZm7290IBMR/Ode6wmlMXelq9cALlz8UwEe34uqgDqg/HIU2j10g==
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 56110
Cc: "C. Michailidis" <signal3@HIDDEN>, 56110 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Stefan Monnier <monnier@HIDDEN> writes:

> So you prefer taking the risk that such a thing happens at some point in
> the future, or that someone copies this code without knowing what were
> your assumptions?
>
> 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.

I must admit I don't understand.

First: Don't buffer local variables come with the same problem?

Second: When somebody changes a binding using `add/remove-function` with
a scope limited to the scope of my `let', we have no problem.

So let's assume a global scope is wanted.  Then that somebody still has
to figure out what exactly to add-function to, and if the currently seen
value is not the global one, or what the scope of the currently seen
binding is.  Bindings can be local or buffer local.

Then one has to figure out if the binding (variable), or the value is to
be modified.  You yourself got it wrong in this case.  So using
`add/remove-function` is still absolutely nontrivial if I used
`add-function' instead of `let'.

Finally, what about variables that can be bound to functions but also
other types like strings?  You can't use `add-function' on them, right?

TIA,

Michael.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#56110; Package emacs. Full text available.

Message received at 56110 <at> debbugs.gnu.org:


Received: (at 56110) by debbugs.gnu.org; 23 Jun 2022 21:46:09 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jun 23 17:46:09 2022
Received: from localhost ([127.0.0.1]:40188 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1o4UeO-00088Q-SK
	for submit <at> debbugs.gnu.org; Thu, 23 Jun 2022 17:46:09 -0400
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:3518)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <monnier@HIDDEN>) id 1o4UeL-00087n-GQ
 for 56110 <at> debbugs.gnu.org; Thu, 23 Jun 2022 17:46:07 -0400
Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1])
 by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 9580E808A2;
 Thu, 23 Jun 2022 17:45:59 -0400 (EDT)
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 3264880636;
 Thu, 23 Jun 2022 17:45:58 -0400 (EDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1656020758;
 bh=OO89aehSf9oKJsPIgE3XdIymog8ro5WlyYYE9V6/Cyg=;
 h=From:To:Cc:Subject:References:Date:In-Reply-To:From;
 b=jkZeNUIBpqSw39/kENIyG65BOiPdtoOKmEw5VfgoPJcrh5OvUQv8UDaGRGlQmM6NA
 5J0IIoPxVivqGCWVBnJEClHRNJ6WQR63+yGU65kud439Vup+4DXORBKOb10H4yDsYF
 xFNhoMOKszDqoJeVtOjvBFqenJGFvCHyOdX9UoqfMSTHWjCvZrm1427t1GLtb3CDCS
 A3QkqJ7zIrLwqXcXSiUtVkbX4AWSEEwnUuCiwMnI1BFN5qVHhBxyPWQC/pT0WoQz7+
 nq25kJQqIJlVrmTDGR7hIe/KAxtlefKgmvLbDij7PizGs1Xgp2fv2Ms4+oOS+eB5JT
 IDidjw5QQEpTA==
Received: from alfajor (196.214.25.93.rev.sfr.net [93.25.214.196])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 7B0901204B7;
 Thu, 23 Jun 2022 17:45:57 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: Michael Heerdegen <michael_heerdegen@HIDDEN>
Subject: Re: bug#56110: 27+; switching from line-mode to char-mode
Message-ID: <jwvwnd7njko.fsf-monnier+emacs@HIDDEN>
References: <875ykvs9gq.fsf@HIDDEN> <87wndaw84w.fsf@HIDDEN>
 <87sfnyw6m7.fsf@HIDDEN> <877d58obnn.fsf@HIDDEN>
 <jwv1qvgqmeu.fsf-monnier+emacs@HIDDEN> <87k097mi81.fsf@HIDDEN>
Date: Thu, 23 Jun 2022 17:45:55 -0400
In-Reply-To: <87k097mi81.fsf@HIDDEN> (Michael Heerdegen's message of "Thu, 23
 Jun 2022 18:56:30 +0200")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-SPAM-INFO: Spam detection results:  0
 ALL_TRUSTED                -1 Passed through trusted hosts only via SMTP
 AWL 0.044 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DKIM_SIGNED               0.1 Message has a DKIM or DK signature,
 not necessarily valid
 DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
 DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
 domain T_SCC_BODY_TEXT_LINE    -0.01 -
X-SPAM-LEVEL: 
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 56110
Cc: "C. Michailidis" <signal3@HIDDEN>, 56110 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> I want.  The initial revision by Richard already looks like
>
> #+begin_src emacs-lisp
> (unwind-protect
>     (progn
>       (setq term-input-sender (symbol-function 'term-send-string))
>       (end-of-line)
>       (term-send-input))
>   (setq term-input-sender save-input-sender))
> #+end_src

I have no idea why it was written that way.  There's been all kinds of
bugs linked to `let` bindings interacting with buffer-local bindings,
but that doesn't seem to explain it either.
It's probably just an accident of history.

>> If you don't, then `let` is not the same: e.g. if some other code uses
>> `add/remove-function` on that variable within your `let`, their changes
>> will be lost when your `let` ends.
> Yeah, such things - but I don't think anything like this is crucial
> here.

So you prefer taking the risk that such a thing happens at some point in
the future, or that someone copies this code without knowing what were
your assumptions?

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.


        Stefan





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#56110; Package emacs. Full text available.

Message received at 56110 <at> debbugs.gnu.org:


Received: (at 56110) by debbugs.gnu.org; 23 Jun 2022 16:56:44 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jun 23 12:56:43 2022
Received: from localhost ([127.0.0.1]:39711 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1o4Q8J-0000Om-LV
	for submit <at> debbugs.gnu.org; Thu, 23 Jun 2022 12:56:43 -0400
Received: from mout.web.de ([212.227.15.3]:47287)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <michael_heerdegen@HIDDEN>) id 1o4Q8H-0000OS-9t
 for 56110 <at> debbugs.gnu.org; Thu, 23 Jun 2022 12:56:42 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de;
 s=dbaedf251592; t=1656003391;
 bh=IEcUusQRcjkhWfpaJygkfPeXHChEACc9ykUrvgXy3mI=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To;
 b=pnwjz1eM36E+/NXJB+vAz2DlgL8gkQBXrQR1uLIzW7dckNUNDyLx3HcYFYMzuqWCe
 UtPrL8QPVxByjldomW2qnXsvZwdaH4RsM7yUT6SiWbJdlgQGAfOq6z3ZZpK0nY0p5u
 VP7uMwNNurwjTPSXC4ESu8GI/mG6Xzsf7F9PL0uE=
X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9
Received: from drachen.dragon ([88.66.201.45]) by smtp.web.de (mrweb005
 [213.165.67.108]) with ESMTPSA (Nemesis) id 1MmQcf-1nMav0252X-00iJiR; Thu, 23
 Jun 2022 18:56:31 +0200
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
Subject: Re: bug#56110: 27+; switching from line-mode to char-mode
References: <875ykvs9gq.fsf@HIDDEN> <87wndaw84w.fsf@HIDDEN>
 <87sfnyw6m7.fsf@HIDDEN> <877d58obnn.fsf@HIDDEN>
 <jwv1qvgqmeu.fsf-monnier+emacs@HIDDEN>
Date: Thu, 23 Jun 2022 18:56:30 +0200
In-Reply-To: <jwv1qvgqmeu.fsf-monnier+emacs@HIDDEN> (Stefan Monnier's message
 of "Wed, 22 Jun 2022 20:02:55 -0400")
Message-ID: <87k097mi81.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V03:K1:jxGtTtm/zT5ce4OWplqJDirG7/YzIN2jakTNHqvdH1JX3JWDF5I
 3Ub/dY8n24k04aN5vBbgcOhrC7OjX/UjTEFlvpzkWd2I/GeIqyegm35h9ydVgmk4blywsmC
 VK2nTMjO2VPQ3dd86p1nVvLibq+BJPN7D/YgBNK0a5yjX0rc/5fVHG13hhdvi4nMh3+HzTb
 Pb/ZUFwSfo4Xa0yRW6k3A==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:1XpQKZfD7Xc=:a5QBgd+IbbRnxgSr2e6aey
 2YNKwf9/mQ9GX3hKeR13dRQsA/AYILLClQHz1vwAC8d4AdPGoCuO1f98P9ZJEbk4lUD4B/Fl1
 QRhaH/Db2HMrqDPN5kf51OzTv5KwTvnluLfneUyJspZucEV7PCzKFic57NToZEUYdzSbolWLe
 SJvJO/lhhZpgPRahMIYOyE01YPbWD+dFxElXHID7BT42s5gAkl7XAUsuegLYLZBsNTQW+F+fu
 QcaO7y3/MIkRYI2FaPsrcJKrT4GqFg91PeO4XYkzoOX4l8sraMiT6kuT+ej/0ZR+btq1SGJms
 AxBl0WfxBZNWCN42000l7thRSO1DNyeiDqyp8rCYiclcK+mIg5H5u1MTpSnETiSd7U3yo3Qo4
 pqEfXMjnU646LB9qq1I/nXsB7ius4qhNiFliV5arCyy1loBOPLoeQI0GhrYw/sY+4lum//KEG
 jbX7dl4YqXaq2RayFJQ9o4lWCAkU/BbgB3TM4UqYAQ8IBO0zTvACdxYwir8fUrCX5U4m8nfBk
 SlKbYQ4Kb+ZBEfRgyKmxsYULG8A+l16HtZXV12b8zXbSD9RFl3rTAvFCccUMRBOhxLDMAoaBd
 93gtAJBpN3VyTULPDIZPUi2CbMUEI73njYEZiaGGHOenMe9BDSmp26887YE5J/XsdjeKnWwvK
 897i2R18iXKlpJ1h44q6uib6rtCxHwRmdcoDl6O80GqVllmomtfxFsJBPgvNrnzx5L8TjWzqW
 WGEXLgJqLKx9imPfudMthuOjmRIzs4ckd4ZSzSkM+/GomIx+4H+8et1mwH0yo7FqPyNASx5Wv
 QoJ1ca3zbUeZEUZIyYj5rvjPk6xYvwXZvejbhrD+lkuSRwM1WtXJy6B1QtoVy3PrtxaCKBJ9V
 jVDE2OjA/rEyN0hFzG+jIk13RRAT28xBJOhbdkIATaJMNZdnVM68M3OX2mlMveGxfKGILs7wJ
 gboPpec6/rrvG7b790reoY2TPo4/ypByPryAiFKz0+twC9bNcgEQ0brtcdJgrKVuVhbS5vjED
 QGuSD7KX5QWfZAlekKsXRiPtuGmXWyyeNx7C6geBrMTNeJnuBWFuvWVblZMpRRgGthJnPqkb4
 8ZI5ubtLW8w1CL71DuRwEVPT5I0zga+deaq10i2N2tYUpvt24NkN67YhQ==
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 56110
Cc: "C. Michailidis" <signal3@HIDDEN>, 56110 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Stefan Monnier <monnier@HIDDEN> writes:

> > That works - but I fail to understand why a simple `let' doesn't suffice
> > (which works as well):
>
> Depends if you want to have to think about what other code does or
> not.

I want.  The initial revision by Richard already looks like

#+begin_src emacs-lisp
(unwind-protect
    (progn
      (setq term-input-sender (symbol-function 'term-send-string))
      (end-of-line)
      (term-send-input))
  (setq term-input-sender save-input-sender))
#+end_src

I checked (using variable watchers) that when I replace
unwind-protect+setq with let, the executed code doesn't leave the scope
of the let.  So why was it written like that?  `term-input-sender' has a
buffer local binding (it already had in the initial revision from 1994)
- but the current buffer is not changed in between.

Did `let' back then not work with buffer-local bindings - or what could
have been the intention to avoid `let'?

> If you don't, then `let` is not the same: e.g. if some other code uses
> `add/remove-function` on that variable within your `let`, their changes
> will be lost when your `let` ends.

Yeah, such things - but I don't think anything like this is crucial
here.


Thanks,

Michael.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#56110; Package emacs. Full text available.

Message received at 56110 <at> debbugs.gnu.org:


Received: (at 56110) by debbugs.gnu.org; 23 Jun 2022 00:03:07 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jun 22 20:03:07 2022
Received: from localhost ([127.0.0.1]:36882 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1o4AJP-00072R-71
	for submit <at> debbugs.gnu.org; Wed, 22 Jun 2022 20:03:07 -0400
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:18230)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <monnier@HIDDEN>) id 1o4AJM-00071x-Ui
 for 56110 <at> debbugs.gnu.org; Wed, 22 Jun 2022 20:03:05 -0400
Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1])
 by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 620CD80323;
 Wed, 22 Jun 2022 20:02:59 -0400 (EDT)
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 35E6E804AA;
 Wed, 22 Jun 2022 20:02:58 -0400 (EDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1655942578;
 bh=cOQJpEBs1HRDJkE/LTRAKOwHCn8efboIetzAJZLDINE=;
 h=From:To:Cc:Subject:References:Date:In-Reply-To:From;
 b=H9NLqzvYYbLmdDqdimvF1xm8BriJj7hTB8JMo9AsQNaMEGYV7/CzFGYw0xYV0843a
 waRHV5xusRKJcZXzLvscnfz2h1KGpHVLWdxv9J1AbJLYE89N+BsxsFJoJdUbzA1EBa
 btM1D2dieKeSV7ShgNsBADInVct7slUZ9uZDHiquUe7eFrEOv3XNnWscPon6MxWiCN
 xsZkxPW1EzclX5kaMSjtPx6sofxPk3y5mP1TOS5B65trvV+TFxPKTYZQmhK7vvOpX+
 DFByH7mVTSiqXF2aorzo3JiIKMNdFY9CppHSdQz49G2Z6JzUBvuOYeZ+0P2CNpxZqi
 Jf72XNLlsmD2w==
Received: from alfajor (196.214.25.93.rev.sfr.net [93.25.214.196])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 7A182120278;
 Wed, 22 Jun 2022 20:02:57 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: Michael Heerdegen <michael_heerdegen@HIDDEN>
Subject: Re: bug#56110: 27+; switching from line-mode to char-mode
Message-ID: <jwv1qvgqmeu.fsf-monnier+emacs@HIDDEN>
References: <875ykvs9gq.fsf@HIDDEN> <87wndaw84w.fsf@HIDDEN>
 <87sfnyw6m7.fsf@HIDDEN> <877d58obnn.fsf@HIDDEN>
Date: Wed, 22 Jun 2022 20:02:55 -0400
In-Reply-To: <877d58obnn.fsf@HIDDEN> (Michael Heerdegen's message of "Wed, 22
 Jun 2022 19:23:08 +0200")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-SPAM-INFO: Spam detection results:  0
 ALL_TRUSTED                -1 Passed through trusted hosts only via SMTP
 AWL -0.159 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DKIM_SIGNED               0.1 Message has a DKIM or DK signature,
 not necessarily valid
 DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
 DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
 domain T_SCC_BODY_TEXT_LINE    -0.01 -
X-SPAM-LEVEL: 
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 56110
Cc: "C. Michailidis" <signal3@HIDDEN>, 56110 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

>> This maybe?
>
> That works - but I fail to understand why a simple `let' doesn't suffice
> (which works as well):

Depends if you want to have to think about what other code does or not.
If you don't, then `let` is not the same: e.g. if some other code uses
`add/remove-function` on that variable within your `let`, their changes
will be lost when your `let` ends.


        Stefan





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#56110; Package emacs. Full text available.

Message received at 56110 <at> debbugs.gnu.org:


Received: (at 56110) by debbugs.gnu.org; 22 Jun 2022 22:24:11 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jun 22 18:24:11 2022
Received: from localhost ([127.0.0.1]:36809 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1o48le-0002UX-Vu
	for submit <at> debbugs.gnu.org; Wed, 22 Jun 2022 18:24:11 -0400
Received: from mail-yw1-f181.google.com ([209.85.128.181]:36373)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <signal3@HIDDEN>) id 1o48lZ-0002Tw-Ou
 for 56110 <at> debbugs.gnu.org; Wed, 22 Jun 2022 18:24:09 -0400
Received: by mail-yw1-f181.google.com with SMTP id
 00721157ae682-3176d94c236so177292567b3.3
 for <56110 <at> debbugs.gnu.org>; Wed, 22 Jun 2022 15:24:05 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :cc; bh=O7rd1hgU51w/WNmaEgWiBk3sXiFWd5/RwIBRTMJ4Q+8=;
 b=dhwdmk9s7MALTj9yTf08/cNVfRpa5Y5FihpLu5jMZAI6IX0WMW9eM/Rw5mrzsMd0mb
 oQF1dCM5PCwBzH/EvHh1F5r0OfRoz+JTFwS2K3paSX63cDKoMPl+aUsorsBW+RxGrRJw
 ohxQPVtszEd6cIHkjU35qBnr0/peZ26LT+xji7JMOrG29iXaAweX75xVO0DNCgvGIInX
 k4PbYjdJq4E0UXTKE/vLW9Gz2JDKg7alMLLNX1spEmIZqKNmu8GPifyKiRkj21C56vxb
 g5Xtxb+L+jT6aAm3tkplubfcJYk2dRHJRL+FZmi/axKdqiWrnVFmv9UN7X5ujTFFhqDs
 qmSg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=O7rd1hgU51w/WNmaEgWiBk3sXiFWd5/RwIBRTMJ4Q+8=;
 b=HLVcGd9Budb8OJZGTuXY+WY0uE2wH4ZpKcioUaZwmyWTWBHR+qRH5fqrSZ2sVDnOfY
 4393COrx7TG/7HqVFMb4VMfI7x+77CClqUDUrfUhooO2SZVagjsneR0Cmrb7jAcJCA+z
 ZIo2Cs3ncePfsBP67KknM7oh+KS2pwHGTYUKmO54+xivvjdxZU/Dsl2Vd5aX4E5IK9Xm
 +iHReBFer/mmxz+MHU3F5tUlQEJOQHkuX6jSAV3Y0zUP39MxmYInUEAdYQ0kzzE2IhVg
 VH+y7GN2uMcKDuoBib1ZHkjCxIK8ke+meWGRxWOszC5oU9ZEJcz9qK48o7DPLWkXDGGI
 qW/A==
X-Gm-Message-State: AJIora+5mlJZpnNcS3I7vWejwtDjPe+phKjdQfK7O5ZBDJb97lUK3lb8
 Sieugdz/Eclod7CHUiHUvxxR3rXeRUe0ATAFdyQ=
X-Google-Smtp-Source: AGRyM1ssJmY09M7pudZ2R2JSkiIUYmAmn4zYeOQPC3AeWAgFngVOCC4zeSi6PSlITOgQPyx8xI5KZZqr/lPP4/PrBng=
X-Received: by 2002:a81:2442:0:b0:30f:9fc4:a488 with SMTP id
 k63-20020a812442000000b0030f9fc4a488mr6837601ywk.408.1655936640291; Wed, 22
 Jun 2022 15:24:00 -0700 (PDT)
MIME-Version: 1.0
References: <875ykvs9gq.fsf@HIDDEN> <87wndaw84w.fsf@HIDDEN>
 <87sfnyw6m7.fsf@HIDDEN> <877d58obnn.fsf@HIDDEN>
 <CAMw2aTyseUdQDcQMkzDq2cs=sB2qtQSRrfRW5OPa4wbF+EvoWg@HIDDEN>
 <87czf0qu3p.fsf@HIDDEN>
In-Reply-To: <87czf0qu3p.fsf@HIDDEN>
From: signal3 <signal3@HIDDEN>
Date: Wed, 22 Jun 2022 22:23:49 +0000
Message-ID: <CAMw2aTzE-hx2de3zProD_9s-xxyQ1HuGsW9Qm8jaKahvmooi2Q@HIDDEN>
Subject: Re: bug#56110: 27+; switching from line-mode to char-mode
To: "Basil L. Contovounesios" <contovob@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.2 (/)
X-Debbugs-Envelope-To: 56110
Cc: Michael Heerdegen <michael_heerdegen@HIDDEN>, 56110 <at> debbugs.gnu.org,
 Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.8 (/)

On Wed, Jun 22, 2022 at 9:14 PM Basil L. Contovounesios <contovob@HIDDEN> wrote:
<snip>
> In any case, my vote is for correct and simpler code over a smaller
> diff.

Lol, correct is definitely better! Smaller diff might be considered if
there's doubt regarding correctness.

> > And in that vein, I'm not sure why the unwind-protect was removed.
>
> AFAICT it's redundant because let always unwinds its temporary bindings,
> in contrast with the previous add-function and setq which make permanent
> modifications that require manual unwinding.

Ah... makes sense to me now, thanks for the clarification..




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#56110; Package emacs. Full text available.

Message received at 56110 <at> debbugs.gnu.org:


Received: (at 56110) by debbugs.gnu.org; 22 Jun 2022 21:14:15 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jun 22 17:14:15 2022
Received: from localhost ([127.0.0.1]:36741 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1o47fz-0000k5-9p
	for submit <at> debbugs.gnu.org; Wed, 22 Jun 2022 17:14:15 -0400
Received: from mail-ed1-f51.google.com ([209.85.208.51]:35596)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <contovob@HIDDEN>) id 1o47fu-0000jp-Lb
 for 56110 <at> debbugs.gnu.org; Wed, 22 Jun 2022 17:14:14 -0400
Received: by mail-ed1-f51.google.com with SMTP id e40so13129798eda.2
 for <56110 <at> debbugs.gnu.org>; Wed, 22 Jun 2022 14:14:10 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd.ie; s=google21;
 h=from:to:cc:subject:references:date:in-reply-to:message-id
 :user-agent:mime-version;
 bh=CnoxR+B06DCCoOMiTAMuqzExt4wCTzW5atLpcwR0iQU=;
 b=TB+wbdQyHvuzCfSAofqMpSFWiiOGCi+YxG+SeUv/gfAjWYb8yoG/70IWlr5ZNDDlC2
 flxqQ0AKq6+fvM4W6oyXBFYw3V3f3A4uDmoiPpjkr1n/xIlpccqelG8VOCMWpWxOmbMS
 znwymx36A+ESAd2VgUBFpmKqojsbJhiWR0dL5Bz1etDuZN8+Ydt42R5P+4EiJT8lykzI
 7owwxJnIYK+JGxqYpnMZ55UfojuCSFQmF+/RPrLjqyx/+1AZuLy+EU6HR+qdIJ3KnVAf
 YPbepIY7vlIZiQnaFtCKPVeTBPWiPQ0zu9UGbOjoF6DFsYPApPqpWCHFwSDIqB0E6/Mj
 reJw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to
 :message-id:user-agent:mime-version;
 bh=CnoxR+B06DCCoOMiTAMuqzExt4wCTzW5atLpcwR0iQU=;
 b=TGXhm0GhW/JN6AOLHW+ahcBBtytRCRPAql/YqyyAtj3sPeSPNCqetBB0tJXxdRYqE3
 ASaInW33Xb3AQBqsVfCsNlCgvcW6eFudxIqrZdrc2VF49SfESTIj+cQReWR2FXq2kfQK
 D+q+1SeRnNRVVPcHNRaIudzFOmpkl1Qw/Vf2lZJps7Kt9L/G6aow7OzmX8nZVL6Cuhby
 M0wcQne1VwIq4sciKCxL3i1vq3xUNrIo9bLsaZbaMmWkFKZhN5jiSLpXU8Mw7jUwBbti
 BIABR2YGKYtM4z/QwviQdknClV6LXEXui1hMxgZ6Au1NQVLRq5mJx94QHZTDsWatLcg7
 vl1g==
X-Gm-Message-State: AJIora/6yjlTYC/rJVGRRSUZaebEWUNfrVQP5uKhChDf3z414sHAhV+C
 leK9yJf/V8YwoCwZioucOBEPxA==
X-Google-Smtp-Source: AGRyM1vghX5KYbnvObCrdN9Qe31MRhta078crhL5wCrzUiKYobJ/x8r31fem1TbNFYn5m8yYBcv0dA==
X-Received: by 2002:a05:6402:3808:b0:435:5a6c:9dd9 with SMTP id
 es8-20020a056402380800b004355a6c9dd9mr6661101edb.368.1655932444786; 
 Wed, 22 Jun 2022 14:14:04 -0700 (PDT)
Received: from localhost ([2a02:587:322b:6f5e:dc92:136a:a7c4:dc8c])
 by smtp.gmail.com with ESMTPSA id
 oq14-20020a170906cc8e00b00722e559ee66sm3122616ejb.62.2022.06.22.14.14.03
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Wed, 22 Jun 2022 14:14:04 -0700 (PDT)
From: "Basil L. Contovounesios" <contovob@HIDDEN>
To: signal3 <signal3@HIDDEN>
Subject: Re: bug#56110: 27+; switching from line-mode to char-mode
References: <875ykvs9gq.fsf@HIDDEN> <87wndaw84w.fsf@HIDDEN>
 <87sfnyw6m7.fsf@HIDDEN> <877d58obnn.fsf@HIDDEN>
 <CAMw2aTyseUdQDcQMkzDq2cs=sB2qtQSRrfRW5OPa4wbF+EvoWg@HIDDEN>
Date: Thu, 23 Jun 2022 00:14:02 +0300
In-Reply-To: <CAMw2aTyseUdQDcQMkzDq2cs=sB2qtQSRrfRW5OPa4wbF+EvoWg@HIDDEN>
 (signal3's message of "Wed, 22 Jun 2022 19:22:28 +0000")
Message-ID: <87czf0qu3p.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 56110
Cc: Michael Heerdegen <michael_heerdegen@HIDDEN>, 56110 <at> debbugs.gnu.org,
 Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

signal3 [2022-06-22 19:22 +0000] wrote:

> On Wed, Jun 22, 2022 at 5:23 PM Michael Heerdegen
> <michael_heerdegen@HIDDEN> wrote:
>>
>> That works - but I fail to understand why a simple `let' doesn't suffice
>> (which works as well):
>>
>> Does anybody know?

FWIW, I also fail to see why let wouldn't be equivalent for most
intensive porpoises, but then I wouldn't trust myself to tell a porpoise
from a dolphin.

> I don't know. But, whenever I'm making changes I like to keep the
> smallest hamming distance possible between revisions. Just a pet peeve
> maybe?
>
> So unless there is a reason to avoid using 'let', it seems preferable
> to me. That way the snippet better resembles the version prior to 27+.

Surely rewriting in terms of let increases Hamming distance? ;)

In any case, my vote is for correct and simpler code over a smaller
diff.

> And in that vein, I'm not sure why the unwind-protect was removed.

AFAICT it's redundant because let always unwinds its temporary bindings,
in contrast with the previous add-function and setq which make permanent
modifications that require manual unwinding.

Thanks,

-- 
Basil




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#56110; Package emacs. Full text available.

Message received at 56110 <at> debbugs.gnu.org:


Received: (at 56110) by debbugs.gnu.org; 22 Jun 2022 19:22:47 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jun 22 15:22:47 2022
Received: from localhost ([127.0.0.1]:36627 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1o45w7-000228-Dh
	for submit <at> debbugs.gnu.org; Wed, 22 Jun 2022 15:22:47 -0400
Received: from mail-yw1-f180.google.com ([209.85.128.180]:38908)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <signal3@HIDDEN>) id 1o45w5-00021u-8o
 for 56110 <at> debbugs.gnu.org; Wed, 22 Jun 2022 15:22:47 -0400
Received: by mail-yw1-f180.google.com with SMTP id
 00721157ae682-3177f4ce3e2so149293977b3.5
 for <56110 <at> debbugs.gnu.org>; Wed, 22 Jun 2022 12:22:45 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :cc; bh=Ylkfp1pi9v48t3eRZtoM/C0XA1rrIfKeB8o+tip4YRo=;
 b=NElPAVNZkokfOiwZPctCh9rIGMXW2/tYfVrC3jQ5xRjljMW0qV2bS6jRhDzscQwGRT
 rPZ8EKZ7oD/f/35cDOmjVVfcvGZoSSM3v/RwBCyVkl+i4U0IaMU4wpnj5Hca3i6wRv5Z
 zW+FHFfaNvljq1W+LqABlMpS0UAEwwmRRuuwONrFVf8hHCRDVgSbDbDqHa6CHDMPBb4S
 gmKyGjyvs8tbysneltKfsOSHpV6rYu/W82PR/v+kBN1/9KLo34QQ+20oCMOWTQbD6HBf
 JYZuAMGNV9GkgJj3le5JNSGalDY+HRDUcnz+ckZGSsD7WrqkIKc41BU9al/BY+qr1GEO
 EUfA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=Ylkfp1pi9v48t3eRZtoM/C0XA1rrIfKeB8o+tip4YRo=;
 b=lALaP6hf5R7Wec3SkhGvAfJH/mZoFgFbHWvJmOxChIPvM5DterP/yMPuhJVMdpQcoC
 ZDewRNTgKK4qgla+8r4/jsP0NXMJDvCqj4wO/yr2oU2RslsDpSpF4S7gHjtrWQ6Fuc4A
 jUE2vFHZxtjMOzbY/goU7H+KR/HHb9ChxALX5fgNoAUvTKVtPg4AuAe5kCBNGBU+bcPI
 RP8uTODuL7eyZ1K9TqkaWkzj5ZzFmsiprVZ/WpjgNJ1qr+Tb0p40WgHhZ3CAU8eZ2DfP
 yeUnlZSnPIk/C6Hi8HMg0cHlhBCG59U3Zx9g3NIC8Zo5bbfMhWWWKYKoASl1B3wYSdog
 Dghw==
X-Gm-Message-State: AJIora/cRnAuNv6JgFm1ZwWwFnpqx5+N+/buJmzvnQTFydc/NmBEKkf1
 WE1/EmkzFTMNGUOI7GktqTOr2W/clc1EHSHrkp0=
X-Google-Smtp-Source: AGRyM1swngfHkoURlMP6SxVS2/67pbnpzSI/yT1NWsdS1uXvb/NiCSKS3Qs8JE3D+WSMPKiliBbJOD48bUD4rCiRo84=
X-Received: by 2002:a81:57d2:0:b0:317:81b3:2460 with SMTP id
 l201-20020a8157d2000000b0031781b32460mr6235290ywb.493.1655925759732; Wed, 22
 Jun 2022 12:22:39 -0700 (PDT)
MIME-Version: 1.0
References: <875ykvs9gq.fsf@HIDDEN> <87wndaw84w.fsf@HIDDEN>
 <87sfnyw6m7.fsf@HIDDEN> <877d58obnn.fsf@HIDDEN>
In-Reply-To: <877d58obnn.fsf@HIDDEN>
From: signal3 <signal3@HIDDEN>
Date: Wed, 22 Jun 2022 19:22:28 +0000
Message-ID: <CAMw2aTyseUdQDcQMkzDq2cs=sB2qtQSRrfRW5OPa4wbF+EvoWg@HIDDEN>
Subject: Re: bug#56110: 27+; switching from line-mode to char-mode
To: Michael Heerdegen <michael_heerdegen@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.2 (/)
X-Debbugs-Envelope-To: 56110
Cc: 56110 <at> debbugs.gnu.org, Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.8 (/)

On Wed, Jun 22, 2022 at 5:23 PM Michael Heerdegen
<michael_heerdegen@HIDDEN> wrote:
>
> Michael Heerdegen <michael_heerdegen@HIDDEN> writes:
>
> > This maybe?
>
> That works - but I fail to understand why a simple `let' doesn't suffice
> (which works as well):
>
>
> Does anybody know?
>
> TIA,
>
> Michael.

I don't know. But, whenever I'm making changes I like to keep the
smallest hamming distance possible between revisions. Just a pet peeve
maybe?

So unless there is a reason to avoid using 'let', it seems preferable
to me. That way the snippet better resembles the version prior to 27+.

And in that vein, I'm not sure why the unwind-protect was removed.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#56110; Package emacs. Full text available.

Message received at 56110 <at> debbugs.gnu.org:


Received: (at 56110) by debbugs.gnu.org; 22 Jun 2022 17:23:31 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jun 22 13:23:30 2022
Received: from localhost ([127.0.0.1]:36535 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1o444g-0003D1-Mk
	for submit <at> debbugs.gnu.org; Wed, 22 Jun 2022 13:23:30 -0400
Received: from mout.web.de ([212.227.15.3]:49815)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <michael_heerdegen@HIDDEN>) id 1o444b-0003Ck-4m
 for 56110 <at> debbugs.gnu.org; Wed, 22 Jun 2022 13:23:29 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de;
 s=dbaedf251592; t=1655918595;
 bh=fYeFZr3noImdfWvstxN0aUCTR7GpjOHbUC7J+34pqTc=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To;
 b=HHZ4jHWEqZYuL7v7XOl78MBR2gHnr+7InD2TKljwmS8LsTSFj13O4Bm+0HvZBc1x/
 usJL03Qzav0PZGle75Jz28nfN+lFTh/c8mBZW9N8KnVUC4Cc/Ox9qCIdbkxZ+iIgB2
 1lsxSnGA7Akx+uqyoJCI8JIBoQ8JHWP2YehMHJMA=
X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9
Received: from drachen.dragon ([84.60.174.246]) by smtp.web.de (mrweb005
 [213.165.67.108]) with ESMTPSA (Nemesis) id 1MN6FV-1oMQR40Sqz-00JC6R; Wed, 22
 Jun 2022 19:23:15 +0200
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
To: "C. Michailidis" <signal3@HIDDEN>
Subject: Re: bug#56110: 27+; switching from line-mode to char-mode
References: <875ykvs9gq.fsf@HIDDEN> <87wndaw84w.fsf@HIDDEN>
 <87sfnyw6m7.fsf@HIDDEN>
Date: Wed, 22 Jun 2022 19:23:08 +0200
In-Reply-To: <87sfnyw6m7.fsf@HIDDEN> (Michael Heerdegen's message of "Tue, 21
 Jun 2022 14:20:16 +0200")
Message-ID: <877d58obnn.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Provags-ID: V03:K1:uOthROIL3fUwy4ZDZc8m5cv3zqRDguaAKNlv++qU+C9CdaICbCz
 alwgFsXvnihtTPAColXVU53AB8Y2zRhac5X/1tj3oDB4GiP/NvXiWH8y8H0lIVf/a8vlGDF
 iaaFW/n3UzQFITOxBaWSQHUC7VGbS2mDbegq0YQb40UtiYqE5PEZBTplYFDo5C0Qf7Ap0nI
 VxkrHKAoeYE1j4PV995yg==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:aALo4kRxlTY=:7Jb4WEj2OQgfrocHo+80Lo
 rMhPRGtcHebR9MyhXT2zlpdE+DPcjsy3Bd37VcXAEGYkvoy9DBKeNRIJRbGp1+e/mZMSAQ9Vr
 wgnfMMw0ux+n/vdw4u/6PRqYnykCj3YFy7Vh63ouj93QSD5Oskv5B5jcJIR6QqkwHVitAC1Tl
 EvByzMqL97ot5c/XH6Xl7aBvuuXfWcxnIdUw506ydH5bFJoav4Hcwx0DQkzZcDB5seH2g7iVM
 ZH9E3OXFRRPw0j/Saee2BDMECSh+Cq1nfeSJmqpS/c1SEqmU19SEKIhp7UYg3byJFUrqFOhy6
 UtkeGDXcXi23SY4/u2LvllsAumMn3vQxp3EtIaLmQS/mF/bQV12VTv7S3/J4N/qA2oMXp3ll8
 RQ3czxb6o+ZFXt0+8ECE4/NduHnVSTz73FpG4EwtvxP+7x6jGp5XCM1ok4/wrNSmZdEh9M075
 beQ08Dkpf4DqPkHbcXTAw9ud8QDBaKaYQwwDukPM08dJSuD4Wo2V0QJbkgsdgn41zf9SjMLqi
 f1vo4ASIIhlN7BMx6SGu72wPYkjuPsvNUkTt4itSfSrD78jNyiobLxL7GNUo9yI9w1dotA2EY
 aj7y030bcADCyklRX++tAeuPlV/PdsTmDSFWJOkcZf+epU4PKDMEEVtqCGatQ4B7TRa6Z8qek
 qdP9RDxm6RFgipRoZLQTePttTF81zrlv0917eE0gDtcpnDwVh0RyYanuxZAQPvW+WdJLs6HKg
 7JbsXoV6k0rjWi0HXYNagWjYjth8n9d6Rp/zl+nndaDKg5zttqnPNdmFgxjtNk19D0AzDAivu
 aSKuw5f/0jRk12zgLhsdRvjS7Jz39gAcBoh8Rf2ugptuu0H4/ZAWXo2YvGev9mbY3+Q1f8dlW
 doCodH2ZFsYz3o79j+HdRG0f+cAdyVU7AJ/U7kdvq7f4Tzvwa1LvbkdKUWpV0yIUqKktbU6f0
 IQIEe7f/MfeMg6PDhAU0WjLzrt351CSQ6LPGx44W1MlB1NxUtrACnSqf20NdEgwSPGJCAweYE
 7i0eFapr/I7i+A/9E7dAi9MpeMP28xhYpV1TBwgBZaxhqksRn6kWccrAftbowzPZdW3/jyc8r
 2VgbGVVvSqFKGqyFNxSyFtYGxcJmTfAJxBqEvjTSR1IXlexmjlHsIwDIQ==
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 56110
Cc: 56110 <at> debbugs.gnu.org, Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

--=-=-=
Content-Type: text/plain

Michael Heerdegen <michael_heerdegen@HIDDEN> writes:

> This maybe?

That works - but I fail to understand why a simple `let' doesn't suffice
(which works as well):


--=-=-=
Content-Type: text/x-diff
Content-Disposition: inline; filename=0001-WIP-Fix-56110.patch
Content-Transfer-Encoding: quoted-printable

=46rom 24a089360bfb8521b255d583e462dc19cac9179b Mon Sep 17 00:00:00 2001
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
Date: Tue, 21 Jun 2022 13:41:51 +0200
Subject: [PATCH] WIP: Fix 56110

=2D--
 lisp/term.el | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/lisp/term.el b/lisp/term.el
index 94bf13e973..1fde42aa7f 100644
=2D-- a/lisp/term.el
+++ b/lisp/term.el
@@ -1465,12 +1465,9 @@ term-char-mode
     ;; Send existing partial line to inferior (without newline).
     (let ((pmark (process-mark (get-buffer-process (current-buffer)))))
       (when (> (point) pmark)
-	(unwind-protect
-	    (progn
-	      (add-function :override term-input-sender #'term-send-string)
-	      (end-of-line)
-	      (term-send-input))
-	  (remove-function term-input-sender #'term-send-string))))
+	(let ((term-input-sender #'term-send-string))
+	  (end-of-line)
+	  (term-send-input))))
     (term-update-mode-line)))

 (defun term-line-mode  ()
=2D-
2.30.2


--=-=-=
Content-Type: text/plain


Does anybody know?

TIA,

Michael.

--=-=-=--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#56110; Package emacs. Full text available.

Message received at 56110 <at> debbugs.gnu.org:


Received: (at 56110) by debbugs.gnu.org; 21 Jun 2022 12:20:30 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jun 21 08:20:30 2022
Received: from localhost ([127.0.0.1]:59363 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1o3crt-0005J7-TU
	for submit <at> debbugs.gnu.org; Tue, 21 Jun 2022 08:20:30 -0400
Received: from mout.web.de ([212.227.15.14]:41511)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <michael_heerdegen@HIDDEN>) id 1o3crr-0005Iq-9j
 for 56110 <at> debbugs.gnu.org; Tue, 21 Jun 2022 08:20:28 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de;
 s=dbaedf251592; t=1655814017;
 bh=8O9o+Lb48SvSKTkn5bDYoTRfKay45prxRlZedSSJ+TM=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To;
 b=Ls9TouwJJv37qBDryv7DkRTAOfmL+vDTXNPpsRxxzgrBu6d3TvXu/6McykC51hZ7e
 XVrnwBYZC7AFQHbXFkwIdayTxU4FG+4DLOjE4rPeMgI6avEYbpqV+GodNHCmsEhOgP
 Jvk4B9SuSLDcDBe+VIFJ1ZHkG4jL7z0P9dyDinqw=
X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9
Received: from drachen.dragon ([84.60.174.246]) by smtp.web.de (mrweb005
 [213.165.67.108]) with ESMTPSA (Nemesis) id 1MLRYd-1oLZ7i2S7n-00Icmy; Tue, 21
 Jun 2022 14:20:17 +0200
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
To: "C. Michailidis" <signal3@HIDDEN>
Subject: Re: bug#56110: 27+; switching from line-mode to char-mode
References: <875ykvs9gq.fsf@HIDDEN> <87wndaw84w.fsf@HIDDEN>
Date: Tue, 21 Jun 2022 14:20:16 +0200
In-Reply-To: <87wndaw84w.fsf@HIDDEN> (Michael Heerdegen's message of "Tue, 21
 Jun 2022 13:47:27 +0200")
Message-ID: <87sfnyw6m7.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Provags-ID: V03:K1:4V0stwxdk/4nqVxTF/O6OQYre+CJL/pszQ73yayo+75n4fhRknW
 rHs+Lw5OrxxNloZZCXcAfIbVHYvNvMJOLylGRyKw3AvLFlgT5w3f5ex1Zz/wJ3OjvEpm3wx
 llVtRgi4N1JUliBhoD01MS8lWtRiuB8r9nTJrD360jCV8oyARcMWYyFOhTDHL5U7qGJh2IE
 mF55nxHK0bXHhauh7RIow==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:xVO4pEGSJUI=:DT7ALMrZITgcqEx2wgPENq
 wnoZVR55IcLilUvK1KYE1L1VyfxaQBYDFdt4wrz04M3NC/BalAtfTWw4TCMed7r2EBLniKT0x
 ENUMVq9ucG/XhhL2qHtmEiFX2SH1ztNsaij5/UnLrzurPcnfysXC9pSl8Ndlt02+CYQUHr+K3
 SBpx6/2LwU1Dtlm0yq9tMnCPP+QOlmQg/YQxV1y3ttKAMjrGvzgN+08ITjPltCKvWj96ZWLko
 Z9gMmcEYrNs56C433y1VrjdP5q7RBnB1zlOl/OiMCO3EesQQpWrA9CsaKItwve4TMqSwaLap4
 L9oGfT7duSxJLI8Rk3PpvgFR3A3rGdQMg101EwRQeMw/+8/2Q7yidpjPXDFs1dnanJIPzeZP2
 iLzl/SGwn3tWtmU729orav36tDaZQnD8mazsDbeMsBBExjdBMsThKhoT8vG/23m1mrwVYEYst
 cjV3jiAYlw6RL/2DnmNoYBcN6uERODXTJPlBFFmBuQneMJY6+Hr76WSg2Q2V8WEKeFEctVc3C
 1qdqeJGZfnprPvP5HRlnLHSqtATBrMVLLjDRas9gM5z+dj5qyqX9l9aNRA7LszbIrm3PQ0CHr
 Uo06QZ01F32tvoP8mtK8zBuKWK7lZNNayDFfFJjgaTHUkL3yWQVO3x/GCOujpoQKQaFXy3wZ4
 WyGLzsVSRATeJcIGZ2cuwPhj73YnbhTdenuQE6njlnjOyR4fbRI43cosTutNX4NZ1rlH8dBby
 U7iKAWak58W2VakACHy3MxiEYn9C1zFYjjV1V8tLX/Neq6UpSjdnP0zJ8jaWsqf7/M21UfanF
 96zmLUD8hTo1Pd5MJFQkHHWpZMrRH10vl+GUEpfyAW9hSmVGXz9w5U87amvz8Zc8IJWWWqwSE
 ydEmY0J6PSDLTKSGLaBA9hsBchC1Sy5fBbK4yRdWhyPHm0wgpYf4sm80PBLq1xRa9/DcRYcuV
 7YlAryowtalvPqAYnu0r7bzxSnVYDuhZn1dBShW2inZnCP947s4wWIknrYKG9nqEtxkrNXXNX
 Yx09PhwCjQmzXromz3X3ol75YuwicnAIpsMhM/yk5WEP2lNb+Y6qlZSBfuH25kFKtyKpRIT/w
 2wsdad4zIi4QRkuuhvvNlaiwEAzXLk4hx22gowc0m1JIg8NjTtAfX+96A==
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 56110
Cc: 56110 <at> debbugs.gnu.org, Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

--=-=-=
Content-Type: text/plain

Michael Heerdegen <michael_heerdegen@HIDDEN> writes:

> Stefan, how would a fix look like that fits your intention?

This maybe?


--=-=-=
Content-Type: text/x-diff
Content-Disposition: inline; filename=0001-WIP-Fix-56110.patch
Content-Transfer-Encoding: quoted-printable

=46rom db062f00cbd4cdf5934237dee3350046a40f0482 Mon Sep 17 00:00:00 2001
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
Date: Tue, 21 Jun 2022 13:41:51 +0200
Subject: [PATCH] WIP: Fix 56110

=2D--
 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
=2D-- 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-str=
ing)
 	      (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  ()
=2D-
2.30.2


--=-=-=
Content-Type: text/plain


[ I first failed to do this correctly because I had tried with
(local term-input-sender) instead of (local 'term-input-sender) - maybe
we can warn about that syntax missing that quote? ]

TIA,

Michael.

--=-=-=--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#56110; Package emacs. Full text available.

Message received at 56110 <at> debbugs.gnu.org:


Received: (at 56110) by debbugs.gnu.org; 21 Jun 2022 11:47:41 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jun 21 07:47:41 2022
Received: from localhost ([127.0.0.1]:59337 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1o3cM9-0002F6-2a
	for submit <at> debbugs.gnu.org; Tue, 21 Jun 2022 07:47:41 -0400
Received: from mout.web.de ([212.227.17.11]:43271)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <michael_heerdegen@HIDDEN>) id 1o3cM6-0002AW-UI
 for 56110 <at> debbugs.gnu.org; Tue, 21 Jun 2022 07:47:39 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de;
 s=dbaedf251592; t=1655812049;
 bh=QKiRQGI+TOJ8iT8VwsNd9W6o9SzTLET+9SzKQjRyhjw=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To;
 b=gkfQPJ0B+n3mOEvRzJyUbPD7x8hoakn3/t/r/WuTAy1qEnErhQ/Tx9tT0SWq5DWZU
 czeDMY0UDUlEJ+4rXTNkEm6ssv4XjaCRC90Ybsiz9bA1fEZ0uyJuEmkB4+v5DZUHnX
 Ya6JfOCi2/9PAci77skqDpnYERc9AomTvsYW5Mq4=
X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9
Received: from drachen.dragon ([84.60.174.246]) by smtp.web.de (mrweb105
 [213.165.67.124]) with ESMTPSA (Nemesis) id 1MLRYf-1oLYZu1WS3-00IKAx; Tue, 21
 Jun 2022 13:47:29 +0200
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
To: "C. Michailidis" <signal3@HIDDEN>
Subject: Re: bug#56110: 27+; switching from line-mode to char-mode
References: <875ykvs9gq.fsf@HIDDEN>
Date: Tue, 21 Jun 2022 13:47:27 +0200
In-Reply-To: <875ykvs9gq.fsf@HIDDEN> (C. Michailidis's message of
 "Mon, 20 Jun 2022 10:20:05 -0400")
Message-ID: <87wndaw84w.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Provags-ID: V03:K1:p8HlqS6SSUPZlrjR6qoiGW97GH79GFuGQjyucEQH/t6fl9xu026
 K/u6dnwLhF13DT+s6UUetrFk+nq59Z05TY41SlN1nBAVfsaWSE1g3xdh11dwIVkIzYsXVdy
 SmaMg/XY1SrmT0bJZKQ8AjEaacgoYPimKaeiGRaBQSUeY+VTtPb5td+M2/ixOXz7WfP2eqy
 uKdYm+5F1ZrAlBb7prZOg==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:oLYNASD7x94=:H5jILnO5gE7jnSQkzq1qZH
 8oBFAMkhHA+L8nzFJ1KdDAAJzzTdMgWRWST/0Z3hWmBKDxWOkuqJlgiIwSTgeV3Ww5rAkcRnP
 aQel7ndXMdm2p2V+zJEbVGsX1ygYC1qeoQAMPK1ZZcF1McFZQFNaWG1s9taZbu878h74w0Al5
 8Ef8brc4yMWs/U+q7CeQj9cZyt0l52gs3aRDherfFT18U/m1+dAVLD9so1QHYL0pABjcuu5Oq
 K3EmFVHiWE8WUieeoDLA9KPIVSm3lGsiCEGNQCIVW0y2Yh61GYXTIMODivR4gruA1xCXYgdns
 SHqtFo0O0JxusdBTvoYN8kGEK7jxnKEoyrgmvHK54Jf7rl6rFoAfcw6CZCGAkBnQ7CHZKMfcY
 7Boenh/GjH41RyS8ZtEaN/GcfIZtrfEfmI2JOg2GmDIC69t2hUIG5mgE7l8wQJOQioJz+ZAE1
 jt+0Yg6xFDngAebU0GihNOPXYvRgsIUyMlAFUWWdy/UZSEZJ7szGCMJjMJjgNOV5dCrJfSIbm
 gSWFCtyP5kM7iYgw6uMYQq/NctrA06v10d2I4HW3Y8X2Sw5l6B+2Mgbdg0hv6A98TSuMS16Wy
 yS8mpz07U86vwOS5bPig+kJWNUCfoiBov4ZzeW/FRC+TZgDNd1cCjPJXf1cTNUjALD/epA2I2
 /Uv4tG3fhiSY35fcihYD1DE46b/tLpZmn+CHwy5t0PNZKNRN+1YqHi/S0/l5ts4vYJgT6twvZ
 KQ7ZVsZivTPUcaO7tuQjefzRxbmTsU8mLZ/E4TtQDNfCVMLxPQQbleCaTmRK8Crrn8EEdgc4W
 QHxAzpQBxG4XanwAyn0q30N9Rfb+NysU+M8ovNEfXewHo8sppPrmpD4zX/n+mnx5M2OR0893r
 DLZdbCyfHkJ6zHtPmsEWRZ+WEe6/WR7npR/UVSDy0jYm9M1Fgusg1drqSodH8pIqUU/yjUwqk
 NuVud5iNGkAwVsxXTG4pVkvGFduc/qmQHMQQXeMYl7O7aptM467Le0AxSpGEBR8OrJm0Hqpop
 O0DaX4eVc8M9K5cOh203oED/tGU36mfrZezsVp+MhFBAT8d3YODzE2K8mM9DGM8Gwb56afC/u
 sKpwqVVRomBxllWcbb1GyVY5Xu/7bDCMzyiBTPx8W2LiCr/oEH/UEqp8g==
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 56110
Cc: 56110 <at> debbugs.gnu.org, Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--=-=-=
Content-Type: text/plain

"C. Michailidis" <signal3@HIDDEN> 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@HIDDEN> 2019-02-24

When I revert the part that changes `term-char-mode':


--=-=-=
Content-Type: text/x-diff
Content-Disposition: inline; filename=0001-WIP-Fix-56110.patch
Content-Transfer-Encoding: quoted-printable

=46rom 3ebb78f622453623a406d4413cbee421ae57ad84 Mon Sep 17 00:00:00 2001
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
Date: Tue, 21 Jun 2022 13:41:51 +0200
Subject: [PATCH] WIP: Fix 56110

=2D--
 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
=2D-- 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  ()
=2D-
2.30.2


--=-=-=
Content-Type: text/plain


the original behavior is restored.

Stefan, how would a fix look like that fits your intention?

TIA,

Michael.

--=-=-=--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#56110; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 20 Jun 2022 16:20:04 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jun 20 12:20:04 2022
Received: from localhost ([127.0.0.1]:58317 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1o3K8B-00081x-Bx
	for submit <at> debbugs.gnu.org; Mon, 20 Jun 2022 12:20:04 -0400
Received: from lists.gnu.org ([209.51.188.17]:34350)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <signal3@HIDDEN>) id 1o3IGD-0004p7-BN
 for submit <at> debbugs.gnu.org; Mon, 20 Jun 2022 10:20:13 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:44936)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <signal3@HIDDEN>) id 1o3IGB-0006zR-Cx
 for bug-gnu-emacs@HIDDEN; Mon, 20 Jun 2022 10:20:13 -0400
Received: from mail-qv1-xf2e.google.com ([2607:f8b0:4864:20::f2e]:39891)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <signal3@HIDDEN>) id 1o3IG9-0000ai-Hu
 for bug-gnu-emacs@HIDDEN; Mon, 20 Jun 2022 10:20:11 -0400
Received: by mail-qv1-xf2e.google.com with SMTP id cs6so11576932qvb.6
 for <bug-gnu-emacs@HIDDEN>; Mon, 20 Jun 2022 07:20:08 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=from:to:subject:date:message-id:mime-version;
 bh=opI86uqPryB1e5QxgQ4gvfaHMG8n6F+K9RuxH1lcwZk=;
 b=EzAplykwJZHh8yAW+9ARkkpzp3NIZSKVJEcAkOEGG1oTuurtMm8A0192Dbqc7kamDb
 YvzXgye0pdKtl/X3hrIbfBnNTFavXvig39/FIfDoKMUrqCQdUOqzHbfDT9gf2eFxKLRk
 9hyD7dBcyQtmLOS4hAoMHduEBiQ989Kmph//RqgVeIAveurnwd6F47JRwzB9R8eXOeJr
 joatDCsdvcVfRb8StCQtFOp6Y1UlhfkVShANHb7bPGpv/yD1n3M5xz2Fi+YQhcMO8v5V
 2kUF6ca3RCH4j6kTfKEJ/Gg3dEQz6kIoNzGNWielRvMt512B0CjQzlTOfm3mSFdBUI0a
 n1pA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:from:to:subject:date:message-id:mime-version;
 bh=opI86uqPryB1e5QxgQ4gvfaHMG8n6F+K9RuxH1lcwZk=;
 b=U8mjxlqZCLN7fBNyLTHnGncfOyCAlA7Ys7JcahhJNM1fq5DrHiQPwOtQtZth8n0ik4
 F0ECb4MrNq55jWumbhN0CTzchWSB29QZpw+ihMktiwRLuzuJ0cvk4oBluzS2G3nEQdZ5
 p0Q2vaOjFROpeOajqPbxv8JAum7mxE8JA28TMHDfpaqrqrUiLxIvboF7a4GVo6Tlq/vE
 5P4hONzDLxvIZOarDkJEr+HTSG890lqF4rDIn778NAI3M8A7NzA3ycSZGIIxXD7h7os5
 W/kADjRe3UZOVB+kUer23+B9hFzdXPcPd0YATZQpUdZp2V7iRoZxbJ+3cgodCqtl50Rq
 Tkfg==
X-Gm-Message-State: AJIora9kVFGDF1tpMPCQohVgsCRl4aLxl99xTnEtdTHirRdJJSb6yqEV
 fFFdrHxnF7BBMVkp3DvEPl7oFy/kCKY=
X-Google-Smtp-Source: AGRyM1tMQ2JsU4/wf5T5VqU7kxs0vF1e2B5me0aenx3dMGD6fOqqSv3qfrNMZ3prWcJ6kVnnIdLfcw==
X-Received: by 2002:a05:622a:1109:b0:305:20de:4d21 with SMTP id
 e9-20020a05622a110900b0030520de4d21mr19824429qty.197.1655734808084; 
 Mon, 20 Jun 2022 07:20:08 -0700 (PDT)
Received: from fwiw.co ([216.6.180.36]) by smtp.gmail.com with ESMTPSA id
 x17-20020ac87311000000b003051f450049sm10272241qto.8.2022.06.20.07.20.06
 for <bug-gnu-emacs@HIDDEN>
 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);
 Mon, 20 Jun 2022 07:20:07 -0700 (PDT)
From: "C. Michailidis" <signal3@HIDDEN>
X-Google-Original-From: "C. Michailidis" <dinom@HIDDEN>
Received: by fwiw.co (sSMTP sendmail emulation);
 Mon, 20 Jun 2022 10:20:05 -0400
To: bug-gnu-emacs@HIDDEN
Subject: 27+; switching from line-mode to char-mode
Date: Mon, 20 Jun 2022 10:20:05 -0400
Message-ID: <875ykvs9gq.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
Received-SPF: pass client-ip=2607:f8b0:4864:20::f2e;
 envelope-from=signal3@HIDDEN; helo=mail-qv1-xf2e.google.com
X-Spam_score_int: -18
X-Spam_score: -1.9
X-Spam_bar: -
X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
 FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001,
 RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001,
 T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.1 (-)
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Mon, 20 Jun 2022 12:19:59 -0400
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.1 (--)


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




Acknowledgement sent to "C. Michailidis" <signal3@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#56110; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sun, 26 Jun 2022 15:45:01 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.