Article View: gnu.epoch.misc
Article #1780Cut 'n Paste and Selection in Epoch
From: Michael A. Petonic
Date: Thu, 29 Aug 1991 09:04
Date: Thu, 29 Aug 1991 09:04
39 lines
2642 bytes
2642 bytes
ebubra@ebu.ericsson.se (Bertil Askelid) writes:
> Cut 'n paste works fine bothways between an Epoch screen and an xterm, but
> not between Epoch and an Open Windows shelltool, mailtool, etc.
>
> Does anyone know how to fix this, i.e. to make Epoch running under Open
> Windows work also with the Open Windows clipboard?
People have suggested using xcutsel to solve this problem. I went in and
hacked epoch to use the standard X11 selection mechanism. "Hacked" is
the correct term, however.
Because the mechanics of the X cut buffer and X selection mechanism differ so
much, the function epoch::get-cut-buffer had to be uglified. Selection is
an event driven mechanism whereas using the X cut buffer, you just shovel
octets in and snarf them out. No events. So now, the epoch::get-cut-buffer
has a little event catching loop. No problem, in practice (although it's
ugly as hell, ideally) since it catches all the other events received
and then requeues them on the X event queue to be processed by the other
(real) event catching loop in Epoch.
I also added a new event handler to Epoch called "selection-clear" which
is generated when the X11 SelectionClear event comes in, indicating that
the window lost ownership of the selection. This allows me to clear the
drag-button when someone else (like xterm or xfontsel or anything else)
takes ownership. Thus, epoch now looks like a real[tm] X11 application.
I'm considering posting the diffs, but I'm afraid I wouldn't know what to
use as the base (ie, what patch level should I diff against) plus I hear
that Emacs 19 is coming out soon...
If there are any suggestions for what I should diff against, please let
me know (also, if there is a demand).
-MikeP
--
Michael A. Petonic petonic@hal.com +1-512-794-2855
HaL Computer Systems - Director of Custodial Services and Entertainment
Austin, Texas
"If you *have* to live in Texas..."
Technical Details
Message-ID:
<PETONIC.91Aug29110428@daisy.hal.com>Path:
arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!decwrl!hal.com!halaus!halaus!petonicReferences:
<1991Aug2.010309.4295@eua.ericsson.se> <etxkrjg.683138209@solsta>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fc7ee,a57a59cc2680aa19 X-Google-Attributes: gidfc7ee,public X-Google-ArrivalTime: 1991-08-29 11:57:15 PST Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!decwrl!hal.com!halaus!halaus!petonic From: petonic@hal.com (Michael A. Petonic) Newsgroups: gnu.epoch.misc Subject: Cut 'n Paste and Selection in Epoch Message-ID: <PETONIC.91Aug29110428@daisy.hal.com> Date: 29 Aug 91 09:04:28 GMT References: <1991Aug2.010309.4295@eua.ericsson.se> <etxkrjg.683138209@solsta> Sender: news@hal.com Organization: Henry's Laughing Gas Co., Inc. Lines: 39 In-Reply-To: etxkrjg@solsta.ericsson.se's message of 25 Aug 91 16:36:49 GMT