Subject: Re: bug#6635: mouse-yank-primary/secondary and unicode from other apps.

From: David De La Harpe Golden <[email-masked]>
Date: Sun, 18 Jul 2010 17:39:41 +0100

On 15/07/10 06:29, Kevin Rodgers wrote:

> Can someone explain why the result of x-get-selection/x-selection-value
> is bound to a variable, but instead of referencing the variable in the
> insert function call the expression is evaluated again? I.e. why not
> change it to:
>

I don't know anyway; you're likely quite right - in fact wouldn't there 
be a race the other way? I think the selection could (at least in 
principle) vanish in between the two calls if another app owns it...

> (let ((primary (x-selection-value 'PRIMARY)))
> (if primary
> (insert primary)
> (error "No primary selection"))))
> ...
> (let ((secondary (x-selection-value 'SECONDARY)))
> (if secondary
> (insert secondary)
> (error "No secondary selection"))))
>
> Thanks,
>