Re: emacs -nw keypad, tpu-edt.el, and C-h

2009-05-31 Thread Ken Brown
On 5/31/2009 10:15 AM, Ken Brown wrote: On 5/31/2009 9:36 AM, Andy Koppe wrote: Currently the code sends ^H for Alt+Backspace, which clobbers 'kill word' in emacs, so that still needs to either move to Ctrl+Backspace or be removed altogether. Right. I forgot about that. Presumably there's no

Re: emacs -nw keypad, tpu-edt.el, and C-h

2009-05-31 Thread Ken Brown
On 5/31/2009 9:36 AM, Andy Koppe wrote: Currently the code sends ^H for Alt+Backspace, which clobbers 'kill word' in emacs, so that still needs to either move to Ctrl+Backspace or be removed altogether. Right. I forgot about that. Presumably there's no linux standard that says Alt-Backspace

Re: emacs -nw keypad, tpu-edt.el, and C-h

2009-05-31 Thread Andy Koppe
2009/5/31 Ken Brown: > As I long-time emacs user, I have to say that I have never been tempted to > type Ctrl-Backspace in emacs.  But, as a result of this discussion, I just > tried it in three different settings and got three different behaviors. >  (The three settings were: emacs under X, emacs

Re: emacs -nw keypad, tpu-edt.el, and C-h

2009-05-31 Thread Ken Brown
On 5/31/2009 5:13 AM, Andy Koppe wrote: 2009/5/30 Matt Wozniski: On Debian, at least, the console sends ^H for Ctrl+Backspace and ^? for Backspace; that is a pretty common convention among terminal emulators that I've used. I vote against the ^_ suggestion; I for one would be genuinely surprised

Re: emacs -nw keypad, tpu-edt.el, and C-h

2009-05-31 Thread Andy Koppe
2009/5/30 Ken Brown: > Now C-h and Backspace work as expected when I run emacs in a Cygwin console, > provided I do stty erase ^? first.  Am I right in assuming that this won't > be necessary once the termios default is changed? Yep. 2009/5/30 Matt Wozniski: > On Debian, at least, the console se

Re: emacs -nw keypad, tpu-edt.el, and C-h

2009-05-30 Thread Ken Brown
On 5/30/2009 1:53 AM, Christopher Faylor wrote: However, I have made the change to Cygwin to translate backspace to ^?. It will be in the next snapshot. Thanks! Now C-h and Backspace work as expected when I run emacs in a Cygwin console, provided I do stty erase ^? first. Am I right in assum

Re: emacs -nw keypad, tpu-edt.el, and C-h

2009-05-30 Thread Matt Wozniski
On Sat, May 30, 2009 at 2:35 PM, Andy Koppe wrote: >>>The Linux console in Opensuse actually does the same thing, and two's >>>a standard, right? ;) >> >> Actually, no.  I emulated the linux console on my system.  kterminal and >> xterm also makes no distinction that I can see between CTRL-Backspac

Re: emacs -nw keypad, tpu-edt.el, and C-h

2009-05-30 Thread Andy Koppe
>>The Linux console in Opensuse actually does the same thing, and two's >>a standard, right? ;) > > Actually, no.  I emulated the linux console on my system.  kterminal and > xterm also makes no distinction that I can see between CTRL-Backspace > and Backspace. As I said, I've seen the ^_ in the t

Re: emacs -nw keypad, tpu-edt.el, and C-h

2009-05-30 Thread Christopher Faylor
On Sat, May 30, 2009 at 07:00:46PM +0100, Andy Koppe wrote: >> One more thing: with your change, Alt can be used to override ^? and >> get ^H instead. Usually though, Ctrl is used as the modifier for this, >> whereas Alt acts as Meta (i.e. it sends a ^[ prefix). > >Actually, we could take this one

Re: emacs -nw keypad, tpu-edt.el, and C-h

2009-05-30 Thread Andy Koppe
> One more thing: with your change, Alt can be used to override ^? and > get ^H instead. Usually though, Ctrl is used as the modifier for this, > whereas Alt acts as Meta (i.e. it sends a ^[ prefix). Actually, we could take this one step further. In MinTTY, if Backspace is set to send ^?, Ctrl+Bac

Re: emacs -nw keypad, tpu-edt.el, and C-h

2009-05-30 Thread Andy Koppe
Christopher Faylor wrote: >>Now of course if emacs can translate low-level console I/O as it sees >>fit, then the Cygwin DLL could also be able to translate Backspace into >>^?  characters rather than ^H, in CYGWIN=tty mode anyway.  So I had a >>look at fhandler_console.cc.  It already uses ReadCon

Re: emacs -nw keypad, tpu-edt.el, and C-h

2009-05-29 Thread Christopher Faylor
On Fri, May 29, 2009 at 10:59:21PM +0100, Andy Koppe wrote: >Now of course if emacs can translate low-level console I/O as it sees >fit, then the Cygwin DLL could also be able to translate Backspace into >^? characters rather than ^H, in CYGWIN=tty mode anyway. So I had a >look at fhandler_consol

Re: emacs -nw keypad, tpu-edt.el, and C-h

2009-05-29 Thread Ken Brown
On 5/29/2009 5:59 PM, Andy Koppe wrote: Now of course if emacs can translate low-level console I/O as it sees fit, then the Cygwin DLL could also be able to translate Backspace into ^? characters rather than ^H, in CYGWIN=tty mode anyway. So I had a look at fhandler_console.cc. It already uses Re

Re: emacs -nw keypad, tpu-edt.el, and C-h

2009-05-29 Thread Andy Koppe
>>> Actually, this holy war can be bypassed, without sacrificing Emacs >>> correctly working on a console.  What the console should send for that >>> is the function key. >> >> Makes sense to me.  Andy, is there any reason all cygwin terminals shouldn't >> do this (including mintty)?  This already

Re: emacs -nw keypad, tpu-edt.el, and C-h

2009-05-29 Thread Andy Koppe
>> Actually, this holy war can be bypassed, without sacrificing Emacs >> correctly working on a console.  What the console should send for that >> is the function key. > > Makes sense to me.  Andy, is there any reason all cygwin terminals shouldn't > do this (including mintty)?  This already happe

Re: emacs -nw keypad, tpu-edt.el, and C-h

2009-05-29 Thread Ken Brown
On 5/29/2009 6:35 AM, Eli Zaretskii wrote: Date: Thu, 28 May 2009 15:02:35 +0100 From: Andy Koppe There's an ancient and pointless argument about whether the Backspace key should send ^H (0x08) or ^? (0x7F). Actually, this holy war can be bypassed, without sacrificing Emacs correctly working o

Re: emacs -nw keypad, tpu-edt.el, and C-h

2009-05-29 Thread Eli Zaretskii
> Date: Thu, 28 May 2009 15:02:35 +0100 > From: Andy Koppe > > Ken Brown: > > A separate issue that has arisen in this thread is that when emacs runs > > in a cygwin terminal [*], it sees C-h as DEL instead of as the help key. > > Can someone familiar with cygwin terminals help with this?  I'm sp

Re: emacs -nw keypad, tpu-edt.el, and C-h

2009-05-29 Thread Eli Zaretskii
> Date: Thu, 28 May 2009 18:10:51 +0100 > From: Andy Koppe > > rxvt: invoke with -backspacekey DEC > xterm: invoke with -xrm "*backarrowKey:false" (or untick "Backarrow > Key" in the "Main Options" menu) > mintty: Choose ^? as backspace keycode on the "Keys" page of the options > > As far as I k

Re: emacs -nw keypad, tpu-edt.el, and C-h

2009-05-28 Thread Ken Brown
On 5/28/2009 5:41 PM, Larry Hall (Cygwin) wrote: Ken Brown wrote: On 5/28/2009 5:14 PM, Andy Koppe wrote: And then there's the problem that the Cygwin console can't be changed to ^?. Emacs doesn't work well in the Cygwin console anyway, for a variety of reasons. I'll add that to the README

Re: emacs -nw keypad, tpu-edt.el, and C-h

2009-05-28 Thread Larry Hall (Cygwin)
Ken Brown wrote: On 5/28/2009 5:14 PM, Andy Koppe wrote: And then there's the problem that the Cygwin console can't be changed to ^?. Emacs doesn't work well in the Cygwin console anyway, for a variety of reasons. I'll add that to the README and to the announcement when I release the next v

Re: emacs -nw keypad, tpu-edt.el, and C-h

2009-05-28 Thread Ken Brown
On 5/28/2009 5:14 PM, Andy Koppe wrote: And then there's the problem that the Cygwin console can't be changed to ^?. Emacs doesn't work well in the Cygwin console anyway, for a variety of reasons. I'll add that to the README and to the announcement when I release the next version. (FWIW, I'

Re: emacs -nw keypad, tpu-edt.el, and C-h

2009-05-28 Thread Andy Koppe
> Sorry, I guess I haven't been expressing myself very well.  I wasn't > suggesting any particular course of action, and I certainly don't want to > break other applications. No worries. I was just trying to explain why the proper and obvious fix of switching the backspace defaults to ^? might be

Re: emacs -nw keypad, tpu-edt.el, and C-h

2009-05-28 Thread Ken Brown
On 5/28/2009 1:10 PM, Andy Koppe wrote: Could the default for the terminals be changed? Yes, easily, but only at the cost of breaking any applications that always expect ^H for Backspace. Sorry, I guess I haven't been expressing myself very well. I wasn't suggesting any particular course of a

Re: emacs -nw keypad, tpu-edt.el, and C-h

2009-05-28 Thread Andy Koppe
>> Can cygwin terminals be >> configured so that emacs can tell the difference between the Backspace key >> and "pressing h while holding down the control key"? > > "pressing h while holding down the control key" produces ^H (0x08). > By default, this is also what backspace sends.  As Andy says, ma

Re: emacs -nw keypad, tpu-edt.el, and C-h

2009-05-28 Thread Matt Wozniski
On Thu, May 28, 2009 at 11:00 AM, Ken Brown wrote: > On 5/28/2009 10:02 AM, Andy Koppe wrote: >> >> There's an ancient and pointless argument about whether the Backspace >> key should send ^H (0x08) or ^? (0x7F). > > I was asking something slightly different: No, you were asking the same thing, y

Re: emacs -nw keypad, tpu-edt.el, and C-h

2009-05-28 Thread Ken Brown
On 5/28/2009 10:02 AM, Andy Koppe wrote: There's an ancient and pointless argument about whether the Backspace key should send ^H (0x08) or ^? (0x7F). I was asking something slightly different: Can cygwin terminals be configured so that emacs can tell the difference between the Backspace key

Re: emacs -nw keypad, tpu-edt.el, and C-h

2009-05-28 Thread Andy Koppe
Ken Brown: > A separate issue that has arisen in this thread is that when emacs runs > in a cygwin terminal [*], it sees C-h as DEL instead of as the help key. > Can someone familiar with cygwin terminals help with this?  I'm speculating > again (bad habit), but it seems that the keycodes are being

Re: emacs -nw keypad, tpu-edt.el, and C-h

2009-05-28 Thread Ken Brown
On 5/28/2009 3:48 AM, Eli Zaretskii wrote: What I can suggest at this point is send a formal bug report about this with "M-x report-emacs-bug RET". Tim, You're probably in the best position to do this, since I've never used tpu-edt. Alternatively, tell me precisely what steps to perform to