From: David Kastrup <dak@gnu.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
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@lola.goethe.zz> (raw)
In-Reply-To: <jwvmyy1qskp.fsf-monnier+gnu.emacs.help@gnu.org> (Stefan Monnier's message of "Thu\, 12 Jul 2007 16\:31\:26 -0400")
The following message is a courtesy copy of an article
that has been posted to gnu.emacs.help as well.
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: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <5fmk5pF3bo3fbU1@mid.individual.net>
[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
2007-07-12 20:45 ` David Kastrup [this message]
2007-07-13 18:38 ` Richard Stallman
2007-07-13 19:11 ` Saving the selection before killing Stefan Monnier
2007-07-14 18:00 ` Richard Stallman
2007-07-15 22:54 ` Juri Linkov
2007-07-17 3:34 ` Richard Stallman
2007-07-17 8:21 ` David Kastrup
2007-07-18 4:41 ` Richard Stallman
2007-07-18 5:44 ` David Kastrup
2007-07-18 9:28 ` Jan Djärv
2007-07-18 20:53 ` Richard Stallman
2007-07-18 21:05 ` David Kastrup
2007-07-18 9:24 ` Jan Djärv
2007-07-18 9:21 ` Jan Djärv
2007-07-18 18:34 ` Stefan Monnier
2007-07-19 7:35 ` Jan Djärv
2007-07-19 17:15 ` Stefan Monnier
2007-07-20 6:27 ` Jan Djärv
2007-07-20 15:59 ` Stefan Monnier
2007-07-20 16:50 ` Jan Djärv
2007-07-21 16:54 ` Richard Stallman
2007-07-21 16:54 ` Richard Stallman
2007-07-21 4:51 ` Richard Stallman
2007-07-21 9:22 ` Jan Djärv
2007-07-19 4:25 ` Richard Stallman
2007-07-19 7:44 ` Jan Djärv
2007-07-19 21:21 ` Richard Stallman
2007-07-20 6:33 ` Jan Djärv
2007-07-21 4:51 ` Richard Stallman
2007-07-21 9:28 ` Jan Djärv
2007-07-22 1:49 ` Richard Stallman
2007-07-22 7:55 ` Jan Djärv
2007-07-22 18:37 ` Richard Stallman
2007-07-22 20:32 ` Jan Djärv
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@lola.goethe.zz \
--to=dak@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
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).