* two questions about speedbar
@ 2012-12-08 2:47 Matt Price
0 siblings, 0 replies; only message in thread
From: Matt Price @ 2012-12-08 2:47 UTC (permalink / raw)
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!)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2012-12-08 2:47 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-08 2:47 two questions about speedbar Matt Price
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.