From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thierry Volpiatto Newsgroups: gmane.emacs.devel Subject: Re: Introduce eldoc support in minibuffer Date: Sun, 03 Jul 2011 08:03:51 +0200 Message-ID: <87aacv529k.fsf@gmail.com> References: <87wrg2ggdg.fsf@gmail.com> <87hb743quv.fsf@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1309673065 29009 80.91.229.12 (3 Jul 2011 06:04:25 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 3 Jul 2011 06:04:25 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jul 03 08:04:22 2011 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 1QdFn3-0007yR-Sq for ged-emacs-devel@m.gmane.org; Sun, 03 Jul 2011 08:04:22 +0200 Original-Received: from localhost ([::1]:51774 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QdFn2-0007fN-IX for ged-emacs-devel@m.gmane.org; Sun, 03 Jul 2011 02:04:20 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:46071) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QdFmn-0007fI-W2 for emacs-devel@gnu.org; Sun, 03 Jul 2011 02:04:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QdFmm-0002yp-QZ for emacs-devel@gnu.org; Sun, 03 Jul 2011 02:04:05 -0400 Original-Received: from lo.gmane.org ([80.91.229.12]:39870) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QdFmm-0002yk-LS for emacs-devel@gnu.org; Sun, 03 Jul 2011 02:04:04 -0400 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1QdFml-0007ta-4g for emacs-devel@gnu.org; Sun, 03 Jul 2011 08:04:03 +0200 Original-Received: from 43.77.197.77.rev.sfr.net ([77.197.77.43]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 03 Jul 2011 08:04:03 +0200 Original-Received: from thierry.volpiatto by 43.77.197.77.rev.sfr.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 03 Jul 2011 08:04:03 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 49 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 43.77.197.77.rev.sfr.net User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) Cancel-Lock: sha1:I+L/F1mPyteNll7GSS8OfOihh/k= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 80.91.229.12 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:141484 Archived-At: Thierry Volpiatto writes: > It's not hard to do, just create a help function for isearch and bind it > in isearch map. This is the code of anything.el adapted for isearch: #+BEGIN_SRC lisp (defun isearch-help-internal (bufname insert-content-fn) (save-window-excursion (switch-to-buffer (get-buffer-create bufname)) (delete-other-windows) (erase-buffer) (funcall insert-content-fn) (setq mode-line-format "%b (SPC,C-v:NextPage b,M-v:PrevPage other:Exit)") (setq cursor-type nil) (goto-char 1) (isearch-help-event-loop))) (defun isearch-help-event-loop () (ignore-errors (catch 'exit-isearch-help (loop for event = (read-key) do (case event ((?\C-v ? ) (scroll-up)) ((?\M-v ?b) (scroll-down)) (t (throw 'exit-isearch-help (isearch-update)))))))) (defun isearch-help () (interactive) (isearch-help-internal " *Isearch Help*" (lambda () (insert (substitute-command-keys isearch-help-message))))) (defvar isearch-help-message "\\{isearch-mode-map}") (define-key isearch-mode-map (kbd "C-?") 'isearch-help) #+END_SRC Improve isearch-help-message as needed, and provide a minimal help in mode-line: C-?: Help, C-s: Do_this, C-r: Do_that etc... -- A+ Thierry Get my Gnupg key: gpg --keyserver pgp.mit.edu --recv-keys 59F29997