From: "Drew Adams" <drew.adams@oracle.com>
To: <emacs-devel@gnu.org>
Subject: RE: "Snippet" database
Date: Sun, 8 Jan 2012 22:02:06 -0800 [thread overview]
Message-ID: <B489B7B27E714A468BDD3D0FD738E920@us.oracle.com> (raw)
In-Reply-To: <834nw8o8zx.fsf@gnu.org>
> > 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
next prev parent reply other threads:[~2012-01-09 6:02 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-06 18:47 "Snippet" database Lars Magne Ingebrigtsen
2012-01-06 19:08 ` Drew Adams
2012-01-06 19:13 ` Masatake YAMATO
2012-01-06 21:49 ` Masatake YAMATO
2012-01-06 22:04 ` Lars Magne Ingebrigtsen
2012-01-06 22:17 ` Lennart Borgman
2012-01-06 22:33 ` Tassilo Horn
2012-01-06 19:56 ` Richard Riley
2012-01-06 20:16 ` Ted Zlatanov
2012-01-06 20:45 ` Eli Zaretskii
2012-01-06 21:07 ` Ted Zlatanov
2012-01-06 21:10 ` Lars Magne Ingebrigtsen
2012-01-09 6:02 ` Drew Adams [this message]
2012-01-07 3:06 ` John Wiegley
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=B489B7B27E714A468BDD3D0FD738E920@us.oracle.com \
--to=drew.adams@oracle.com \
--cc=emacs-devel@gnu.org \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.