help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: extension to mouse capabilities within xterm TTY frame


From: Emanuel Berg
Subject: Re: extension to mouse capabilities within xterm TTY frame
Date: Mon, 05 Jan 2015 23:39:27 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)

Olaf Rogalsky <address@hidden> writes:

> I would like to bring to your attention two
> extensions I wrote, relating the mouse support, when
> used inside a xterm TTY frame.

The "TTY"s are usually meant to be the Linux virtual
terminals (VTs), or ttys, or simply "the console":
those you get with Ctrl-Alt-F1, for example, for
/dev/tty1, from X. (In a tty, you only need, say,
Alt-F2 to go to tty2. Even that is bulky so check out
[1] for how to rebind that.)

Try tty(1) in a VT and it'll tell you /dev/tty3 for
the third one, and so on (and in reverse).

On many systems /dev/tty7 is used for X. If you
disable the login manager (that will automatically
start X) you get /dev/tty1 instead... and you can
start X manually with xinit(1), after login! (Actually
there is autologin - no password - for the ttys as
well, for the bold and the impatient.)

xterm, on the other hand, is... <drumroll> a terminal
emulator for X! To confirm that xterm isn't a "real"
tty, hit tty again (in xterm) and it says, perhaps,
/dev/pts/9.

> 1) a replacement for the official xt-mouse.el:
>
>    https://github.com/olaf-rogalsky/xt-mouse
>
> The official xterm-mouse-mode does not highlight
> the selection during mouse dragging. This version
> creates mouse-movement events while dragging the
> mouse. A direct visual feedback of the selected text
> is given.

Cool! I would think most mouse users use the GUI Emacs
in X. But as is evident, not all, so good work!

> 2) a minor mode, which enables access to the X11
> clipboard/selection from within xterm:
>    
>    https://github.com/olaf-rogalsky/xterm-clip
>    
> This extension is very similar to xclip.el from Leo
> Shidai Liu. But instead of using an external program
> to access the clipboard, this code uses xterm
> control sequences.

...*and* the xsel.el from yours truly! :) Actually, I
used xclip to do that as well at first. It was one of
the very first things I published on this group. But
then I was in several flame wars so I would
disencourage anyone from using Google to verify that
claim... Anyway the reason was that I still used a
browser in X (indeed a long time ago) so I needed the
interface back and fourth, and with xclip it was
possible, and later, with xsel, even better. But soon
I found RMAIL, later Gnus, as well as Emacs w3m, so I
could do without X altogether. Somewhere around I
noticed the xclip package in ELPA, so I put my stuff
into a package as well not to be any worse [2] and
there is even a zsh companion [3]. But there was still
one use case for it, namely to Emacs from the ttys.
Again, soon I put tmux(1) over all ttys except the
Emacs one (naturally in /dev/tty1), and so with tmux I
found an even better way [4].

> Advantages: no external programm needed, no access
> to X11-server via DISPLAY variable is neccessary.

That it doesn't use an external program is not an
advantage, exactly. It depends.

And the DISPLAY variable is only needed for the "real"
ttys? So does that apply to xterm?

Anyway, good work! Keep it up.

[1] http://user.it.uu.se/~embe8573/conf/remap.inc
[2] http://user.it.uu.se/~embe8573/conf/emacs-init/xsel.el
[3] http://user.it.uu.se/~embe8573/scripts/xi
[4] http://user.it.uu.se/~embe8573/conf/.tmux.conf
    http://user.it.uu.se/~embe8573/conf/emacs-init/linux-shell.el

-- 
underground experts united


reply via email to

[Prev in Thread] Current Thread [Next in Thread]