Ah, great!

I gave it one very brief try with this mode:

   http://www.emacswiki.org/emacs/FoldingMode

   (folding-add-to-marks-list 'shell-mode "#{{{" "#}}}" nil t)

But I just got "not on a fold".  Maybe it doesn't compose with shell mode?  It might be easier just to add similar functionality to a wrapper function around Chris's folder/expander.

  -Ryan



On Sat, Mar 17, 2012 at 9:10 AM, Brandon Allbery <allbery.b@gmail.com> wrote:
On Sat, Mar 17, 2012 at 08:55, Ryan Newton <rrnewton@gmail.com> wrote:
  • If the source is available, the compiler could be tweaked to obey a protocol, putting delimiters around collapsable output (possibly non-printing control sequences??)

I believe both emacs and vim have folding submodes which operate based on comments containing {{{ / }}} to bracket foldable regions.

--
brandon s allbery                                      allbery.b@gmail.com
wandering unix systems administrator (available)     (412) 475-9364 vm/sms