GNU bug report logs - #6774
Cut and paste with C-w/mouse-2 not working?

Previous Next

Package: emacs;

Reported by: Angelo Graziosi <angelo.graziosi <at> alice.it>

Date: Sun, 1 Aug 2010 22:04:02 UTC

Severity: normal

Done: Chong Yidong <cyd <at> stupidchicken.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Jan Djärv <jan.h.d <at> swipnet.se>
Cc: cyd <at> stupidchicken.com, angelo.graziosi <at> alice.it, 6774 <at> debbugs.gnu.org, Kenichi Handa <handa <at> m17n.org>
Subject: bug#6774: Cut and paste with C-w/mouse-2 not working?
Date: Fri, 13 Aug 2010 12:38:06 +0200
>> I'm more worried about the semantics than about the performance impact.
>> Doing the "set PRIMARY" from C-w and friends is much easier and robust.
> How so?  Just moving the cursor because of a C-f involves a lot more X calls
> that taking ownership of the PRIMARY selection.  I don't understand how
> robustness is affected.

The issue with robustness (when talking about post-command-hook) doesn't
have much to do with heavy X calls (or performance), unless of course
those calls can hang.

The issue of robustness is that post-command-hook is not always run when
you want or need it.  E.g. you may want to run your hook if point is
moved by a process-filter (or you may want to run that hook when the
user is queried via y-or-n-p), but post-command-hook is not involved
there.  And OTOH post-command-hook may very well be run in the middle of
a command (if it reads from the minibuffer, for example).
These corner cases make post-command-hook brittle.

I think that for select-active-region to work the way you seem to want
it to work (i.e. auto-select as soon as the region is active and
non-empty), the "right hook" to use would be something like
a redisplay-hook (i.e. an active region is selected if/when it gets
displayed).  I would welcome such a hook, BTW, especially if it gets run
*before* redisplay.  Could be useful for reveal-mode and maybe also to
move the region-face handling to Elisp.


        Stefan




This bug report was last modified 14 years and 343 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.