Path: utzoo!attcan!uunet!snorkelwacker!apple!sun-barr!newstop!exodus!snowking!tomj From: tomj@snowking.Eng.Sun.COM (Tom Jacobs) Newsgroups: comp.windows.news Subject: Re: Selections in OW 2.0, How to copy from appl. to another ? Message-ID: <1990Sep27.125839@snowking.Eng.Sun.COM> Date: 27 Sep 90 19:58:39 GMT References: Sender: news@exodus.Eng.Sun.COM Reply-To: tomj@snowking.Eng.Sun.COM (Tom Jacobs) Distribution: comp Organization: Sun Microsystems, Inc. Lines: 73 In article , ks@tut.fi (Syst{ Kari) writes: ... ... |> The xview-applications seem to have they very own selection-buffers and |> a special (undocumented?) program 'xv_get_sel' can get the contents of a |> the selected text from a xview-application. Unfortunately if no text |> is selected, I get a error message |> X Error: BadWindow |> Request Major code 2 () |> Request Minor code 1 |> ResourceID 0xb00004 |> Error Serial #148 |> Current Serial #148 |> and if my console happens to be xterm, it dies ! The xv_get_sel command is exactly equivalent to the SunView get_selection command. You've discovered a bug :-) that we'll take a look at. BTW, the man page for xv_get_sel accidently got left out of OWV2, so here it is... --Tom ======================================================================== =========== XV_GET_SEL(1) USER COMMANDS XV_GET_SEL(1) NAME xv_get_sel - copy the contents of a X selection rank to the standard output SYNOPSIS xv_get_sel [ rank ] [ t seconds ] [ D ] AVAILABILITY This command is available with the OpenWindow's software installation. DESCRIPTION xv_get_sel prints the contents of the indicated selection on standard out. A selection is a collection of objects (for instance, characters) picked with the mouse in the OpenWindows X11/NeWS window system. OPTIONS rank Indicate which selection is to be printed: 1: primary; 2: secondary; 3: clipboard. The default is primary. t seconds Indicate how many seconds to wait for the holder of a selection to respond to a request before giving up. The default is 6 seconds. D Debugging. Inquire through a special debug- ging service for the selection, rather than accessing the standard service. Useful only for debugging window applications which are clients of the selection library. EXAMPLE The following line in a OpenWindows Desktop menu file provides a menu command to print the primary selection on the user's default printer: ``Print It'' csh -c xv_get_sel | lpr ===========================================================