From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#6774: Cut and paste with C-w/mouse-2 not working? Date: Fri, 13 Aug 2010 12:38:06 +0200 Message-ID: References: <4C55EF50.3080100@alice.it> <4C573A2A.3030007@harpegolden.net> <8762zphkaw.fsf@stupidchicken.com> <4C5B4E28.4090808@harpegolden.net> <87fwyr3glm.fsf@stupidchicken.com> <4C5C7915.7080407@harpegolden.net> <87hbj6jj7o.fsf@stupidchicken.com> <4C5DE6C7.5080706@harpegolden.net> <87vd7kcx52.fsf@stupidchicken.com> <4C6038B9.1090508@swipnet.se> <4C615BB9.8030905@swipnet.se> <4C61938B.5080302@swipnet.se> <4C642B3C.9000800@swipnet.se> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1281697732 26082 80.91.229.12 (13 Aug 2010 11:08:52 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 13 Aug 2010 11:08:52 +0000 (UTC) Cc: cyd@stupidchicken.com, 6774@debbugs.gnu.org, angelo.graziosi@alice.it To: Jan =?UTF-8?Q?Dj=C3=A4rv?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Aug 13 13:08:50 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Ojs7z-0003Dh-Km for geb-bug-gnu-emacs@m.gmane.org; Fri, 13 Aug 2010 13:08:49 +0200 Original-Received: from localhost ([127.0.0.1]:43339 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ojs7x-0008CW-QA for geb-bug-gnu-emacs@m.gmane.org; Fri, 13 Aug 2010 07:08:45 -0400 Original-Received: from [140.186.70.92] (port=40640 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ojs7r-0008BT-KB for bug-gnu-emacs@gnu.org; Fri, 13 Aug 2010 07:08:40 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Ojs7q-0004FP-8C for bug-gnu-emacs@gnu.org; Fri, 13 Aug 2010 07:08:39 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:44062) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Ojs7q-0004FK-6p for bug-gnu-emacs@gnu.org; Fri, 13 Aug 2010 07:08:38 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1OjreE-0007cu-K6; Fri, 13 Aug 2010 06:38:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 13 Aug 2010 10:38:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6774 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 6774-submit@debbugs.gnu.org id=B6774.128169584129301 (code B ref 6774); Fri, 13 Aug 2010 10:38:02 +0000 Original-Received: (at 6774) by debbugs.gnu.org; 13 Aug 2010 10:37:21 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OjrdY-0007cY-O1 for submit@debbugs.gnu.org; Fri, 13 Aug 2010 06:37:21 -0400 Original-Received: from impaqm5.telefonica.net ([213.4.138.5]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OjrdW-0007cA-2a for 6774@debbugs.gnu.org; Fri, 13 Aug 2010 06:37:18 -0400 Original-Received: from IMPmailhost2.adm.correo ([10.20.102.39]) by IMPaqm5.telefonica.net with bizsmtp id tlCB1e00J0r0BT63Rme8ZN; Fri, 13 Aug 2010 12:38:08 +0200 Original-Received: from ceviche.home ([88.7.8.175]) by IMPmailhost2.adm.correo with BIZ IMP id tme61e00U3mb5G81ime7eZ; Fri, 13 Aug 2010 12:38:08 +0200 X-Brightmail-Tracker: AAAAAA== X-TE-authinfo: authemail="monnier$movistar.es" |auth_email="monnier@movistar.es" X-TE-AcuTerraCos: auth_cuTerraCos="cosuitnetc01" Original-Received: by ceviche.home (Postfix, from userid 20848) id A0DF6660F0; Fri, 13 Aug 2010 12:38:06 +0200 (CEST) In-Reply-To: <4C642B3C.9000800@swipnet.se> ("Jan =?UTF-8?Q?Dj=C3=A4rv"'s?= message of "Thu, 12 Aug 2010 19:11:24 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Fri, 13 Aug 2010 06:38:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:39458 Archived-At: >> 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