From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tim X Newsgroups: gmane.emacs.help Subject: Re: Narrow/widen in folding.el Date: Fri, 24 Dec 2010 10:49:28 +1100 Organization: Unlimited download news at news.astraweb.com Message-ID: <87tyi41247.fsf@rapttech.com.au> References: <87mxnz9dd1.fsf@member.fsf.org> <87zkryz0h0.fsf@member.fsf.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1293153831 754 80.91.229.12 (24 Dec 2010 01:23:51 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 24 Dec 2010 01:23:51 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Dec 24 02:23:47 2010 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PVwNm-0004ve-W0 for geh-help-gnu-emacs@m.gmane.org; Fri, 24 Dec 2010 02:23:47 +0100 Original-Received: from localhost ([127.0.0.1]:38331 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PVwNm-0006UK-6a for geh-help-gnu-emacs@m.gmane.org; Thu, 23 Dec 2010 20:23:46 -0500 Original-Path: usenet.stanford.edu!fu-berlin.de!newsfeed1.swip.net!news.astraweb.com!border5.a.newsrouter.astraweb.com!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) Cancel-Lock: sha1:vAe6Z6U3B1RcnXqFbaU27XPS5V4= Original-Lines: 40 Original-NNTP-Posting-Host: de9df153.news.astraweb.com Original-X-Trace: DXC=4F[>^i]; ?MYJRMXARXV^?kWSCAkl5c@Xgk^F\1A=:Rm_kRPRM<1]> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:77841 Archived-At: Andrea Crotti 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