Hi all,

Masatake YAMATO contacted me because there is some code in my
mst-arch.el[1] for importing new projects.  This is pretty much just a
wrapper around dired, because that's what was handy when I wrote it :o)

I'm not all that familiar with the internals of xtla.el, but it seems
that tla-inventory might be a better choice than using dired.  I've
modified my original code a bit, and have come up with:


(defun tla-start-project ()
  (interactive)
  (let ((base (read-file-name "Directory containing files to import: "
                              (if (buffer-file-name)
                                  (file-name-directory (buffer-file-name))
                                (getenv "HOME"))))
        (archive (car (tla-read-archive-name)))
        (project (read-from-minibuffer "Project name (eg hello--dev--1.0): ")))
    (cd base)
    (unless (zerop (tla-run-arch nil t 'init-tree "init-tree"
                                 "-A" archive project))
      (error "There was a problem initialising %s/%s"
             archive project))
    (tla-run-arch nil t 'import "import" "--setup")
    (tla-inventory base t)))


This seems to work quite well.. does anyone have any suggestions for
improvement?

Cheers,

Mark


[1]  http://dishevelled.net/elisp/mst-arch.el

-- 
Mark Triggs
<[EMAIL PROTECTED]>

Reply via email to