From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thorsten Jolitz Subject: Re: Bug: [PATCH] Make org-narrow-to-subtree usable out of Org mode [8.2.7b (release_8.2.7b-6-g07d470 @ /home/youngfrog/sourcetrees/org-mode/lisp/)] Date: Wed, 30 Jul 2014 18:30:52 +0200 Message-ID: <87oaw6ajwj.fsf@gmail.com> References: <87fvht9tdo.fsf@yahoo.fr> <87bnsfrycn.fsf@nicolasgoaziou.fr> <878uni7unf.fsf@geodiff-mac3.ulb.ac.be> <87tx66lur9.fsf@nicolasgoaziou.fr> <87r41a6dfw.fsf@geodiff-mac3.ulb.ac.be> <87mwbtxuob.fsf@bzg.ath.cx> <87fvhi5288.fsf@yahoo.fr> <874mxyc1r2.fsf@gmail.com> <87wqauzwlw.fsf@geodiff-mac3.ulb.ac.be> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:50154) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XCWma-00084N-QI for emacs-orgmode@gnu.org; Wed, 30 Jul 2014 12:31:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XCWmV-0003gA-54 for emacs-orgmode@gnu.org; Wed, 30 Jul 2014 12:31:16 -0400 Received: from plane.gmane.org ([80.91.229.3]:51599) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XCWmU-0003fB-RT for emacs-orgmode@gnu.org; Wed, 30 Jul 2014 12:31:11 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1XCWmP-00083m-6I for emacs-orgmode@gnu.org; Wed, 30 Jul 2014 18:31:05 +0200 Received: from e178189071.adsl.alicedsl.de ([85.178.189.71]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 30 Jul 2014 18:31:05 +0200 Received: from tjolitz by e178189071.adsl.alicedsl.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 30 Jul 2014 18:31:05 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Nicolas Richard writes: > Thorsten Jolitz writes: > >> Nicolas Richard writes: >> >>> I think backporting narrow-to-subtree to outline is a very good move. >>> (Other things would be cool in outline, e.g. why does it not have >>> outline-cycle ? But that's a longer story, I guess.) >> >> It does via outline-magic.el (now "maintained" by me: >> https://github.com/tj64/outline-magic), and the short story is (my > >> It is fully integrated (and partly improved and expanded) in outshine.el > > Thanks for the URL. The description looks great but why not patch > outline.el instead of making it an external library ? Is there an > incompatibility ? Well, outshine merges quite old extension libraries for outline like outline-magic (Carsten Dominik) and out-xtra (Per Abrahamsen) and adds lots of new stuff. Why did the old guys back then wrote extensions instead of patching outline? No idea ... Outshine was never meant to replace outline, and there is a conceptual incompability. Outshine trys to bring Org-mode's look&feel to programming major-modes, meaning that headlines are outcommented Org headlines, e.g. ,---- | ;; ** 2nd Level `---- But pure outline users tend to fold whatever they want, e.g. function defs in elisp etc., and thats too much of a conceptual mismatch to merge it in one library. Outshine users should structure their source-files just like Org files, only with outcommented headlines, then many things will work just like in Org-mode. Additional folding features could be added like in Org-mode (plain list, src-blocks etc), but the Org-headline as core structural element is mandatory in both Org-mode and Outshine. Thus outshine is one option for outline users, but not the only one. They can still use plain old outline and define whatever they want as outline-regexp. But, btw, navi-mode gives you that too, so its possible to have the best of both worlds: E.g, after doing 'M-s n' (M-x navi-search-and-switch) in outshine.el, doing 'f' in the *Navi* buffer gives: ,---- | 194 matches for "^[[:space:]]*(def[maus][^elt][a-z]*\*? " in buffer: outshine.el | 344:(defun outshine-compatible-face (inherits specs) | 695:(defmacro outshine-define-key-with-fallback | 734:(defun outshine-chomp (str) | 744:(defun outshine-set-outline-regexp-base () | 757:(defun outshine-normalize-regexps () | 772:(defun outshine-modern-header-style-in-elisp-p (&optional buffer) | 785:(defun outshine-calc-comment-region-starter () | 795:(defun outshine-calc-comment-padding () | 811:(defun outshine-calc-outline-regexp () | 834:(defun outshine-calc-outline-level () | 871:(defun outshine-set-local-outline-regexp-and-level | 888:(defun outshine-write-hidden-lines-cookies () | 902:(defun outshine-hidden-lines-cookie-status-changed-p () | 912:(defun outshine-set-hidden-lines-cookie () | 949:(defun outshine-calc-outline-string-at-level (level) | 961:(defun outshine-calc-outline-base-string-at-level (level) | 968:(defun outshine-transform-normalized-outline-regexp-base-to-string () | 976:(defun outshine-make-promotion-headings-list (max-level) | 990:(defun outshine-fontify-headlines (outline-regexp) ... `---- doing 'v' gives ,---- | 55 matches for "^[[:space:]]*(def[vcgf][^l][a-z]+ " in buffer: outshine.el | 150:(defconst outshine-version "1.0" | 153:(defconst outshine-max-level 8 | 157:(defconst outshine-level-faces | 162:(defconst outshine-outline-heading-end-regexp "\n" | 167:(defconst outshine-oldschool-elisp-outline-regexp-base | 171:(defconst outshine-speed-commands-default | 249:(defconst outshine-comment-tag "comment" | 256:(defvar outline-minor-mode-prefix "\M-#" | 264:(defvar outline-promotion-headings nil | 273:(defvar outshine-delete-leading-whitespace-from-outline-regexp-base-p nil | 278:(defvar outshine-enforce-no-comment-padding-p nil | 283:(defvar outshine-outline-regexp-base "" | 286:(defvar outshine-normalized-comment-start "" ... `---- etc etc, here is the key-word search help for Emacs Lisp: ,---- | [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 | Z : ert | P : marker | R : require | N : eval-after-load `---- -- cheers, Thorsten