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: RE: "Snippet" database Date: Sun, 8 Jan 2012 22:02:06 -0800 Message-ID: References: <87obugwprb.fsf@lifelogs.com> <834nw8o8zx.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1326088952 18586 80.91.229.12 (9 Jan 2012 06:02:32 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 9 Jan 2012 06:02:32 +0000 (UTC) To: Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jan 09 07:02:28 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Rk8JP-0006T1-RX for ged-emacs-devel@m.gmane.org; Mon, 09 Jan 2012 07:02:28 +0100 Original-Received: from localhost ([::1]:54013 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rk8JP-0000a9-8a for ged-emacs-devel@m.gmane.org; Mon, 09 Jan 2012 01:02:27 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:33486) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rk8JL-0000Zs-If for emacs-devel@gnu.org; Mon, 09 Jan 2012 01:02:24 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rk8JK-0001I2-9f for emacs-devel@gnu.org; Mon, 09 Jan 2012 01:02:23 -0500 Original-Received: from acsinet15.oracle.com ([141.146.126.227]:45789) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rk8JK-0001Hw-2D for emacs-devel@gnu.org; Mon, 09 Jan 2012 01:02:22 -0500 Original-Received: from acsinet22.oracle.com (acsinet22.oracle.com [141.146.126.238]) by acsinet15.oracle.com (Switch-3.4.4/Switch-3.4.4) with ESMTP id q0962HlQ032445 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 9 Jan 2012 06:02:17 GMT Original-Received: from acsmt357.oracle.com (acsmt357.oracle.com [141.146.40.157]) by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id q0962GDs013460 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 9 Jan 2012 06:02:16 GMT Original-Received: from abhmt112.oracle.com (abhmt112.oracle.com [141.146.116.64]) by acsmt357.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id q0962FjQ031865 for ; Mon, 9 Jan 2012 00:02:16 -0600 Original-Received: from dradamslap1 (/10.159.37.7) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sun, 08 Jan 2012 22:02:15 -0800 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <834nw8o8zx.fsf@gnu.org> Thread-Index: AczMtIJZt6lbNqdUR7OBRpumvOnRIwB3x/bg X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-Source-IP: acsinet22.oracle.com [141.146.126.238] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090206.4F0A82EB.003E,ss=1,re=0.000,fgs=0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 1) X-Received-From: 141.146.126.227 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:147498 Archived-At: > > So maybe a `yank-select' command to select from the kill ring would > > be useful to you > > Possible today via the menu bar (Edit->Paste from Kill Menu). Using completion against the `kill-ring' is a whole lot handier than picking a kill from a menu. FWIW - For "snippet" stuff it is handy to have a selection ring that is separate from the kill ring. The kill ring is volatile, and many of its entries are typically not something you necessarily want to yank - there can be a lot of noise. A less volatile selection is the secondary selection. Library `second-sel.el' gives you a ring for this, `secondary-selection-ring', which you can use the same way as the `kill-ring'. Its entries can be more appropriate for snippets, since a typical use of killing text does not have snippets in mind. In any case, it's also good to be able to copy or move a selection from one ring to the other - e.g. to save a kill as a snippet. Library `browse-kill-ring+.el' lets you browse either selection ring (kills or secondary selections), yank entries from it, and copy or move selections from one ring to the other. You can create other selection rings to browse, and you can of course persist a ring using savehist or whatever (e.g., a "database of snippets"). With these libraries (by default), if `M-y' follows a yank command, it acts normally. If it follows a yank-secondary command it acts similarly but using the `secondary-selection-ring' instead of the `kill-ring'. Otherwise (`M-y' at top level), it browses the current ring or, if in a buffer browsing a ring, it browses the other ring. In Icicles (by default), `M-y' acts similarly. But instead of browsing selections, a top-level `M-y' yanks a selection using completion, from the `kill-ring' or (with prefix arg) from the `secondary-selection-ring'. During this completion you can hit a key to: * Copy a selection to the other ring * Delete a selection from the current ring * Sort the selections in various ways for easier access (no dups) http://www.emacswiki.org/emacs/SecondarySelection#secondary-sel.el http://www.emacswiki.org/emacs/BrowseKillRing