From: David Kastrup <dak@gnu.org>
To: help-gnu-emacs@gnu.org
Cc: emacs-devel@gnu.org
Subject: Re: Saving the selection before killing
Date: Thu, 12 Jul 2007 22:45:44 +0200 [thread overview]
Message-ID: <85ejjdl5af.fsf__15756.3321329237$1184276431$gmane$org@lola.goethe.zz> (raw)
In-Reply-To: jwvmyy1qskp.fsf-monnier+gnu.emacs.help@gnu.org
Stefan Monnier <monnier@iro.umontreal.ca> writes:
>>> From: Will <schimpanski@gmx.de>
>>> Newsgroups: gnu.emacs.help
>>> Date: Thu, 12 Jul 2007 14:14:01 +0200
>>>
>>> I'd like to copy text from external applications (e.g. web
>>> browser) to an Emacs buffer. Often before I paste the text into an
>>> Emacs buffer I'd like to delete text in the this buffer _without_
>>> it being copied to the kill-ring, because then the text from the
>>> external application gets lost.
>
> I bump into the OP's problem every once in a while, but I don't like
> delete-selection-mode for some reason, so I use the patch below
> instead. What it does is that when you kill text, before doing the
> kill (which will replace the current X-selection with the killed
> text), we save the current selection on the kill-ring (only if it
> doesn't come from us, of course since otherwise it's already in the
> kill-ring). So I can simply do my kill and then C-y (which
> re-inserts what I just killed) and M-y (which replaces the text with
> the previous X-selection).
>
> This feature is pretty unnoticeable, so I'm tempted to install it
> just like that, but maybe people want yet-another-config-var to
> control it?
The problem I see is that it is pretty unnoticeable iff the size of
the selection is small compared to the network bandwidth. It would be
nicest if Emacs could tell the X server "if someone asks for a
selection, tell me, and then I'll tell you whether I'll hand over a
selection, or whether you can ask the one who has it now for it."
I don't know the X protocols to know whether this is feasible with
regard to the network traffic. It might be infeasible due to
program's expectations about the kill ring, anyway.
--
David Kastrup, Kriemhildstr. 15, 44793 Bochum
next prev parent reply other threads:[~2007-07-12 20:45 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-12 12:14 Selection not to be copied into kill-ring Will
2007-07-12 12:29 ` weber
2007-07-12 12:53 ` Eli Zaretskii
2007-07-12 15:21 ` Peter Dyballa
[not found] ` <mailman.3386.1184244752.32220.help-gnu-emacs@gnu.org>
2007-07-12 20:31 ` Saving the selection before killing (was: Selection not to be copied into kill-ring) Stefan Monnier
[not found] ` <jwvmyy1qskp.fsf-monnier+gnu.emacs.help@gnu.org>
2007-07-12 20:45 ` David Kastrup [this message]
2007-07-13 7:23 ` Saving the selection before killing Will
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='85ejjdl5af.fsf__15756.3321329237$1184276431$gmane$org@lola.goethe.zz' \
--to=dak@gnu.org \
--cc=emacs-devel@gnu.org \
--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.
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).