[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Simple copy & paste problem
From: |
David Combs |
Subject: |
Re: Simple copy & paste problem |
Date: |
Wed, 08 Dec 2010 15:27:34 -0000 |
In article <mailman.4.1281557372.27891.help-gnu-emacs@gnu.org>,
Thierry Volpiatto <thierry.volpiatto@gmail.com> wrote:
>Joel James Adamson <adamsonj@email.unc.edu> writes:
...
...
>
>You can't do that if emacs and firefox are on differents desktops.
>But you can use mouse2 (don't know for OSX).
mouse2 -- what does that do?
>You can use that also:
>
>,----
>| (defun yank-from-clipboard ()
>| (interactive)
>| (let ((primary (x-selection 'PRIMARY)))
>| (when primary (insert primary))))
>| (global-set-key (kbd "C-c v") 'yank-from-clipboard)
>`----
>
>Like that nothing is added to emacs kill-ring.
>
>If you don't mind adding to emacs kill-ring:
>
>,----
>| ;; (setq interprogram-paste-function 'x-cut-buffer-or-selection-value)
>| ;; (setq x-select-enable-primary t)
>`----
x-cut-buffer-or-selection-value is an alias for `x-get-selection-value' in
`w32-fns.el'.
(x-cut-buffer-or-selection-value)
Return the value of the current selection.
Consult the selection, then the cut buffer. Treat empty strings as if
they were unset.
What does that mean? If there's a selection, use it,
else what's in the cut-buffer? (cut-buffer -- what's that?)>
And that x-cut-buffer-or-selection-value -- not in 23.0.0.1. ???
>--
>Thierry Volpiatto
>Get my Gnupg key:
>gpg --keyserver pgp.mit.edu --recv-keys 59F29997
>
>
Thanks!
David