   (elt tag 2))
 
 (defun mural-open-dwim ()
+  "Interactively search for a tag in the current repository and
+open it in a new buffer"
   (interactive)
   (let ((taginfo (mural-read-tag (buffer-file-name))))
     (find-file (mural-tag-filename taginfo))

      )))

(defun mural-query-save-tag (query)
  (let ((qresult (mural-query query mural-current-tagfile)))
    (setq mural-last-query-result qresult)
    (mapcar 'mural-tag-tagname qresult)))

;;(mural-parse-response "MATCH foo bar 1\nMATCH hi bye 2\nDONE hi hi")
;; returns '((tag file row) ...)
(defun mural-parse-response (tagfile results)
  (delq nil
        (mapcar
         (lambda (x)
           ;; spaces in the filename?  tough.
           (let ((row (split-string x "\t")))
             (if (equal (elt row 0) "MATCH")
                 ;; MATCH tag filename row

         (split-string results "\n"))))

(defun mural-response-complete (result)
  "Returns t if RESULT is a complete response from the server"
  (integerp (string-match "^DONE" result)))

(defun mural-read-tag (file-base)
