* Getting the (text) selection from the clipboard
@ 2009-06-17 21:06 Richard Shann
2009-06-17 22:22 ` Neil Jerram
0 siblings, 1 reply; 4+ messages in thread
From: Richard Shann @ 2009-06-17 21:06 UTC (permalink / raw)
To: guile-user
Does anyone know if there is a guile procedure to get the (text)
selection? (That is from doing Copy in another application)
Richard
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Getting the (text) selection from the clipboard
2009-06-17 21:06 Getting the (text) selection from the clipboard Richard Shann
@ 2009-06-17 22:22 ` Neil Jerram
0 siblings, 0 replies; 4+ messages in thread
From: Neil Jerram @ 2009-06-17 22:22 UTC (permalink / raw)
To: richard.shann; +Cc: guile-user
Richard Shann <richard.shann@virgin.net> writes:
> Does anyone know if there is a guile procedure to get the (text)
> selection? (That is from doing Copy in another application)
> Richard
I assume you mean in the X sense.
In core Guile: no. But maybe guile-gtk or guile-gnome might expose an
equivalent Gtk+ API?
(There is also guile-xlib, which might theoretically be a good place
for this; but in practice it doesn't provide any selection APIs.)
Regards,
Neil
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Getting the (text) selection from the clipboard
@ 2009-06-18 18:09 Richard Shann
0 siblings, 0 replies; 4+ messages in thread
From: Richard Shann @ 2009-06-18 18:09 UTC (permalink / raw)
To: guile-user
Thanks for the info: as we have gtk in Denemo I've used that - just
didn't want to be doing something stupid!
Richard
> > Does anyone know if there is a guile procedure to get the (text)
> > selection? (That is from doing Copy in another application)
> > Richard
>
> I assume you mean in the X sense.
>
> In core Guile: no. But maybe guile-gtk or guile-gnome might expose an
> equivalent Gtk+ API?
>
> (There is also guile-xlib, which might theoretically be a good place
> for this; but in practice it doesn't provide any selection APIs.)
>
> Regards,
> Neil
>
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <cmu-lmtpd-9891-1245341379-1@mail-imap1.uio.no>]
* Re: Getting the (text) selection from the clipboard
[not found] <cmu-lmtpd-9891-1245341379-1@mail-imap1.uio.no>
@ 2009-06-20 11:18 ` Kjetil S. Matheussen
0 siblings, 0 replies; 4+ messages in thread
From: Kjetil S. Matheussen @ 2009-06-20 11:18 UTC (permalink / raw)
To: guile-user
Richard Shann:
>
> Does anyone know if there is a guile procedure to get the (text)
> selection? (That is from doing Copy in another application)
> Richard
>
Assuming you mean X selection, I've used the "xsel" program to do this:
(define-macro (include filename)
(define ret "")
(for-each-line-in-file (string-trim-right (eval-parse filename))
(lambda (line)
(set! ret (string-append ret line "\n"))))
ret)
(define-macro (x11-selection)
(define filename (tmpnam))
(if (not (= 0 (system (string-append "xsel >" filename))))
(display "Error. x11-selection requires the \"xsel\" program: http://www.vergenet.net/~conrad/software/xsel/")
`(include ,filename)))
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-06-20 11:18 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-17 21:06 Getting the (text) selection from the clipboard Richard Shann
2009-06-17 22:22 ` Neil Jerram
-- strict thread matches above, loose matches on Subject: below --
2009-06-18 18:09 Richard Shann
[not found] <cmu-lmtpd-9891-1245341379-1@mail-imap1.uio.no>
2009-06-20 11:18 ` Kjetil S. Matheussen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).