caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Lukasz Stafiniak <lukstafi@gmail.com>
To: dumitru.potop@inria.fr
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] Smart caml editor and smart debugger
Date: Fri, 15 Oct 2010 12:59:42 +0200	[thread overview]
Message-ID: <AANLkTi=dDfu=hGGRMyoQ0d3TB_psxfmU8SikN=sMuysk@mail.gmail.com> (raw)
In-Reply-To: <4CB8210D.7030307@inria.fr>

On Fri, Oct 15, 2010 at 11:38 AM, Dumitru Potop-Butucaru
<dumitru.potop_butucaru@inria.fr> wrote:
>
> 1. An editor where I can collapse entire
>    definitions (by reducing a huge "let x = .... in"
>    step into a single line). I'd prefer doing it
>    using a mouse, but emacs shortcuts would
>    be OK, too.
>

There are several outline modes for emacs. I use folding-mode:

(folding-mode-add-find-file-hook)
(folding-add-to-marks-list 'tuareg-mode "(* {{{" "(* }}}" nil t)

and at the beginning of soruce file:

(* -*- folded-file: t; -*- *)

You can see the available commands and their shortcuts in the "Fld" submenu.
I experience two annoyances (probably Tuareg is the culprit): Tuareg
indentation does not work too well around a folded section, and "goto
error" doesn't work at all (it overshots). I solve the second problem
by unfolding everything before picking an error location and then
folding back.

As for tracing, I use printfs. If something seems like a good
information to understand how the algorithm works, I leave it there
using:

(defun camldev-insert-log-entry ()
  (interactive)
    (insert "(* {{{ log entry *)
if !debug_level >  then (
);
(* }}} *)")
(goto-char (- (point) 20)))


  parent reply	other threads:[~2010-10-15 11:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-15  9:38 Dumitru Potop-Butucaru
2010-10-15 10:21 ` [Caml-list] " Gabriel Kerneis
2010-10-15 10:59 ` Lukasz Stafiniak [this message]
2010-10-15 12:00 ` Vincent Aravantinos
2010-10-16 17:14   ` Yoann Padioleau
2010-10-16 10:23 ` Gaius Hammond

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='AANLkTi=dDfu=hGGRMyoQ0d3TB_psxfmU8SikN=sMuysk@mail.gmail.com' \
    --to=lukstafi@gmail.com \
    --cc=caml-list@inria.fr \
    --cc=dumitru.potop@inria.fr \
    /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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).