From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Subject: Re: org-style folding for a .emacs Date: Thu, 16 Jul 2009 21:50:08 +0200 Message-ID: <87bpnk8l1r.fsf@bzg.ath.cx> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MRWyB-00053X-QT for emacs-orgmode@gnu.org; Thu, 16 Jul 2009 15:50:19 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MRWy7-0004xE-Rx for emacs-orgmode@gnu.org; Thu, 16 Jul 2009 15:50:19 -0400 Received: from [199.232.76.173] (port=55759 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MRWy7-0004ws-MZ for emacs-orgmode@gnu.org; Thu, 16 Jul 2009 15:50:15 -0400 Received: from rv-out-0708.google.com ([209.85.198.244]:16219) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MRWy7-0000bw-0V for emacs-orgmode@gnu.org; Thu, 16 Jul 2009 15:50:15 -0400 Received: by rv-out-0708.google.com with SMTP id f25so119647rvb.6 for ; Thu, 16 Jul 2009 12:50:14 -0700 (PDT) In-Reply-To: (Scot Becker's message of "Mon, 13 Jul 2009 22:23:51 +0100") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Scot Becker Cc: Org-mode ml Hi Scot, Scot Becker 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