GNU bug report logs - #4635
23.1.50; term-previous-input and split windows

Previous Next

Package: emacs;

Reported by: Stephen Berman <stephen.berman <at> gmx.net>

Date: Sun, 4 Oct 2009 22:15:04 UTC

Severity: normal

Done: Chong Yidong <cyd <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 4635 in the body.
You can then email your comments to 4635 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#4635; Package emacs. (Sun, 04 Oct 2009 22:15:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Stephen Berman <stephen.berman <at> gmx.net>:
New bug report received and forwarded. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Sun, 04 Oct 2009 22:15:05 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Stephen Berman <stephen.berman <at> gmx.net>
To: emacs-pretest-bug <at> gnu.org
Subject: 23.1.50; term-previous-input and split windows
Date: Mon, 05 Oct 2009 00:07:02 +0200
1. emacs -Q
2. Type M-x term RET to bring up the *terminal* buffer in term-mode
   (/bin/bash here, if that's significant).
3. Type RET to put point on line 2 of the *terminal* buffer.
4. Type C-c 2 to make split windows (or any other command that makes
   split windows, e.g. C-c 3, C-c C-b, etc.).
5. Type M-p to insert previous input.
=> The cursor in the selected *terminal* buffer jumps to the beginning
   of the buffer instead of staying at the end of the inserted input.

This only happens if the *terminal* buffer has at least two displayed
lines (step 3).  Any further term-* command restores the cursor to the
correct position.  The cursor displacement also happens if the frame is
unsplit after step 5, i.e. C-c 1 followed by M-p (but not if the frame
is unsplit between steps 4 and 5).

This problem also happens with Emacs 22.


In GNU Emacs 23.1.50.2 (i686-pc-linux-gnu, GTK+ Version 2.14.4)
 of 2009-10-03 on escher
Windowing system distributor `The X.Org Foundation', version 11.0.10502000
Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: @im=local
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t



Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#4635; Package emacs. (Thu, 19 Nov 2009 22:05:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Stephen Berman <stephen.berman <at> gmx.net>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Thu, 19 Nov 2009 22:05:05 GMT) Full text and rfc822 format available.

Message #10 received at 4635 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Stephen Berman <stephen.berman <at> gmx.net>
To: 4635 <at> debbugs.gnu.org
Subject: Re: bug#4635: 23.1.50; term-previous-input and split windows
Date: Thu, 19 Nov 2009 22:55:57 +0100
ping

The recipe in my OP was too specific, the problem occurs even without
term-previous-input:

1. emacs -Q
2. M-x term RET
3. C-c 2
4. RET
=> Cursor jumps from the term prompt to the beginning of the buffer

I instrumented term.el but could not induce the jump when stepping
through with edebug.  I don't know how else to try debugging this.

Steve Berman



Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#4635; Package emacs. (Fri, 19 Feb 2010 14:27:01 GMT) Full text and rfc822 format available.

Message #13 received at 4635 <at> debbugs.gnu.org (full text, mbox):

From: Stephen Berman <Stephen.Berman <at> gmx.net>
To: 4635 <at> debbugs.gnu.org
Subject: Re: bug#4635: 23.1.50; term-previous-input and split windows
Date: Fri, 19 Feb 2010 15:25:54 +0100
On Thu, 19 Nov 2009 22:55:57 +0100 Stephen Berman <stephen.berman <at> gmx.net> wrote:

> 1. emacs -Q
> 2. M-x term RET
> 3. C-c 2
> 4. RET
> => Cursor jumps from the term prompt to the beginning of the buffer
>
> I instrumented term.el but could not induce the jump when stepping
> through with edebug.  I don't know how else to try debugging this.

Manifestations of this bug continue to annoy me (currently using GNU
Emacs 23.1.92.1 (i686-pc-linux-gnu, GTK+ Version 2.18.6) of 2010-02-13
on escher).  Does anyone have any idea how to fix (or at least debug)
it?  Can anyone else reproduce it?

Steve Berman




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#4635; Package emacs. (Sat, 25 Sep 2010 16:06:02 GMT) Full text and rfc822 format available.

Message #16 received at 4635 <at> debbugs.gnu.org (full text, mbox):

From: Johan Bockgård <bojohan <at> gnu.org>
To: Stephen Berman <Stephen.Berman <at> gmx.net>
Cc: 4635 <at> debbugs.gnu.org
Subject: Re: bug#4635: 23.1.50; term-previous-input and split windows
Date: Sat, 25 Sep 2010 18:07:02 +0200
Stephen Berman <Stephen.Berman <at> gmx.net> writes:

> On Thu, 19 Nov 2009 22:55:57 +0100 Stephen Berman <stephen.berman <at> gmx.net> wrote:
>
>> 1. emacs -Q
>> 2. M-x term RET
>> 3. C-c 2
>> 4. RET
>> => Cursor jumps from the term prompt to the beginning of the buffer
>>
>> I instrumented term.el but could not induce the jump when stepping
>> through with edebug.  I don't know how else to try debugging this.
>
> Manifestations of this bug continue to annoy me (currently using GNU
> Emacs 23.1.92.1 (i686-pc-linux-gnu, GTK+ Version 2.18.6) of 2010-02-13
> on escher).  Does anyone have any idea how to fix (or at least debug)
> it?  Can anyone else reproduce it?

Point is being moved by

  <process filter> -> term-emulate-terminal -> term-check-size ->
  term-reset-size -> term-set-scroll-region

The same thing will also happen if you resize the window without
splitting it.




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#4635; Package emacs. (Sun, 26 Sep 2010 13:02:01 GMT) Full text and rfc822 format available.

Message #19 received at 4635 <at> debbugs.gnu.org (full text, mbox):

From: Stephen Berman <stephen.berman <at> gmx.net>
To: 4635 <at> debbugs.gnu.org
Subject: Re: bug#4635: 23.1.50; term-previous-input and split windows
Date: Sun, 26 Sep 2010 15:03:49 +0200
On Sat, 25 Sep 2010 18:07:02 +0200 Johan Bockgård <bojohan <at> gnu.org> wrote:

> Stephen Berman <Stephen.Berman <at> gmx.net> writes:
>
>> On Thu, 19 Nov 2009 22:55:57 +0100 Stephen Berman <stephen.berman <at> gmx.net> wrote:
>>
>>> 1. emacs -Q
>>> 2. M-x term RET
>>> 3. C-c 2
>>> 4. RET
>>> => Cursor jumps from the term prompt to the beginning of the buffer
>>>
>>> I instrumented term.el but could not induce the jump when stepping
>>> through with edebug.  I don't know how else to try debugging this.
>>
>> Manifestations of this bug continue to annoy me (currently using GNU
>> Emacs 23.1.92.1 (i686-pc-linux-gnu, GTK+ Version 2.18.6) of 2010-02-13
>> on escher).  Does anyone have any idea how to fix (or at least debug)
>> it?  Can anyone else reproduce it?
>
> Point is being moved by
>
>   <process filter> -> term-emulate-terminal -> term-check-size ->
>   term-reset-size -> term-set-scroll-region
>
> The same thing will also happen if you resize the window without
> splitting it.

Thanks for tracking that down.  So, if I comment out the sexp (term-goto
0 0) in the last line term-set-scroll-region, the jump still happens,
but only to (line-beginning-position) and then the cursor immediately
returns to the first character after the prompt.  This looks strange but
is at any rate much less disconcerting than jumping to the beginning of
the buffer.  The only other place term-set-scroll-region is called is at
the end of term-handle-ansi-escape; I don't know how to test if this
change causes problems here.  BTW, the jump only happens in character
mode (the default), not in line mode.

Steve Berman




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#4635; Package emacs. (Sun, 17 Jun 2012 08:30:02 GMT) Full text and rfc822 format available.

Message #22 received at 4635 <at> debbugs.gnu.org (full text, mbox):

From: Chong Yidong <cyd <at> gnu.org>
To: Stephen Berman <stephen.berman <at> gmx.net>
Cc: 4635 <at> debbugs.gnu.org
Subject: Re: bug#4635: 23.1.50; term-previous-input and split windows
Date: Sun, 17 Jun 2012 16:26:31 +0800
Stephen Berman <stephen.berman <at> gmx.net> writes:

>>>> 1. emacs -Q
>>>> 2. M-x term RET
>>>> 3. C-c 2
>>>> 4. RET
>>>> => Cursor jumps from the term prompt to the beginning of the buffer
>
> Thanks for tracking that down.  So, if I comment out the sexp (term-goto
> 0 0) in the last line term-set-scroll-region, the jump still happens,
> but only to (line-beginning-position) and then the cursor immediately
> returns to the first character after the prompt.  This looks strange but
> is at any rate much less disconcerting than jumping to the beginning of
> the buffer.  The only other place term-set-scroll-region is called is at
> the end of term-handle-ansi-escape; I don't know how to test if this
> change causes problems here.  BTW, the jump only happens in character
> mode (the default), not in line mode.

I committed a similar fix, in term-emulate-terminal, to trunk.  Thanks.




bug closed, send any further explanations to 4635 <at> debbugs.gnu.org and Stephen Berman <stephen.berman <at> gmx.net> Request was from Chong Yidong <cyd <at> gnu.org> to control <at> debbugs.gnu.org. (Sun, 17 Jun 2012 08:31:01 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 15 Jul 2012 11:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 11 years and 295 days ago.

Previous Next


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