[Top][All Lists]

[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: Tue, 06 Jan 2015 18:21:46 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)

Olaf Rogalsky <> writes:

>> Cool! I would think most mouse users use the GUI
>> Emacs in X. But as is evident, not all, so good
>> work!
> I never use the gui emacs. I am switching back and
> forth between several instances of emacs and the
> shell with the job control commands from the bash. I
> could do it the other way round with shell-mode, but
> I like it as it is.

OK, but why do you use several instances of Emacs? If
you only use one, you don't need X's clipboard at all
but can stick to the much more powerful Emacs kill

>> That it doesn't use an external program is not an
>> advantage, exactly. It depends.
> Xclip (or xsel, or any of the other variants) is not
> installed everywhere.

No, they aren't.

> But I agree, its mostly a matter of taste. I just
> dislike having a seperate program for such a
> fundamental thing like access to the clipboard.

I don't see the "inter-program" clipboard as
fundamental anymore as I moved browsing and
Usenet/mails (and IRC, tho I don't use that a lot), I
moved all of that to Emacs. Of course, the kill ring
is fundamental to Emacs, and its importance increases
the more stuff you bring from the rest of the system
into Emacs. Not only the things I mentioned but
documentation (the man pages, info, possibly more),
and the file system (dired)... (The only thing I'll
never bring to Emacs is the shell itself - I use zsh -
because I have hundreds of shell functions by now, and
I have a very fast transition between the zsh/tmux
panes, and Emacs, so it would be unproportionally an
effort for a small gain.)

If, however, there *is* need for an inter-program
clipboard I would actually like that to be an external
program, because then different programs could hook
into that (like indeed xclip/xsel), so there wasn't a
need to set this up for every program: X's clipboard,
Emacs' kill ring, readline(3) of the shell, and
whatever else does this.

>> And the DISPLAY variable is only needed for the
>> "real" ttys? So does that apply to xterm?
> The DISPLAY variable is needed to make a connection
> to the X-server. For example, xsel uses DISPLAY to
> find out, to which X-server it shall connect to
> (there may be several X-servers running, the
> X-server may be on a remote computer). There is no
> X-server in a "real" tty, but if you set DISPLAY to
> a running X-server (start X11 on vt7, switch back to
> vt1, enter "export DISPLAY=:0" on the shell prompt),
> then xsel running on the tty can access the
> X-servers clipboard (which of cause isn't very
> usefull).

Yes, what I mean is, in X, where you use xterm, you
don't need that for normal usage. Try, for example:

    echo "Didn't mention DISPLAY" | xsel -i -b; xsel -o -b

In the ttys (that aren't occupied by X), you *do* need
it, but there you don't use xterm anyway.

> On the other hand, if I ssh to a remote host from a
> xterm without X11 forwarding (no DISPLAY), then
> xterm-clip still can access the clipboard via
> xterm's control sequences.

Yes, for complicated situations like that, and/or with
several X servers, I can't tell you how my stuff would
work because I never did it.

underground experts united

reply via email to

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