Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 161315 - Emacs exhibits different delete key behaviour between linux tty and xterm
Summary: Emacs exhibits different delete key behaviour between linux tty and xterm
Alias: None
Product: Fedora
Classification: Fedora
Component: emacs
Version: 4
Hardware: x86_64
OS: Linux
Target Milestone: ---
Assignee: Jens Petersen
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2005-06-22 11:20 UTC by David Howells
Modified: 2007-11-30 22:11 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2005-09-30 02:12:57 UTC

Attachments (Terms of Use)

Description David Howells 2005-06-22 11:20:59 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (compatible; Konqueror/3.4; Linux) KHTML/3.4.0 (like Gecko)

Description of problem:
emacs -nw when run on the linux text tty shows the following key bindings:    
    CTRL-d    - C-d; delete-char    
    CTRL-h    - C-h; goes into help menu    
    Backspace - DEL; backward-delete-char-untabify    
    DEL       - <deletechar>; delete-char    
emacs -nw when run under the "xterm" program shows the following key bindings:    
    CTRL-d    - C-d; delete-char    
    CTRL-h    - DEL; backward-delete-char-untabify    
    Backspace - C-d; delete-char    
    DEL       - <deletechar>; delete-char    
I've checked with strace, and in both cases the same data is read by emacs for    
each type of keypress: 0x04; 0x08; 0x7f; and 0x1b 0x5b 0x33 0x7e.    
I've tried changing the TERM, DISPLAY and LANG variables, but to no effect. 
infocmp doesn't show any obvious differences between the xterm and linux 
terminal types, so I don't know what's determining the behaviour. 

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Run emacs -nw on linux tty. 
2. Type a character and press the backspace key. 
3. Repeat on emacs -nw running on an xterm. 

Actual Results:  On the linux tty the character entered is deleted, but on the xterm emacs 
complains about the cursor being at the end of the buffer. 

Expected Results:  In both cases the character should be deleted. 

Additional info:

The reason I'm raising this bug is that firstly the delete behaviour ought to 
be consistent; secondly, the backspace key usually deletes backwards and in 
the xterm case it doesn't; and thirdly this might affect programs other than 

Comment 1 Jens Petersen 2005-06-23 00:48:19 UTC
I have a feeling this is likely an upstream faq.

Could you please try to ask about this upstream, eg
on emacs-devel list or

This is somewhat akin to the debates on C-h vs Backspace for emacs
on the terminal, I think.

Anyway assuming it is not a Fedora specific problem, then
the change needs to be made upstream first.

Does the same thing happen with cvs emacs?

Note You need to log in before you can comment on or make changes to this bug.