 
 (provide 'evernote-mode)
 
-;;(setq debug-on-error nil)
-
+;;(setq debug-on-error t)
+


(defvar evernote-mode-map (make-sparse-keymap)
  "Keymap used in evernote mode.")

(define-key evernote-mode-map "\C-x\C-s" 'evernote-save-note)
(define-key evernote-mode-map "\C-cet"   'evernote-edit-tags)
(define-key evernote-mode-map "\C-cee"   'evernote-change-edit-mode)
(define-key evernote-mode-map "\C-cer"   'evernote-rename-note)
(define-key evernote-mode-map "\C-ced"   'evernote-delete-note)

(defvar evernote-minibuffer-read-note-name-map
  (copy-keymap minibuffer-local-completion-map))

(define-key evernote-minibuffer-read-note-name-map [tab] 'evernote-minibuffer-note-completion)
(define-key evernote-minibuffer-read-note-name-map "\C-i" 'evernote-minibuffer-note-completion)
(define-key evernote-minibuffer-read-note-name-map "\C-m" 'evernote-minibuffer-note-input-finish)


(defvar evernote-search-mode-map (copy-keymap global-map)
  "Keymap used in evernote search mode.")
(define-key evernote-search-mode-map "\C-m" 'evernote-select-note-in-search-mode)

(defvar evernote-search-mode-displayed-name-and-name-map nil
  "Formatted name list variable used only in evernote-search-mode buffer")
(make-variable-buffer-local 'evernote-search-mode-displayed-name-and-name-map)


;;(defvar evernote-browsing-mode-map (copy-keymap global-map)
;;  "Keymap used in evernote browsing mode.")
;;(define-key evernote-browsing-mode-map "l" 'evernote-command-login)
;;(define-key evernote-browsing-mode-map "t" 'evernote-command-listtags)
;;(define-key evernote-browsing-mode-map "\C-m" 'evernote-open-guid)

(defconst evernote-client-buffer-name "*Evernote*")
(defconst evernote-client-output-buffer-name "*Evernote-Client-Output*")

(defconst evernote-error-ok                  0)
(defconst evernote-error-fail                100)
(defconst evernote-error-parse               101)

;;      (require 'evernote-mode)
;;      (global-set-key "\C-cec" 'evernote-create-note)
;;      (global-set-key "\C-ceo" 'evernote-open-note)
;;      (global-set-key "\C-ces" 'evernote-search-notes)
;;      (global-set-key "\C-ceS" 'evernote-do-saved-search)
;;      (global-set-key "\C-cew" 'evernote-write-note)
;;
;; There is one hooks, evernotes-mode-hook.
