[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: yank-match.el -- yank matches for a regexp from kill-ring
From: |
Juri Linkov |
Subject: |
Re: yank-match.el -- yank matches for a regexp from kill-ring |
Date: |
Sun, 02 Mar 2008 19:59:05 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (x86_64-unknown-linux-gnu) |
> Rather than stuffing it into simple.el, I guess I'd create a new file
> yank-match.el (suggestions for other destinations welcome).
May I make some remarks? Usually a good function is harder to find
in a separate small file. Also it is more difficult to incorporate a
separate file into the core functionality. But this would be useful:
when I tried using your `yank-match' at the first try it yanked the
first match but I needed one of the next matches. Then I typed M-y
to cycle next matches, but this method failed. I think just like a
sequence of `C-y M-y M-y M-y' cycles the kill-ring it would be good to
do the same for `yank-match' as `M-x yank-match RET regexp RET M-y M-y'
to cycle matches from the kill-ring.
BTW, I have a command for similar purposes:
(defun insert-yank-from-kill-ring (string)
"Insert the selected item from the kill-ring in the minibuffer history.
Use minibuffer navigation and search commands to browse the kill-ring
in the minibuffer history."
(interactive (list (read-string "Yank from kill-ring: " nil 'kill-ring)))
(insert-for-yank string))
Comparing to your approach, it has one drawback: multi-line elements
in the kill-ring will resize the minibuffer, but in other respects
those are complementing approaches.
--
Juri Linkov
http://www.jurta.org/emacs/