help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Narrow/widen in folding.el


From: Tim X
Subject: Re: Narrow/widen in folding.el
Date: Fri, 24 Dec 2010 10:49:28 +1100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

Andrea Crotti <andrea.crotti.0@gmail.com> writes:

>
> Sure structuring is very nice, but I don't see why you need it when you
> can jump fast to sections?
> I use tags, isearch or grep as a last resource, and it's very fast.
>

I find both very useful. Things like tags, isearch and grep are great
for jumping around in source files - especially if they are large.
However, folding is very useful when you want to be able to
see/reference a bit of code that is some distance from the code your
working on and don't want to have to actually move the cursor back and
forward. I find it particularly useful if the folding marks/comments
also conatin some additional information, such as the argument types to
a function. Now, when writing some code and I can't remember the order
of arguments etc, rather than having to move the cursor, I just glance
up and the folded comment provides the memory jolt I needed. 

Sometimes, I also find folding helps reveal the algorithm I'm owrking on
in a more concise, brief form - helping to keep me on track i.e. see the
forest, not the trees. 

Essentially, its not an either/or situation. I also find folding more
useful with some languages than others, so type of source code is
probablyh a factor as well. 

The tip on using outline minor mode rather than one of the existing
dedicated folding modes is very useful. I've always found the various
implementations of folding as in folding.el, folding-mode.el etc to be a
bit clunky - isearch and cumbersome key bindings being the two major
frustrations. The example earlier in this thread using outline has
reminded me that I've always planned to see if that would be a better
solution and it looks promising, so thanks.

Tim


-- 
tcross (at) rapttech dot com dot au


reply via email to

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