Mailing List Archive

Support open source code!


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

Re: Copy & Paste



>>>>> "Josh" == Josh Glover <jmglov@example.com> writes:

    Josh> I know that in an xterm, highlighting some text puts it into
    Josh> X's clipboard,

Arrgh.  Don't get me started.  I'll let the nomenclature errors slide
this time....

In a properly coded X app, the highlighted region will be accessible
through the _primary selection_.  This is easy to set up, although if
the selection needs to be read as something other than ISO 8859-1 text
cooperation is required between the owner of the selection (ie, the
window where the hightlighting is) and the app that queries it.
However, any app can query it, and "query and paste" is usually bound
to the middle button for typical apps.  The selection is the most often
used means of immediate interclient communication.  However, it is
very volatile: the app will relinquish the selection as soon as any
button or keyboard event is received, and there will be no memory of
what it was.

Unfortunately, few apps implement this very well.  Mozilla certainly
did not (at least up to 0.8 Milestone 13 or 14).  That's one of the
things that GNOME and KDE are supposed to get right.  I don't know if
that's true (see below re: pinkies and bondage).

There is a secondary selection, which is intended for highlight
[this], now highlight [that], and click on "that" to replace with
"this".  Few apps implement the secondary selection, and even fewer
implement the "cut buffers."

Finally, Motif, the standard MIT client "xclipboard", and GNU Emacsen,
among others, implement true clipboards, which save the selection in
persistent way.  You can review past selections and choose among them
in inserting or replacing text.  See the relevant man pages.

Don't ask me how well any of this works in practice, my pinkies are
bound to the control keys so I can't reach the mouse.  So I only know
the APIs....


-- 
University of Tsukuba                Tennodai 1-1-1 Tsukuba 305-8573 JAPAN
Institute of Policy and Planning Sciences       Tel/fax: +81 (298) 53-5091
_________________  _________________  _________________  _________________
What are those straight lines for?  "XEmacs rules."


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links