A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://lists.gnu.org/archive/html/emacs-orgmode/2009-07/msg00476.html below:

Re: [Orgmode] org-style folding for a .emacs

[Top][All Lists] [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] 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




RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4