Phil Sainty 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.