From: Thierry Volpiatto <thierry.volpiatto@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: Simple copy & paste problem
Date: Wed, 11 Aug 2010 22:06:43 +0200 [thread overview]
Message-ID: <87vd7g9ang.fsf@tux.homenetwork> (raw)
In-Reply-To: m3iq3hneoi.fsf@chondestes.bio.unc.edu
Joel James Adamson <adamsonj@email.unc.edu> writes:
> Andrea Crotti <andrea.crotti.0@gmail.com> writes:
>
>> This is probably very stupid but every time I step into it and it's very
>> annoying.
>>
>> Supposing I want to copy something from Safari to emacs.
>> So I
>> - select and copy
>> - select and kill the text I want to substitute
>> - try to paste
>>
>> ARGH! Now the text I copied from safari is disappeared...
>>
>> A workardound is to delete first and then copy-paste.
>> But is there a smarter way to solve this?
>> Something like
>> "if I copied something from the os keep it as first in the kill ring"?
>
> How about drag and drop? Does that work on OS X? Select the text, then
> drag it to Emacs. That's usually what I do when I want to go from
> Firefox to Emacs.
You can't do that if emacs and firefox are on differents desktops.
But you can use mouse2 (don't know for OSX).
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)
`----
--
Thierry Volpiatto
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997
next prev parent reply other threads:[~2010-08-11 20:06 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-11 16:51 Simple copy & paste problem Andrea Crotti
2010-08-11 17:51 ` Drew Adams
2010-08-11 18:10 ` Andrea Crotti
2010-08-11 19:05 ` Glauber Alex Dias Prado
2010-08-11 19:15 ` Joel James Adamson
2010-08-11 20:06 ` Thierry Volpiatto [this message]
2010-08-11 22:44 ` Andrea Crotti
2010-08-12 17:25 ` Joel James Adamson
2010-08-12 18:14 ` Thierry Volpiatto
[not found] ` <mailman.4.1281557372.27891.help-gnu-emacs@gnu.org>
2010-09-05 1:59 ` David Combs
2010-08-12 5:42 ` Jonathan Groll
2010-08-13 2:35 ` Kevin Rodgers
2010-08-25 13:47 ` Leo
[not found] ` <mailman.0.1281553020.25709.help-gnu-emacs@gnu.org>
2010-09-05 1:48 ` David Combs
2010-09-29 21:20 ` David Combs
[not found] ` <mailman.4.1282744218.27059.help-gnu-emacs@gnu.org>
2010-09-05 2:02 ` David Combs
[not found] <mailman.4.1281546350.9082.help-gnu-emacs@gnu.org>
2010-08-11 17:43 ` Pascal J. Bourguignon
2010-09-05 1:44 ` David Combs
2010-09-05 1:55 ` Pascal J. Bourguignon
2010-08-11 18:11 ` notbob
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87vd7g9ang.fsf@tux.homenetwork \
--to=thierry.volpiatto@gmail.com \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.