emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bash style reverse-i-search for Emacs using command history.


From: Ehud Karni
Subject: Re: bash style reverse-i-search for Emacs using command history.
Date: Sat, 19 Jan 2002 23:44:40 +0200

> 
> M-p in the minibuffer does something like this.
> It is not an incremental search, but it does the same job.

While we are on minibuffer history subject. I suggest to add the
ability of selecting completion from it by using M-h:

(defun complete-from-minibuffer-history ()
  "Take the history list and make it available as a `completions' buffer"
  (interactive)
       (with-output-to-temp-buffer "*Completions*"
           (display-completion-list (symbol-value minibuffer-history-variable))
           (save-excursion
               (set-buffer standard-output)
               (setq completion-base-size 0))))

(defun keymap-test (var)           ; internal function for keymap checking
       (and (boundp var)
            (keymapp (symbol-value var))))

(let ((minimaps (apropos-internal "mini" 'keymap-test))
      map op)
       (while minimaps
           (setq map (symbol-value (car minimaps)))
           (setq minimaps (cdr minimaps))
           (define-key map "\eh"  'complete-from-minibuffer-history)))

Ehud.


-- 
 Ehud Karni           Tel: +972-3-7966-561  /"\
 Mivtach - Simon      Fax: +972-3-7966-667  \ /  ASCII Ribbon Campaign
 Insurance agencies   (USA) voice mail and   X   Against   HTML   Mail
 http://www.mvs.co.il  FAX:  1-815-5509341  / \
 mailto:address@hidden          Better  Safe  Than  Sorry



reply via email to

[Prev in Thread] Current Thread [Next in Thread]