all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Marc Mientki <mientki@nonet.com>
To: help-gnu-emacs@gnu.org
Subject: Re: folding-mode question
Date: Tue, 28 Sep 2010 11:49:23 +0200	[thread overview]
Message-ID: <i7sdn4$k14$1@news.onet.pl> (raw)
In-Reply-To: <4f8544d1-1f12-4e76-bbb2-f81816562081@28g2000yqm.googlegroups.com>

Am 25.09.2010 21:31, schrieb tomer:
 > On Sep 24, 9:13 am, Marc Mientki<mien...@nonet.com>  wrote:
 >> Am 24.09.2010 02:17, schrieb tomer:
 >>
 >>> On Sep 22, 12:45 pm, Marc Mientki<mien...@nonet.com>    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.
 >>
 >> regards
 >> Marc
 >
 > I appreciate your comments, I think more or lest like you,

Nice to hear it! :)

 > but recently i got a task which basically maintain old code
 > from other programmers, in which the distande between the
 > open and close statemn could be several emacs pages,and have
 > 5 or more hirarchy insisde. this makes it difficult to trak,
 > but i cant change code, i need only to maintain it. my
 > solution is use fodling i dont know other solution to keep
 > it easy to track the code

Well... when you fold the source code you can't see it. When
you can't see it you can't understand it and as rasult you
can't track it ;-)

Do not take it too seriously, but emphasis on "too seriously".
Again und again I must read not own sources (C and C++), too.
For navigation in {}-hierarchy I use with love this piece of
lisp code:

;; define function to match a parenthesis otherwise insert a '~'
(defun goto-match-paren (arg)
   "Go to the matching parenthesis if on parenthesis otherwise insert '~'."
   (interactive "p")
   (cond ((looking-at "\\s\(") (forward-list 1) (backward-char 1))
         ((looking-at "\\s\)") (forward-char 1) (backward-list 1))
         (t (self-insert-command (or arg 1)))))
(global-set-key (kbd "~") 'goto-match-paren)

This allows me to jump to corresponding { or } with '~'

And of course I use mic-paren.el and show-paren-mode.

regards
Marc





  reply	other threads:[~2010-09-28  9:49 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-22  6:58 folding-mode question tomer
2010-09-22  8:44 ` Marc Mientki
2010-09-22  9:47   ` tomer
2010-09-22 10:45     ` Marc Mientki
2010-09-24  0:17       ` tomer
2010-09-24  7:13         ` Marc Mientki
2010-09-25 19:31           ` tomer
2010-09-28  9:49             ` Marc Mientki [this message]
2010-09-28 22:46               ` Stefan Monnier
2010-09-29  8:54                 ` Marc Mientki
2010-09-29  8:56                   ` Marc Mientki
2010-09-29  9:00                   ` Marc Mientki
     [not found]           ` <87sk0yk5al.fsf@puma.rapttech.com.au>
2010-09-28  9:35             ` Marc Mientki
2010-09-25  0:47         ` Tim X

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='i7sdn4$k14$1@news.onet.pl' \
    --to=mientki@nonet.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.