From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thorsten Jolitz Newsgroups: gmane.emacs.help Subject: Re: outline for coding Date: Fri, 21 Mar 2014 10:58:32 +0100 Message-ID: <87bnwzkh4n.fsf@gmail.com> References: <87fvmcnjer.fsf@gmx.at> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1395395865 9523 80.91.229.3 (21 Mar 2014 09:57:45 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 21 Mar 2014 09:57:45 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Mar 21 10:57:55 2014 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WQwD5-0007JM-18 for geh-help-gnu-emacs@m.gmane.org; Fri, 21 Mar 2014 10:57:55 +0100 Original-Received: from localhost ([::1]:51590 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WQwD4-0007I4-LR for geh-help-gnu-emacs@m.gmane.org; Fri, 21 Mar 2014 05:57:54 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50697) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WQwCo-0007Hl-Q5 for help-gnu-emacs@gnu.org; Fri, 21 Mar 2014 05:57:44 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WQwCi-00023X-L9 for help-gnu-emacs@gnu.org; Fri, 21 Mar 2014 05:57:38 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:44705) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WQwCi-00023J-Aw for help-gnu-emacs@gnu.org; Fri, 21 Mar 2014 05:57:32 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1WQwCe-0006j2-SN for help-gnu-emacs@gnu.org; Fri, 21 Mar 2014 10:57:28 +0100 Original-Received: from g231110120.adsl.alicedsl.de ([92.231.110.120]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 21 Mar 2014 10:57:28 +0100 Original-Received: from tjolitz by g231110120.adsl.alicedsl.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 21 Mar 2014 10:57:28 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 164 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: g231110120.adsl.alicedsl.de User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:goNpMGhQRkNVzQTl4E5gV+HDbLM= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:96668 Archived-At: Martin writes: > Hi there, > > Is there any outline for elisp, ruby and so on for emacs, where I can > have a small window left to my coding window with the defined functions > and vars? Specially for elisp I would like to have that. you could try outshine.el with navi-mode.el: ,------------------------------------------- | http://www.youtube.com/watch?v=nqE6YxlY0rw `------------------------------------------- ,----------------------------------------------------------- | http://orgmode.org/worg/org-tutorials/org-outside-org.html `----------------------------------------------------------- its major mode agnostic and extensible. Navi-mode already has a quite comprehensive number of keyword searches for Emacs Lisp defined: ,------------------------------------------- | [KEY] : [SEARCH] | ================ | a : ALL | f : FUN | v : VAR | x : OBJ | b : DB | F : defun | V : defvar | C : defconst | G : defgroup | U : defcustom | A : defadvice | W : defalias | M : defmarcro | D : defface | S : defstruct | B : defsubst | L : defclass | I : define | J : declare | K : global-set-key | T : add-to-list | Q : setq | H : add-hook | O : hook | X : lambda | R : require `------------------------------------------- you can add you own searches via customizable vars. I defined sets of keyword searches for Elist, PicoLisp, Org-mode and R. For Ruby or other languages you could easily define your own sets using ,--------------------------------------------- | M-x customize-variable RET navi-key-mappings | M-x customize-variable RET navi-keywords `--------------------------------------------- (or writing emacs lisp of course). My usual set-up is the (outshine-structured) source-buffer and its *Navi* buffer side-by-side, one showing the details, the other the overview. Then I can combine headlines views (1 to 8) with keywordsearches, e.g. in a *Navi* buffer associated with navi-mode.el: ,-- | 3 `-- gives ,---------------------------------------------------------------- | 1:;;; navi-mode.el --- major-mode for easy buffer-navigation | 7:;;;; MetaData | 21:;;;; Commentary | 240:;;;; ChangeLog | 247:;;; Requires | 253:;;; Mode Definitions | 284:;;; Variables | 285:;;;; Consts | 286:;;;; Vars | 302:;;;; Hooks | 307:;;;; Fonts | 308:;;;; Customs | 881:;;; Defuns | 882:;;;; Functions | 1353:;;;; Commands | 1822:;;; Menus and Keys | 1823:;;;; Menus | 2034:;;;; Keys | 2136:;;; Run Hooks and Provide | 2143:;;; navi-mode.el ends here `---------------------------------------------------------------- combining headline and keyword-searches looks like this: ,------ | C-3 a `------ gives: ,--------------------------------------------------------------- | 1:;;; navi-mode.el --- major-mode for easy buffer-navigation | 7:;;;; MetaData | 21:;;;; Commentary | 23:;;;;; About navi-mode | 47:;;;;; Usage | 214:;;;;; Installation | 234:;;;;; Emacs Version | 240:;;;; ChangeLog | 247:;;; Requires | 253:;;; Mode Definitions | 284:;;; Variables | 285:;;;; Consts | 286:;;;; Vars | 288:(defvar navi-mode-version 1.0 | 291:(defvar navi "navi" | 296:(defvar navi-regexp-quoted-line-at-point "" | 299:(defvar navi-regexp-quoted-line-before-narrowing "" | 302:;;;; Hooks | 307:;;;; Fonts | 308:;;;; Customs | 309:;;;;; Custom Groups | 311:(defgroup navi-mode nil | 316:;;;;; Custom Vars | 318:(defcustom navi-key-mappings | 532:(defcustom navi-keywords | 881:;;; Defuns | 882:;;;; Functions | 888:(defun navi-underline-line-with (char) | 897:(defun navi-map-keyboard-to-key (language kbd-key) | 903:(defun navi-msg (key language) | 908:(defun navi-1 (regexp nlines bufs &optional buf-name) | [...] `--------------------------------------------------------------- When moving to ,------------- | ;;;; Customs `------------- with 'n', typing 'r' to narrow to headline, then 'v' to show variable definitions gives ,--------------------------------------------------------------------------- | 3 matches for "^[[:space:]]*(def[vcgf][^l][a-z]+ " in buffer: navi-mode.el | 4:(defgroup navi-mode nil | 11:(defcustom navi-key-mappings | 225:(defcustom navi-keywords `--------------------------------------------------------------------------- type '3' and 'w' to get back to the former view. -- cheers, Thorsten