unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Dan Nicolaescu <dann@gnu.org>
To: tv.raman.tv@gmail.com
Cc: emacs-devel@gnu.org
Subject: Re: Ubuntu 10.0: TERM=Linux: facemenu steals arrow keys
Date: Sun, 08 Jan 2012 22:30:32 -0500	[thread overview]
Message-ID: <yxqzkdx5z8n.fsf@fencepost.gnu.org> (raw)
In-Reply-To: <20234.20416.484712.470008@gargle.gargle.HOWL> (T. V. Raman's message of "Sun, 8 Jan 2012 18:24:00 -0800")

"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



  parent reply	other threads:[~2012-01-09  3:30 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=yxqzkdx5z8n.fsf@fencepost.gnu.org \
    --to=dann@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=tv.raman.tv@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).