* emacs allout-mode
@ 2009-09-28 2:15 stucker
2009-09-29 9:24 ` Andreas Röhler
0 siblings, 1 reply; 3+ messages in thread
From: stucker @ 2009-09-28 2:15 UTC (permalink / raw
To: Help-gnu-emacs
Hi,
I am wondering if anyone might share with me the secrets of allout.el. I am
interested in adapting this for my programming in R through ESS. I have read
through comments in the source code and the docstring but there are some
things that are still a bit confusing...
So from examining allout.el my understanding is that I want to mark up my
document in the following style (# is the comment char in R):
###_* heading 1
###_ = heading 2
...code...
###_ > another type of heading 2
...code...
with stylish-prefixes set to true, the set of distinctive bullets
"*+-=>()[{}&!?#%\"X@$~_\\:;^" can be used as different subtopic bullets.
However:
1. This works when I do allout-hide-bodies, but when I add (setq
allout-layout t) to the mode-hook and open an R file, some of the topics and
subtopics are hidden.
2. In allout.el:
"comment-start strings that do not end in spaces are tripled in
the header-prefix, and an `_' underscore is tacked on the end, to
distinguish them from regular comment strings. comment-start
strings that do end in spaces are not tripled, but an underscore
is substituted for the space."
-> Is there something I do that will automatically convert my comments into
allout-style headings and sub-headings?
The main advantage I see for allout over outline is the easy keyboard
navigation (for my purposes, since I do not require encryption)... but is
there more? Is there also an allout export document that can be generated?
There is some comment in 'allout.el' which says:
"Easy rendering of exposed portions into numbered, latex, indented, etc
outline styles" leads me to believe so...
I was wondering if anyone could possibly confirm this and perhaps share some
ways in which they use allout mode (if at all, or do you use outline mode
code)? I already use folding-mode already to hide parts of interactive
scripts that I don't currently use, but don't want to delete... but was
looking for another folding mode that will structure my scripts.
Thank you!
Stephen
--
View this message in context: http://www.nabble.com/emacs-allout-mode-tp25639808p25639808.html
Sent from the Emacs - Help mailing list archive at Nabble.com.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: emacs allout-mode
2009-09-28 2:15 emacs allout-mode stucker
@ 2009-09-29 9:24 ` Andreas Röhler
2009-10-02 8:34 ` stucker
0 siblings, 1 reply; 3+ messages in thread
From: Andreas Röhler @ 2009-09-29 9:24 UTC (permalink / raw
To: stucker; +Cc: help-gnu-emacs
stucker wrote:
> Hi,
> I am wondering if anyone might share with me the secrets of allout.el. I am
> interested in adapting this for my programming in R through ESS. I have read
> through comments in the source code and the docstring but there are some
> things that are still a bit confusing...
>
> So from examining allout.el my understanding is that I want to mark up my
> document in the following style (# is the comment char in R):
>
> ###_* heading 1
> ###_ = heading 2
> ...code...
> ###_ > another type of heading 2
> ...code...
>
> with stylish-prefixes set to true, the set of distinctive bullets
> "*+-=>()[{}&!?#%\"X@$~_\\:;^" can be used as different subtopic bullets.
>
> However:
> 1. This works when I do allout-hide-bodies, but when I add (setq
> allout-layout t) to the mode-hook and open an R file, some of the topics and
> subtopics are hidden.
> 2. In allout.el:
> "comment-start strings that do not end in spaces are tripled in
> the header-prefix, and an `_' underscore is tacked on the end, to
> distinguish them from regular comment strings. comment-start
> strings that do end in spaces are not tripled, but an underscore
> is substituted for the space."
> -> Is there something I do that will automatically convert my comments into
> allout-style headings and sub-headings?
>
> The main advantage I see for allout over outline is the easy keyboard
> navigation (for my purposes, since I do not require encryption)... but is
> there more? Is there also an allout export document that can be generated?
> There is some comment in 'allout.el' which says:
> "Easy rendering of exposed portions into numbered, latex, indented, etc
> outline styles" leads me to believe so...
>
> I was wondering if anyone could possibly confirm this and perhaps share some
> ways in which they use allout mode (if at all, or do you use outline mode
> code)? I already use folding-mode already to hide parts of interactive
> scripts that I don't currently use, but don't want to delete... but was
> looking for another folding mode that will structure my scripts.
>
> Thank you!
>
> Stephen
>
Hi,
AFAIU if you have already a structured text, whose
hierarchies you may adress, simply outline-mode or
hs-minor-mode should be the suitable tools.
Feel free to post some example code, should you not
come to a result.
Andreas
--
https://code.launchpad.net/s-x-emacs-werkstatt/
http://bazaar.launchpad.net/~a-roehler/python-mode/python-mode.el/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: emacs allout-mode
2009-09-29 9:24 ` Andreas Röhler
@ 2009-10-02 8:34 ` stucker
0 siblings, 0 replies; 3+ messages in thread
From: stucker @ 2009-10-02 8:34 UTC (permalink / raw
To: Help-gnu-emacs
Hi Andreas, thanks for your response!
Andreas Röhler wrote:
>
> AFAIU if you have already a structured text, whose
> hierarchies you may adress, simply outline-mode or
> hs-minor-mode should be the suitable tools.
>
So I guess I am not sure what allout.el is even capable of, but I did like
two things about it:
1) someone already made a decision about the hierarchy structure for
outlining
2) the hot keys for moving around (h,o,...) were convenient
I can't seem to reproduce my problem with using fancy heading bullets (using
'>' vs '='), but in the meantime I edited outline-mode for ESS to mimic the
structure of the allout headings -
(add-hook 'ess-mode-hook 'my-ess-outline-hook)
(defun my-ess-outline-level ()
(let (buffer-invisibility-spec)
(save-excursion
(search-forward-regexp
"^###_\\(\\*\\|[ ]+[+-=>()[{}&!?#%\"X@$~_\\:;^]\\)")
(- (current-column) 3))))
(defun my-ess-outline-hook ()
(setq outline-regexp "^###_")
(setq outline-level 'my-ess-outline-level)
(outline-minor-mode t)
(hide-body)
)
... I also thought it might be convenient in case I ever figured out more
about allout and decided it was worth switching to in the future (then my
documents would be somewhat compatible?). I also bound a few of the
show/hide functions of outline-mode to easier key strokes than the default
so I think I'm getting the functionality I was hoping to get from allout. If
you (or others on the list) has a few insights as to what additional
features allout might provide, I'd be interested to hear - but it seems like
outline-mode may be sufficient for my purposes, as you suggest.
Thanks!
-Stephen
--
View this message in context: http://www.nabble.com/emacs-allout-mode-tp25639808p25712250.html
Sent from the Emacs - Help mailing list archive at Nabble.com.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-10-02 8:34 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-28 2:15 emacs allout-mode stucker
2009-09-29 9:24 ` Andreas Röhler
2009-10-02 8:34 ` stucker
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.