🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

6 total messages Started by Bertil Askelid Fri, 02 Aug 1991 01:03
Cut 'n paste between Epoch and Open Windows
#1819
Author: Bertil Askelid
Date: Fri, 02 Aug 1991 01:03
12 lines
1106 bytes
	[sorry for wasted bandwidth if this occurs twice, I have some problems with
	my mailserver]

	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?
-- 
			Bertil Askelid
			ebubra@ebu.ericsson.se
Re: Cut 'n paste between Epoch and Open Windows
#1824
Author: Chris Weikart
Date: Fri, 02 Aug 1991 11:48
58 lines
3076 bytes
In article <1991Aug2.010309.4295@eua.ericsson.se>, ebubra@ebu.ericsson.se (Bertil Askelid) writes:
> 
> 	[sorry for wasted bandwidth if this occurs twice, I have some problems with
> 	my mailserver]
> 
> 	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?
> -- 
> 			Bertil Askelid
> 			ebubra@ebu.ericsson.se

[Here's a message I sent to our lab awhile back which may be useful...]

The problem is that most X apps use the "primary selection", while gnuemacs/
epoch use "cut buffer 0", for copy & paste. There's a very simple clipboard
tool called "xcutsel" that allows interchange between these buffers, thus
enabling all combinations of copy/paste. You click on either of two
push-buttons, "copy PRIMARY to 0" or "copy 0 to PRIMARY".

The following applications use the indicated buffer for both copy and paste:

			CUT BUFFER 0	PRIMARY
			------------	-------
	xrn				x
	dxmail				x
	notes				x
	(etc)				x

	xterm		x (1)		x (1)

	gnuemacs	x
	epoch		x (2)

(1) Xterm is friendly. Selecting within xterm copies into both buffers,
    and one can paste into xterm from either buffer. By default, PRIMARY
    has priority in case both are non-empty, but priority can be given to
    CUT BUFFER 0 with the following resource:

	XTerm*VT100.translations:#override \n\
		<Btn2Up>: insert-selection(CUT_BUFFER0, PRIMARY)

(2) After selection into CUT BUFFER 0, epoch as currently patched [locally?]
    deletes the contents of PRIMARY; this is intended to facilitate
    interchange with xterm (without the resource mentioned above).

Therefore, for instance, you can select text in xrn, click on "copy PRIMARY to
0" in xcutsel, and middle-button-click in gnuemacs to paste. Or you can select
text in epoch, click on "copy 0 to PRIMARY" in xcutsel, and right-button-click
in the dxmail "create" window to paste.

I know, what a drag to have to think about this, but it's better than nothing.
The next release of epoch is supposed to use PRIMARY instead of CUT BUFFER 0.

-------------------------------------------------------------------------------
Chris Weikart <weikart@prl.dec.com> .............. DEC Paris Research Lab (PRL)
Re: Cut 'n paste between Epoch and Open Windows
#1771
Author: Kristian Jorg TX/DKL
Date: Sun, 25 Aug 1991 16:36
21 lines
1380 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?

I have been digging into the code a little, and the only way to solve it is to
make epoch use the selection_service instead of the ususal X clipboard.

It is not easy to do however.

The *best* solution is of course to let SUN fix the selection_service to use
X clipboards for text. :-)

--
-----------------------------------+  
Kristian Jorg                      !  
e-mail: etxkrjg@solsta.ericsson.se ! 
-----------------------------------+
Re: Cut 'n paste between Epoch and Open Windows
#1774
Author: Brian D. Johnston
Date: Mon, 26 Aug 1991 16:22
9 lines
1136 bytes
I can paste from an xterm into epoch using the standard mouse keys,
but I have not been able to paste into an xterm from Epoch.  What kind
of settings do I need to change. I am of course running Open Windows
on a Sparc 2 (Sun OS 4.1.1) Thanks.  
--
	           Brian D. Johnston, PET Engineering
   GE Medical Systems, W641, 3000 N. Grandview Blvd., Waukesha, WI 53188
	     (414) 548-5189 : EMAIL -  johnstonb@med.ge.com
Re: Cut 'n paste between Epoch and Open Windows
#1775
Author: Barry L. Kaplan
Date: Tue, 27 Aug 1991 16:40
16 lines
1391 bytes
In article <BDJ.91Aug26112203@muon.med.ge.com>, bdj@muon.med.ge.com (Brian D. Johnston) writes:
> 
> I can paste from an xterm into epoch using the standard mouse keys,
> but I have not been able to paste into an xterm from Epoch.  What kind
> of settings do I need to change. I am of course running Open Windows
> on a Sparc 2 (Sun OS 4.1.1) Thanks.  

I don't know if you can do directly in Epoch, but using 
'xcutsel' you can copy the 0 buffer into primary, which
is what xterm uses.

-- 
Barry Kaplan  
Software Process & Environments
Rockwell International
(kaplanb@ajpo.sei.smu.edu)
Cut 'n Paste and Selection in Epoch
#1780
Author: Michael A. Petonic
Date: Thu, 29 Aug 1991 09:04
39 lines
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..."
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads