[Haskell-cafe] Re: dirs in Emacs/Vim in Cabal
Nils Anders Danielsson
nad at Cs.Nott.AC.UK
Thu Jul 1 09:37:30 EDT 2010
On 2010-06-30 18:38, Chris BROWN wrote:
> My question is:
> Is it possible to allow the emacs/vim scripts that I have know where
> this directory is automatically?
Maybe you could adapt the approach taken by Agda. Agda's Emacs mode is
installed using Cabal plus a small script:
1) The Emacs Lisp sources are installed as data files, using Cabal.
2) A small program called agda-mode is compiled and installed, using
3) If the user runs "agda-mode setup", then the following code is copied
into the user's .emacs (unless it is already there):
(load-file (let ((coding-system-for-read 'utf-8))
(shell-command-to-string "agda-mode locate")))
The .emacs file is found by querying Emacs.
4) The command "agda-mode locate" prints out the path to a file which
sets up the Agda mode (using the Paths_<package name> module).
Note that if a newer version of Agda is installed, then Emacs will
(after being restarted) automatically make use of the new version of
the Agda mode.
The source of agda-mode can be found in Agda's darcs repository:
More information about the Haskell-Cafe