On Sep 10, 2006, at 14:57, David O'Toole wrote:
I also use Carsten's outline-magic.el (which feels like org-mode with
its visibility cycling) to organize and get overviews of source code
in my emacs lisp projects.
Side question: Carsten, did you get a chance to integrate my bugfix
into the version of outline-magic available on your site? I still use
a locally fixed version, but i think others might like to have their
source code cycle like orgmode buffers do.
I have not yet updated outline-magic, not found the time yet.
However, if you are just interested in using visibility cycling for
outline-mode and outline-minor mode, you can bind the corresponding
org-mode functions also in these modes. For outline-minor-mode, here
is what I have in .emacs to do this:
(add-hook 'outline-minor-mode-hook
(lambda ()
(define-key outline-minor-mode-map [(control tab)] 'org-cycle)
(define-key outline-minor-mode-map [(shift tab)]
'org-global-cycle)))
(add-hook 'emacs-lisp-mode-hook 'outline-minor-mode)
The problem is that in most major modes, TAB is used for indentation,
so we cannot use it for cycling. The implementation above makes S-TAB
do global cycling just line in Org-mode, but the local cycling is done
with C-TAB.
To get cycling in outline-mode itself, we can in fact use TAB, so for
outline-mode I use
(add-hook 'outline-mode-hook
(lambda ()
(define-key outline-mode-map [(tab)] 'org-cycle)
(define-key outline-mode-map [(shift tab)] 'org-global-cycle)))
- Carsten
--
Carsten Dominik
Sterrenkundig Instituut "Anton Pannekoek"
Universiteit van Amsterdam
Kruislaan 403
NL-1098SJ Amsterdam
phone: +31 20 525 7477
_______________________________________________
Emacs-orgmode mailing list
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode