Re: [dev] Shift-Selection in Emacs with st

2011-04-14 Thread Aurélien Aptel
shift+right/left is defined with the kRIT/kLFT capability. I'm still
looking for up/down.



Re: [dev] Shift-Selection in Emacs with st

2011-04-13 Thread Aurélien Aptel
hey,

On Sat, Apr 9, 2011 at 8:05 AM, Sara Fauzia  wrote:
> I am unable to do shift selection in st (the suckless tool), with Emacs
> (http://www.gnu.org/software/emacs/manual/html_node/emacs/Shift-Selection.html).
>  The
> arrow keys also did not work in Emacs, so I fixed this by adding the
> following to my config.h:
>
> { XK_Left,      "\033[D"  },
> { XK_Right,     "\033[C"  },
> { XK_Up,        "\033[A"  },
> { XK_Down,      "\033[B"  },

It's already handled in st.c (in kpress()). It should be working
(without shift) without this. Are you sure you compiled the terminfo
entry?

> Now, when I try to shift-select (with the above fix for the arrow keys),
> just the arrow keys move, as if shift key wasn't being pressed.

Ok, so I've gone through rxvt-unicode/xterm source code (ugh):

rxvt: arrow keys \e[x with x = ABCD
rxvt: shift + arrow keys \e[x with x = abcd
xterm  in emacs: arrows  \eOx with x = ABCD
xterm !in emacs: arrows  \e[x with x = ABCD
xterm in&out emacs: shift + arrow  \e[1;2x with x = ABCD (wtf)

I've made some tests and guess what? None of these work when outputed
by st unless you change TNAME to the corresponding terminal.
This means that the behaviour of emacs is, as usual, determined by the
terminfo entry... and I have no idea where. *sigh*

So if anyone wants to help dump a terminfo entry like this

  $ infocmp 

see terminfo(5) for a description of each capability and try to find
something related to this problem.



[dev] Shift-Selection in Emacs with st

2011-04-08 Thread Sara Fauzia

I am unable to do shift selection in st (the suckless tool), with Emacs
(http://www.gnu.org/software/emacs/manual/html_node/emacs/Shift-Selection.html).
 The
arrow keys also did not work in Emacs, so I fixed this by adding the
following to my config.h:

{ XK_Left,  "\033[D"  }, 
{ XK_Right, "\033[C"  },
{ XK_Up,"\033[A"  },
{ XK_Down,  "\033[B"  },

Now, when I try to shift-select (with the above fix for the arrow keys),
just the arrow keys move, as if shift key wasn't being pressed.

Thanks for making this really cool terminal, by the way (besides this,
st works perfectly in emacs, not conflicting with its keybindings like
urxvt did).

Sara

-- 
"Nothing is too wonderful to be true, if it be consistent with the laws of 
nature." ~Michael Faraday