browse-kill-ring.el --- interactively insert items from kill-ring -*- coding: utf-8 -*-

Copyright (C) 2001, 2002 Colin Walters <walters@verbum.org>

Author: Colin Walters <walters@verbum.org>
Maintainer: Nick Hurley <hurley@cis.ohio-state.edu>
Created: 7 Apr 2001
Version: 1.3 (CVS)
X-RCS: $Id: browse-kill-ring.el,v 1.2 2002/10/29 00:23:00 hurley Exp $
URL: http://freedom.cis.ohio-state.edu/~hurley/
URL-ja: http://www.fan.gr.jp/~ring/doc/browse-kill-ring.html
Keywords: convenience

This file is not currently part of GNU Emacs.

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2, or (at
your option) any later version.

This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program ; see the file COPYING.  If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.

Commentary:

Ever feel that 'C-y M-y M-y M-y ...' is not a great way of trying
to find that piece of text you know you killed a while back?  Then
browse-kill-ring.el is for you.

This package is simple to install; add (require 'browse-kill-ring)
to your ~/.emacs file, after placing this file somewhere in your
`load-path'.  If you want to use 'M-y' to invoke
`browse-kill-ring', also add (browse-kill-ring-default-keybindings)
to your ~/.emacs file.  Alternatively, you can bind it to another
key such as "C-c k", with:
(global-set-key (kbd "C-c k") 'browse-kill-ring)

Note that the command keeps track of the last window displayed to
handle insertion of chosen text; this might have unexpected
consequences if you do 'M-x browse-kill-ring', then switch your
window configuration, and try to use the same *Kill Ring* buffer
again.

Change Log:

Changes from 1.2 to 1.3:

* New maintainer, Nick Hurley <hurley@cis.ohio-state.edu>
* New functions `browse-kill-ring-prepend-insert', and
  `browse-kill-ring-append-insert', bound to 'b' and 'a' by
  default. There are also the unbound functions
  `browse-kill-ring-prepend-insert-and-quit',
  `browse-kill-ring-prepend-insert-and-move',
  `browse-kill-ring-prepend-insert-move-and-quit',
  `browse-kill-ring-append-insert-and-quit',
  `browse-kill-ring-append-insert-and-move',
  `browse-kill-ring-append-insert-move-and-quit'.

Changes from 1.1 to 1.2:

* New variable `browse-kill-ring-resize-window', which controls
  whether or not the browse-kill-ring window will try to resize
  itself to fit the buffer.  Implementation from Juanma Barranquero
  <lektu@terra.es>.
* New variable `browse-kill-ring-highlight-inserted-item'.
  Implementation from Yasutaka SHINDOH <ring-pub@fan.gr.jp>.
* `browse-kill-ring-mouse-insert' (normally bound to mouse-2) now
  calls `browse-kill-ring-quit'.
* Some non-user-visible code cleanup.
* New variable `browse-kill-ring-recenter', implementation from
  René Kyllingstad <kyllingstad@users.sourceforge.net>.
* Patch from Michal Maršuka <mmc@maruska.dyndns.org> which handles
  read-only text better.
* New ability to move unkilled entries back to the beginning of the
  ring; patch from Yasutaka SHINDOH <ring-pub@fan.gr.jp>.
* Do nothing if the user invokes `browse-kill-ring' when we're
  already in a *Kill Ring* buffer (initial patch from Juanma
  Barranquero <lektu@terra.es>).

Changes from 1.0 to 1.1:

* Important keybinding change!  The default bindings of RET and 'i'
  have switched; this means typing RET now by default inserts the
  text and calls `browse-kill-ring-quit'; 'i' just inserts.
* The variable `browse-kill-ring-use-fontification' is gone;
  browse-kill-ring.el has been rewritten to use font-lock.  XEmacs
  users who want fontification will have to do:
  (add-hook 'browse-kill-ring-hook 'font-lock-mode)
* Integrated code from Michael Slass <mikesl@wrq.com> into
  `browse-kill-ring-default-keybindings'.
* New Japanese homepage for browse-kill-ring.el, thanks to
  Yasutaka SHINDOH <ring-pub@fan.gr.jp>.
* Correctly restore window configuration after editing an entry.
* New command `browse-kill-ring-insert-and-delete'.
* Bug reports and patches from Michael Slass <mikesl@wrq.com> and
  Juanma Barranquero <lektu@terra.es>.

Changes from 0.9b to 1.0:

* Add autoload cookie to `browse-kill-ring'; suggestion from
  D. Goel <deego@glue.umd.edu> and Dave Pearson <davep@davep.org>.
* Add keybinding tip from Michael Slass <mikesl@wrq.com>.

Changes from 0.9a to 0.9b:

* Remove extra parenthesis.  Duh.

Changes from 0.9 to 0.9a:

* Fix bug making `browse-kill-ring-quit-action' uncustomizable.
  Patch from Henrik Enberg <henrik@enberg.org>.
* Add `url-link' and `group' attributes to main Customization
  group.

Changes from 0.8 to 0.9:

* Add new function `browse-kill-ring-insert-and-quit', bound to 'i'
  by default (idea from Yasutaka Shindoh).
* Make default `browse-kill-ring-quit-action' be
  `bury-and-delete-window', which handles the case of a single window
  more nicely.
* Note change of home page and author address.

Changes from 0.7 to 0.8:

* Fix silly bug in `browse-kill-ring-edit' which made it impossible
  to edit entries.
* New variable `browse-kill-ring-quit-action'.
* `browse-kill-ring-restore' renamed to `browse-kill-ring-quit'.
* Describe the keymaps in mode documentation.  Patch from
  Marko Slyz <mslyz@eecs.umich.edu>.
* Fix advice documentation for `browse-kill-ring-no-duplicates'.

Changes from 0.6 to 0.7:

* New functions `browse-kill-ring-search-forward' and
  `browse-kill-ring-search-backward', bound to "s" and "r" by
  default, respectively.
* New function `browse-kill-ring-edit' bound to "e" by default, and
  a associated new major mode.
* New function `browse-kill-ring-occur', bound to "l" by default.

Changes from 0.5 to 0.6:

* Fix bug in `browse-kill-ring-forward' which sometimes would cause
  a message "Wrong type argument: overlayp, nil" to appear.
* New function `browse-kill-ring-update'.
* New variable `browse-kill-ring-highlight-current-entry'.
* New variable `browse-kill-ring-display-duplicates'.
* New optional advice `browse-kill-ring-no-kill-new-duplicates',
  and associated variable `browse-kill-ring-no-duplicates'.  Code
  from Klaus Berndl <Klaus.Berndl@sdm.de>.
* Bind "?" to `describe-mode'.  Patch from Dave Pearson
  <dave@davep.org>.
* Fix typo in `browse-kill-ring-display-style' defcustom form.
  Thanks "Kahlil (Kal) HODGSON" <kahlil@discus.anu.edu.au>.

Changes from 0.4 to 0.5:

* New function `browse-kill-ring-delete', bound to "d" by default.
* New function `browse-kill-ring-undo', bound to "U" by default.
* New variable `browse-kill-ring-maximum-display-length'.
* New variable `browse-kill-ring-use-fontification'.
* New variable `browse-kill-ring-hook', called after the
  "*Kill Ring*" buffer is created.

Changes from 0.3 to 0.4:

* New functions `browse-kill-ring-forward' and
  `browse-kill-ring-previous', bound to "n" and "p" by default,
  respectively.
* Change the default `browse-kill-ring-display-style' to
  `separated'.
* Removed `browse-kill-ring-original-window-config'; Now
  `browse-kill-ring-restore' just buries the "*Kill Ring*" buffer
  and deletes its window, which is simpler and more intuitive.
* New variable `browse-kill-ring-separator-face'.

Bugs:

* Sometimes, in Emacs 21, the cursor will jump to the end of an
  entry when moving backwards using `browse-kill-ring-previous'.
  This doesn't seem to occur in Emacs 20 or XEmacs.

