From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Marc Mientki Newsgroups: gmane.emacs.help Subject: Re: folding-mode question Date: Tue, 28 Sep 2010 11:35:17 +0200 Organization: http://onet.pl Message-ID: References: <6280c85e-1c8a-4a8e-afb0-7759ece217b6@a19g2000vbi.googlegroups.com> <87sk0yk5al.fsf@puma.rapttech.com.au> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1291880386 17880 80.91.229.12 (9 Dec 2010 07:39:46 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 9 Dec 2010 07:39:46 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Dec 09 08:39:38 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 1PQb6I-0001Ix-LM for geh-help-gnu-emacs@m.gmane.org; Thu, 09 Dec 2010 08:39:38 +0100 Original-Received: from localhost ([127.0.0.1]:55979 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PQb6H-00027u-Ep for geh-help-gnu-emacs@m.gmane.org; Thu, 09 Dec 2010 02:39:37 -0500 Original-Path: usenet.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed00.sul.t-online.de!t-online.de!plix.pl!newsfeed1.plix.pl!news.nask.pl!news.nask.org.pl!news.onet.pl!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 86 Original-NNTP-Posting-Host: port-83-236-194-74.static.qsc.de Original-X-Trace: news.onet.pl 1285666518 17937 83.236.194.74 (28 Sep 2010 09:35:18 GMT) Original-X-Complaints-To: niusy@onet.pl Original-NNTP-Posting-Date: Tue, 28 Sep 2010 09:35:18 +0000 (UTC) User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.2.9) Gecko/20100915 Thunderbird/3.1.4 In-Reply-To: <87sk0yk5al.fsf@puma.rapttech.com.au> Original-Xref: usenet.stanford.edu gnu.emacs.help:181523 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:76836 Archived-At: Am 25.09.2010 02:58, schrieb Tim X: > Marc Mientki writes: > >> Am 24.09.2010 02:17, schrieb tomer: >>> On Sep 22, 12:45 pm, Marc Mientki wrote: >>>> Am 22.09.2010 11:47, schrieb tomer: >>>> >>>>> Thanks for the answer I >>>>> work with a language called "e" (hardware verification langauge) it >>>>> looks like C but not exactly. >>>>> am I still able to use hideshow ? >>>> >>>> I would simply switch to c-mode and see what happens. >>>> >>>> regards >>>> Marc >>> >>> I have tried it is not practical. >>> the folding is great because it not language related. >> >> What would you say what is the benefit of code folding? >> I've never used folding. After I've tried this out I was so >> dissapointed. This was never interested to me. My "mystery >> theory" is that peole who advocate code folding never seen >> realy good text editor with superb navigation mechanism like >> Emacs. But maybe I'm wrong and I underrate code folding. >> > > I would say your theory is very weak. OK. As I've noticed it was only my "mystery theory" ;) > One reason I liked it was that by using well structured folding markers, > you could have a screen that showed not only the current code you are > editing, but also summary information about other bits of code in the > buffer. This means that often, you could get a quick reminder without > having to navigate or move from hour current position at all. For > example, when writing lots of Java code, I used folding mode so that in > my buffer, I had folding marks that also showed the arguments and return > values of other methods etc in my class. I found this useful because I > could just look up and see what the arguments were for a method I'd > defined higher/lower in the file - no need to move my cursor at all, no > need to navigate anywhere - essntially, I got more useful real-estate > use out of my screen. I use in such situation another technique: I split my frame (which is almost always full screen) into 2 (or more) windows. Each window can now show another part of (same or not same) text. For quick navigation I use my 4 "high-speed-bookmarks". There are ordinary Emacs bookmarks that I place on F9 to F12. I set a bookmark with M-F9..M-F12 and jump to bookmark simply with F9..F12. This is the code: ;; quick bookmark (global-set-key [\M-f9] (lambda () (interactive) (bookmark-set "quick-bookmark-1"))) (global-set-key [f9] (lambda () (interactive) (bookmark-jump "quick-bookmark-1"))) And so on for F10, F11 and F12. There may be exist a smarten (generalized) solution, but I typed this once and left it so. Unfortunately using bookmarks in two or more windows with the same buffer has one bug since Emacs23 - when I jump in window 1 it jumps in window 2 to the same place. Sometimes I use also bm.el. The bigest drawback of code folding for me is: - the visual text form changes. I don't like it. - it produced more effort. I must first navigate to the right place, then fold and than go elsewhere where I want to edit. Possibly I must repeat folding many times so that I get the state that I see in one window both distance piece of text and current edited text. With my bookmarks and splited frame I'am much faster. regards Marc