* [happy@mcplaksin.org: One display problem and one M-x problem]
@ 2004-08-22 16:52 Richard Stallman
0 siblings, 0 replies; only message in thread
From: Richard Stallman @ 2004-08-22 16:52 UTC (permalink / raw)
Can people work on these two problems? Please ack to me.
------- Start of forwarded message -------
X-Injected-Via-Gmane: http://gmane.org/
To: emacs-pretest-bug@gnu.org
From: Mark Plaksin <happy@mcplaksin.org>
Date: Sat, 21 Aug 2004 13:40:46 -0400
X-Gmane-NNTP-Posting-Host: water.tss.usg.edu
Cancel-Lock: sha1:bTsTRDBlvdrD1WAKgU46n4gkqeQ=
Subject: One display problem and one M-x problem
Sender: emacs-pretest-bug-bounces+rms=gnu.org@gnu.org
X-Spam-Status: No, hits=0.0 required=5.0
tests=RCVD_IN_ORBS,USER_AGENT_GNUS_UA
version=2.55
X-Spam-Level:
X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp)
CVS Emacs running on Debian unstable recently (in the past month or so)
started misbehaving when running vi inside M-x term. Emacs seems to add an
extra newline at the end of lines. I found two problems while trying to
fix it. Since I haven't found a fix for (1), I'm not sure if it is the
cause of the vi-in-term problem but it seems likely.
1) The first problem isn't related to M-x term at all. It's more general.
To reproduce:
- - Run emacs -q in X. My window was 83x40.
- - a ;; Type the letter a to mark the beginning of the line
- - M-: (insert-char ?b 50000)
- - a ;; Another a to mark the end of the line
- - C-a ;; to get to the beginning of the giant line
- - ESC 1 0 0 C-f ;; to put the cursor somewhere in the middle of the second
row of b's.
- - C-SPC
- - ESC >
- - C-b ;; to put the cursor on the final a.
- - C-w
- - ;; At this point, a is in the upper left corner of the window.
- - C-p ;; Now the display will contain a spurious newline and a spurious a.
Like this:
http://mcplaksin.org/happy/before.png
- - C-l ;; and the extras go away and Emacs displays what you expected to see in
the first place. Like this:
http://mcplaksin.org/happy/after.png
Since C-l fixes it and that's in the C source, I think I'm helpless to help
solve this. Let me know if there's more I can do.
2) term inserts a spurious newline if the first command run inside the term
sends ESC[?47h (this just happens to be the first thing vim sends when run
inside M-x term). To reproduce:
- - Create a short shell script called 'testy':
#!/bin/sh
# Instead of ESC, use a real ESC character
echo -n 'ESC[?47h'
- - emacs -q
- - M-x term RET
- - ./testy
The newline is inserted by the following code from
term-switch-to-alternate-sub-buffer which is called from
term-handle-ansi-escape:
(if (not (eq (preceding-char) ?\n))
(term-insert-char ?\n 1))
I don't quite get what term-switch-to-alternate-sub-buffer is trying to do
so I don't know how to help further. The problem goes away if I make
term-switch-to-alternate-sub-buffer do nothing at all; because of (1)
above, I'm not sure whether this change results in the problem described in
term-switch-to-alternate-sub-buffer's comment:
;; If asked to switch to (from) the alternate sub-buffer, and already (not)
;; using it, do nothing. This test is needed for some programs (including
;; Emacs) that emit the ti termcap string twice, for unknown reason.
Thanks!
_______________________________________________
Emacs-pretest-bug mailing list
Emacs-pretest-bug@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug
------- End of forwarded message -------
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-08-22 16:52 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-08-22 16:52 [happy@mcplaksin.org: One display problem and one M-x problem] Richard Stallman
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).