caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] How to use emacs tuareg mode effectively to manage an OCaml project?
@ 2014-09-02 20:05 Xinuo Chen
  2014-09-02 20:20 ` Mads Jensen
                   ` (5 more replies)
  0 siblings, 6 replies; 8+ messages in thread
From: Xinuo Chen @ 2014-09-02 20:05 UTC (permalink / raw)
  To: caml-list

[-- Attachment #1: Type: text/plain, Size: 674 bytes --]

Hi all

I am using OCaml for a project with 20 - 50 files inside. Also I am using emacs
+ tuareg.

Syntax highlight is well done by tuareg and generally it is good using
emacs for one file editing.

However, for the project files, I need to frequently switch between files
together with folders, how can i use emacs as also a project manager such
as eclipse? How can I have a file / project tree there just like Eclipse
does?

Also how do people manage a huge bunch of files (just like core library or
batteries-included) effectively? It seems emacs is good for single file or
simple project editing, but not good at managing a complex project.

thanks
Best Regards,

Xinuo

[-- Attachment #2: Type: text/html, Size: 2494 bytes --]

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

* Re: [Caml-list] How to use emacs tuareg mode effectively to manage an OCaml project?
  2014-09-02 20:05 [Caml-list] How to use emacs tuareg mode effectively to manage an OCaml project? Xinuo Chen
@ 2014-09-02 20:20 ` Mads Jensen
  2014-09-02 20:22 ` Lars Nilsson
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 8+ messages in thread
From: Mads Jensen @ 2014-09-02 20:20 UTC (permalink / raw)
  To: Xinuo Chen; +Cc: caml-list

[-- Attachment #1: Type: text/plain, Size: 1197 bytes --]

Hi Xinuo,

I use projectile (https://github.com/bbatsov/projectile) to navigate large
projects. It isn't OCaml specific but it works really well IMO.

This post contains lots of good tips when using Emacs for OCaml
programming: http://chaudhuri.info/misc/osetup/

You definitely also want to checkout UTop and get comfortable using it from
Emacs: https://github.com/diml/utop

Best of luck,
Mads



On Tue, Sep 2, 2014 at 10:05 PM, Xinuo Chen <iamindcs@gmail.com> wrote:

> Hi all
>
> I am using OCaml for a project with 20 - 50 files inside. Also I am using emacs
> + tuareg.
>
> Syntax highlight is well done by tuareg and generally it is good using
> emacs for one file editing.
>
> However, for the project files, I need to frequently switch between files
> together with folders, how can i use emacs as also a project manager such
> as eclipse? How can I have a file / project tree there just like Eclipse
> does?
>
> Also how do people manage a huge bunch of files (just like core library or
> batteries-included) effectively? It seems emacs is good for single file or
> simple project editing, but not good at managing a complex project.
>
> thanks
> Best Regards,
>
> Xinuo
>



-- 
/Mads

[-- Attachment #2: Type: text/html, Size: 3620 bytes --]

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

* Re: [Caml-list] How to use emacs tuareg mode effectively to manage an OCaml project?
  2014-09-02 20:05 [Caml-list] How to use emacs tuareg mode effectively to manage an OCaml project? Xinuo Chen
  2014-09-02 20:20 ` Mads Jensen
@ 2014-09-02 20:22 ` Lars Nilsson
  2014-09-02 20:27 ` Benjamin Greenman
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 8+ messages in thread
From: Lars Nilsson @ 2014-09-02 20:22 UTC (permalink / raw)
  To: Xinuo Chen; +Cc: OCaml

On Tue, Sep 2, 2014 at 4:05 PM, Xinuo Chen <iamindcs@gmail.com> wrote:
> However, for the project files, I need to frequently switch between files
> together with folders, how can i use emacs as also a project manager such as
> eclipse? How can I have a file / project tree there just like Eclipse does?
>
> Also how do people manage a huge bunch of files (just like core library or
> batteries-included) effectively? It seems emacs is good for single file or
> simple project editing, but not good at managing a complex project.

You could give the dirtree mode a try.

http://melpa.milkbox.net/#/dirtree
http://www.emacswiki.org/emacs/dirtree.el
http://stackoverflow.com/questions/9546562/emacs-dirtree-directory-tree-view-setup

M-x dirtree and accept current directory or enter another directory
and you are present with a left-hand pane containing a directory tree
that you can navigate and press enter to select a file for
viewing/editing.

Lars Nilsson

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

* Re: [Caml-list] How to use emacs tuareg mode effectively to manage an OCaml project?
  2014-09-02 20:05 [Caml-list] How to use emacs tuareg mode effectively to manage an OCaml project? Xinuo Chen
  2014-09-02 20:20 ` Mads Jensen
  2014-09-02 20:22 ` Lars Nilsson
@ 2014-09-02 20:27 ` Benjamin Greenman
  2014-09-02 21:48   ` Richard W.M. Jones
  2014-09-03  7:28 ` Denis Berthod
                   ` (2 subsequent siblings)
  5 siblings, 1 reply; 8+ messages in thread
From: Benjamin Greenman @ 2014-09-02 20:27 UTC (permalink / raw)
  To: Xinuo Chen; +Cc: OCaml mailing-list

[-- Attachment #1: Type: text/plain, Size: 1016 bytes --]

I've always enjoyed the tab completion emacs provides when searching for
files. It feels like a working tree generated on demand. Also, I've found
that buffers scale much nicer to many files than tabs. Free yourself from
the GUI!


On Tue, Sep 2, 2014 at 4:05 PM, Xinuo Chen <iamindcs@gmail.com> wrote:

> Hi all
>
> I am using OCaml for a project with 20 - 50 files inside. Also I am using emacs
> + tuareg.
>
> Syntax highlight is well done by tuareg and generally it is good using
> emacs for one file editing.
>
> However, for the project files, I need to frequently switch between files
> together with folders, how can i use emacs as also a project manager such
> as eclipse? How can I have a file / project tree there just like Eclipse
> does?
>
> Also how do people manage a huge bunch of files (just like core library or
> batteries-included) effectively? It seems emacs is good for single file or
> simple project editing, but not good at managing a complex project.
>
> thanks
> Best Regards,
>
> Xinuo
>

[-- Attachment #2: Type: text/html, Size: 3158 bytes --]

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

* Re: [Caml-list] How to use emacs tuareg mode effectively to manage an OCaml project?
  2014-09-02 20:27 ` Benjamin Greenman
@ 2014-09-02 21:48   ` Richard W.M. Jones
  0 siblings, 0 replies; 8+ messages in thread
From: Richard W.M. Jones @ 2014-09-02 21:48 UTC (permalink / raw)
  To: Benjamin Greenman; +Cc: Xinuo Chen, OCaml mailing-list

On Tue, Sep 02, 2014 at 04:27:08PM -0400, Benjamin Greenman wrote:
> I've always enjoyed the tab completion emacs provides when searching for
> files. It feels like a working tree generated on demand. Also, I've found
> that buffers scale much nicer to many files than tabs. Free yourself from
> the GUI!

Indeed:

  $ cd libguestfs
  $ find -name '*.ml' -o -name '*.mli' | wc -l
  206

I guess we're doing OK using just emacs (except for 1 person using
that "visual" editor that shall not be named).

I'm interested in the particular problems that the OP has with
navigating through a small collection of files.

Rich.

-- 
Richard Jones
Red Hat

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

* Re: [Caml-list] How to use emacs tuareg mode effectively to manage an OCaml project?
  2014-09-02 20:05 [Caml-list] How to use emacs tuareg mode effectively to manage an OCaml project? Xinuo Chen
                   ` (2 preceding siblings ...)
  2014-09-02 20:27 ` Benjamin Greenman
@ 2014-09-03  7:28 ` Denis Berthod
  2014-09-03  7:40 ` Louis Gesbert
  2014-09-03  7:51 ` Francois BERENGER
  5 siblings, 0 replies; 8+ messages in thread
From: Denis Berthod @ 2014-09-03  7:28 UTC (permalink / raw)
  To: caml-list

Hi,

I daily use emacs with dozens of buffers.
I use the Iswitchb emacs mode. This mode is included into emacs but may 
be not on by default.
To enable it add

  '(iswitchb-mode t nil (iswitchb))

to your custom-set-variables in your .emacs file
or use the customization group gui : convenience > Iswitchb.

CTRL-x b displays the list of buffers in the mini-buffer (sorted by the 
last access time).
CTRL-s to select next buffer
CTRL-r to select previous buffer
Type a string to reduce the buffer list, typically 2 or 3 char are 
sufficient.

I find it much fast to navigate than tabs or menus.

Regards,

Denis Berthod

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

* Re: [Caml-list] How to use emacs tuareg mode effectively to manage an OCaml project?
  2014-09-02 20:05 [Caml-list] How to use emacs tuareg mode effectively to manage an OCaml project? Xinuo Chen
                   ` (3 preceding siblings ...)
  2014-09-03  7:28 ` Denis Berthod
@ 2014-09-03  7:40 ` Louis Gesbert
  2014-09-03  7:51 ` Francois BERENGER
  5 siblings, 0 replies; 8+ messages in thread
From: Louis Gesbert @ 2014-09-03  7:40 UTC (permalink / raw)
  To: caml-list

[-- Attachment #1: Type: text/plain, Size: 1287 bytes --]

Slightly different from what you ask for, but there are several ways to
jump-to-definition and find-uses for identifiers, which helps get around
large project a lot.

Others may point to different options, but ocp-index [1] is very efficient for that (`C-c ;` to jump to definition, `C-c /` to find uses) ; you just need to enable -bin-annot in your build system and it should work out-of-the box.

[1] http://www.typerex.org/ocp-index.html (disclaimer: I am the author !)

Le mardi 2 septembre 2014, 21:05:09 Xinuo Chen a écrit :
> Hi all
> 
> I am using OCaml for a project with 20 - 50 files inside. Also I am using emacs
> + tuareg.
> 
> Syntax highlight is well done by tuareg and generally it is good using
> emacs for one file editing.
> 
> However, for the project files, I need to frequently switch between files
> together with folders, how can i use emacs as also a project manager such
> as eclipse? How can I have a file / project tree there just like Eclipse
> does?
> 
> Also how do people manage a huge bunch of files (just like core library or
> batteries-included) effectively? It seems emacs is good for single file or
> simple project editing, but not good at managing a complex project.
> 
> thanks
> Best Regards,
> 
> Xinuo
> 
> 


[-- Attachment #2: Type: text/html, Size: 6389 bytes --]

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

* Re: [Caml-list] How to use emacs tuareg mode effectively to manage an OCaml project?
  2014-09-02 20:05 [Caml-list] How to use emacs tuareg mode effectively to manage an OCaml project? Xinuo Chen
                   ` (4 preceding siblings ...)
  2014-09-03  7:40 ` Louis Gesbert
@ 2014-09-03  7:51 ` Francois BERENGER
  5 siblings, 0 replies; 8+ messages in thread
From: Francois BERENGER @ 2014-09-03  7:51 UTC (permalink / raw)
  To: caml-list

On 09/02/2014 10:05 PM, Xinuo Chen wrote:
> Hi all
>
> I am using OCaml for a project with 20 - 50 files inside. Also I am
> using |emacs + tuareg|.
>
> Syntax highlight is well done by tuareg and generally it is good using
> emacs for one file editing.
>
> However, for the project files, I need to frequently switch between
> files together with folders, how can i use emacs as also a project
> manager such as eclipse? How can I have a file / project tree there just
> like Eclipse does?

M-x speedbar

> Also how do people manage a huge bunch of files (just like core library
> or batteries-included) effectively? It seems emacs is good for single
> file or simple project editing, but not good at managing a complex project.

I read Linus Torvalds writing emacs is his preferred editor.
I also read that he is working on a pretty complex project. ;)

> thanks
>
> Best Regards,
>
> Xinuo

-- 
Regards,
Francois.

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

end of thread, other threads:[~2014-09-03  7:51 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-02 20:05 [Caml-list] How to use emacs tuareg mode effectively to manage an OCaml project? Xinuo Chen
2014-09-02 20:20 ` Mads Jensen
2014-09-02 20:22 ` Lars Nilsson
2014-09-02 20:27 ` Benjamin Greenman
2014-09-02 21:48   ` Richard W.M. Jones
2014-09-03  7:28 ` Denis Berthod
2014-09-03  7:40 ` Louis Gesbert
2014-09-03  7:51 ` Francois BERENGER

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