emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Bug: [PATCH] Make org-narrow-to-subtree usable out of Org mode [


From: Thorsten Jolitz
Subject: Re: [O] 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
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Nicolas Richard <address@hidden> writes:

> Thorsten Jolitz <address@hidden> writes:
>
>> Nicolas Richard <address@hidden> 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]