all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* backspace/del/C-h confusion between emacs -nw & emacs X11
@ 2003-05-20  1:29 Balaji Venkataraman
  2003-05-20  1:46 ` lawrence mitchell
  2003-05-20 12:25 ` Kai Großjohann
  0 siblings, 2 replies; 6+ messages in thread
From: Balaji Venkataraman @ 2003-05-20  1:29 UTC (permalink / raw)


I'm sure this is an oft repeated question, but I still haven't found a fool
proof solution yet. I'm not a novice user, so I'd appreciate it if you read
the whole mail, before replying.

This is with Emacs (21.1.2) on Solaris.

In short I want the <Backspace> and "C-h" to behave similarly whether I run
"emacs -q" or "emacs -nw -q". I want the <Backspace> key to delete the
previous char and "C-h" to give me the help menu - this is what happens when
you run "emacs -q". But with "-nw", both those keys seem to be tied to the
same thing. Changing one (with keyboard translate) changes the other. 

I have read the emacs news (do "C-h C-n" and search for the string 
"backspace"). It talks about the difference in behavior, but I want to be
able to avoid it. It's most annoying to bring up emacs with the "-nw" in an
xterm and have the backspace give you "help".

Thanks,
Balaji.
-- 
Remember 2 + 2 = 5, for large values of 2

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: backspace/del/C-h confusion between emacs -nw & emacs X11
  2003-05-20  1:29 backspace/del/C-h confusion between emacs -nw & emacs X11 Balaji Venkataraman
@ 2003-05-20  1:46 ` lawrence mitchell
  2003-05-20 12:25 ` Kai Großjohann
  1 sibling, 0 replies; 6+ messages in thread
From: lawrence mitchell @ 2003-05-20  1:46 UTC (permalink / raw)


Balaji Venkataraman wrote:

> I'm sure this is an oft repeated question, but I still haven't found a fool
> proof solution yet. I'm not a novice user, so I'd appreciate it if you read
> the whole mail, before replying.

> This is with Emacs (21.1.2) on Solaris.

> In short I want the <Backspace> and "C-h" to behave similarly whether I run
> "emacs -q" or "emacs -nw -q". I want the <Backspace> key to delete the
> previous char and "C-h" to give me the help menu - this is what happens when
> you run "emacs -q". But with "-nw", both those keys seem to be tied to the
> same thing. Changing one (with keyboard translate) changes the other.

Does adding (normal-erase-is-backspace-mode 1) to your ~/.emacs
(or doing M-x normal-erase-is-backspace-mode RET) help at all?

Also, what does stty -a tell you about the value of "erase", for
me, backspace generates ^? in an xterm.

-- 
lawrence mitchell <wence@gmx.li>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: backspace/del/C-h confusion between emacs -nw & emacs X11
  2003-05-20  1:29 backspace/del/C-h confusion between emacs -nw & emacs X11 Balaji Venkataraman
  2003-05-20  1:46 ` lawrence mitchell
@ 2003-05-20 12:25 ` Kai Großjohann
  2003-05-20 19:27   ` Balaji Venkataraman
  1 sibling, 1 reply; 6+ messages in thread
From: Kai Großjohann @ 2003-05-20 12:25 UTC (permalink / raw)


Balaji Venkataraman <bvenkata+nospam@sm.intel.com> writes:

> In short I want the <Backspace> and "C-h" to behave similarly whether I run
> "emacs -q" or "emacs -nw -q". I want the <Backspace> key to delete the
> previous char and "C-h" to give me the help menu - this is what happens when
> you run "emacs -q". But with "-nw", both those keys seem to be tied to the
> same thing. Changing one (with keyboard translate) changes the other. 

>From a shell, invoke cat.  Then hit C-v <backspace> and then hit C-v
C-h.  I'm guessing that you will see that both print ^H on the
screen.  If this is indeed the case, then there is nothing Emacs can
do: when you hit <backspace> or when you hit C-h, the terminal sends
the same bytes to Emacs, so there is no way for Emacs to tell the
difference.

If the two print different things, please show us what they print.

If the two print the same thing, then you need to reprogram your
terminal to produce different things.  I suggest that you make
<backspace> produce ^? (that's ascii 127, also known as DEL).

-- 
This line is not blank.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: backspace/del/C-h confusion between emacs -nw & emacs X11
  2003-05-20 12:25 ` Kai Großjohann
@ 2003-05-20 19:27   ` Balaji Venkataraman
  2003-05-21  6:06     ` Klaus Zeitler
  2003-05-22  8:54     ` Kai Großjohann
  0 siblings, 2 replies; 6+ messages in thread
From: Balaji Venkataraman @ 2003-05-20 19:27 UTC (permalink / raw)


On Tue, 20 May 2003 14:25:09 +0200, kai.grossjohann@gmx.net (Kai Großjohann)
wrote: 

> From a shell, invoke cat.  Then hit C-v <backspace> and then hit C-v
> C-h.  I'm guessing that you will see that both print ^H on the
> screen.  

Kai...spot on! Yes...they both produce ^H. 

> If the two print the same thing, then you need to reprogram your
> terminal to produce different things.  I suggest that you make
> <backspace> produce ^? (that's ascii 127, also known as DEL).

The only way I could get it to work:
I swapped my <backspace> and <delete> keys (as below):
My keyboard is - Sun Microsystems Type 5/PC (OpenWindows; US)
keycode 0x32 =  Delete
keycode 0x49 =  BackSpace

Now emacs works fine, both X11 and "-nw", but I have to live with "C-h"
being the backspace at the shell (<backspace> is backspace within emacs).

I'd like to be able to do <backspace> at the shell and have it behave like 
backspace. Is that possible?

Thanks,
Balaji.
-- 
Remember 2 + 2 = 5, for large values of 2

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: backspace/del/C-h confusion between emacs -nw & emacs X11
  2003-05-20 19:27   ` Balaji Venkataraman
@ 2003-05-21  6:06     ` Klaus Zeitler
  2003-05-22  8:54     ` Kai Großjohann
  1 sibling, 0 replies; 6+ messages in thread
From: Klaus Zeitler @ 2003-05-21  6:06 UTC (permalink / raw)


>>>>> "Balaji" == Balaji Venkataraman <bvenkata+nospam@sm.intel.com> writes:
    Balaji> 
    Balaji> I'd like to be able to do <backspace> at the shell and have it
    Balaji> behave like  backspace. Is that possible?

maybe with something like "stty erase ^h" (with the usual caveats regarding
interactive/non interactive use of shells)

Klaus

-- 
 ------------------------------------------
|  Klaus Zeitler      Lucent Technologies  |
 ------------------------------------------
---
Fashion is a form of ugliness so intolerable that we have to alter it
every six months.                                      -- Oscar Wilde

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: backspace/del/C-h confusion between emacs -nw & emacs X11
  2003-05-20 19:27   ` Balaji Venkataraman
  2003-05-21  6:06     ` Klaus Zeitler
@ 2003-05-22  8:54     ` Kai Großjohann
  1 sibling, 0 replies; 6+ messages in thread
From: Kai Großjohann @ 2003-05-22  8:54 UTC (permalink / raw)


Balaji Venkataraman <bvenkata+nospam@sm.intel.com> writes:

> Now emacs works fine, both X11 and "-nw", but I have to live with "C-h"
> being the backspace at the shell (<backspace> is backspace within emacs).

"stty erase '^?'" might help.
-- 
This line is not blank.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2003-05-22  8:54 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-05-20  1:29 backspace/del/C-h confusion between emacs -nw & emacs X11 Balaji Venkataraman
2003-05-20  1:46 ` lawrence mitchell
2003-05-20 12:25 ` Kai Großjohann
2003-05-20 19:27   ` Balaji Venkataraman
2003-05-21  6:06     ` Klaus Zeitler
2003-05-22  8:54     ` Kai Großjohann

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.