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: Best way to get hang of an elisp file? Date: Fri, 18 Oct 2013 19:22:14 +0200 Message-ID: <87k3ha8pfd.fsf@gmail.com> References: <20131018185232.2084581e@aga-netbook> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1382116970 5744 80.91.229.3 (18 Oct 2013 17:22:50 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 18 Oct 2013 17:22:50 +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 Oct 18 19:22:54 2013 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 1VXDlC-00052f-Mv for geh-help-gnu-emacs@m.gmane.org; Fri, 18 Oct 2013 19:22:50 +0200 Original-Received: from localhost ([::1]:58850 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VXDlC-0001NU-93 for geh-help-gnu-emacs@m.gmane.org; Fri, 18 Oct 2013 13:22:50 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34728) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VXDku-0001MT-SF for help-gnu-emacs@gnu.org; Fri, 18 Oct 2013 13:22:38 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VXDkp-0004u9-Je for help-gnu-emacs@gnu.org; Fri, 18 Oct 2013 13:22:32 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:34186) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VXDkp-0004u0-92 for help-gnu-emacs@gnu.org; Fri, 18 Oct 2013 13:22:27 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1VXDkn-0004m0-0Q for help-gnu-emacs@gnu.org; Fri, 18 Oct 2013 19:22:25 +0200 Original-Received: from g231226083.adsl.alicedsl.de ([92.231.226.83]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 18 Oct 2013 19:22:25 +0200 Original-Received: from tjolitz by g231226083.adsl.alicedsl.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 18 Oct 2013 19:22:25 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 212 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: g231226083.adsl.alicedsl.de User-Agent: Gnus/5.130002 (Ma Gnus v0.2) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:1Jj+qPfW7FcOzQUVdSv8/4Ry/jg= 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:94088 Archived-At: Marcin Borkowski writes: Hi, > I'm curious whether there exists something like "outline mode", hiding > everything but the signature of a function and its docstring etc. (Or > better yet, generating a file with everything but signatures and > docstrings etc. deleted.) Sounds like a perfect use case for [[https://github.com/tj64/navi][navi-mode.el]]. Instead of describing it (again) I'll just give some examples of possible views on tex.el: * Outline structure (level 1-8) type 1 in *Navi* buffer (-> level 1) ,----------------------------------------------------------------------- | 45 matches for "^;;; " in buffer: tex.el | 1:;;; tex.el --- Support for TeX documents. | 27:;;; Commentary: | 33:;;; Code: | 61:;;; Site Customization | 541:;;; Portability. | 572:;;; Documentation for Info-goto-emacs-command-node and similar | 597:;;; Special support for XEmacs | 688:;;; Special support for GNU Emacs | 762:;;; Buffer | [...] | 5053:;;; Dollars | 5144:;;; Simple Commands | 5379:;;; Documentation | 5508:;;; Ispell Support | 5573:;;; Special provisions for other modes and libraries | 5598:;;; tex.el ends here `----------------------------------------------------------------------- type 3 (level 1-3) [... same thing as above, tex.el seems to have only level 1 headlines] * Keyword Searches type h for help: ,------------------------------------------- | [KEY] : [SEARCH] | ================ | a : ALL | f : FUN | v : VAR | x : OBJ | b : DB | F : defun | V : defvar | C : defconst | G : defgroup | U : defcustom | A : defadvice | 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 `------------------------------------------- (type q to quit help buffer) type f ,--------------------------------------------------------------------------- | 186 matches for "^[[:space:]]*(def[maus][^et][a-z]*\*? " in buffer: tex.el | 547: (defun TeX-maybe-remove-help (menu) | 562: (defun TeX-maybe-remove-help (menu) | 566: (defmacro TeX-menu-with-help (menu) | 601: (defun TeX-read-string | 608: (defun TeX-mark-active () | 614: (defun TeX-active-mark () | 622: (defalias 'line-beginning-position 'point-at-bol)) | 624: (defalias 'line-end-position 'point-at-eol)) | 626: (defun TeX-overlay-prioritize (start end) | 665: (defalias 'TeX-completing-read-multiple 'completing-read-multiple) | 666: (defun TeX-completing-read-multiple | 675: (defalias 'TeX-line-number-at-pos 'line-number-at-pos) | [...] `-------------------------------------------------------------------------- type v ,------------------------------------------------------------------- | 186 matches for "^[[:space:]]*(def[vcgf][^l][a-z]+ " in buffer: tex.el | 43:(defgroup TeX-file nil | 47:(defgroup TeX-command nil | 51:(defgroup LaTeX nil | 57:(defgroup TeX-misc nil | 81:(defcustom TeX-print-command "%(o?)dvips -P%p %r %s" | 91:(defcustom TeX-command "tex" | 96:(defcustom TeX-Omega-command "omega" | 101:(defcustom LaTeX-command "latex" | 106:(defcustom LaTeX-Omega-command "lambda" | 111:(defcustom ConTeXt-engine nil | 118:(defcustom ConTeXt-Omega-engine TeX-Omega-command | 127:(defcustom TeX-queue-command "lpq -P%p" `------------------------------------------------------------------- type R ,------------------------------------------------------------ | 5 matches for "^[[:space:]]*([a-z-]*require " in buffer: tex.el | 38:(require 'custom) | 39:(require 'tex-site) | 41: (require 'cl)) | 543:(require 'easymenu) | 5348: (require 'reporter) `------------------------------------------------------------ * Combine Headline and Keyword searches type C-1 C ,------------------------------------------------------------------- | [...] | 3021:;;; Hilighting | 3032:;;; Parsing | 3049:(defconst TeX-auto-parser-temporary 1) | 3050:(defconst TeX-auto-parser-add 2) | 3051:(defconst TeX-auto-parser-local 3) | 3052:(defconst TeX-auto-parser-change 4) | 3508:;;; Utilities | 3862:;;; Syntax Table | 3891:;;; Menu Support | 3961:(defconst TeX-command-menu-name "Command" | 3964:;;; Keymap | 4218:;;; Menus for plain TeX mode | 4303:;;; AmSTeX | 4348:;;; Verbatim constructs | 4363:;;; Comments | 4599:;;; Indentation | 4637:;;; Navigation | 4916:;;; Fonts | 5053:;;; Dollars | 5066:(defconst TeX-dollar-string (char-to-string TeX-dollar-sign)) | 5067:(defconst TeX-dollar-regexp | 5144:;;; Simple Commands | [...] `------------------------------------------------------------------- * Narrow to Headline type 1 with point (in *Navi* buffer) on ,----------------- | 3032:;;; Parsing `----------------- type r type a ,------------------------------------------------------------------------------- | 40 matches for "^[[:space:]]*(def[a-z]+ " in buffer: tex.el | 3:(defgroup TeX-parse nil | 7:(defvar TeX-auto-parser '((styles TeX-auto-file TeX-run-style-hooks))) | 18:(defconst TeX-auto-parser-temporary 1) | 19:(defconst TeX-auto-parser-add 2) | 20:(defconst TeX-auto-parser-local 3) | 21:(defconst TeX-auto-parser-change 4) | 23:(defun TeX-auto-add-type (name prefix &optional plural) | 55:(defun TeX-auto-add-information (name entries) | 67:(defun TeX-auto-list-information (name) | 100:(defvar TeX-auto-apply-hook nil | 103:(defun TeX-auto-apply () | 109:(defun TeX-auto-apply-entry (entry) | [...] | 320:(defvar TeX-auto-prepare-hook nil | 323:(defvar TeX-auto-cleanup-hook nil | 326:(defcustom TeX-auto-parse-length 999999 | 332:(defcustom TeX-auto-x-parse-length 0 | 340:(defcustom TeX-auto-x-regexp-list 'LaTeX-auto-label-regexp-list | 357:(defun TeX-regexp-group-count (regexp) | 367:(defun TeX-auto-parse-region (regexp-list beg end) | 422:(defun TeX-auto-parse () | 456:(defun TeX-auto-clear-entry (entry) | 460:(defvar LaTeX-auto-end-symbol nil) | 462:(defun TeX-auto-symbol-check (match) `------------------------------------------------------------------------------- type w to widen again. * Other Stuff use n, p, space and <= for navigation, d to show point in associated source-code buffer, s and o to switch to the source-code buffer, M-s M-s to switch back to *Navi* buffer, type E to make the *Navi* buffer editable (excellent for keyboard macros) and C-c C-c to make it read-only again. You can even search, mark, copy, kill, paste the original buffer from the *Navi* buffer and of course cycle visibility (locally and globally). -- cheers, Thorsten