From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Phil Sainty Newsgroups: gmane.emacs.bugs Subject: bug#21609: bug#24837: 26.0.50; term.el: In char mode, displayed and executed commands can differ Date: Mon, 4 Sep 2017 21:55:57 +1200 Message-ID: References: <08c3b161-174d-1fb7-5df4-bbf7f7d47ee9@orcon.net.nz> <83val1xk58.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1504519073 7976 195.159.176.226 (4 Sep 2017 09:57:53 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 4 Sep 2017 09:57:53 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 Cc: 24837@debbugs.gnu.org, 21609@debbugs.gnu.org To: Eli Zaretskii , Philipp Stephani Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Sep 04 11:57:37 2017 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 1doo81-0000QY-3k for geb-bug-gnu-emacs@m.gmane.org; Mon, 04 Sep 2017 11:57:13 +0200 Original-Received: from localhost ([::1]:48908 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1doo87-0000Ba-RZ for geb-bug-gnu-emacs@m.gmane.org; Mon, 04 Sep 2017 05:57:19 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34776) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1doo7x-0000AT-34 for bug-gnu-emacs@gnu.org; Mon, 04 Sep 2017 05:57:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1doo7s-0007NT-Ea for bug-gnu-emacs@gnu.org; Mon, 04 Sep 2017 05:57:09 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:39040) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1doo7s-0007NE-B9 for bug-gnu-emacs@gnu.org; Mon, 04 Sep 2017 05:57:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1doo7p-0002EO-MK for bug-gnu-emacs@gnu.org; Mon, 04 Sep 2017 05:57:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Phil Sainty Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 04 Sep 2017 09:57:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21609 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 21609-submit@debbugs.gnu.org id=B21609.15045189728507 (code B ref 21609); Mon, 04 Sep 2017 09:57:01 +0000 Original-Received: (at 21609) by debbugs.gnu.org; 4 Sep 2017 09:56:12 +0000 Original-Received: from localhost ([127.0.0.1]:47716 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1doo72-0002D6-Ep for submit@debbugs.gnu.org; Mon, 04 Sep 2017 05:56:12 -0400 Original-Received: from smtp-4.orcon.net.nz ([60.234.4.59]:53229) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1doo70-0002Cm-PZ; Mon, 04 Sep 2017 05:56:11 -0400 Original-Received: from [150.107.172.28] (port=10839 helo=[192.168.20.102]) by smtp-4.orcon.net.nz with esmtpa (Exim 4.86_2) (envelope-from ) id 1doo6o-0004d7-9j; Mon, 04 Sep 2017 21:55:58 +1200 In-Reply-To: Content-Language: en-GB X-GeoIP: NZ X-Spam_score: -2.9 X-Spam_score_int: -28 X-Spam_bar: -- 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:136570 Archived-At: On 03/09/17 14:58, Phil Sainty wrote: > Secondly, I've added a local `post-command-hook' function in > `term-char-mode' which simply moves point back to the local process > mark position. > > Might such a simple approach be usable? I'm not very familiar with > the code, so maybe there are glaring holes that I'm not seeing. I've realised that one such glaring hole is mouse input, as clicking then tends to create a selection between where you click and (forcibly) the mark position at (most likely) the end of the buffer. I'm not sure whether that's a deal breaker, or something which is essentially incompatible with any solution to the problem and should perhaps be disabled when in term-char-mode? Inhibiting mouse events (or similar) sounds a little bit drastic; however if unimpeded mouse selection is possible, and this allows the user a way to move point from the process mark, then that just seems contradictory to what we're trying to achieve in the first place, which is to keep the state of the buffer (including point) consistent with what the terminal process believes it to be. We could automatically switch to term-line-mode upon mouse clicks, but offhand I don't see how we could switch back automatically without simply triggering the initial problem, and requiring the user to manually switch back doesn't seem so user-friendly. -Phil