Lisp HUG Maillist Archive

[Q] Accessing the system clipboard

Hello,

Is there a platform neutral way to get and set the contents of the
system clipboard in LispWorks? If so, what is it? :) and will that
also side-effect the kill-ring of all the open editor panes?

Thanks.

-ram


Re: [Q] Accessing the system clipboard

Unable to parse email body. Email id is 411

Re: [Q] Accessing the system clipboard

Dave,

This was exactly what I was looking for. Thanks.

-ram

davef@xanalys.com writes:

>    Is there a platform neutral way to get and set the contents of the
>    system clipboard in LispWorks? If so, what is it? :) 
>
> (CAPI:CLIPBOARD <pane>)
>
> (CAPI:SET-CLIPBOARD <pane> "the contents of the system clipboard")
>
>
>                                                         and will that
>    also side-effect the kill-ring of all the open editor panes?
>
>
> Yes, since the Editor by default uses the clipboard in its Un-Kill
> command (on Ctrl+Y in Emacs emulation). You can switch this Editor
> behaviour off completely by
>
>  (SETF EDITOR:*INTERPROGRAM-PASTE-FUNCTION* NIL)
>
> or avoid it for a particular use of Un-Kill by using the prefix
> argument: Ctrl+U Ctrl+Y.


Re: [Q] Accessing the system clipboard

davef@xanalys.com writes:

>    Is there a platform neutral way to get and set the contents of the
>    system clipboard in LispWorks? If so, what is it? :) 
> 
> (CAPI:CLIPBOARD <pane>)
> 
> (CAPI:SET-CLIPBOARD <pane> "the contents of the system clipboard")

I was looking through old mail to find a solution to this, but
in 4.2.7 capi:clipboard seems to demand a second parameter...?

-- 
  (espen)


Re: [Q] Accessing the system clipboard

Unable to parse email body. Email id is 695

Re: [Q] Accessing the system clipboard

davef@xanalys.com writes:

> This will get the system clipboard:
> 
> (CAPI:CLIPBOARD <pane> :STRING)
> 
> CAPI:SET-CLIPBOARD is OK as above.

Great! Just one more question: This works great in the Windows version,
but in the linux version, the contents of the clipboard aren't
transferred to the X clipboard (like they are if I e.g. use the Copy
menu item in the editor).

> Perhaps my mistake was due to wishful thinking, 

:-)
-- 
  (espen)


Re: [Q] Accessing the system clipboard

Unable to parse email body. Email id is 697

Re: [Q] Accessing the system clipboard

davef@xanalys.com writes:

> There's also CAPI:SELECTION and CAPI:SET-SELECTION which sets the
> primary selection on X. Does that DTRT for you?

yes! That seems to do the trick.

> We do need to straighten out these APIs. 

yes, please :-)

-- 
  (espen)


Updated at: 2020-12-10 09:02 UTC