From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.devel Subject: FW: yank-secondary Date: Sun, 10 Feb 2008 10:57:30 -0800 Message-ID: <000501c86c16$c987a710$2958908d@us.oracle.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1202669894 27151 80.91.229.12 (10 Feb 2008 18:58:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 10 Feb 2008 18:58:14 +0000 (UTC) To: "Emacs-Devel" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Feb 10 19:58:37 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JOHNp-0005pe-Fw for ged-emacs-devel@m.gmane.org; Sun, 10 Feb 2008 19:58:33 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JOHNM-0008Dm-EB for ged-emacs-devel@m.gmane.org; Sun, 10 Feb 2008 13:58:04 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JOHMb-0007Ma-7X for emacs-devel@gnu.org; Sun, 10 Feb 2008 13:57:17 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JOHMZ-0007Jy-Dz for emacs-devel@gnu.org; Sun, 10 Feb 2008 13:57:16 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JOHMZ-0007Jj-8i for emacs-devel@gnu.org; Sun, 10 Feb 2008 13:57:15 -0500 Original-Received: from rgminet01.oracle.com ([148.87.113.118]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JOHMY-00072T-Tl for emacs-devel@gnu.org; Sun, 10 Feb 2008 13:57:15 -0500 Original-Received: from rgmgw2.us.oracle.com (rgmgw2.us.oracle.com [138.1.186.111]) by rgminet01.oracle.com (Switch-3.2.4/Switch-3.1.6) with ESMTP id m1AIvASJ016351 for ; Sun, 10 Feb 2008 11:57:10 -0700 Original-Received: from acsmt351.oracle.com (acsmt351.oracle.com [141.146.40.151]) by rgmgw2.us.oracle.com (Switch-3.2.4/Switch-3.2.4) with ESMTP id m1AIIkmq022428 for ; Sun, 10 Feb 2008 11:57:09 -0700 Original-Received: from inet-141-146-46-1.oracle.com by acsmt350.oracle.com with ESMTP id 3568610831202669826; Sun, 10 Feb 2008 10:57:06 -0800 Original-Received: from dradamslap1 (/141.144.88.41) by bhmail.oracle.com (Oracle Beehive Gateway v4.0) with ESMTP ; Sun, 10 Feb 2008 10:57:05 -0800 X-Mailer: Microsoft Office Outlook 11 Thread-Index: AchjiN79QbAYQ+j/ROKKRXQlsKbyaAH6E8ug X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198 X-Brightmail-Tracker: AAAAAQAAAAI= X-Brightmail-Tracker: AAAAAQAAAAI= X-Whitelist: TRUE X-Whitelist: TRUE X-detected-kernel: by monty-python.gnu.org: Linux 2.4-2.6 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:88646 Archived-At: Resending. Questions: 1) Any interest? 2) Do you yank the secondary selection (without the mouse)? If so, how? ------------- Sent: Wednesday, January 30, 2008 1:41 PM Any interest in adding something like this? I've used it for years. Hard to believe it isn't already in Emacs (or is it?). (What do those of you who are sans souris use?) (defun yank-secondary () "Insert the secondary selection at point. Moves point to the end of the inserted text. Does not change mark." (interactive) (let ((secondary (x-get-selection 'SECONDARY))) (unless secondary (error "No secondary selection")) (insert secondary))) I bind it to `C-M-y', so I can access two different selections from the keyboard. (FWIW, I also bind the meta mouse stuff to `C-M-', so mouse-yank-secondary and yank-secondary use the same modifiers. I've done that since I had an SGI workstation that wouldn't pass ALT-mouse stuff to Emacs. So, e.g., I have `C-M-y' = yank-secondary, `C-M-mouse2' = mouse-yank-secondary, `C-M-mouse-1' = mouse-start-secondary, `C-M-mouse-3' = mouse-secondary-save-then-kill, `C-M-drag-mouse-1' = mouse-set-secondary, and `C-M-down-mouse-1' = mouse-drag-secondary.)