emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Orgmode] Org-mode usage and concept mapping.


From: Carsten Dominik
Subject: Re: [Orgmode] Org-mode usage and concept mapping.
Date: Tue, 12 Sep 2006 11:35:28 +0200


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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]