From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#24639: 26.0.50; Terminal paste doesn't work right in term char mode Date: Mon, 10 Oct 2016 08:56:16 +0300 Message-ID: <834m4kg327.fsf@gnu.org> References: <83oa2whtds.fsf@gnu.org> <83lgy0hshf.fsf@gnu.org> <83k2djif60.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1476079041 23800 195.159.176.226 (10 Oct 2016 05:57:21 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 10 Oct 2016 05:57:21 +0000 (UTC) Cc: 24639@debbugs.gnu.org To: Philipp Stephani Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Oct 10 07:57:17 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1btTaN-0005QF-Og for geb-bug-gnu-emacs@m.gmane.org; Mon, 10 Oct 2016 07:57:15 +0200 Original-Received: from localhost ([::1]:47652 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1btTaM-0006t2-0H for geb-bug-gnu-emacs@m.gmane.org; Mon, 10 Oct 2016 01:57:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39114) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1btTaF-0006sa-Cy for bug-gnu-emacs@gnu.org; Mon, 10 Oct 2016 01:57:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1btTaA-0003dS-E0 for bug-gnu-emacs@gnu.org; Mon, 10 Oct 2016 01:57:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:44232) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1btTaA-0003dL-Af for bug-gnu-emacs@gnu.org; Mon, 10 Oct 2016 01:57:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1btTaA-0002PJ-0p for bug-gnu-emacs@gnu.org; Mon, 10 Oct 2016 01:57:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 10 Oct 2016 05:57:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24639 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 24639-submit@debbugs.gnu.org id=B24639.14760789789201 (code B ref 24639); Mon, 10 Oct 2016 05:57:01 +0000 Original-Received: (at 24639) by debbugs.gnu.org; 10 Oct 2016 05:56:18 +0000 Original-Received: from localhost ([127.0.0.1]:50422 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1btTZR-0002OK-UH for submit@debbugs.gnu.org; Mon, 10 Oct 2016 01:56:18 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:48025) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1btTZQ-0002O5-9C for 24639@debbugs.gnu.org; Mon, 10 Oct 2016 01:56:16 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1btTZF-0003Fz-SS for 24639@debbugs.gnu.org; Mon, 10 Oct 2016 01:56:10 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:42993) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1btTZF-0003FJ-Pk; Mon, 10 Oct 2016 01:56:05 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1875 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1btTZD-0000BA-E8; Mon, 10 Oct 2016 01:56:04 -0400 In-reply-to: (message from Philipp Stephani on Sun, 09 Oct 2016 20:48:59 +0000) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:124285 Archived-At: > From: Philipp Stephani > Date: Sun, 09 Oct 2016 20:48:59 +0000 > Cc: 24639@debbugs.gnu.org > > > > Maybe M-x term should temporarily bracketed paste mode when in char > > > mode. > > > > That's what I was trying to suggest. Does this have downsides? > > > > I wouldn't expect any. Bracketed paste mode is a bit faster, but running a bit slower is better than not > working > > at all. > > Then please push such a change to the emacs-25 branch. > > Unfortunately it's not that simple: Bracketed paste more should only be disabled when a term buffer is active > on an xterm and in char mode. So this will probably require an addition to window-configuration-change-hook > or similar. Sorry, I don't understand the reasons for the complication. The "in char mode" part was already on the table when we discussed this previously. Presumably, there's a function in term-mode which switches to and from char mode, and that function should turn bracketed paste mode on or off, accordingly. Is that right? For the "term buffer is active" part, do you mean re-enable the bracketed paste mode when the user switches to another buffer? If so, won't it be easier, simpler, and more reliable to do that in a post-command-hook? Or maybe it's easier to arrange for xterm-paste to realize the current buffer is in term char mode, and do the "normal" paste part? Is that possible?