Matthieu Moy <[EMAIL PROTECTED]> writes:

> Hi all, (Xtla, and bzr mailing list in Cc -- for those who didn't
> follow, Xtla is the Emacs interface to Baz 1.x, and we started
> extending it to support mercurial and bzr in a more general framework
> that we currently call DVC)
>
> I've just discovered Pymacs (thank you Lalo). It's a way to make
> python and Emacs communicate together.
>
>   http://pymacs.progiciels-bpi.ca/
>
> This would in particular allow using bzr (and probably mercurial) as a
> Python library instead of a standalone process.
>
> This means: No need to parse the output, we can get the data-structure
> directly. If something is not right in the bzr interface, we can use
> lower-level functions in the API, without modifying bzr (to make M-x
> baz-revisions RET efficient, I had to modify baz itself -- that's why
> baz 1.5 makes Xtla faster).
>
> That's also interesting for the bzr team, since that would provide a
> use-case of bzr as a library (I suppose bzr is currently more tested
> as a standalone executable than as a library).
>
> The drawback is, it adds one dependancy to DVC: pymacs. Pymacs made of
> some .el files, and needs a python interpreter (off course), but bzr
> needs one anyway. This is a problem for people installing DVC
> manually, and for a future integration of DVC in GNU Emacs, unless
> pymacs is planned to be integrated in mainline.
>
> Perhaps some code could be factored between mercurial and bzr support,
> so we'd have:
>
> +-------------+                      +--------+
> | bzr support |                      | pymacs |
> +-------------+`-,+------------+  ,-'+--------+
>                   | DVC-python |-<
> +-------------+,-'+------------+  `-,+----------+
> | hg support  |                      | DVC core |
> +-------------+                      +----------+
>
> Lalo's advice is to use Pymacs. I think I'd also like to at least try
> it. What do other people think?

I already have some experiences with Pymacs. It is a nice way to make
the python standard library and any other library available for emacs.

To talk about the mentioned drawback: the dependency on pymacs:
* pymacs is already in ubuntu and in debian (my used distros)
* Is it already available for other distros too?

I suggest to use the pymacs interface additionally to the regular command line 
parsing:
* That has the advantage that we don't need pymacs
* Many functions don't need the extra speed (if we gain some speed by that 
mechanism)
* We need the commandline parsing anyway for the other interfaces
* The presentation layers need some elisp data structures.
  It does not matter if the data structures are created via the pymacs interface
  or via command line parsing.
* The big plus when using pymacs is, that we don't need the parsing of the
  text output. Instead we get the data directly available as elisp data 
structures.

So I think we can start with the interface that is more fun/easier to implement.
We can add the pymacs or non-pymacs support later.

As I don't have very much time for hacking open source software at the moment 
I'll try to
track the things that happen on the dvc front.


Stefan.

Reply via email to