unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Adding xterm-extras to Emacs
@ 2007-06-12 22:03 Leo
  2007-06-12 22:21 ` Dan Nicolaescu
  0 siblings, 1 reply; 52+ messages in thread
From: Leo @ 2007-06-12 22:03 UTC (permalink / raw)
  To: emacs-devel

Dear all,

When I run emacs in terminal like xterm I find that xterm-extras.el¹
crucial. It makes almost all key bindings available in X also available
in terminal.

I wonder if we can include the file or add such functionality to
an appropriate existing package in Emacs.

Footnotes: 
¹ http://www.dur.ac.uk/p.j.heslin/Software/Emacs/Download/xterm-extras.el

Best,
-- 
Leo <sdl.web AT gmail.com>                         (GPG Key: 9283AA3F)

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

* Re: Adding xterm-extras to Emacs
  2007-06-12 22:03 Adding xterm-extras to Emacs Leo
@ 2007-06-12 22:21 ` Dan Nicolaescu
  2007-06-12 22:31   ` Leo
  0 siblings, 1 reply; 52+ messages in thread
From: Dan Nicolaescu @ 2007-06-12 22:21 UTC (permalink / raw)
  To: Leo; +Cc: emacs-devel

Leo <sdl.web@gmail.com> writes:

  > Dear all,
  > 
  > When I run emacs in terminal like xterm I find that xterm-extras.el¹
  > crucial. It makes almost all key bindings available in X also available
  > in terminal.
  > 
  > I wonder if we can include the file or add such functionality to
  > an appropriate existing package in Emacs.
  > 
  > Footnotes: 
  > ¹ http://www.dur.ac.uk/p.j.heslin/Software/Emacs/Download/xterm-extras.el

In emacs-22 xterm-extras.el is not needed anymore, term/xterm.el
should bind all the keys that xterm-extras.el does (and more). 

If you know of any bindings that are still missing, please point them
out and they will be added.

xterm-extras.el also required you to fiddle with X11 resources, this
is not needed now. 

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

* Re: Adding xterm-extras to Emacs
  2007-06-12 22:21 ` Dan Nicolaescu
@ 2007-06-12 22:31   ` Leo
  2007-06-12 22:43     ` Dan Nicolaescu
  0 siblings, 1 reply; 52+ messages in thread
From: Leo @ 2007-06-12 22:31 UTC (permalink / raw)
  To: emacs-devel

----- Dan Nicolaescu (2007-06-12) wrote:-----

> Leo <sdl.web@gmail.com> writes:
>
>   > Dear all,
>   > 
>   > When I run emacs in terminal like xterm I find that xterm-extras.el¹
>   > crucial. It makes almost all key bindings available in X also available
>   > in terminal.
>   > 
>   > I wonder if we can include the file or add such functionality to
>   > an appropriate existing package in Emacs.
>   > 
>   > Footnotes: 
>   > ¹ http://www.dur.ac.uk/p.j.heslin/Software/Emacs/Download/xterm-extras.el
>
> In emacs-22 xterm-extras.el is not needed anymore, term/xterm.el
> should bind all the keys that xterm-extras.el does (and more). 
>
> If you know of any bindings that are still missing, please point them
> out and they will be added.

I check term/xterm.el and it seems a lot of key combinations should be
available. However I randomly choose two key bindings

'C-;'     => inserts ';'
'M-S-up'  => inserts 'A'

> xterm-extras.el also required you to fiddle with X11 resources, this
> is not needed now. 

-- 
Leo <sdl.web AT gmail.com>                         (GPG Key: 9283AA3F)

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

* Re: Adding xterm-extras to Emacs
  2007-06-12 22:31   ` Leo
@ 2007-06-12 22:43     ` Dan Nicolaescu
  2007-06-12 23:32       ` Leo
  0 siblings, 1 reply; 52+ messages in thread
From: Dan Nicolaescu @ 2007-06-12 22:43 UTC (permalink / raw)
  To: Leo; +Cc: emacs-devel

Leo <sdl.web@gmail.com> writes:

  > ----- Dan Nicolaescu (2007-06-12) wrote:-----
  > 
  > > Leo <sdl.web@gmail.com> writes:
  > >
  > >   > Dear all,
  > >   > 
  > >   > When I run emacs in terminal like xterm I find that xterm-extras.el¹
  > >   > crucial. It makes almost all key bindings available in X also available
  > >   > in terminal.
  > >   > 
  > >   > I wonder if we can include the file or add such functionality to
  > >   > an appropriate existing package in Emacs.
  > >   > 
  > >   > Footnotes: 
  > >   > ¹ http://www.dur.ac.uk/p.j.heslin/Software/Emacs/Download/xterm-extras.el
  > >
  > > In emacs-22 xterm-extras.el is not needed anymore, term/xterm.el
  > > should bind all the keys that xterm-extras.el does (and more). 
  > >
  > > If you know of any bindings that are still missing, please point them
  > > out and they will be added.
  > 
  > I check term/xterm.el and it seems a lot of key combinations should be
  > available. However I randomly choose two key bindings
  > 
  > 'C-;'     => inserts ';'

This only works if you set modifyOtherKeys to 1 and iff you have a new
enough xterm (after 216). This didn't work with xterm-extras.el

  > 'M-S-up'  => inserts 'A'

Does it do that if you start from emacs -Q? 
Can you show the result of C-q M-S-up   ?
(My window manager uses M-S-up so I can't test that one).

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

* Re: Adding xterm-extras to Emacs
  2007-06-12 22:43     ` Dan Nicolaescu
@ 2007-06-12 23:32       ` Leo
  2007-06-13  0:47         ` Dan Nicolaescu
  0 siblings, 1 reply; 52+ messages in thread
From: Leo @ 2007-06-12 23:32 UTC (permalink / raw)
  To: emacs-devel

----- Dan Nicolaescu (2007-06-12) wrote:-----

>   > I check term/xterm.el and it seems a lot of key combinations should be
>   > available. However I randomly choose two key bindings
>   > 
>   > 'C-;'     => inserts ';'
>
> This only works if you set modifyOtherKeys to 1 and iff you have a new
> enough xterm (after 216). This didn't work with xterm-extras.el

Thanks for the tip. Is this mentioned somewhere?

>   > 'M-S-up'  => inserts 'A'
>
> Does it do that if you start from emacs -Q? 
> Can you show the result of C-q M-S-up   ?
> (My window manager uses M-S-up so I can't test that one).

It inserts: ^[[1;4A

-- 
Leo <sdl.web AT gmail.com>                         (GPG Key: 9283AA3F)

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

* Re: Adding xterm-extras to Emacs
  2007-06-12 23:32       ` Leo
@ 2007-06-13  0:47         ` Dan Nicolaescu
  2007-06-13  0:56           ` Leo
                             ` (2 more replies)
  0 siblings, 3 replies; 52+ messages in thread
From: Dan Nicolaescu @ 2007-06-13  0:47 UTC (permalink / raw)
  To: Leo; +Cc: emacs-devel

Leo <sdl.web@gmail.com> writes:

  > ----- Dan Nicolaescu (2007-06-12) wrote:-----
  > 
  > >   > I check term/xterm.el and it seems a lot of key combinations should be
  > >   > available. However I randomly choose two key bindings
  > >   > 
  > >   > 'C-;'     => inserts ';'
  > >
  > > This only works if you set modifyOtherKeys to 1 and iff you have a new
  > > enough xterm (after 216). This didn't work with xterm-extras.el
  > 
  > Thanks for the tip. Is this mentioned somewhere?

It is briefly mentioned in NEWS.

  > >   > 'M-S-up'  => inserts 'A'
  > >
  > > Does it do that if you start from emacs -Q? 
  > > Can you show the result of C-q M-S-up   ?
  > > (My window manager uses M-S-up so I can't test that one).
  > 
  > It inserts: ^[[1;4A

Oops, I didn't pay enough attention: there's no support for any M-S-
key bindings. No idea why, there AFAICT nothing in emacs uses them and
nobody requested them ... 

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

* Re: Adding xterm-extras to Emacs
  2007-06-13  0:47         ` Dan Nicolaescu
@ 2007-06-13  0:56           ` Leo
  2007-06-13  3:52             ` Dan Nicolaescu
  2007-06-13  7:08           ` csant
  2007-06-13  9:43           ` Peter Heslin
  2 siblings, 1 reply; 52+ messages in thread
From: Leo @ 2007-06-13  0:56 UTC (permalink / raw)
  To: emacs-devel

----- Dan Nicolaescu (2007-06-13) wrote:-----

>   > It inserts: ^[[1;4A
>
> Oops, I didn't pay enough attention: there's no support for any M-S-
> key bindings.

These key bindings work if xterm-extras.el is loaded.

> No idea why, there AFAICT nothing in emacs uses them and nobody
> requested them ...

Org.el uses them.

-- 
Leo <sdl.web AT gmail.com>                         (GPG Key: 9283AA3F)

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

* Re: Adding xterm-extras to Emacs
  2007-06-13  0:56           ` Leo
@ 2007-06-13  3:52             ` Dan Nicolaescu
  2007-06-13 10:54               ` Johan Bockgård
  0 siblings, 1 reply; 52+ messages in thread
From: Dan Nicolaescu @ 2007-06-13  3:52 UTC (permalink / raw)
  To: Leo; +Cc: emacs-devel

Leo <sdl.web@gmail.com> writes:

  > ----- Dan Nicolaescu (2007-06-13) wrote:-----
  > 
  > >   > It inserts: ^[[1;4A
  > >
  > > Oops, I didn't pay enough attention: there's no support for any M-S-
  > > key bindings.
  > 
  > These key bindings work if xterm-extras.el is loaded.

I meant that term/xterm.el does not support any M-S- bindings. 

I can add bindings for M-S- keys in a few days if there's no objection
to such bindings. Patches are welcome!

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

* Re: Adding xterm-extras to Emacs
  2007-06-13  0:47         ` Dan Nicolaescu
  2007-06-13  0:56           ` Leo
@ 2007-06-13  7:08           ` csant
  2007-06-13 13:33             ` Dan Nicolaescu
  2007-06-13  9:43           ` Peter Heslin
  2 siblings, 1 reply; 52+ messages in thread
From: csant @ 2007-06-13  7:08 UTC (permalink / raw)
  To: Dan Nicolaescu; +Cc: emacs-devel

On Wed, 13 Jun 2007 02:47:48 +0200, Dan Nicolaescu <dann@ics.uci.edu>  
wrote:

> Oops, I didn't pay enough attention: there's no support for any M-S-
> key bindings. No idea why, there AFAICT nothing in emacs uses them and
> nobody requested them ...

Funny this comes up - have been banging my head on this for a few days  
already (C-S-key, actually).  Good to know I am not the only one...  (just  
for the usecase, makes vcursor with default bindings pretty useless in  
terminal).

/c

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

* Re: Adding xterm-extras to Emacs
  2007-06-13  0:47         ` Dan Nicolaescu
  2007-06-13  0:56           ` Leo
  2007-06-13  7:08           ` csant
@ 2007-06-13  9:43           ` Peter Heslin
  2007-06-13 14:15             ` Dan Nicolaescu
  2 siblings, 1 reply; 52+ messages in thread
From: Peter Heslin @ 2007-06-13  9:43 UTC (permalink / raw)
  To: emacs-devel

Dan Nicolaescu <dann@ics.uci.edu> writes:
> Oops, I didn't pay enough attention: there's no support for any M-S-
> key bindings. No idea why, there AFAICT nothing in emacs uses them and
> nobody requested them ... 

Hi Dan,

When we discussed this by e-mail some time ago, I suggested that rather
than limiting term/xterm.el to those bindings currently used by Emacs,
we should provide mappings for all possible escape sequences emitted by
a current xterm with modifyOtherKeys set.

The reasons for this are: (1) it's hard to get a list of all bindings
used by all modes that ship with Emacs, and (2) many users define
additional bindings in their .emacs file which work with X11, and which
they might like also to work with xterm.

That was the approach I tried when I wrote xterm-extras.el.  That
package is now out-of-date, since it predates the appearance of
modifyOtherKeys.  When I wrote xterm-extras, the xterm source came with
a file that documented the escape codes, which made it reasonable to
attempt comprehensive coverage in Emacs.

Peter

-- 
Peter Heslin (http://www.dur.ac.uk/p.j.heslin)

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

* Re: Adding xterm-extras to Emacs
  2007-06-13  3:52             ` Dan Nicolaescu
@ 2007-06-13 10:54               ` Johan Bockgård
  2007-06-13 13:22                 ` Dan Nicolaescu
  0 siblings, 1 reply; 52+ messages in thread
From: Johan Bockgård @ 2007-06-13 10:54 UTC (permalink / raw)
  To: emacs-devel

Dan Nicolaescu <dann@ics.uci.edu> writes:

> Patches are welcome!

Here's one. It makes no change to the meaning of the code, but it
avoids confusing Show Paren mode and the motion/etc commands.


2007-06-13  Johan Bockgård  <bojohan@dd.chalmers.se>

	* term/xterm.el (terminal-init-xterm): Escape parens in character
	constants.

Index: xterm.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/term/xterm.el,v
retrieving revision 1.38
diff -u -r1.38 xterm.el
--- xterm.el	8 Apr 2007 14:33:32 -0000	1.38
+++ xterm.el	13 Jun 2007 10:46:32 -0000
@@ -272,8 +272,8 @@
       (define-key map "\e[27;6;36~"  [?\C-$])
       (define-key map "\e[27;6;37~"  [?\C-%])
       (define-key map "\e[27;6;38~"  [?\C-&])
-      (define-key map "\e[27;6;40~"  [?\C-(])
-      (define-key map "\e[27;6;41~"  [?\C-)])
+      (define-key map "\e[27;6;40~"  [?\C-\(])
+      (define-key map "\e[27;6;41~"  [?\C-\)])
       (define-key map "\e[27;6;42~"  [?\C-*])
       (define-key map "\e[27;6;43~"  [?\C-+])
       (define-key map "\e[27;6;58~"  [?\C-:])
@@ -312,8 +312,8 @@
       (define-key map "\e[27;14;36~"  [?\C-\M-$])
       (define-key map "\e[27;14;37~"  [?\C-\M-%])
       (define-key map "\e[27;14;38~"  [?\C-\M-&])
-      (define-key map "\e[27;14;40~"  [?\C-\M-(])
-      (define-key map "\e[27;14;41~"  [?\C-\M-)])
+      (define-key map "\e[27;14;40~"  [?\C-\M-\(])
+      (define-key map "\e[27;14;41~"  [?\C-\M-\)])
       (define-key map "\e[27;14;42~"  [?\C-\M-*])
       (define-key map "\e[27;14;43~"  [?\C-\M-+])
       (define-key map "\e[27;14;58~"  [?\C-\M-:])
@@ -350,8 +350,8 @@
       (define-key map "\e[27;8;36~"  [?\C-\M-$])
       (define-key map "\e[27;8;37~"  [?\C-\M-%])
       (define-key map "\e[27;8;38~"  [?\C-\M-&])
-      (define-key map "\e[27;8;40~"  [?\C-\M-(])
-      (define-key map "\e[27;8;41~"  [?\C-\M-)])
+      (define-key map "\e[27;8;40~"  [?\C-\M-\(])
+      (define-key map "\e[27;8;41~"  [?\C-\M-\)])
       (define-key map "\e[27;8;42~"  [?\C-\M-*])
       (define-key map "\e[27;8;43~"  [?\C-\M-+])
       (define-key map "\e[27;8;58~"  [?\C-\M-:])


-- 
Johan Bockgård

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

* Re: Adding xterm-extras to Emacs
  2007-06-13 10:54               ` Johan Bockgård
@ 2007-06-13 13:22                 ` Dan Nicolaescu
  2007-06-13 16:18                   ` Johan Bockgård
  0 siblings, 1 reply; 52+ messages in thread
From: Dan Nicolaescu @ 2007-06-13 13:22 UTC (permalink / raw)
  To: emacs-devel

bojohan+news@dd.chalmers.se (Johan Bockgård) writes:

  > Dan Nicolaescu <dann@ics.uci.edu> writes:
  > 
  > > Patches are welcome!
  > 
  > Here's one. It makes no change to the meaning of the code, but it
  > avoids confusing Show Paren mode and the motion/etc commands.

If you tested it, please put it in, both trunk and 22 branch. 

Thanks!

  > 
  > 
  > 2007-06-13  Johan Bockgård  <bojohan@dd.chalmers.se>
  > 
  > 	* term/xterm.el (terminal-init-xterm): Escape parens in character
  > 	constants.
  > 
  > Index: xterm.el
  > ===================================================================
  > RCS file: /cvsroot/emacs/emacs/lisp/term/xterm.el,v
  > retrieving revision 1.38
  > diff -u -r1.38 xterm.el
  > --- xterm.el	8 Apr 2007 14:33:32 -0000	1.38
  > +++ xterm.el	13 Jun 2007 10:46:32 -0000
  > @@ -272,8 +272,8 @@
  >        (define-key map "\e[27;6;36~"  [?\C-$])
  >        (define-key map "\e[27;6;37~"  [?\C-%])
  >        (define-key map "\e[27;6;38~"  [?\C-&])
  > -      (define-key map "\e[27;6;40~"  [?\C-(])
  > -      (define-key map "\e[27;6;41~"  [?\C-)])
  > +      (define-key map "\e[27;6;40~"  [?\C-\(])
  > +      (define-key map "\e[27;6;41~"  [?\C-\)])
  >        (define-key map "\e[27;6;42~"  [?\C-*])
  >        (define-key map "\e[27;6;43~"  [?\C-+])
  >        (define-key map "\e[27;6;58~"  [?\C-:])
  > @@ -312,8 +312,8 @@
  >        (define-key map "\e[27;14;36~"  [?\C-\M-$])
  >        (define-key map "\e[27;14;37~"  [?\C-\M-%])
  >        (define-key map "\e[27;14;38~"  [?\C-\M-&])
  > -      (define-key map "\e[27;14;40~"  [?\C-\M-(])
  > -      (define-key map "\e[27;14;41~"  [?\C-\M-)])
  > +      (define-key map "\e[27;14;40~"  [?\C-\M-\(])
  > +      (define-key map "\e[27;14;41~"  [?\C-\M-\)])
  >        (define-key map "\e[27;14;42~"  [?\C-\M-*])
  >        (define-key map "\e[27;14;43~"  [?\C-\M-+])
  >        (define-key map "\e[27;14;58~"  [?\C-\M-:])
  > @@ -350,8 +350,8 @@
  >        (define-key map "\e[27;8;36~"  [?\C-\M-$])
  >        (define-key map "\e[27;8;37~"  [?\C-\M-%])
  >        (define-key map "\e[27;8;38~"  [?\C-\M-&])
  > -      (define-key map "\e[27;8;40~"  [?\C-\M-(])
  > -      (define-key map "\e[27;8;41~"  [?\C-\M-)])
  > +      (define-key map "\e[27;8;40~"  [?\C-\M-\(])
  > +      (define-key map "\e[27;8;41~"  [?\C-\M-\)])
  >        (define-key map "\e[27;8;42~"  [?\C-\M-*])
  >        (define-key map "\e[27;8;43~"  [?\C-\M-+])
  >        (define-key map "\e[27;8;58~"  [?\C-\M-:])
  > 
  > 
  > -- 
  > Johan Bockgård

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

* Re: Adding xterm-extras to Emacs
  2007-06-13  7:08           ` csant
@ 2007-06-13 13:33             ` Dan Nicolaescu
  2007-06-13 19:18               ` csant
  0 siblings, 1 reply; 52+ messages in thread
From: Dan Nicolaescu @ 2007-06-13 13:33 UTC (permalink / raw)
  To: csant; +Cc: emacs-devel

csant <csant@csant.info> writes:

  > On Wed, 13 Jun 2007 02:47:48 +0200, Dan Nicolaescu <dann@ics.uci.edu>
  > wrote:
  > 
  > > Oops, I didn't pay enough attention: there's no support for any M-S-
  > > key bindings. No idea why, there AFAICT nothing in emacs uses them and
  > > nobody requested them ...
  > 
  > Funny this comes up - have been banging my head on this for a few days
  > already (C-S-key, actually).  Good to know I am not the only one...
  > (just  for the usecase, makes vcursor with default bindings pretty
  > useless in  terminal).

What keys did you have problems with? What terminal emulator + version?
Some C-S-keys are supported, please look in term/xterm.el and check if
the keys you are trying to use appear there. 

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

* Re: Adding xterm-extras to Emacs
  2007-06-13  9:43           ` Peter Heslin
@ 2007-06-13 14:15             ` Dan Nicolaescu
  2007-06-13 15:31               ` Stefan Monnier
  0 siblings, 1 reply; 52+ messages in thread
From: Dan Nicolaescu @ 2007-06-13 14:15 UTC (permalink / raw)
  To: Peter Heslin; +Cc: emacs-devel

Peter Heslin <p.j.heslin@dur.ac.uk> writes:

  > Dan Nicolaescu <dann@ics.uci.edu> writes:
  > > Oops, I didn't pay enough attention: there's no support for any M-S-
  > > key bindings. No idea why, there AFAICT nothing in emacs uses them and
  > > nobody requested them ... 
  > 
  > Hi Dan,

Hi Peter,

  > When we discussed this by e-mail some time ago, I suggested that rather
  > than limiting term/xterm.el to those bindings currently used by Emacs,
  > we should provide mappings for all possible escape sequences emitted by
  > a current xterm with modifyOtherKeys set.

That is certainly a valid approach. I didn't take because at the time
I did that work emacs was in a feature freeze for the 22.1 release. I
didn't want to have the changes postponed for after the release, so I
tried to do the minimal, but still enough for useful work.

  > The reasons for this are: (1) it's hard to get a list of all bindings
  > used by all modes that ship with Emacs, and (2) many users define
  > additional bindings in their .emacs file which work with X11, and which
  > they might like also to work with xterm.

I don't have a strong opinion about this, but before moving in that
direction I would like to hear at least Eli's and Stefan's opinion.

BTW, new packages are being accepted now in Emacs CVS, so this is
probably a good moment to submit your ispell-multi and
flyspell-babel...

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

* Re: Adding xterm-extras to Emacs
  2007-06-13 14:15             ` Dan Nicolaescu
@ 2007-06-13 15:31               ` Stefan Monnier
  2007-06-14  5:08                 ` Dan Nicolaescu
  0 siblings, 1 reply; 52+ messages in thread
From: Stefan Monnier @ 2007-06-13 15:31 UTC (permalink / raw)
  To: Dan Nicolaescu; +Cc: Peter Heslin, emacs-devel

>> When we discussed this by e-mail some time ago, I suggested that rather
>> than limiting term/xterm.el to those bindings currently used by Emacs,
>> we should provide mappings for all possible escape sequences emitted by
>> a current xterm with modifyOtherKeys set.

> That is certainly a valid approach. I didn't take because at the time
> I did that work emacs was in a feature freeze for the 22.1 release. I
> didn't want to have the changes postponed for after the release, so I
> tried to do the minimal, but still enough for useful work.

I guess it made sense then, but now I encourage people to add such
exhaustive keybinding to term/xterm.el.  Ideally, part of the contents of
term/xterm.el should be auto-generated from the source code (or the doc) of
the xterm program, so we can be sure we're complete and up-to-date.


        Stefan

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

* Re: Adding xterm-extras to Emacs
  2007-06-13 13:22                 ` Dan Nicolaescu
@ 2007-06-13 16:18                   ` Johan Bockgård
  2007-06-13 19:09                     ` Dan Nicolaescu
  0 siblings, 1 reply; 52+ messages in thread
From: Johan Bockgård @ 2007-06-13 16:18 UTC (permalink / raw)
  To: emacs-devel

Dan Nicolaescu <dann@ics.uci.edu> writes:

> If you tested it, please put it in, both trunk and 22 branch. 

Are you asking me? I don't have write access.

-- 
Johan Bockgård

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

* Re: Adding xterm-extras to Emacs
  2007-06-13 16:18                   ` Johan Bockgård
@ 2007-06-13 19:09                     ` Dan Nicolaescu
  0 siblings, 0 replies; 52+ messages in thread
From: Dan Nicolaescu @ 2007-06-13 19:09 UTC (permalink / raw)
  To: emacs-devel

bojohan+news@dd.chalmers.se (Johan Bockgård) writes:

  > Dan Nicolaescu <dann@ics.uci.edu> writes:
  > 
  > > If you tested it, please put it in, both trunk and 22 branch. 
  > 
  > Are you asking me? I don't have write access.

OK, I committed the patch. Thanks!

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

* Re: Adding xterm-extras to Emacs
  2007-06-13 13:33             ` Dan Nicolaescu
@ 2007-06-13 19:18               ` csant
  0 siblings, 0 replies; 52+ messages in thread
From: csant @ 2007-06-13 19:18 UTC (permalink / raw)
  To: Dan Nicolaescu; +Cc: emacs-devel

> What keys did you have problems with? What terminal emulator + version?

Hm,  my bad - turns out this is more of a terminal problem than emacs (and  
thus off-topic): xterm 225, with
	XTerm*modifyOtherKeys:  1
C-S-<key>, where <key> is an alphabetic character, are just interpreted as  
^<key> - not much any emacs fix could do about.

/c

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

* Re: Adding xterm-extras to Emacs
  2007-06-13 15:31               ` Stefan Monnier
@ 2007-06-14  5:08                 ` Dan Nicolaescu
  2007-09-13 16:40                   ` Leo
  0 siblings, 1 reply; 52+ messages in thread
From: Dan Nicolaescu @ 2007-06-14  5:08 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Peter Heslin, emacs-devel

Stefan Monnier <monnier@iro.umontreal.ca> writes:

  > I guess it made sense then, but now I encourage people to add such
  > exhaustive keybinding to term/xterm.el.  Ideally, part of the contents of
  > term/xterm.el should be auto-generated from the source code (or the doc) of
  > the xterm program, so we can be sure we're complete and up-to-date.

I don't think that the docs or the source code are too amenable to
automatic analysis (although I would love to be proven wrong in
practice).

I will start adding M-S- bindings when I have some free time to play
with this. If people can point out what other bindings should be added
that would be very helpful. Any help/patches are more than welcome. 

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

* Re: Adding xterm-extras to Emacs
  2007-06-14  5:08                 ` Dan Nicolaescu
@ 2007-09-13 16:40                   ` Leo
  2007-09-13 16:58                     ` Dan Nicolaescu
  0 siblings, 1 reply; 52+ messages in thread
From: Leo @ 2007-09-13 16:40 UTC (permalink / raw)
  To: emacs-devel

On 2007-06-14 06:08 +0100, Dan Nicolaescu wrote:
> Stefan Monnier <monnier@iro.umontreal.ca> writes:
>
>   > I guess it made sense then, but now I encourage people to add such
>   > exhaustive keybinding to term/xterm.el.  Ideally, part of the contents of
>   > term/xterm.el should be auto-generated from the source code (or the doc) of
>   > the xterm program, so we can be sure we're complete and up-to-date.
>
> I don't think that the docs or the source code are too amenable to
> automatic analysis (although I would love to be proven wrong in
> practice).
>
> I will start adding M-S- bindings when I have some free time to play
> with this. If people can point out what other bindings should be added
> that would be very helpful. Any help/patches are more than welcome. 

I have installed the newest xterm.el and now it seems M-S- key bindings
work in xterm.

However, C-S- and C-M- still don't.

FWIW,
-- 
.:  Leo  :.  [ sdl.web AT gmail.com ]  .:  [ GPG Key: 9283AA3F ]  :.

=>             "(require 'cl) considered harmful" considered harmful
=>           http://dto.freeshell.org/blog/blog-2007-09-07-2323.html

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

* Re: Adding xterm-extras to Emacs
  2007-09-13 16:40                   ` Leo
@ 2007-09-13 16:58                     ` Dan Nicolaescu
  2007-09-13 19:49                       ` Leo
  0 siblings, 1 reply; 52+ messages in thread
From: Dan Nicolaescu @ 2007-09-13 16:58 UTC (permalink / raw)
  To: Leo; +Cc: emacs-devel

Leo <sdl.web@gmail.com> writes:

  > On 2007-06-14 06:08 +0100, Dan Nicolaescu wrote:
  > > Stefan Monnier <monnier@iro.umontreal.ca> writes:
  > >
  > >   > I guess it made sense then, but now I encourage people to add such
  > >   > exhaustive keybinding to term/xterm.el.  Ideally, part of the contents of
  > >   > term/xterm.el should be auto-generated from the source code (or the doc) of
  > >   > the xterm program, so we can be sure we're complete and up-to-date.
  > >
  > > I don't think that the docs or the source code are too amenable to
  > > automatic analysis (although I would love to be proven wrong in
  > > practice).
  > >
  > > I will start adding M-S- bindings when I have some free time to play
  > > with this. If people can point out what other bindings should be added
  > > that would be very helpful. Any help/patches are more than welcome. 
  > 
  > I have installed the newest xterm.el and now it seems M-S- key bindings
  > work in xterm.
  > 
  > However, C-S- and C-M- still don't.

If you want to be helpful, please show an exact list of what keys are
not working.
But before doing that, please make sure that xterm can generate those
keys, not all key combinations are possible.

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

* Re: Adding xterm-extras to Emacs
  2007-09-13 16:58                     ` Dan Nicolaescu
@ 2007-09-13 19:49                       ` Leo
  2007-09-14  1:02                         ` Dan Nicolaescu
  0 siblings, 1 reply; 52+ messages in thread
From: Leo @ 2007-09-13 19:49 UTC (permalink / raw)
  To: emacs-devel

On 2007-09-13 17:58 +0100, Dan Nicolaescu wrote:
>   > I have installed the newest xterm.el and now it seems M-S- key bindings
>   > work in xterm.
>   > 
>   > However, C-S- and C-M- still don't.
>
> If you want to be helpful, please show an exact list of what keys are
> not working.  But before doing that, please make sure that xterm can
> generate those keys, not all key combinations are possible.

The following are what I have found not working:

C-M-up       ;; ^[[1;7A
C-M-down     ;; ^[[1;7B
C-M-left     ;; ^[[1;7D
C-M-right    ;; ^[[1;7C

C-S-up       ;; ^[[1;6A
C-S-down     ;; ^[[1;6B
C-S-left     ;; ^[[1;6D
C-S-right    ;; ^[[1;6C

S-up         ;; ^[[1;2A
S-down       ;; ^[[1;2B
S-left       ;; ^[[1;2D
S-right      ;; ^[[1;2C

I will try to post here if I find more.

-- 
.:  Leo  :.  [ sdl.web AT gmail.com ]  .:  [ GPG Key: 9283AA3F ]  :.

=>             "(require 'cl) considered harmful" considered harmful
=>           http://dto.freeshell.org/blog/blog-2007-09-07-2323.html

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

* Re: Adding xterm-extras to Emacs
  2007-09-13 19:49                       ` Leo
@ 2007-09-14  1:02                         ` Dan Nicolaescu
  2007-09-14  1:20                           ` Leo
  0 siblings, 1 reply; 52+ messages in thread
From: Dan Nicolaescu @ 2007-09-14  1:02 UTC (permalink / raw)
  To: Leo; +Cc: emacs-devel

Leo <sdl.web@gmail.com> writes:

  > On 2007-09-13 17:58 +0100, Dan Nicolaescu wrote:
  > >   > I have installed the newest xterm.el and now it seems M-S- key bindings
  > >   > work in xterm.
  > >   > 
  > >   > However, C-S- and C-M- still don't.
  > >
  > > If you want to be helpful, please show an exact list of what keys are
  > > not working.  But before doing that, please make sure that xterm can
  > > generate those keys, not all key combinations are possible.
  > 
  > The following are what I have found not working:
  > 
  > C-M-up       ;; ^[[1;7A
  > C-M-down     ;; ^[[1;7B
  > C-M-left     ;; ^[[1;7D
  > C-M-right    ;; ^[[1;7C

I'll add these. What window manager are you using? The ones that will
not allow these to the application...

  > C-S-up       ;; ^[[1;6A
  > C-S-down     ;; ^[[1;6B
  > C-S-left     ;; ^[[1;6D
  > C-S-right    ;; ^[[1;6C
  > 
  > S-up         ;; ^[[1;2A
  > S-down       ;; ^[[1;2B
  > S-left       ;; ^[[1;2D
  > S-right      ;; ^[[1;2C

These have been there for a long time, and they work fine for me.
How did you test them?

  > I will try to post here if I find more.

Please do.

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

* Re: Adding xterm-extras to Emacs
  2007-09-14  1:02                         ` Dan Nicolaescu
@ 2007-09-14  1:20                           ` Leo
  2007-09-14  1:30                             ` Dan Nicolaescu
  0 siblings, 1 reply; 52+ messages in thread
From: Leo @ 2007-09-14  1:20 UTC (permalink / raw)
  To: emacs-devel

On 2007-09-14 02:02 +0100, Dan Nicolaescu wrote:
>   > The following are what I have found not working:
>   > 
>   > C-M-up       ;; ^[[1;7A
>   > C-M-down     ;; ^[[1;7B
>   > C-M-left     ;; ^[[1;7D
>   > C-M-right    ;; ^[[1;7C
>
> I'll add these. What window manager are you using? The ones that will
> not allow these to the application...

I use xmonad, all its key bindings start with [win].

>   > C-S-up       ;; ^[[1;6A
>   > C-S-down     ;; ^[[1;6B
>   > C-S-left     ;; ^[[1;6D
>   > C-S-right    ;; ^[[1;6C
>   > 
>   > S-up         ;; ^[[1;2A
>   > S-down       ;; ^[[1;2B
>   > S-left       ;; ^[[1;2D
>   > S-right      ;; ^[[1;2C
>
> These have been there for a long time, and they work fine for me.
> How did you test them?

I start emacs with 'emacs -nw -q' and test them with 'C-h k'.

>   > I will try to post here if I find more.
>
> Please do.

-- 
.:  Leo  :.  [ sdl.web AT gmail.com ]  .:  [ GPG Key: 9283AA3F ]  :.

=>             "(require 'cl) considered harmful" considered harmful
=>           http://dto.freeshell.org/blog/blog-2007-09-07-2323.html

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

* Re: Adding xterm-extras to Emacs
  2007-09-14  1:20                           ` Leo
@ 2007-09-14  1:30                             ` Dan Nicolaescu
  2007-09-14  1:47                               ` Leo
  0 siblings, 1 reply; 52+ messages in thread
From: Dan Nicolaescu @ 2007-09-14  1:30 UTC (permalink / raw)
  To: Leo; +Cc: emacs-devel

Leo <sdl.web@gmail.com> writes:

  > >   > C-S-up       ;; ^[[1;6A
  > >   > C-S-down     ;; ^[[1;6B
  > >   > C-S-left     ;; ^[[1;6D
  > >   > C-S-right    ;; ^[[1;6C
  > >   > 
  > >   > S-up         ;; ^[[1;2A
  > >   > S-down       ;; ^[[1;2B
  > >   > S-left       ;; ^[[1;2D
  > >   > S-right      ;; ^[[1;2C
  > >
  > > These have been there for a long time, and they work fine for me.
  > > How did you test them?
  > 
  > I start emacs with 'emacs -nw -q' and test them with 'C-h k'.

What C-h k says for those keys might be misleading.
Try 
emacs -nw -q
M-x cua-selection-mode RET
and now try to use the S- C-S- keys, they should select/extend the selection for
a region. Did that work?

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

* Re: Adding xterm-extras to Emacs
  2007-09-14  1:30                             ` Dan Nicolaescu
@ 2007-09-14  1:47                               ` Leo
  2007-09-14  2:32                                 ` Dan Nicolaescu
  0 siblings, 1 reply; 52+ messages in thread
From: Leo @ 2007-09-14  1:47 UTC (permalink / raw)
  To: emacs-devel

On 2007-09-14 02:30 +0100, Dan Nicolaescu wrote:
> What C-h k says for those keys might be misleading.
> Try 
> emacs -nw -q
> M-x cua-selection-mode RET
> and now try to use the S- C-S- keys, they should select/extend the selection for
> a region. Did that work?

Except <S-up>, the rest seem working.

However, it S-left and left is the same in 'C-h k', how can I bind them
to different commands?

Thanks,
-- 
.:  Leo  :.  [ sdl.web AT gmail.com ]  .:  [ GPG Key: 9283AA3F ]  :.

=>             "(require 'cl) considered harmful" considered harmful
=>           http://dto.freeshell.org/blog/blog-2007-09-07-2323.html

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

* Re: Adding xterm-extras to Emacs
  2007-09-14  1:47                               ` Leo
@ 2007-09-14  2:32                                 ` Dan Nicolaescu
  2007-09-14  8:02                                   ` Leo
  2007-09-14 14:04                                   ` Stefan Monnier
  0 siblings, 2 replies; 52+ messages in thread
From: Dan Nicolaescu @ 2007-09-14  2:32 UTC (permalink / raw)
  To: Leo; +Cc: emacs-devel

Leo <sdl.web@gmail.com> writes:

  > On 2007-09-14 02:30 +0100, Dan Nicolaescu wrote:
  > > What C-h k says for those keys might be misleading.
  > > Try 
  > > emacs -nw -q
  > > M-x cua-selection-mode RET
  > > and now try to use the S- C-S- keys, they should select/extend the selection for
  > > a region. Did that work?
  > 
  > Except <S-up>, the rest seem working.

In what way is S-up misbehaving?

  > However, it S-left and left is the same in 'C-h k', how can I bind them
  > to different commands?

They are different, you can bind them just fine. I don't remember the
explanation why is C-h k showing them like that.

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

* Re: Adding xterm-extras to Emacs
  2007-09-14  2:32                                 ` Dan Nicolaescu
@ 2007-09-14  8:02                                   ` Leo
  2007-09-14 16:38                                     ` Dan Nicolaescu
  2007-09-14 14:04                                   ` Stefan Monnier
  1 sibling, 1 reply; 52+ messages in thread
From: Leo @ 2007-09-14  8:02 UTC (permalink / raw)
  To: emacs-devel

On 2007-09-14 03:32 +0100, Dan Nicolaescu wrote:
>   > Except <S-up>, the rest seem working.
>
> In what way is S-up misbehaving?

<S-up> didn't move the selection up (it didn't move at all) in
cua-selection-mode.

>
>   > However, it S-left and left is the same in 'C-h k', how can I bind them
>   > to different commands?
>
> They are different, you can bind them just fine. I don't remember the
> explanation why is C-h k showing them like that.

I will now stop using xterm-extras.el and see if there are key bindings
stop working.

Thank you for fixing this.

-- 
.:  Leo  :.  [ sdl.web AT gmail.com ]  .:  [ GPG Key: 9283AA3F ]  :.

=>             "(require 'cl) considered harmful" considered harmful
=>           http://dto.freeshell.org/blog/blog-2007-09-07-2323.html

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

* Re: Adding xterm-extras to Emacs
  2007-09-14  2:32                                 ` Dan Nicolaescu
  2007-09-14  8:02                                   ` Leo
@ 2007-09-14 14:04                                   ` Stefan Monnier
  2007-09-14 14:13                                     ` Andreas Schwab
  1 sibling, 1 reply; 52+ messages in thread
From: Stefan Monnier @ 2007-09-14 14:04 UTC (permalink / raw)
  To: Dan Nicolaescu; +Cc: Leo, emacs-devel

>> However, it S-left and left is the same in 'C-h k', how can I bind them
>> to different commands?
> They are different, you can bind them just fine. I don't remember the
> explanation why is C-h k showing them like that.

C-h k shows the "raw data" as well as the "final event".  It doesn't show
all the intermediate steps.  In this case one of the steps is to turn the
escape sequence into S-left, and another step turns `S-left' into `left'
(because Emacs always tried to unshift a key to find a binding in case
where the shifted version has no binding).

I.e. under X11 where the "raw data" is already a `S-left', C-h k shows:

   <left> (translated from <S-left>) runs the command backward-char


-- Stefan

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

* Re: Adding xterm-extras to Emacs
  2007-09-14 14:04                                   ` Stefan Monnier
@ 2007-09-14 14:13                                     ` Andreas Schwab
  0 siblings, 0 replies; 52+ messages in thread
From: Andreas Schwab @ 2007-09-14 14:13 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Dan Nicolaescu, Leo, emacs-devel

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>>> However, it S-left and left is the same in 'C-h k', how can I bind them
>>> to different commands?
>> They are different, you can bind them just fine. I don't remember the
>> explanation why is C-h k showing them like that.
>
> C-h k shows the "raw data" as well as the "final event".  It doesn't show
> all the intermediate steps.  In this case one of the steps is to turn the
> escape sequence into S-left, and another step turns `S-left' into `left'
> (because Emacs always tried to unshift a key to find a binding in case
> where the shifted version has no binding).

That last step (unshifing) is omitted if you try to bind the key
interactively.

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

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

* Re: Adding xterm-extras to Emacs
  2007-09-14  8:02                                   ` Leo
@ 2007-09-14 16:38                                     ` Dan Nicolaescu
  2007-09-14 22:29                                       ` Leo
  0 siblings, 1 reply; 52+ messages in thread
From: Dan Nicolaescu @ 2007-09-14 16:38 UTC (permalink / raw)
  To: Leo; +Cc: emacs-devel

Leo <sdl.web@gmail.com> writes:

  > On 2007-09-14 03:32 +0100, Dan Nicolaescu wrote:
  > >   > Except <S-up>, the rest seem working.
  > >
  > > In what way is S-up misbehaving?
  > 
  > <S-up> didn't move the selection up (it didn't move at all) in
  > cua-selection-mode.

Strange. What do you get when typing:

C-q S-up

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

* Re: Adding xterm-extras to Emacs
  2007-09-14 16:38                                     ` Dan Nicolaescu
@ 2007-09-14 22:29                                       ` Leo
  2007-09-15  0:32                                         ` Dan Nicolaescu
  2007-09-15  1:27                                         ` Stefan Monnier
  0 siblings, 2 replies; 52+ messages in thread
From: Leo @ 2007-09-14 22:29 UTC (permalink / raw)
  To: emacs-devel

On 2007-09-14 17:38 +0100, Dan Nicolaescu wrote:
> Leo <sdl.web@gmail.com> writes:
>
>   > On 2007-09-14 03:32 +0100, Dan Nicolaescu wrote:
>   > >   > Except <S-up>, the rest seem working.
>   > >
>   > > In what way is S-up misbehaving?
>   > 
>   > <S-up> didn't move the selection up (it didn't move at all) in
>   > cua-selection-mode.
>
> Strange. What do you get when typing:
>
> C-q S-up

^[[1;2A

In cua-selection-mode, S-up displays "<select> is not bound".

HTH,
-- 
.:  Leo  :.  [ sdl.web AT gmail.com ]  .:  [ GPG Key: 9283AA3F ]  :.

=>             "(require 'cl) considered harmful" considered harmful
=>           http://dto.freeshell.org/blog/blog-2007-09-07-2323.html

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

* Re: Adding xterm-extras to Emacs
  2007-09-14 22:29                                       ` Leo
@ 2007-09-15  0:32                                         ` Dan Nicolaescu
  2007-09-21 10:15                                           ` Leo
  2007-09-15  1:27                                         ` Stefan Monnier
  1 sibling, 1 reply; 52+ messages in thread
From: Dan Nicolaescu @ 2007-09-15  0:32 UTC (permalink / raw)
  To: Leo; +Cc: emacs-devel

Leo <sdl.web@gmail.com> writes:

  > On 2007-09-14 17:38 +0100, Dan Nicolaescu wrote:
  > > Leo <sdl.web@gmail.com> writes:
  > >
  > >   > On 2007-09-14 03:32 +0100, Dan Nicolaescu wrote:
  > >   > >   > Except <S-up>, the rest seem working.
  > >   > >
  > >   > > In what way is S-up misbehaving?
  > >   > 
  > >   > <S-up> didn't move the selection up (it didn't move at all) in
  > >   > cua-selection-mode.
  > >
  > > Strange. What do you get when typing:
  > >
  > > C-q S-up
  > 
  > ^[[1;2A

That is the correct string, xterm.el binds it. 

  > In cua-selection-mode, S-up displays "<select> is not bound".

No idea where this could come from.

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

* Re: Adding xterm-extras to Emacs
  2007-09-14 22:29                                       ` Leo
  2007-09-15  0:32                                         ` Dan Nicolaescu
@ 2007-09-15  1:27                                         ` Stefan Monnier
  2007-09-21 10:11                                           ` Leo
  1 sibling, 1 reply; 52+ messages in thread
From: Stefan Monnier @ 2007-09-15  1:27 UTC (permalink / raw)
  To: Leo; +Cc: emacs-devel

>> C-q S-up
> ^[[1;2A
> In cua-selection-mode, S-up displays "<select> is not bound".

What does C-h k S-up say?

What might be happening is that your termcap/terminfo data tells Emacs to
bind this sequence to `select'.


        Stefan

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

* Re: Adding xterm-extras to Emacs
  2007-09-15  1:27                                         ` Stefan Monnier
@ 2007-09-21 10:11                                           ` Leo
  2007-09-21 10:22                                             ` Andreas Schwab
  0 siblings, 1 reply; 52+ messages in thread
From: Leo @ 2007-09-21 10:11 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

On 2007-09-15 02:27 +0100, Stefan Monnier wrote:
>>> C-q S-up
>> ^[[1;2A
>> In cua-selection-mode, S-up displays "<select> is not bound".
>
> What does C-h k S-up say?
>
> What might be happening is that your termcap/terminfo data tells Emacs
> to bind this sequence to `select'.

How can I find out if this is the case?

>
>         Stefan
>

-- 
.:  Leo  :.  [ sdl.web AT gmail.com ]  .:  [ GPG Key: 9283AA3F ]  :.

                                                 I use GNU Emacs  <=
                              http://www.gnu.org/software/emacs/  <=

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

* Re: Adding xterm-extras to Emacs
  2007-09-15  0:32                                         ` Dan Nicolaescu
@ 2007-09-21 10:15                                           ` Leo
  2007-09-21 13:51                                             ` Dan Nicolaescu
  0 siblings, 1 reply; 52+ messages in thread
From: Leo @ 2007-09-21 10:15 UTC (permalink / raw)
  To: Dan Nicolaescu; +Cc: emacs-devel

On 2007-09-15 01:32 +0100, Dan Nicolaescu wrote:
> Leo <sdl.web@gmail.com> writes:
>
>   > On 2007-09-14 17:38 +0100, Dan Nicolaescu wrote:
>   > > Leo <sdl.web@gmail.com> writes:
>   > >
>   > >   > On 2007-09-14 03:32 +0100, Dan Nicolaescu wrote:
>   > >   > >   > Except <S-up>, the rest seem working.
>   > >   > >
>   > >   > > In what way is S-up misbehaving?
>   > >   > 
>   > >   > <S-up> didn't move the selection up (it didn't move at all) in
>   > >   > cua-selection-mode.
>   > >
>   > > Strange. What do you get when typing:
>   > >
>   > > C-q S-up
>   > 
>   > ^[[1;2A
>
> That is the correct string, xterm.el binds it. 
>
>   > In cua-selection-mode, S-up displays "<select> is not bound".
>
> No idea where this could come from.
>

The current xterm.el does not cover the functionality of
xterm-extras.el. So I will continue using it.

If would be favorable, if you can study xterm-extras.el and include
those you see fit.

Thanks,
-- 
.:  Leo  :.  [ sdl.web AT gmail.com ]  .:  [ GPG Key: 9283AA3F ]  :.

                                                 I use GNU Emacs  <=
                              http://www.gnu.org/software/emacs/  <=

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

* Re: Adding xterm-extras to Emacs
  2007-09-21 10:11                                           ` Leo
@ 2007-09-21 10:22                                             ` Andreas Schwab
  2007-09-21 10:33                                               ` Leo
  0 siblings, 1 reply; 52+ messages in thread
From: Andreas Schwab @ 2007-09-21 10:22 UTC (permalink / raw)
  To: Leo; +Cc: Stefan Monnier, emacs-devel

Leo <sdl.web@gmail.com> writes:

> On 2007-09-15 02:27 +0100, Stefan Monnier wrote:
>> What might be happening is that your termcap/terminfo data tells Emacs
>> to bind this sequence to `select'.
>
> How can I find out if this is the case?

infocmp(1)

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

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

* Re: Adding xterm-extras to Emacs
  2007-09-21 10:22                                             ` Andreas Schwab
@ 2007-09-21 10:33                                               ` Leo
  2007-09-21 11:23                                                 ` Andreas Schwab
  0 siblings, 1 reply; 52+ messages in thread
From: Leo @ 2007-09-21 10:33 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 405 bytes --]

On 2007-09-21 11:22 +0100, Andreas Schwab wrote:
> Leo <sdl.web@gmail.com> writes:
>
>> On 2007-09-15 02:27 +0100, Stefan Monnier wrote:
>>> What might be happening is that your termcap/terminfo data tells Emacs
>>> to bind this sequence to `select'.
>>
>> How can I find out if this is the case?
>
> infocmp(1)
>
> Andreas.

The output is attached. Does it say that 'select' is bound to "S-up"? Thanks.


[-- Attachment #2: xterm.ic --]
[-- Type: text/plain, Size: 2812 bytes --]

#	Reconstructed via infocmp from file: /usr/share/terminfo/x/xterm-256color
xterm-256color|xterm with 256 colors,
	am, bce, ccc, km, mc5i, mir, msgr, npc, xenl,
	colors#256, cols#80, it#8, lines#24, pairs#32767,
	acsc=``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
	bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z, civis=\E[?25l,
	clear=\E[H\E[2J, cnorm=\E[?12l\E[?25h, cr=^M,
	csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H,
	cud=\E[%p1%dB, cud1=^J, cuf=\E[%p1%dC, cuf1=\E[C,
	cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A,
	cvvis=\E[?12;25h, dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM,
	dl1=\E[M, ech=\E[%p1%dX, ed=\E[J, el=\E[K, el1=\E[1K,
	flash=\E[?5h$<100/>\E[?5l, home=\E[H, hpa=\E[%i%p1%dG,
	ht=^I, hts=\EH, ich=\E[%p1%d@, il=\E[%p1%dL, il1=\E[L,
	ind=^J, indn=\E[%p1%dS,
	initc=\E]4;%p1%d;rgb\:%p2%{255}%*%{1000}%/%2.2X/%p3%{255}%*%{1000}%/%2.2X/%p4%{255}%*%{1000}%/%2.2X\E\\,
	invis=\E[8m, is2=\E[!p\E[?3;4l\E[4l\E>, kDC=\E[3;2~,
	kEND=\E[1;2F, kHOM=\E[1;2H, kIC=\E[2;2~, kLFT=\E[1;2D,
	kNXT=\E[6;2~, kPRV=\E[5;2~, kRIT=\E[1;2C, kb2=\EOE,
	kbs=\177, kcbt=\E[Z, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC,
	kcuu1=\EOA, kdch1=\E[3~, kend=\EOF, kent=\EOM, kf1=\EOP,
	kf10=\E[21~, kf11=\E[23~, kf12=\E[24~, kf13=\EO2P,
	kf14=\EO2Q, kf15=\EO2R, kf16=\EO2S, kf17=\E[15;2~,
	kf18=\E[17;2~, kf19=\E[18;2~, kf2=\EOQ, kf20=\E[19;2~,
	kf21=\E[20;2~, kf22=\E[21;2~, kf23=\E[23;2~,
	kf24=\E[24;2~, kf25=\EO5P, kf26=\EO5Q, kf27=\EO5R,
	kf28=\EO5S, kf29=\E[15;5~, kf3=\EOR, kf30=\E[17;5~,
	kf31=\E[18;5~, kf32=\E[19;5~, kf33=\E[20;5~,
	kf34=\E[21;5~, kf35=\E[23;5~, kf36=\E[24;5~, kf37=\EO6P,
	kf38=\EO6Q, kf39=\EO6R, kf4=\EOS, kf40=\EO6S,
	kf41=\E[15;6~, kf42=\E[17;6~, kf43=\E[18;6~,
	kf44=\E[19;6~, kf45=\E[20;6~, kf46=\E[21;6~,
	kf47=\E[23;6~, kf48=\E[24;6~, kf49=\EO3P, kf5=\E[15~,
	kf50=\EO3Q, kf51=\EO3R, kf52=\EO3S, kf53=\E[15;3~,
	kf54=\E[17;3~, kf55=\E[18;3~, kf56=\E[19;3~,
	kf57=\E[20;3~, kf58=\E[21;3~, kf59=\E[23;3~, kf6=\E[17~,
	kf60=\E[24;3~, kf61=\EO4P, kf62=\EO4Q, kf63=\EO4R,
	kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, khome=\EOH,
	kich1=\E[2~, kind=\E[1;2B, kmous=\E[M, knp=\E[6~,
	kpp=\E[5~, kri=\E[1;2A, mc0=\E[i, mc4=\E[4i, mc5=\E[5i,
	meml=\El, memu=\Em, op=\E[39;49m, rc=\E8, rev=\E[7m, ri=\EM,
	rin=\E[%p1%dT, rmacs=\E(B, rmam=\E[?7l, rmcup=\E[?1049l,
	rmir=\E[4l, rmkx=\E[?1l\E>, rmm=\E[?1034l, rmso=\E[27m,
	rmul=\E[24m, rs1=\Ec, rs2=\E[!p\E[?3;4l\E[4l\E>, sc=\E7,
	setab=\E[%?%p1%{8}%<%t4%p1%d%e%p1%{16}%<%t10%p1%{8}%-%d%e48;5;%p1%d%;m,
	setaf=\E[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;m,
	sgr=%?%p9%t\E(0%e\E(B%;\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;%?%p7%t;8%;m,
	sgr0=\E(B\E[m, smacs=\E(0, smam=\E[?7h, smcup=\E[?1049h,
	smir=\E[4h, smkx=\E[?1h\E=, smm=\E[?1034h, smso=\E[7m,
	smul=\E[4m, tbc=\E[3g, u6=\E[%i%d;%dR, u7=\E[6n,
	u8=\E[?1;2c, u9=\E[c, vpa=\E[%i%p1%dd,

[-- Attachment #3: Type: text/plain, Size: 213 bytes --]


-- 
.:  Leo  :.  [ sdl.web AT gmail.com ]  .:  [ GPG Key: 9283AA3F ]  :.

                                                 I use GNU Emacs  <=
                              http://www.gnu.org/software/emacs/  <=

[-- Attachment #4: Type: text/plain, Size: 142 bytes --]

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

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

* Re: Adding xterm-extras to Emacs
  2007-09-21 10:33                                               ` Leo
@ 2007-09-21 11:23                                                 ` Andreas Schwab
  0 siblings, 0 replies; 52+ messages in thread
From: Andreas Schwab @ 2007-09-21 11:23 UTC (permalink / raw)
  To: Leo; +Cc: emacs-devel

Leo <sdl.web@gmail.com> writes:

> On 2007-09-21 11:22 +0100, Andreas Schwab wrote:
>> Leo <sdl.web@gmail.com> writes:
>>
>>> On 2007-09-15 02:27 +0100, Stefan Monnier wrote:
>>>> What might be happening is that your termcap/terminfo data tells Emacs
>>>> to bind this sequence to `select'.
>>>
>>> How can I find out if this is the case?
>>
>> infocmp(1)
>>
>> Andreas.
>
> The output is attached. Does it say that 'select' is bound to "S-up"? Thanks.

The binding is done here:

term.c:1630:      CONDITIONAL_REASSIGN ("*6", "kU", "select");

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

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

* Re: Adding xterm-extras to Emacs
  2007-09-21 10:15                                           ` Leo
@ 2007-09-21 13:51                                             ` Dan Nicolaescu
  2007-10-11 16:26                                               ` Leo
  0 siblings, 1 reply; 52+ messages in thread
From: Dan Nicolaescu @ 2007-09-21 13:51 UTC (permalink / raw)
  To: Leo; +Cc: emacs-devel

Leo <sdl.web@gmail.com> writes:

  > On 2007-09-15 01:32 +0100, Dan Nicolaescu wrote:
  > > Leo <sdl.web@gmail.com> writes:
  > >
  > >   > On 2007-09-14 17:38 +0100, Dan Nicolaescu wrote:
  > >   > > Leo <sdl.web@gmail.com> writes:
  > >   > >
  > >   > >   > On 2007-09-14 03:32 +0100, Dan Nicolaescu wrote:
  > >   > >   > >   > Except <S-up>, the rest seem working.
  > >   > >   > >
  > >   > >   > > In what way is S-up misbehaving?
  > >   > >   > 
  > >   > >   > <S-up> didn't move the selection up (it didn't move at all) in
  > >   > >   > cua-selection-mode.
  > >   > >
  > >   > > Strange. What do you get when typing:
  > >   > >
  > >   > > C-q S-up
  > >   > 
  > >   > ^[[1;2A
  > >
  > > That is the correct string, xterm.el binds it. 
  > >
  > >   > In cua-selection-mode, S-up displays "<select> is not bound".
  > >
  > > No idea where this could come from.
  > >
  > 
  > The current xterm.el does not cover the functionality of
  > xterm-extras.el. So I will continue using it.
  > 
  > If would be favorable, if you can study xterm-extras.el and include
  > those you see fit.

Given that you are interested in this and you seem to know that
something is missing, why don't you provide a proper bug report with
what is missing???

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

* Re: Adding xterm-extras to Emacs
  2007-09-21 13:51                                             ` Dan Nicolaescu
@ 2007-10-11 16:26                                               ` Leo
  2007-10-11 17:08                                                 ` Dan Nicolaescu
  2007-10-11 17:42                                                 ` Stefan Monnier
  0 siblings, 2 replies; 52+ messages in thread
From: Leo @ 2007-10-11 16:26 UTC (permalink / raw)
  To: Dan Nicolaescu; +Cc: emacs-devel

On 2007-09-21 14:51 +0100, Dan Nicolaescu wrote:
[...]
>   > If would be favorable, if you can study xterm-extras.el and include
>   > those you see fit.
>
> Given that you are interested in this and you seem to know that
> something is missing, why don't you provide a proper bug report with
> what is missing???

To produce a full bug report is difficult as I only know how to use an
XTerm and no more than that. With the recent change, <S-up> is not shown
as <select> under `C-h K' any more.

However the following key bindings are recognized differently in `C-h
K':

Alt-right => <A-right>
Alt-left => <A-left>
Alt-up => <A-up>
Alt-down => <A-down>

HTH,
-- 
.:  Leo  :.  [ sdl.web AT gmail.com ]  .:  [ GPG Key: 9283AA3F ]  :.

       Use the most powerful email client -- http://gnus.org/

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

* Re: Adding xterm-extras to Emacs
  2007-10-11 16:26                                               ` Leo
@ 2007-10-11 17:08                                                 ` Dan Nicolaescu
  2007-10-11 17:39                                                   ` Leo
  2007-10-11 17:42                                                 ` Stefan Monnier
  1 sibling, 1 reply; 52+ messages in thread
From: Dan Nicolaescu @ 2007-10-11 17:08 UTC (permalink / raw)
  To: Leo; +Cc: emacs-devel

Leo <sdl.web@gmail.com> writes:

  > On 2007-09-21 14:51 +0100, Dan Nicolaescu wrote:
  > [...]
  > >   > If would be favorable, if you can study xterm-extras.el and include
  > >   > those you see fit.
  > >
  > > Given that you are interested in this and you seem to know that
  > > something is missing, why don't you provide a proper bug report with
  > > what is missing???
  > 
  > To produce a full bug report is difficult as I only know how to use an
  > XTerm and no more than that. 

You just need to show what keys are missing, nothing more.

  > With the recent change, <S-up> is not shown as <select> under `C-h
  > K' any more.

Then something has changed in your setup, AFAIK nothing has changed in
emacs to change that.

  > However the following key bindings are recognized differently in `C-h
  > K':
  > 
  > Alt-right => <A-right>
  > Alt-left => <A-left>
  > Alt-up => <A-up>
  > Alt-down => <A-down>

I am not sure I understand what you mean here, please explain in a bit
more detail. It's unclear if the above refers to the emacs defaults or
xterm-extras.el... 

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

* Re: Adding xterm-extras to Emacs
  2007-10-11 17:08                                                 ` Dan Nicolaescu
@ 2007-10-11 17:39                                                   ` Leo
  0 siblings, 0 replies; 52+ messages in thread
From: Leo @ 2007-10-11 17:39 UTC (permalink / raw)
  To: emacs-devel

On 2007-10-11 18:08 +0100, Dan Nicolaescu wrote:
> Leo <sdl.web@gmail.com> writes:
>
>   > On 2007-09-21 14:51 +0100, Dan Nicolaescu wrote:
>   > [...]
>   > >   > If would be favorable, if you can study xterm-extras.el and include
>   > >   > those you see fit.
>   > >
>   > > Given that you are interested in this and you seem to know that
>   > > something is missing, why don't you provide a proper bug report with
>   > > what is missing???
>   > 
>   > To produce a full bug report is difficult as I only know how to use an
>   > XTerm and no more than that. 
>
> You just need to show what keys are missing, nothing more.

I will report them when I see them.

>   > With the recent change, <S-up> is not shown as <select> under `C-h
>   > K' any more.
>
> Then something has changed in your setup, AFAIK nothing has changed in
> emacs to change that.

I haven't changed any of my setup. Maybe the following change:

,----
| ** New keymap `input-decode-map' overrides like key-translation-map, but
| applies before function-key-map.  Also it is terminal-local contrary to
| key-translation-map.  Terminal-specific key-sequences are generally added to
| this map rather than to function-key-map now.
`----


>   > However the following key bindings are recognized differently in
>   > `C-h K':
>   > 
>   > Alt-right => <A-right>
>   > Alt-left => <A-left>
>   > Alt-up => <A-up>
>   > Alt-down => <A-down>
>
> I am not sure I understand what you mean here, please explain in a bit
> more detail. It's unclear if the above refers to the emacs defaults or
> xterm-extras.el... 

It is tested in 'emacs -nw -q' (exterm-extras.el is not loaded).

Type `C-h k' and then type "Alt + RightArrow", it shows in the
minibuffer:

"<A-right> is undefined"

I was hoping to see "<M-right> is undefined".

-- 
.:  Leo  :.  [ sdl.web AT gmail.com ]  .:  [ GPG Key: 9283AA3F ]  :.

       Use the most powerful email client -- http://gnus.org/

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

* Re: Adding xterm-extras to Emacs
  2007-10-11 16:26                                               ` Leo
  2007-10-11 17:08                                                 ` Dan Nicolaescu
@ 2007-10-11 17:42                                                 ` Stefan Monnier
  2007-10-11 17:48                                                   ` Leo
  2007-10-13 10:45                                                   ` Leo
  1 sibling, 2 replies; 52+ messages in thread
From: Stefan Monnier @ 2007-10-11 17:42 UTC (permalink / raw)
  To: Leo; +Cc: Dan Nicolaescu, emacs-devel

>> > If would be favorable, if you can study xterm-extras.el and include
>> > those you see fit.
>> 
>> Given that you are interested in this and you seem to know that
>> something is missing, why don't you provide a proper bug report with
>> what is missing???

> To produce a full bug report is difficult as I only know how to use an
> XTerm and no more than that.

Just tell us which keys are not recognized (i.e. say key A-C-foo is not
recognized and give us the corresponding escape sequence, which you can
recover from C-h l).

> With the recent change, <S-up> is not shown
> as <select> under `C-h K' any more.

Not sure which change could have caused that.  Does it show up as S-up now?
If so, I'm glad to hear it ;-)

> However the following key bindings are recognized differently in `C-h
> K':

> Alt-right => <A-right>
> Alt-left => <A-left>
> Alt-up => <A-up>
> Alt-down => <A-down>

Is that good or bad?  The above looks right to me.  What was it before?
What should it be instead?


        Stefan

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

* Re: Adding xterm-extras to Emacs
  2007-10-11 17:42                                                 ` Stefan Monnier
@ 2007-10-11 17:48                                                   ` Leo
  2007-10-11 20:12                                                     ` Stefan Monnier
  2007-10-13 10:45                                                   ` Leo
  1 sibling, 1 reply; 52+ messages in thread
From: Leo @ 2007-10-11 17:48 UTC (permalink / raw)
  To: emacs-devel

On 2007-10-11 18:42 +0100, Stefan Monnier wrote:
>> With the recent change, <S-up> is not shown
>> as <select> under `C-h K' any more.
>
> Not sure which change could have caused that.  Does it show up as S-up now?
> If so, I'm glad to hear it ;-)

It might be due to some changes in my .Xresources.

What's the recommended setting for XTerm?

,----
| XTerm.termName: xterm-256color
| XTerm*scrollBar: off
| XTerm*metaSendsEscape: true
| XTerm*backarrowKey: false
| XTerm*modifier: meta
| XTerm*modifyOtherKeys: 0
| XTerm*modifyFunctionKeys: 2
| XTerm*modifyCursorKeys: 2
`----

>> However the following key bindings are recognized differently in `C-h
>> K':
>
>> Alt-right => <A-right>
>> Alt-left => <A-left>
>> Alt-up => <A-up>
>> Alt-down => <A-down>
>
> Is that good or bad?  The above looks right to me.  What was it before?
> What should it be instead?

I was expecting to see <M-right> etc. For example some modes bind
`M-right' to a command. But I could only invoke it by "Esc + RightArrow"
and not "Alt + RightArrow".

HTH
-- 
.:  Leo  :.  [ sdl.web AT gmail.com ]  .:  [ GPG Key: 9283AA3F ]  :.

       Use the most powerful email client -- http://gnus.org/

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

* Re: Adding xterm-extras to Emacs
  2007-10-11 17:48                                                   ` Leo
@ 2007-10-11 20:12                                                     ` Stefan Monnier
  2007-10-11 20:27                                                       ` Leo
  0 siblings, 1 reply; 52+ messages in thread
From: Stefan Monnier @ 2007-10-11 20:12 UTC (permalink / raw)
  To: Leo; +Cc: emacs-devel

>>> However the following key bindings are recognized differently in `C-h K':
>> 
>>> Alt-right => <A-right>
>>> Alt-left => <A-left>
>>> Alt-up => <A-up>
>>> Alt-down => <A-down>
>> 
>> Is that good or bad?  The above looks right to me.  What was it before?
>> What should it be instead?

> I was expecting to see <M-right> etc. For example some modes bind
> `M-right' to a command. But I could only invoke it by "Esc + RightArrow"
> and not "Alt + RightArrow".

Have you tried with other "alt" keys?  There's always this issue about
Alt-vs-Meta, so normally xterm converts the Meta modifier into an ESC prefix
(via the "metaSendsEscape" which you seem to have set as well).
If you don't like to distinguish Meta from Alt, then maybe you should play
with xmodmap to turn all your Alt keys into Meta keys or vice-versa.


        Stefan

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

* Re: Adding xterm-extras to Emacs
  2007-10-11 20:12                                                     ` Stefan Monnier
@ 2007-10-11 20:27                                                       ` Leo
  2007-10-12  1:11                                                         ` Stefan Monnier
  0 siblings, 1 reply; 52+ messages in thread
From: Leo @ 2007-10-11 20:27 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

On 2007-10-11 21:12 +0100, Stefan Monnier wrote:
>>>> However the following key bindings are recognized differently in `C-h K':
>>> 
>>>> Alt-right => <A-right>
>>>> Alt-left => <A-left>
>>>> Alt-up => <A-up>
>>>> Alt-down => <A-down>
>>> 
>>> Is that good or bad?  The above looks right to me.  What was it before?
>>> What should it be instead?
>
>> I was expecting to see <M-right> etc. For example some modes bind
>> `M-right' to a command. But I could only invoke it by "Esc + RightArrow"
>> and not "Alt + RightArrow".
>
> Have you tried with other "alt" keys?  There's always this issue about
> Alt-vs-Meta, so normally xterm converts the Meta modifier into an ESC prefix
> (via the "metaSendsEscape" which you seem to have set as well).
> If you don't like to distinguish Meta from Alt, then maybe you should play
> with xmodmap to turn all your Alt keys into Meta keys or vice-versa.

However, Alt+Ctrl+Right is shown as "<C-M-right>" but not "<C-A-right>"
while Alt+Right is shown as "<A-right>" but not <M-right>. You can see
they are _INCONSISTENT_.

(What I mean by 'shown' is by what is displayed when the key binding is
tested in 'C-h k'.)

>
>
>         Stefan

-- 
.:  Leo  :.  [ sdl.web AT gmail.com ]  .:  [ GPG Key: 9283AA3F ]  :.

       Use the most powerful email client -- http://gnus.org/

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

* Re: Adding xterm-extras to Emacs
  2007-10-11 20:27                                                       ` Leo
@ 2007-10-12  1:11                                                         ` Stefan Monnier
  2007-10-12  7:18                                                           ` Leo
  0 siblings, 1 reply; 52+ messages in thread
From: Stefan Monnier @ 2007-10-12  1:11 UTC (permalink / raw)
  To: Leo; +Cc: emacs-devel

> However, Alt+Ctrl+Right is shown as "<C-M-right>" but not "<C-A-right>"
> while Alt+Right is shown as "<A-right>" but not <M-right>. You can see
> they are _INCONSISTENT_.

Can you check C-h l as well to see if Alt+Ctrl+Right sends ESC followed by
the escape sequence for Ctrl+Right and if Alr+Right does the same.
If not, then the inconsistency is in xterm and should be reported there
(after reporting there, we may also decide to workaround the problem in
Emacs by binding those escape sequences to M-right instead).


        Stefan

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

* Re: Adding xterm-extras to Emacs
  2007-10-12  1:11                                                         ` Stefan Monnier
@ 2007-10-12  7:18                                                           ` Leo
  2007-10-12 16:18                                                             ` Stefan Monnier
  0 siblings, 1 reply; 52+ messages in thread
From: Leo @ 2007-10-12  7:18 UTC (permalink / raw)
  To: emacs-devel

On 2007-10-12 02:11 +0100, Stefan Monnier wrote:
>> However, Alt+Ctrl+Right is shown as "<C-M-right>" but not "<C-A-right>"
>> while Alt+Right is shown as "<A-right>" but not <M-right>. You can see
>> they are _INCONSISTENT_.
>
> Can you check C-h l as well to see if Alt+Ctrl+Right sends ESC followed by
> the escape sequence for Ctrl+Right and if Alr+Right does the same.
> If not, then the inconsistency is in xterm and should be reported there
> (after reporting there, we may also decide to workaround the problem in
> Emacs by binding those escape sequences to M-right instead).

Yes, it looks like Alt+Ctrl+Right and Alt+Right send ESC.

Alt+Ctrl+Right  ^[[1;7C
Alt+Right       ^[[1;3C

================================
[ M SPC : = ESC [ M # : = ESC [ M a M B ESC [ M a M
B ESC [ M a M B ESC [ M ` M B ESC [ M ` M B ESC [ M
` M B ESC [ M ` M B ESC [ M ` M B ESC [ M ` M B ESC
[ M ` M B ESC [ M ` M B ESC [ M ` M B ESC [ M SPC 2
& ESC [ M # 2 & n n n n n n ESC [ M SPC @ ; ESC [ M
# @ ; ESC [ M SPC ? = ESC [ M # ? = ESC O B ESC O B
ESC O B ESC O B ESC O B ESC O B ESC O B ESC O B ESC
O B ESC O B ESC O B ESC O B ESC O B ESC O B ESC O B
ESC O B ESC O B ESC O B ESC O B ESC O B ESC O B ESC
O B ESC O B ESC O B ESC O B ESC O B ESC O B ESC O B
ESC O B ESC O B ESC O B ESC O B ESC O B ESC O B ESC
O B ESC O B ESC O B h n n n SPC n n n n n n n n n n
n n n n n q RET ESC O B ESC O B ESC O B ESC O B ESC
O A RET C-x 1 C-x b s c r RET C-h k ESC [ 1 ; 7 C C-h
k ESC [ 1 ; 3 C C-h l

>
>
>         Stefan

-- 
.:  Leo  :.  [ sdl.web AT gmail.com ]  .:  [ GPG Key: 9283AA3F ]  :.

       Use the most powerful email client -- http://gnus.org/

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

* Re: Adding xterm-extras to Emacs
  2007-10-12  7:18                                                           ` Leo
@ 2007-10-12 16:18                                                             ` Stefan Monnier
  2007-10-13 10:37                                                               ` Leo
  0 siblings, 1 reply; 52+ messages in thread
From: Stefan Monnier @ 2007-10-12 16:18 UTC (permalink / raw)
  To: Leo; +Cc: emacs-devel

>>> However, Alt+Ctrl+Right is shown as "<C-M-right>" but not "<C-A-right>"
>>> while Alt+Right is shown as "<A-right>" but not <M-right>. You can see
>>> they are _INCONSISTENT_.
>> 
>> Can you check C-h l as well to see if Alt+Ctrl+Right sends ESC followed by
>> the escape sequence for Ctrl+Right and if Alr+Right does the same.
>> If not, then the inconsistency is in xterm and should be reported there
>> (after reporting there, we may also decide to workaround the problem in
>> Emacs by binding those escape sequences to M-right instead).

> Yes, it looks like Alt+Ctrl+Right and Alt+Right send ESC.

> Alt+Ctrl+Right  ^[[1;7C
> Alt+Right       ^[[1;3C

You mean "it looks like they *don't*"!  The ESC you see are the first char
of an escape sequence, not standalone ESC characters.

What "metaSendsEscape" is supposed to do is to turn Alt+A into ESC A, so if
Right sends ^[[C (aka ESC [ C), then Alt+Right should send ^[^[[C (aka ESC
ESC [ C).  Please report this as a feature request to xterm's maintainers.

But looking at lisp/xterm.el now I see that we indeed inconsistently map
things to S-M-foo but A-foo, so the inconsistency is our fault and should be
corrected with the patch below,


        Stefan


--- xterm.el	09 oct 2007 01:14:42 -0400	1.51
+++ xterm.el	12 oct 2007 11:28:38 -0400	
@@ -89,18 +89,18 @@
     (define-key map "\e[23;6~" [C-S-f11])
     (define-key map "\e[24;6~" [C-S-f12])
 
-    (define-key map "\eO3P" [A-f1])
-    (define-key map "\eO3Q" [A-f2])
-    (define-key map "\eO3R" [A-f3])
-    (define-key map "\eO3S" [A-f4])
-    (define-key map "\e[15;3~" [A-f5])
-    (define-key map "\e[17;3~" [A-f6])
-    (define-key map "\e[18;3~" [A-f7])
-    (define-key map "\e[19;3~" [A-f8])
-    (define-key map "\e[20;3~" [A-f9])
-    (define-key map "\e[21;3~" [A-f10])
-    (define-key map "\e[23;3~" [A-f11])
-    (define-key map "\e[24;3~" [A-f12])
+    (define-key map "\eO3P" [M-f1])
+    (define-key map "\eO3Q" [M-f2])
+    (define-key map "\eO3R" [M-f3])
+    (define-key map "\eO3S" [M-f4])
+    (define-key map "\e[15;3~" [M-f5])
+    (define-key map "\e[17;3~" [M-f6])
+    (define-key map "\e[18;3~" [M-f7])
+    (define-key map "\e[19;3~" [M-f8])
+    (define-key map "\e[20;3~" [M-f9])
+    (define-key map "\e[21;3~" [M-f10])
+    (define-key map "\e[23;3~" [M-f11])
+    (define-key map "\e[24;3~" [M-f12])
 
     (define-key map "\eO4P" [M-S-f1])
     (define-key map "\eO4Q" [M-S-f2])
@@ -164,12 +164,12 @@
     (define-key map "\e[1;8F" [C-M-S-end])
     (define-key map "\e[1;8H" [C-M-S-home])
 
-    (define-key map "\e[1;3A" [A-up])
-    (define-key map "\e[1;3B" [A-down])
-    (define-key map "\e[1;3C" [A-right])
-    (define-key map "\e[1;3D" [A-left])
-    (define-key map "\e[1;3F" [A-end])
-    (define-key map "\e[1;3H" [A-home])
+    (define-key map "\e[1;3A" [M-up])
+    (define-key map "\e[1;3B" [M-down])
+    (define-key map "\e[1;3C" [M-right])
+    (define-key map "\e[1;3D" [M-left])
+    (define-key map "\e[1;3F" [M-end])
+    (define-key map "\e[1;3H" [M-home])
 
     (define-key map "\e[2~" [insert])
     (define-key map "\e[3~" [delete])
@@ -206,10 +206,10 @@
     (define-key map "\e[5;8~" [C-M-S-prior])
     (define-key map "\e[6;8~" [C-M-S-next])
 
-    (define-key map "\e[2;3~" [A-insert])
-    (define-key map "\e[3;3~" [A-delete])
-    (define-key map "\e[5;3~" [A-prior])
-    (define-key map "\e[6;3~" [A-next])
+    (define-key map "\e[2;3~" [M-insert])
+    (define-key map "\e[3;3~" [M-delete])
+    (define-key map "\e[5;3~" [M-prior])
+    (define-key map "\e[6;3~" [M-next])
 
     (define-key map "\e[4~" [select])
     (define-key map "\e[29~" [print])
@@ -425,18 +425,18 @@
     (define-key map [f47] [C-S-f11])
     (define-key map [f48] [C-S-f12])
 
-    (define-key map [f49] [A-f1])
-    (define-key map [f50] [A-f2])
-    (define-key map [f51] [A-f3])
-    (define-key map [f52] [A-f4])
-    (define-key map [f53] [A-f5])
-    (define-key map [f54] [A-f6])
-    (define-key map [f55] [A-f7])
-    (define-key map [f56] [A-f8])
-    (define-key map [f57] [A-f9])
-    (define-key map [f58] [A-f10])
-    (define-key map [f59] [A-f11])
-    (define-key map [f60] [A-f12])
+    (define-key map [f49] [M-f1])
+    (define-key map [f50] [M-f2])
+    (define-key map [f51] [M-f3])
+    (define-key map [f52] [M-f4])
+    (define-key map [f53] [M-f5])
+    (define-key map [f54] [M-f6])
+    (define-key map [f55] [M-f7])
+    (define-key map [f56] [M-f8])
+    (define-key map [f57] [M-f9])
+    (define-key map [f58] [M-f10])
+    (define-key map [f59] [M-f11])
+    (define-key map [f60] [M-f12])
 
     map)
   "Keymap of possible alternative meanings for some keys.")

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

* Re: Adding xterm-extras to Emacs
  2007-10-12 16:18                                                             ` Stefan Monnier
@ 2007-10-13 10:37                                                               ` Leo
  0 siblings, 0 replies; 52+ messages in thread
From: Leo @ 2007-10-13 10:37 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

On 2007-10-12 17:18 +0100, Stefan Monnier wrote:
>>>> However, Alt+Ctrl+Right is shown as "<C-M-right>" but not "<C-A-right>"
>>>> while Alt+Right is shown as "<A-right>" but not <M-right>. You can see
>>>> they are _INCONSISTENT_.
>>> 
>>> Can you check C-h l as well to see if Alt+Ctrl+Right sends ESC followed by
>>> the escape sequence for Ctrl+Right and if Alr+Right does the same.
>>> If not, then the inconsistency is in xterm and should be reported there
>>> (after reporting there, we may also decide to workaround the problem in
>>> Emacs by binding those escape sequences to M-right instead).
>
>> Yes, it looks like Alt+Ctrl+Right and Alt+Right send ESC.
>
>> Alt+Ctrl+Right  ^[[1;7C
>> Alt+Right       ^[[1;3C
>
> You mean "it looks like they *don't*"!  The ESC you see are the first char
> of an escape sequence, not standalone ESC characters.
>
> What "metaSendsEscape" is supposed to do is to turn Alt+A into ESC A, so if
> Right sends ^[[C (aka ESC [ C), then Alt+Right should send ^[^[[C (aka ESC
> ESC [ C).  Please report this as a feature request to xterm's maintainers.
>
> But looking at lisp/xterm.el now I see that we indeed inconsistently map
> things to S-M-foo but A-foo, so the inconsistency is our fault and should be
> corrected with the patch below,

I have updated xterm.el to the latest and now Alt+Right is recognized as
<M-right> etc.

Do you still think that xterm is missing the feature?

>         Stefan
[...]

-- 
.:  Leo  :.  [ sdl.web AT gmail.com ]  .:  [ GPG Key: 9283AA3F ]  :.

       Use the most powerful email client -- http://gnus.org/

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

* Re: Adding xterm-extras to Emacs
  2007-10-11 17:42                                                 ` Stefan Monnier
  2007-10-11 17:48                                                   ` Leo
@ 2007-10-13 10:45                                                   ` Leo
  1 sibling, 0 replies; 52+ messages in thread
From: Leo @ 2007-10-13 10:45 UTC (permalink / raw)
  To: emacs-devel

On 2007-10-11 18:42 +0100, Stefan Monnier wrote:
>> To produce a full bug report is difficult as I only know how to use an
>> XTerm and no more than that.
>
> Just tell us which keys are not recognized (i.e. say key A-C-foo is not
> recognized and give us the corresponding escape sequence, which you can
> recover from C-h l).

I will provide feedback on any missing key binding that I can find in my
daily use of Emacs.

-- 
.:  Leo  :.  [ sdl.web AT gmail.com ]  .:  [ GPG Key: 9283AA3F ]  :.

       Use the most powerful email client -- http://gnus.org/

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

end of thread, other threads:[~2007-10-13 10:45 UTC | newest]

Thread overview: 52+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-12 22:03 Adding xterm-extras to Emacs Leo
2007-06-12 22:21 ` Dan Nicolaescu
2007-06-12 22:31   ` Leo
2007-06-12 22:43     ` Dan Nicolaescu
2007-06-12 23:32       ` Leo
2007-06-13  0:47         ` Dan Nicolaescu
2007-06-13  0:56           ` Leo
2007-06-13  3:52             ` Dan Nicolaescu
2007-06-13 10:54               ` Johan Bockgård
2007-06-13 13:22                 ` Dan Nicolaescu
2007-06-13 16:18                   ` Johan Bockgård
2007-06-13 19:09                     ` Dan Nicolaescu
2007-06-13  7:08           ` csant
2007-06-13 13:33             ` Dan Nicolaescu
2007-06-13 19:18               ` csant
2007-06-13  9:43           ` Peter Heslin
2007-06-13 14:15             ` Dan Nicolaescu
2007-06-13 15:31               ` Stefan Monnier
2007-06-14  5:08                 ` Dan Nicolaescu
2007-09-13 16:40                   ` Leo
2007-09-13 16:58                     ` Dan Nicolaescu
2007-09-13 19:49                       ` Leo
2007-09-14  1:02                         ` Dan Nicolaescu
2007-09-14  1:20                           ` Leo
2007-09-14  1:30                             ` Dan Nicolaescu
2007-09-14  1:47                               ` Leo
2007-09-14  2:32                                 ` Dan Nicolaescu
2007-09-14  8:02                                   ` Leo
2007-09-14 16:38                                     ` Dan Nicolaescu
2007-09-14 22:29                                       ` Leo
2007-09-15  0:32                                         ` Dan Nicolaescu
2007-09-21 10:15                                           ` Leo
2007-09-21 13:51                                             ` Dan Nicolaescu
2007-10-11 16:26                                               ` Leo
2007-10-11 17:08                                                 ` Dan Nicolaescu
2007-10-11 17:39                                                   ` Leo
2007-10-11 17:42                                                 ` Stefan Monnier
2007-10-11 17:48                                                   ` Leo
2007-10-11 20:12                                                     ` Stefan Monnier
2007-10-11 20:27                                                       ` Leo
2007-10-12  1:11                                                         ` Stefan Monnier
2007-10-12  7:18                                                           ` Leo
2007-10-12 16:18                                                             ` Stefan Monnier
2007-10-13 10:37                                                               ` Leo
2007-10-13 10:45                                                   ` Leo
2007-09-15  1:27                                         ` Stefan Monnier
2007-09-21 10:11                                           ` Leo
2007-09-21 10:22                                             ` Andreas Schwab
2007-09-21 10:33                                               ` Leo
2007-09-21 11:23                                                 ` Andreas Schwab
2007-09-14 14:04                                   ` Stefan Monnier
2007-09-14 14:13                                     ` Andreas Schwab

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).