 (require 'cl)
 (require 'anything)
 
-(defvar hateda-exec-path "~/bin/hateda")
+(defvar hateda-executable "~/bin/hateda")
 (defvar hateda-draft-dir "~/hateda/")
 (defvar hateda-draft-entry-regexp "Draft id: \\([1-9][0-9]*\\)  title: \\(.*\\)  date: \\([0-9]+\\)")
 (defstruct hateda-draft-entry

    (hateda-draft-rm (hateda-draft-entry-id entry))))

(defun hateda-draft-rm (id)
  (shell-command (hateda-mkString `(,hateda-exec-path "draft" "rm" ,id) " ")))

(defun anything-hateda-draft-entries-get-candidates ()
  (message "Wait a moment....")

    (mkdir hateda-draft-dir))
  (with-current-buffer (find-file (hateda-draft-make-file-name id title))
    (erase-buffer)
    (shell-command (hateda-mkString `(,hateda-executable "draft" "get" ,id) " ") (current-buffer))))

(defun anything-hateda-draft-open-file (description)
  (message "Wait a moment....")
