|
| From: | Bastien |
| Subject: | Re: [Orgmode] org-style folding for a .emacs |
| Date: | Thu, 16 Jul 2009 21:50:08 +0200 |
| User-agent: | Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) |
Hi Scot,
Scot Becker <address@hidden> writes:
> Does anyone have a recipe for easy org-style folding of an elisp file?
> I'd like to divide my .emacs into segments to make it easier to
> oversee and navigate.
I use this (original idea from Tassilo IIRC):
--8<---------------cut here---------------start------------->8---
;;; Use orgstruct-mode in emacs-lisp-mode buffers
(add-hook 'emacs-lisp-mode-hook 'orgstruct-mode)
(defun org-cycle-global ()
(interactive)
(org-cycle t))
(defun org-cycle-local ()
(interactive)
(save-excursion
(move-beginning-of-line nil)
(org-cycle)))
(global-set-key (kbd "C-M-]") 'org-cycle-global)
(global-set-key (kbd "M-]") 'org-cycle-local)
--8<---------------cut here---------------end--------------->8---
--
Bastien
| [Prev in Thread] | Current Thread | [Next in Thread] |