From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Wang Lei Newsgroups: gmane.emacs.help Subject: Re: How to expertly fold perl or other scripting code. Date: Sun, 20 Sep 2009 13:22:34 +0800 Message-ID: References: <87fxaiha14.fsf@newsguy.com> <87my4q8dsq.fsf@lion.rapttech.com.au> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1253424210 13745 80.91.229.12 (20 Sep 2009 05:23:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 20 Sep 2009 05:23:30 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Sep 20 07:23:23 2009 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.50) id 1MpEtN-0006HH-Af for geh-help-gnu-emacs@m.gmane.org; Sun, 20 Sep 2009 07:23:21 +0200 Original-Received: from localhost ([127.0.0.1]:36379 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MpEtM-0000Un-Dh for geh-help-gnu-emacs@m.gmane.org; Sun, 20 Sep 2009 01:23:20 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MpEsj-0000Ui-ET for help-gnu-emacs@gnu.org; Sun, 20 Sep 2009 01:22:41 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MpEse-0000UW-3H for help-gnu-emacs@gnu.org; Sun, 20 Sep 2009 01:22:40 -0400 Original-Received: from [199.232.76.173] (port=36277 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MpEsd-0000UR-Rn for help-gnu-emacs@gnu.org; Sun, 20 Sep 2009 01:22:35 -0400 Original-Received: from mail-yw0-f172.google.com ([209.85.211.172]:38198) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MpEsd-0002DG-JV for help-gnu-emacs@gnu.org; Sun, 20 Sep 2009 01:22:35 -0400 Original-Received: by ywh2 with SMTP id 2so2732779ywh.27 for ; Sat, 19 Sep 2009 22:22:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=t/GvM0kK/M1QlmnDVfBLf+9SmoI6s0dLlaOsF5Yz3co=; b=XBdyn2L2UII+z1WHV5nORfruhroAskjK69bqcrFYP8rZLp0oJd3EGsGFD98QHoNgMy sGsVkaRZTxOSF8l9ADTUgBFhrCgqe5D1tKlPjmpE58k6EovFc4hpHl6dLd88eIRUxESC EH99/pab7YjTtIgLGyibtShOpBnmkx6Rlj1vY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=JtSTTPdZzB2IkXTe5Mvi/LVWWM8l5bAULZsaUisn21vmm23fap7yofj3kzSUXPLotN HKhAUed1pKs3wBUWp0QIcRwMXWfQ3qS2i8ZXx54RaUeQd11iMYR9z3YSOpEZODAucYk5 p20agd4yP2o5wsxfCsEtNbflZcZTkGAePY0qk= Original-Received: by 10.151.24.21 with SMTP id b21mr5976578ybj.270.1253424154472; Sat, 19 Sep 2009 22:22:34 -0700 (PDT) In-Reply-To: <87my4q8dsq.fsf@lion.rapttech.com.au> X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor 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:68322 Archived-At: On 9/20/09, Tim X wrote: > Andreas Politz writes: > >> Harry Putnam writes: >> >>> I see too much output on google that looks very complex when I try to >>> delve into folding code in emacs. >>> >>> Is it horribly complicated? >>> >>> I know some windows editors or ide's do such folding very >>> quickly... but I'm not going to do my coding on windows. I'm far to >>> comfortable on linux or opensolaris, but I would really like to have >>> the ability to fold/unfold code as needed, quickly and easily. >> >> M-x outline-minor-mode RET >> C-c @ C-t >> >> For a start... >> > > I personally find outline of limited use when it comes to folding > code. However, there are a few folding modes out there (check the emacs > wiki). I use an old mode called folding.el (which is bundled in the > emacs-goodies debian package. It works quite well, is easy to install > and provides good functionality. >> >>Tim > > > -- > tcross (at) rapttech dot com dot au > After reading these from folding.el, I decided to use hs-minor-mode. ;; ;; Please note, that the maintainers do not recommend to use only ;; folding for you your code layout and navigation. Folding.el is ;; on its best when it can "chunk" large sections of code inside ;; folds. The larger the chunks, the more the usability of ;; folding will increase. Folding.el is not meant to hide ;; individual functions: you may be better served by hideshow.el ;; or imenu.el (which can parse the function indexes) -- Regards, Lei