From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Markus Grunwald Newsgroups: gmane.emacs.help Subject: Re: speedbar: how can I open a file with the keyboard ? Date: 19 Dec 2007 10:13:10 GMT Organization: Arcor Message-ID: <4768eeb6$0$13113$9b4e6d93@newsspool2.arcor-online.net> References: <4767e0a5$0$13119$9b4e6d93@newsspool2.arcor-online.net> <4768d9c5$0$13113$9b4e6d93@newsspool2.arcor-online.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1198060921 3609 80.91.229.12 (19 Dec 2007 10:42:01 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 19 Dec 2007 10:42:01 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Dec 19 11:42:13 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1J4wNL-0008M1-0j for geh-help-gnu-emacs@m.gmane.org; Wed, 19 Dec 2007 11:42:07 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1J4wN1-0001WW-8n for geh-help-gnu-emacs@m.gmane.org; Wed, 19 Dec 2007 05:41:47 -0500 Original-Path: shelby.stanford.edu!headwall.stanford.edu!newshub.sdsu.edu!newsfeed.freenet.de!newsfeed01.chello.at!newsfeed.arcor.de!newsspool2.arcor-online.net!news.arcor.de.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: pan 0.119 (Karma Hunters) Original-Lines: 54 Original-NNTP-Posting-Date: 19 Dec 2007 11:13:10 CET Original-NNTP-Posting-Host: 3386f837.newsspool2.arcor-online.net Original-X-Trace: DXC=E1=>WGP0mS[=>bdbdS?M0YA9EHlD; 3YcR4Fo<]lROoRQ4nDHegD_]RU_IOHMcReZg_71; S_5>aFmZLU[Nfgf@ List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:50213 Archived-At: On Wed, 19 Dec 2007 08:43:50 +0000, Markus Grunwald wrote: > After I read your message I tried to correct some keybindings in the > speedbar-mode-hook, but it seems it is not called: It seems I did something wrong: the hooks are called now, but the keymap stays the same :( This is what I do: ;;{{{ Speedbar ;;------------ (defun ska-speedbar-keys ( map ) "Set keybindings in major navigation tool Speedbar." (define-key map '[(g)] 'speedbar-update-contents) (define-key map '[(kbd "SPC")] 'ska-speedbar-toggle-expand) ) ;;}}} (add-hook 'speedbar-mode-hook '(lambda() (message "==================== speedbar-mode-hook start ====================") ( ska-speedbar-keys speedbar-key-map ) (message "==================== speedbar-mode-hook end ====================") )) ;; Maybe the wrong hook ??? (add-hook 'speedbar-reconfigure-keymaps-hook '(lambda() (message "==================== speedbar-reconfigure-keymaps-hook start ====================") ( ska-speedbar-keys speedbar-key-map ) (message "==================== speedbar-reconfigure-keymaps-hook end ====================") )) When I start speedbar, this is what I get in the *messages*: Loading speedbar...done Loading view...done Type C-h for help, h for commands, q to quit. ==================== speedbar-mode-hook start ==================== ==================== speedbar-mode-hook end ==================== ==================== speedbar-reconfigure-keymaps-hook start ==================== ==================== speedbar-reconfigure-keymaps-hook end ==================== ==================== speedbar-reconfigure-keymaps-hook start ==================== ==================== speedbar-reconfigure-keymaps-hook end ==================== So the hooks are called. What's with my keys ? I call C-h c g and C-h c space from the speedbar buffer: g runs the command View-goto-line SPC runs the command View-scroll-page-forward ARGH. I have no Idea, why speedbar behaves so differently compared to all the other modes I have customized...