 (defvar olm-folder-id nil)
 (defvar olm-default-bcc nil)
 (defvar olm-attachment-path nil)
+(defvar olm-ruby-executable "ruby")
 
 (defun olm
   ()


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;; gereral helper functions
;;; 
(defun olm-do-command
  (command &optional buf)
  (let ((buf (or buf (get-buffer-create "*Messages*"))))
    (call-process "ruby" nil buf nil
                  "-r" "rubygems" "-r" "olm" "-e" command)))

(defun olm-sync

  ()
  (interactive)
  (let ((entry-id (olm-message-entry-id)))
    (message (format "Olm: saving attachments into %S ..."
                     olm-attachment-path))
    (olm-do-command (format "Olm.save_attachments(%S, %S)"
                            entry-id
