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

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

bug#21609: bug#24837: 26.0.50; term.el: In char mode, displayed and exec


From: Philipp Stephani
Subject: bug#21609: bug#24837: 26.0.50; term.el: In char mode, displayed and executed commands can differ
Date: Sun, 24 Sep 2017 10:59:13 +0000



Phil Sainty <address@hidden> schrieb am So., 3. Sep. 2017 um 04:58 Uhr:
On 03/09/17 02:14, Eli Zaretskii wrote:
> This bug is currently one of those marked to block the release of
> Emacs 26.1.  Given that it existed for quite some time, I tend to
> remove the blocking status, but if someone has practical ideas how
> to fix this, I think we should do that now.

Well here's a starter for discussion.

I've performed only cursory testing, but at first glance this seems
to do the trick, so I'll see what other people think...

Firstly I'm using Philipp Stephani's suggestion that the buffer be
read-only in `term-char-mode' (and removing that in `term-line-mode';
this code doesn't attempt to remember the pre-existing states if
the user had changed it manually).  The default term process filter
`term-emulate-terminal' then binds `buffer-read-only' to nil.

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 haven't checked the code in detail, but it seems to be reasonable. Since nobody complained in weeks, maybe just push it to the release branch and see whether it breaks anything. 

reply via email to

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