           (setq edit-mode (enutil-aget 'edit-mode attr))))
     (setq attr
           (enh-command-update-note inbuf guid name tag-names edit-mode))
-    (enh-update-note-attr attr)))
+    (enh-update-note-and-new-tag-attrs attr)))
 
 
 (defun enh-base-read-note-attr (note-attrs &optional display-completion)

(defun evernote-browser ()
  "Open an evernote browser"
  (interactive)
  (let ((buf (get-buffer evernote-browsing-mode-buffer-name)))
    (if buf
        (enutil-move-cursor-to-window buf)
      (switch-to-buffer (generate-new-buffer evernote-browsing-mode-buffer-name))
      (evernote-browsing-mode)
      (evernote-browsing-list-tags))))


(defun evernote-browsing-list-tags ()
  "List tags"
  (interactive)
  (when (eq major-mode 'evernote-browsing-mode)
    (enh-command-with-auth
     (enh-init-tag-info)
     (enh-browsing-push-page
      (enh-browsing-create-page 'tag-list "All Tags")))))


(defun evernote-browsing-list-searches ()
  "List saved searches"
  (interactive)
  (when (eq major-mode 'evernote-browsing-mode)
    (enh-command-with-auth
     (enh-init-search-info)
     (enh-browsing-push-page
      (enh-browsing-create-page 'search-list "All Saved Searches")))))


(defun evernote-browsing-search-notes ()
  "Search notes"
  (interactive)
  (when (eq major-mode 'evernote-browsing-mode)
    (let (note-attrs (query (read-string "Query:")))
      (enh-command-with-auth
       (setq note-attrs
             (enh-command-get-note-attrs-from-query query))
       (enh-set-note-attrs note-attrs)
       (enh-browsing-push-page
        (enh-browsing-create-page 'note-list
                                  (format "Query Result of: %s" query)
                                  note-attrs))))))


(defun evernote-browsing-prev-page ()
  "Move to the prev page"
  (interactive)
  (when (eq major-mode 'evernote-browsing-mode)
    (let ((prev-page (enh-browsing-get-prev-page)))
      (if prev-page
          (progn
            (setq enh-browsing-current-page prev-page)
            (enh-browsing-redraw-current-page))
        (message "[No more previous page]")))))



          (enh-command-get-note-attrs-from-tag-guids
           (enh-read-tag-guids
            "Tags used for search (comma separated form. default search all tags):"))))
     (enh-set-note-attrs note-attrs)
     (enh-base-open-note-common (enh-base-read-note-attr note-attrs)))))


