From: Matt Price <moptop99@gmail.com>
To: Org Mode <emacs-orgmode@gnu.org>
Subject: two questions about speedbar
Date: Fri, 7 Dec 2012 21:47:07 -0500 [thread overview]
Message-ID: <CAN_Dec8OJSijDYNnOzf3UrNB2Qw3AH9UBhwzh-LU049Y4TOj-w@mail.gmail.com> (raw)
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!)
reply other threads:[~2012-12-08 2:47 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAN_Dec8OJSijDYNnOzf3UrNB2Qw3AH9UBhwzh-LU049Y4TOj-w@mail.gmail.com \
--to=moptop99@gmail.com \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.