unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Ubuntu 10.0: TERM=Linux: facemenu steals arrow keys
@ 2012-01-07 19:10 T. V. Raman
  2012-01-08  5:50 ` Dan Nicolaescu
  2012-01-08 14:09 ` Stefan Monnier
  0 siblings, 2 replies; 8+ messages in thread
From: T. V. Raman @ 2012-01-07 19:10 UTC (permalink / raw)
  To: emacs-devel

Hi,
This problem started after a git update from savannah yesterday.

Environment: Ubuntu 10.0
Linux Console (i.e. outside X)
TERM=linux (terminal type)

I suddenly found the arrow keys invoking facemenu-set-default.

Describe Function (attached output below) on
facemenu-set-default shows that it is indeed bound to \eOD,
which coincidentally is what the left arrow key generates on the
linux console.

I verified that  this is still true with emacs -q -- but with  a
minimal emacspeak environment loaded; I dont  believe the binding
is coming from Emacspeak as far as I can tell.


facemenu-set-default is an interactive Lisp function.

It is bound to meta o d , META cap G d , <control down-mouse-2>
<fc> d , <menu-bar> <edit> <props> <fc> d .

(facemenu-set-default)

Select face `default' for subsequent insertion.
If the mark is active and there is no prefix argument,
apply face `default' to the region instead.
This command was defined by `facemenu-add-new-face'.

-- 
Best Regards,
--raman



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

* Re: Ubuntu 10.0: TERM=Linux: facemenu steals arrow keys
  2012-01-07 19:10 Ubuntu 10.0: TERM=Linux: facemenu steals arrow keys T. V. Raman
@ 2012-01-08  5:50 ` Dan Nicolaescu
       [not found]   ` <CADkJX2jtwKuvhS_Es7ELafq+bVsVb79q2Vi4EV+PYh-9LBDxjA@mail.gmail.com>
  2012-01-08 14:09 ` Stefan Monnier
  1 sibling, 1 reply; 8+ messages in thread
From: Dan Nicolaescu @ 2012-01-08  5:50 UTC (permalink / raw)
  To: tv.raman.tv; +Cc: emacs-devel

"T. V. Raman" <tv.raman.tv@gmail.com> writes:

> Hi,
> This problem started after a git update from savannah yesterday.
>
> Environment: Ubuntu 10.0
> Linux Console (i.e. outside X)
> TERM=linux (terminal type)
>
> I suddenly found the arrow keys invoking facemenu-set-default.
>
> Describe Function (attached output below) on
> facemenu-set-default shows that it is indeed bound to \eOD,
> which coincidentally is what the left arrow key generates on the
> linux console.
>
> I verified that  this is still true with emacs -q -- but with  a
> minimal emacspeak environment loaded; I dont  believe the binding
> is coming from Emacspeak as far as I can tell.
>
>
> facemenu-set-default is an interactive Lisp function.
>
> It is bound to meta o d , META cap G d , <control down-mouse-2>
> <fc> d , <menu-bar> <edit> <props> <fc> d .
>
> (facemenu-set-default)
>
> Select face `default' for subsequent insertion.
> If the mark is active and there is no prefix argument,
> apply face `default' to the region instead.
> This command was defined by `facemenu-add-new-face'.

What do you get if you press:
C-q <left>
(i.e. C-q followed by left arrow key)

Do you get the same sequence as running in a shell :

infocmp linux | grep kcub1

?



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

* Re: Ubuntu 10.0: TERM=Linux: facemenu steals arrow keys
  2012-01-07 19:10 Ubuntu 10.0: TERM=Linux: facemenu steals arrow keys T. V. Raman
  2012-01-08  5:50 ` Dan Nicolaescu
@ 2012-01-08 14:09 ` Stefan Monnier
  2012-01-08 19:57   ` T.V. Raman
  1 sibling, 1 reply; 8+ messages in thread
From: Stefan Monnier @ 2012-01-08 14:09 UTC (permalink / raw)
  To: tv.raman.tv; +Cc: emacs-devel

> I verified that  this is still true with emacs -q -- but with a
> minimal emacspeak environment loaded; I dont  believe the binding
> is coming from Emacspeak as far as I can tell.

Can you check that -Q also shows this behavior?
I can't think of how/where we'd setup such a binding.

> It is bound to meta o d , META cap G d , <control down-mouse-2>
> <fc> d , <menu-bar> <edit> <props> <fc> d .

This text looks odd: what are those "meta" and "META" and "cap" keys?


        Stefan



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

* Ubuntu 10.0: TERM=Linux: facemenu steals arrow keys
  2012-01-08 14:09 ` Stefan Monnier
@ 2012-01-08 19:57   ` T.V. Raman
  2012-01-09  1:01     ` Stefan Monnier
  0 siblings, 1 reply; 8+ messages in thread
From: T.V. Raman @ 2012-01-08 19:57 UTC (permalink / raw)
  To: Stefan Monnier, emacs-devel

Culprit in facemenu.el: (define-key global-map "\M-o" 'facemenu-keymap)
-- 
Best Regards,
--raman

-- 
Best Regards,
--raman


On 1/8/12, Stefan Monnier <monnier@iro.umontreal.ca> wrote:
>> I verified that  this is still true with emacs -q -- but with a
>> minimal emacspeak environment loaded; I dont  believe the binding
>> is coming from Emacspeak as far as I can tell.
>
> Can you check that -Q also shows this behavior?
> I can't think of how/where we'd setup such a binding.
>
>> It is bound to meta o d , META cap G d , <control down-mouse-2>
>> <fc> d , <menu-bar> <edit> <props> <fc> d .
>
> This text looks odd: what are those "meta" and "META" and "cap" keys?
>
>
>         Stefan
>



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

* Re: Ubuntu 10.0: TERM=Linux: facemenu steals arrow keys
  2012-01-08 19:57   ` T.V. Raman
@ 2012-01-09  1:01     ` Stefan Monnier
  2012-01-09  8:48       ` Dan Nicolaescu
  0 siblings, 1 reply; 8+ messages in thread
From: Stefan Monnier @ 2012-01-09  1:01 UTC (permalink / raw)
  To: T.V. Raman; +Cc: emacs-devel

> Culprit in facemenu.el: (define-key global-map "\M-o" 'facemenu-keymap)

Oh, right.  So the real problem is the use of ESC O D escape sequences.
AFAIK these sequences aren't used any more in current
terminal emulators.  I wonder how you ended up with such a situation.


        Stefan



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

* Re: Ubuntu 10.0: TERM=Linux: facemenu steals arrow keys
       [not found]           ` <20234.20416.484712.470008@gargle.gargle.HOWL>
@ 2012-01-09  3:30             ` Dan Nicolaescu
  0 siblings, 0 replies; 8+ messages in thread
From: Dan Nicolaescu @ 2012-01-09  3:30 UTC (permalink / raw)
  To: tv.raman.tv; +Cc: emacs-devel

"T. V. Raman" <tv.raman.tv@gmail.com> writes:
[Your original CC to emacs-devel had an incorrect address, so I got a
bounce, this is a resend]

> Ithought Ihad said in my original note that the problem only
> showed up if TERM=linux -- which the default on the Linux
> console. 

But that only happens on your machine when you use 
loadkeys emacs2

right?

On my Fedora machine "loadkeys emacs2" does not change the what the
arrow keys emit. 


> I've already fixed it for myself locally by defining
> \M-OA  and friends in my function-key-map --- but Istill think
> facemenu.el should be fixed for the general user.

The problem is that on your machine what the arrow keys emit does not
correspond to the "linux" terminfo entry (terminfo expect \e[[A whereas
the terminal emits \eOA).  So emacs is confused.
Once that confusion is resolved, facemenu.el would just work.


>
>
>>>>>> "Dan" == Dan Nicolaescu <dann@gnu.org> writes:
>     Dan> "T.V. Raman" <tv.raman.tv@gmail.com> writes:
>     >> Correct: Arrows emit \eO[A-D] using keymap emacs2.kmap.gz
>     Dan> 
>     Dan> Then you need to set TERM to something else, not to
>     Dan> linux. I think using "xterm" would get rid of this
>     Dan> particular error.
>     Dan> 
>     Dan> BTW, please keep emacs-devel in the CC.
>     Dan> 
>     >> -- 
>     >> Best Regards, --raman
>     >> 
>     >> -- 
>     >> Best Regards, --raman
>     >> 
>     >> 
>     >> On 1/8/12, Dan Nicolaescu <dann@gnu.org> wrote:
>     >>> "T.V. Raman" <tv.raman.tv@gmail.com> writes:
>     >>> 
>     >>>> On linnnux console term=linux\eOA
>     >>> 
>     >>> Are you saying that on your linux console \eOA is emitted
>     >>> for an arrow key?
>     >>> 
>     >>> That's not what I get on Fedora... And that's not what
>     >>> the terminfo database specifies. This is the cause of the
>     >>> problem: the terminal emits one sequence and the terminfo
>     >>> database expects another one.
>     >>> 
>     >>> 
>     >>> 
>     >>> 
>     >>>> --
>     >>>> Best Regards, --raman
>     >>>> 
>     >>>> --
>     >>>> Best Regards, --raman
>     >>>> 
>     >>>> 
>     >>>> On 1/7/12, Dan Nicolaescu <dann@gnu.org> wrote:
>     >>>>> "T. V. Raman" <tv.raman.tv@gmail.com> writes:
>     >>>>> 
>     >>>>>> Hi, This problem started after a git update from
>     >>>>>> savannah yesterday.
>     >>>>>> 
>     >>>>>> Environment: Ubuntu 10.0 Linux Console (i.e. outside
>     >>>>>> X) TERM=linux (terminal type)
>     >>>>>> 
>     >>>>>> I suddenly found the arrow keys invoking
>     >>>>>> facemenu-set-default.
>     >>>>>> 
>     >>>>>> Describe Function (attached output below) on
>     >>>>>> facemenu-set-default shows that it is indeed bound to
>     >>>>>> \eOD, which coincidentally is what the left arrow key
>     >>>>>> generates on the linux console.
>     >>>>>> 
>     >>>>>> I verified that this is still true with emacs -q --
>     >>>>>> but with a minimal emacspeak environment loaded; I
>     >>>>>> dont believe the binding is coming from Emacspeak as
>     >>>>>> far as I can tell.
>     >>>>>> 
>     >>>>>> 
>     >>>>>> facemenu-set-default is an interactive Lisp function.
>     >>>>>> 
>     >>>>>> It is bound to meta o d , META cap G d , <control
>     >>>>>> down-mouse-2> <fc> d , <menu-bar> <edit> <props> <fc>
>     >>>>>> d .
>     >>>>>> 
>     >>>>>> (facemenu-set-default)
>     >>>>>> 
>     >>>>>> Select face `default' for subsequent insertion. If the
>     >>>>>> mark is active and there is no prefix argument, apply
>     >>>>>> face `default' to the region instead. This command was
>     >>>>>> defined by `facemenu-add-new-face'.
>     >>>>> 
>     >>>>> What do you get if you press: C-q <left> (i.e. C-q
>     >>>>> followed by left arrow key)
>     >>>>> 
>     >>>>> Do you get the same sequence as running in a shell :
>     >>>>> 
>     >>>>> infocmp linux | grep kcub1
>     >>>>> 
>     >>>>> ?
>     >>>>> 
>     >>>
>
> -- 
> Best Regards,
> --raman



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

* Re: Ubuntu 10.0: TERM=Linux: facemenu steals arrow keys
  2012-01-09  1:01     ` Stefan Monnier
@ 2012-01-09  8:48       ` Dan Nicolaescu
  2012-01-09 13:59         ` Stefan Monnier
  0 siblings, 1 reply; 8+ messages in thread
From: Dan Nicolaescu @ 2012-01-09  8:48 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: T.V. Raman, emacs-devel

Stefan Monnier <monnier@IRO.UMontreal.CA> writes:

>> Culprit in facemenu.el: (define-key global-map "\M-o" 'facemenu-keymap)
>
> Oh, right.  So the real problem is the use of ESC O D escape sequences.
> AFAIK these sequences aren't used any more in current
> terminal emulators.

Please try in an xterm:
emacs -nw
C-q <left>

>  I wonder how you ended up with such a situation.

The problem is that the terminal emits one escape sequence and terminfo
expects a different one.




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

* Re: Ubuntu 10.0: TERM=Linux: facemenu steals arrow keys
  2012-01-09  8:48       ` Dan Nicolaescu
@ 2012-01-09 13:59         ` Stefan Monnier
  0 siblings, 0 replies; 8+ messages in thread
From: Stefan Monnier @ 2012-01-09 13:59 UTC (permalink / raw)
  To: Dan Nicolaescu; +Cc: T.V. Raman, emacs-devel

>>> Culprit in facemenu.el: (define-key global-map "\M-o" 'facemenu-keymap)
>> Oh, right.  So the real problem is the use of ESC O D escape sequences.
>> AFAIK these sequences aren't used any more in current
>> terminal emulators.
> Please try in an xterm:
> emacs -nw
> C-q <left>

Duh... yes, I see I'm really dense these days.  Indeed, once
input-decode-map is setup properly, there's no conflict since facemenu
uses the "ESC o" prefix whereas the cursor movement uses "ESC O".
But in the absence of the input-decode-map, "ESC O" ends up unbound, so
Emacs tries to downcase the key to find a binding (which it does find).


        Stefan



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

end of thread, other threads:[~2012-01-09 13:59 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-07 19:10 Ubuntu 10.0: TERM=Linux: facemenu steals arrow keys T. V. Raman
2012-01-08  5:50 ` Dan Nicolaescu
     [not found]   ` <CADkJX2jtwKuvhS_Es7ELafq+bVsVb79q2Vi4EV+PYh-9LBDxjA@mail.gmail.com>
     [not found]     ` <yxqr4z9u5k1.fsf@fencepost.gnu.org>
     [not found]       ` <CADkJX2jqDEhzU46GTR8H6ti8U8oWjGA=JFL3k_wK-2DBQOW+Sw@mail.gmail.com>
     [not found]         ` <yxqty45fwn3.fsf@fencepost.gnu.org>
     [not found]           ` <20234.20416.484712.470008@gargle.gargle.HOWL>
2012-01-09  3:30             ` Dan Nicolaescu
2012-01-08 14:09 ` Stefan Monnier
2012-01-08 19:57   ` T.V. Raman
2012-01-09  1:01     ` Stefan Monnier
2012-01-09  8:48       ` Dan Nicolaescu
2012-01-09 13:59         ` Stefan Monnier

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