From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matt Price Subject: two questions about speedbar Date: Fri, 7 Dec 2012 21:47:07 -0500 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Return-path: Received: from eggs.gnu.org ([208.118.235.92]:35129) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ThARZ-0005Tf-Nu for emacs-orgmode@gnu.org; Fri, 07 Dec 2012 21:47:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ThARY-0003wN-Kf for emacs-orgmode@gnu.org; Fri, 07 Dec 2012 21:47:09 -0500 Received: from mail-qa0-f48.google.com ([209.85.216.48]:50906) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ThARY-0003wJ-GL for emacs-orgmode@gnu.org; Fri, 07 Dec 2012 21:47:08 -0500 Received: by mail-qa0-f48.google.com with SMTP id l8so94109qaq.0 for ; Fri, 07 Dec 2012 18:47:07 -0800 (PST) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Org Mode Hi, I am trying to modify the way speedbar interacts with org files (for the purpose of the 'writers room' project I've discussed in other threads). I wonder if anyone can help me with these two issues: - when I browse an org file in speedbar (and, interestingly, some org files don't seem to work with speedbar, though most do) I can't navigate directly to a headline by clicking on in if it has subheadings. Is that everyone else's experience? Anyone know if it's possible to change this behaviour? - instead of navigating to the location of headline in an org buffer (when I click on a headline in speedbar), I would like to call org-tree-to-indirect-buffer on that headline. I'm not sure, but I think the behaviour of speedbar clicks for org-mode is set in org.el: (eval-after-load "speedbar" '(progn (speedbar-add-supported-extension ".org") (define-key speedbar-file-key-map "<" 'org-speedbar-set-agenda-restriction) (define-key speedbar-file-key-map "\C-c\C-x<" 'org-speedbar-set-agenda-restriction) (define-key speedbar-file-key-map ">" 'org-agenda-remove-restriction-lock) (define-key speedbar-file-key-map "\C-c\C-x>" 'org-agenda-remove-restriction-lock) (add-hook 'speedbar-visiting-tag-hook (lambda () (and (derived-mode-p 'org-mode) (org-show-context 'org-goto)))))) I'm not entirely sure what that last add-hook statement does, but can I maybe replace org-goto with org-tree-to-indirect-buffer (or better, my own custom function)? In fact I just tried that but it doesn't seem to have worked, so maybe I have the wrong function. Any suggestions? (and a bonus: if anyone happens to know how I can limit the view in speedbar to the headlines in a single file, I'd loveto hear about that too!)