emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Thorsten Jolitz <tjolitz@gmail.com>
To: emacs-orgmode@gnu.org
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	[thread overview]
Message-ID: <87oaw6ajwj.fsf@gmail.com> (raw)
In-Reply-To: 87wqauzwlw.fsf@geodiff-mac3.ulb.ac.be

Nicolas Richard <theonewiththeevillook@yahoo.fr> writes:

> Thorsten Jolitz <tjolitz@gmail.com> writes:
>
>> Nicolas Richard <theonewiththeevillook@yahoo.fr> 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	other threads:[~2014-07-30 16:31 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-22 17:48 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/)] Nicolas Richard
2014-07-24  7:48 ` Nicolas Goaziou
2014-07-24 13:28   ` Nicolas Richard
2014-07-24 14:02     ` Nicolas Goaziou
2014-07-24 14:25       ` Nicolas Richard
2014-07-24 15:00         ` Thorsten Jolitz
2014-07-25  9:13         ` Nicolas Goaziou
2014-07-28 14:18         ` Bastien
2014-07-30 14:51           ` Nicolas Richard
2014-07-30 15:20             ` Thorsten Jolitz
2014-07-30 15:37               ` Nicolas Richard
2014-07-30 16:30                 ` Thorsten Jolitz [this message]
2014-07-31  8:00                   ` Nicolas Richard
2014-07-28 14:15 ` Bastien

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87oaw6ajwj.fsf@gmail.com \
    --to=tjolitz@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).