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

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

Re: Page Up/Down Issues With Emacs in Terminal


From: Yuri Khan
Subject: Re: Page Up/Down Issues With Emacs in Terminal
Date: Wed, 6 Jul 2016 13:37:08 +0600

On Wed, Jul 6, 2016 at 8:14 AM, Brandeis King <address@hidden> wrote:

> To clarify, I'm experiencing this issue with xterm and gnome-terminal, both 
> with and without tmux. And yes, I'm using z-shell.

When you press Page Down in xterm or gnome-terminal, it generates four
characters: ESC [ 6 ~. Upon receiving this sequence, Emacs should
translate it back to a [next] key vector.

In order for this to happen, Emacs has to know you’re using an
xterm-compatible terminal. It does that by looking at your TERM
variable.

Your symptoms suggest that the value of the TERM environment variable
does not match your terminal type.

To debug the problem further, you need to list, for each distinct case:

* the complete stack of terminal emulators;
* what the value of TERM is at each layer of that stack.

The shell you are using is mostly irrelevant; the only thing it will
affect is whether and how you set the TERM variable.


For xterm and gnome-terminal, the expected result is:

    $ echo $TERM
    xterm

or a variation thereof (e.g. xterm-256color).

When you use tmux with xterm or gnome-terminal, TERM should be "xterm"
(or xterm-*) before you start tmux, and "screen" (or screen-*) within
tmux.

(Newer systems, e.g. Ubuntu 16.04, also support a separate "tmux" (and
tmux-*) terminal type. As far as I can tell, Emacs does not yet have
such support.)



reply via email to

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