caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Tuareg-mode and pipes |
@ 2012-05-23 15:15 Romain Bardou
  2012-05-23 15:53 ` Eric Cooper
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Romain Bardou @ 2012-05-23 15:15 UTC (permalink / raw)
  To: caml-list

Hi list,

About two years ago, the following bug was reported:
https://forge.ocamlcore.org/tracker/index.php?func=detail&aid=659&group_id=43&atid=255

If you don't want to click, here is the issue. Tuareg indents 
pattern-matching like this:

match x with
   | Bla ->
     hello

But the previous behavior of Tuareg, which I prefer, was:

match x with
   | Bla ->
       hello

I have occasionally been updating my tuareg-mode, looking forward for 
this "tuareg-pipe-indent" variable (see the comments in the bug report), 
while patiently re-indenting pattern-matching by hand. But this 
variable, or any similar variable, never appeared.

After two years, I'm becoming suspicious that something went wrong. Does 
anybody know what happened to the patch? Or how I can get my preferred 
behavior back?

A related question is the following. I read here a few weeks ago a claim 
that the caml-mode was much better than the tuareg-mode. I was not able 
to find a comparison between these two modes, to support this claim, nor 
whether the caml-mode would fix the pipe behavior for me. Any comment 
here would be appreciated.

Cheers,

-- 
Romain Bardou

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Caml-list] Tuareg-mode and pipes |
  2012-05-23 15:15 [Caml-list] Tuareg-mode and pipes | Romain Bardou
@ 2012-05-23 15:53 ` Eric Cooper
  2012-05-23 15:55   ` Romain Bardou
  2012-05-23 17:16 ` [Caml-list] " Hongbo Zhang
       [not found] ` <20120523.225137.2235002212124282451.Christophe.Troestler@umons.ac.be>
  2 siblings, 1 reply; 9+ messages in thread
From: Eric Cooper @ 2012-05-23 15:53 UTC (permalink / raw)
  To: caml-list

On Wed, May 23, 2012 at 05:15:17PM +0200, Romain Bardou wrote:
> Tuareg indents pattern-matching like this:
> 
> match x with
>   | Bla ->
>     hello
> 
> But the previous behavior of Tuareg, which I prefer, was:
> 
> match x with
>   | Bla ->
>       hello
> 
> [...] 
> A related question is the following. I read here a few weeks ago a
> claim that the caml-mode was much better than the tuareg-mode. I was
> not able to find a comparison between these two modes, to support
> this claim, nor whether the caml-mode would fix the pipe behavior
> for me. Any comment here would be appreciated.

I switched to caml-mode from tuareg for exactly this reason.  I can
confirm that with its default settings, it indents in the second
style.

-- 
Eric Cooper             e c c @ c m u . e d u

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Caml-list] Tuareg-mode and pipes |
  2012-05-23 15:53 ` Eric Cooper
@ 2012-05-23 15:55   ` Romain Bardou
  2012-05-23 16:15     ` Eric Cooper
  0 siblings, 1 reply; 9+ messages in thread
From: Romain Bardou @ 2012-05-23 15:55 UTC (permalink / raw)
  To: caml-list

Le 23/05/2012 17:53, Eric Cooper a écrit :
> On Wed, May 23, 2012 at 05:15:17PM +0200, Romain Bardou wrote:
>> Tuareg indents pattern-matching like this:
>>
>> match x with
>>    | Bla ->
>>      hello
>>
>> But the previous behavior of Tuareg, which I prefer, was:
>>
>> match x with
>>    | Bla ->
>>        hello
>>
>> [...]
>> A related question is the following. I read here a few weeks ago a
>> claim that the caml-mode was much better than the tuareg-mode. I was
>> not able to find a comparison between these two modes, to support
>> this claim, nor whether the caml-mode would fix the pipe behavior
>> for me. Any comment here would be appreciated.
>
> I switched to caml-mode from tuareg for exactly this reason.  I can
> confirm that with its default settings, it indents in the second
> style.
>

Thanks for your input. Do you miss anything from tuareg-mode or is your 
life just better now?

Cheers,

-- 
Romain Bardou

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Caml-list] Tuareg-mode and pipes |
  2012-05-23 15:55   ` Romain Bardou
@ 2012-05-23 16:15     ` Eric Cooper
  0 siblings, 0 replies; 9+ messages in thread
From: Eric Cooper @ 2012-05-23 16:15 UTC (permalink / raw)
  To: caml-list

On Wed, May 23, 2012 at 05:55:15PM +0200, Romain Bardou wrote:
> Do you miss anything from tuareg-mode or is your life just better
> now?

I basically use only the auto-indenting features, and they've been
fine.  I only rarely run an OCaml subprocess, for example, so there
may be differences there that I haven't noticed.

-- 
Eric Cooper             e c c @ c m u . e d u

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Caml-list] Re: Tuareg-mode and pipes |
  2012-05-23 15:15 [Caml-list] Tuareg-mode and pipes | Romain Bardou
  2012-05-23 15:53 ` Eric Cooper
@ 2012-05-23 17:16 ` Hongbo Zhang
  2012-05-23 18:03   ` Thibault Suzanne
       [not found] ` <20120523.225137.2235002212124282451.Christophe.Troestler@umons.ac.be>
  2 siblings, 1 reply; 9+ messages in thread
From: Hongbo Zhang @ 2012-05-23 17:16 UTC (permalink / raw)
  To: Romain Bardou; +Cc: caml-list

On 5/23/12 11:15 AM, Romain Bardou wrote:
> Hi list,
>
> About two years ago, the following bug was reported:
> https://forge.ocamlcore.org/tracker/index.php?func=detail&aid=659&group_id=43&atid=255
>
>
> If you don't want to click, here is the issue. Tuareg indents
> pattern-matching like this:
>
> match x with
> | Bla ->
> hello
>
> But the previous behavior of Tuareg, which I prefer, was:
>
> match x with
> | Bla ->
> hello
>
> I have occasionally been updating my tuareg-mode, looking forward for
> this "tuareg-pipe-indent" variable (see the comments in the bug report),
> while patiently re-indenting pattern-matching by hand. But this
> variable, or any similar variable, never appeared.
>
> After two years, I'm becoming suspicious that something went wrong. Does
> anybody know what happened to the patch? Or how I can get my preferred
> behavior back?
>
> A related question is the following. I read here a few weeks ago a claim
> that the caml-mode was much better than the tuareg-mode. I was not able
> to find a comparison between these two modes, to support this claim, nor
> whether the caml-mode would fix the pipe behavior for me. Any comment
> here would be appreciated.
It's true.
I previously used tuareg-mode, switched to caml-mode then
>
> Cheers,
>


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Caml-list] Re: Tuareg-mode and pipes |
  2012-05-23 17:16 ` [Caml-list] " Hongbo Zhang
@ 2012-05-23 18:03   ` Thibault Suzanne
  0 siblings, 0 replies; 9+ messages in thread
From: Thibault Suzanne @ 2012-05-23 18:03 UTC (permalink / raw)
  To: caml-list

Hi

Alternatively you could use typerex from ocamlpro 
(http://www.typerex.org/), which indents the way you want. As for the 
features, it does at least what tuareg does (and a few additionnal 
things which i did not tested).

Thibault Suzanne

Le 23/05/2012 19:16, Hongbo Zhang a écrit :
> On 5/23/12 11:15 AM, Romain Bardou wrote:
>> Hi list,
>>
>> About two years ago, the following bug was reported:
>> https://forge.ocamlcore.org/tracker/index.php?func=detail&aid=659&group_id=43&atid=255 
>>
>>
>>
>> If you don't want to click, here is the issue. Tuareg indents
>> pattern-matching like this:
>>
>> match x with
>> | Bla ->
>> hello
>>
>> But the previous behavior of Tuareg, which I prefer, was:
>>
>> match x with
>> | Bla ->
>> hello
>>
>> I have occasionally been updating my tuareg-mode, looking forward for
>> this "tuareg-pipe-indent" variable (see the comments in the bug report),
>> while patiently re-indenting pattern-matching by hand. But this
>> variable, or any similar variable, never appeared.
>>
>> After two years, I'm becoming suspicious that something went wrong. Does
>> anybody know what happened to the patch? Or how I can get my preferred
>> behavior back?
>>
>> A related question is the following. I read here a few weeks ago a claim
>> that the caml-mode was much better than the tuareg-mode. I was not able
>> to find a comparison between these two modes, to support this claim, nor
>> whether the caml-mode would fix the pipe behavior for me. Any comment
>> here would be appreciated.
> It's true.
> I previously used tuareg-mode, switched to caml-mode then
>>
>> Cheers,
>>
>
>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Caml-list] Tuareg-mode and pipes |
       [not found] ` <20120523.225137.2235002212124282451.Christophe.Troestler@umons.ac.be>
@ 2012-05-23 21:27   ` Mehdi Dogguy
       [not found]     ` <20120524.104708.916458905184337628.Christophe.Troestler@umons.ac.be>
  2012-05-24  8:10   ` [Caml-list] Tuareg-mode and pipes | Romain Bardou
  1 sibling, 1 reply; 9+ messages in thread
From: Mehdi Dogguy @ 2012-05-23 21:27 UTC (permalink / raw)
  To: Christophe TROESTLER; +Cc: OCaml Mailing List

On 23/05/12 22:51, Christophe TROESTLER wrote:
> I have commited a fix to the trunk.

Thanks for fixing this issue. Do you plan to make a new release
of tuareg?

Regards,

-- 
Mehdi Dogguy مهدي الدڤي

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Caml-list] Tuareg-mode and pipes |
       [not found] ` <20120523.225137.2235002212124282451.Christophe.Troestler@umons.ac.be>
  2012-05-23 21:27   ` [Caml-list] " Mehdi Dogguy
@ 2012-05-24  8:10   ` Romain Bardou
  1 sibling, 0 replies; 9+ messages in thread
From: Romain Bardou @ 2012-05-24  8:10 UTC (permalink / raw)
  To: caml-list

On 23/05/2012 22:51, Christophe TROESTLER wrote:
> On Wed, 23 May 2012 17:15:17 +0200, Romain Bardou wrote:
>>
>> Hi list,
>>
>> About two years ago, the following bug was reported:
>> https://forge.ocamlcore.org/tracker/index.php?func=detail&aid=659&group_id=43&atid=255
> 
> Thank you for drawing my attention to this regression ― you should
> have insisted earlier because the bug was closed and we did not notice
> it was a problem for so many people.

I can be very patient, it seems ;)

Thanks for the fix! Warning: I may come back in two years if this
doesn't work.

Cheers,

-- 
Romain Bardou

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Caml-list] Re: [Announce] New release of tuareg mode
       [not found]       ` <20120524.220613.1066733202670535323.Christophe.Troestler@umons.ac.be>
@ 2012-05-25  6:13         ` David House
  0 siblings, 0 replies; 9+ messages in thread
From: David House @ 2012-05-25  6:13 UTC (permalink / raw)
  To: Christophe TROESTLER; +Cc: OCaml Mailing List

I have C-; for a custom function called comment-current-line. It's
probably one of my most used custom functions.

I do use M-; to insert comments at the end of nonblank lines, albeit
rarely, so I would probably stick with my curernt solution.

On Thu, May 24, 2012 at 9:06 PM, Christophe TROESTLER
<Christophe.Troestler@umons.ac.be> wrote:
> Hi,
>
> By default, Emacs binds M-; to comment-dwim -- a powerful commenting
> macro.  However, to alleviate the absence of single line comment in
> OCaml, I am thinking to bind M-; in tuareg instead to the following
> variant:
>
>  (defun comment-dwim-line (&optional arg)
>     "Replacement for the comment-dwim command.
>  If no region is selected and current line is not blank and we are
>  not at the end of the line, then comment current line. Replaces
>  default behaviour of comment-dwim, when it inserts comment at the
>  end of the line."
>     (interactive "*P")
>     (comment-normalize-vars)
>     (if (and (not (region-active-p)) (not (looking-at "[ \t]*$")))
>         (comment-or-uncomment-region (line-beginning-position)
>                                    (line-end-position))
>       (comment-dwim arg)))
>
> (taken from http://www.emacswiki.org/emacs/CommentingCode) to easily
> toggle commenting single lines.
>
> I'd like to know your opinion.  Do you think (or not) it would be a
> useful default?
>
> Best,
> C.
>
> --
> Caml-list mailing list.  Subscription management and archives:
> https://sympa-roc.inria.fr/wws/info/caml-list
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs
>

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2012-05-25  6:13 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-23 15:15 [Caml-list] Tuareg-mode and pipes | Romain Bardou
2012-05-23 15:53 ` Eric Cooper
2012-05-23 15:55   ` Romain Bardou
2012-05-23 16:15     ` Eric Cooper
2012-05-23 17:16 ` [Caml-list] " Hongbo Zhang
2012-05-23 18:03   ` Thibault Suzanne
     [not found] ` <20120523.225137.2235002212124282451.Christophe.Troestler@umons.ac.be>
2012-05-23 21:27   ` [Caml-list] " Mehdi Dogguy
     [not found]     ` <20120524.104708.916458905184337628.Christophe.Troestler@umons.ac.be>
     [not found]       ` <20120524.220613.1066733202670535323.Christophe.Troestler@umons.ac.be>
2012-05-25  6:13         ` [Caml-list] Re: [Announce] New release of tuareg mode David House
2012-05-24  8:10   ` [Caml-list] Tuareg-mode and pipes | Romain Bardou

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).