From: "Jan D." <jan.h.d@swipnet.se>
To: Sam Steingold <sds@gnu.org>
Cc: "emacs-devel@gnu.org" <emacs-devel@gnu.org>
Subject: Re: kill-new discards current X selection
Date: Wed, 26 Aug 2009 20:41:01 +0200 [thread overview]
Message-ID: <0F667BE2-7E6A-4054-8276-DC0A295D9E8C@swipnet.se> (raw)
In-Reply-To: <4A95606A.6050606@gnu.org>
I for one would be very surprised if the X selection popped up in the
kill-ring just because I made a kill in Emacs.
An option to tell Emacs to grab the primary X selection only when
something is selected with the mouse would be nice. Maybe there
already exists one. I assume you mean the primary selection?
Jan D.
26 aug 2009 kl. 18.18 skrev Sam Steingold <sds@gnu.org>:
> When I select a word in an xterm and then kill in emacs, then X
> selection is gone forever, replaced with the emacs kill.
> The appended patch prepends the current X selection to kill-ring
> before replacing the X selection with the current Emacs kill.
> Is it OK to install it unconditionally, or is it better to guard it
> with a user option, e.g., save-interprogram-paste-before-kill?
>
>
> --- simple.el.~1.1005.~ 2009-08-25 16:44:36.000000000 -0400
> +++ simple.el 2009-08-26 12:15:19.000123000 -0400
> @@ -2819,6 +2819,13 @@ argument should still be a \"useful\" st
> (list string "yank-handler specified for empty string"))))
> (if (fboundp 'menu-bar-update-yank-menu)
> (menu-bar-update-yank-menu string (and replace (car kill-
> ring))))
> + (let ((interprogram-paste (and interprogram-paste-function
> + (funcall interprogram-paste-function))))
> + (when interprogram-paste
> + (if (listp interprogram-paste)
> + (dolist (s (nreverse interprogram-paste))
> + (push s kill-ring))
> + (push interprogram-paste kill-ring))))
> (if (and replace kill-ring)
> (setcar kill-ring string)
> (push string kill-ring)
>
>
next prev parent reply other threads:[~2009-08-26 18:41 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-26 16:18 kill-new discards current X selection Sam Steingold
2009-08-26 18:41 ` Jan D. [this message]
2009-08-26 19:28 ` Stefan Monnier
2009-08-26 20:39 ` Sam Steingold
2009-08-27 3:03 ` Stefan Monnier
2009-08-26 19:36 ` David De La Harpe Golden
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=0F667BE2-7E6A-4054-8276-DC0A295D9E8C@swipnet.se \
--to=jan.h.d@swipnet.se \
--cc=emacs-devel@gnu.org \
--cc=sds@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.