[Nix-dev] How to develop with chicken and emacs

Eike eike at eknet.org
Tue Apr 21 14:04:19 CEST 2015


Ertugrul Söylemez <ertesx at gmx.de> writes:

>>> The way I do this is to fire up a Makefile from Emacs.  The Makefile
>>> uses nix-shell to start the actual builder:
>>>
>>>     nix-shell --pure --command "./Setup build"
>>>
>>> This is an indirection, but it makes sure that the environment the
>>> builder sees is (fairly close to) the environment the build script
>>> would see when you use nix-build.  And indeed, you can actually use
>>> nix-build as well, although you probably don't want to, because it
>>> rebuilds the whole thing all the time.
>>
>> That's a good tip! I will start with this. But it still wouldn't allow
>> me to use the interactive features of emacs, if I understand
>> correctly?  It would be great to evaluate expressions inside emacs
>> without building the whole app.
>
> Well, you can invoke nix-shell instead of the regular shell from within
> Emacs.  Getting an inferior mode or any other tighter integration to
> work, if there is one, could be more difficult.  One thing you can do is
> to make Emacs part of a project-specific development environment using
> myEnvFun.  The wiki should help you with this.  Alternatively many
> integration modes allow you to specify the command used for invoking the
> helper programs.

You're right, an email from Moritz Ulrich taught me about the same thing
(setting 'scheme-program-name'). That is quite obvious, sometimes it
seems I can't think to the next step.

Thanks again!

Regards,
Eike


More information about the nix-dev mailing list