 Blue ==> regular file with maybe a region saved.
 RedOnWhite ==> Directory."
   (loop for i in bookmarks
-     for pred = (bookmark-get-filename i)
-     for bufp = (and (fboundp 'bookmarkp-get-buffer-name)
-                     (bookmarkp-get-buffer-name i))
-     for regp = (and (fboundp 'bookmarkp-get-end-position)
-                     (bookmarkp-get-end-position i)
-                     (/= (bookmark-get-position i)
-                         (bookmarkp-get-end-position i)))
-     for handlerp = (and (fboundp 'bookmark-get-handler)
-                         (bookmark-get-handler i))
+     for pred      = (bookmark-get-filename i)
+     for bufp      = (and (fboundp 'bookmarkp-get-buffer-name)
+                          (bookmarkp-get-buffer-name i))
+     for regp      = (and (fboundp 'bookmarkp-get-end-position)
+                          (bookmarkp-get-end-position i)
+                          (/= (bookmark-get-position i)
+                              (bookmarkp-get-end-position i)))
+     for handlerp  = (and (fboundp 'bookmark-get-handler)
+                          (bookmark-get-handler i))
+     for isannotation  = (bookmark-get-annotation i)       
+     if (and isannotation (not (string-equal isannotation "")))
+     do (setq i (concat "*" i))
      ;; info buffers
      if (and (fboundp 'bookmarkp-get-buffer-name)
              (eq handlerp 'Info-bookmark-jump)

  (defun anything-c-bookmark-su-files-setup-alist ()
    "Specialized filter function for bookmark+ su/sudo files."
    (loop
       with l = (anything-c-bookmark+-filter-setup-alist 'bookmarkp-remote-alist-only)
       for i in l
       for isfile = (bookmark-get-filename i)
       for istramp = (and isfile (boundp 'tramp-file-name-regexp)

        (ediff-merge-buffers buf1 buf2)
        (ediff-buffers buf1 buf2))))

(defun anything-bookmark-get-bookmark-from-name (bmk)
  "Return bookmark name even if it is a bookmark with annotation.
e.g prepended with *.
Return nil if bmk is not a valid bookmark."
  (let ((bookmark (replace-regexp-in-string "\*" "" bmk)))
    (if (assoc bookmark bookmark-alist)
        bookmark
        (when (assoc bmk bookmark-alist)
          bmk))))

(defun anything-delete-marked-bookmarks (elm)
  "Delete this bookmark or all marked bookmarks."
  (let ((bookmark (anything-bookmark-get-bookmark-from-name elm)))
    (anything-aif anything-c-marked-candidate-list
        (dolist (i it)
          (let ((bmk (anything-bookmark-get-bookmark-from-name i)))
            (bookmark-delete bmk 'batch)))
      (bookmark-delete bookmark 'batch))))

(defun anything-bookmark-active-region-maybe (candidate)
  "Active saved region if this bookmark have one."
  (let ((bookmark (anything-bookmark-get-bookmark-from-name candidate)))
    (condition-case nil
        (when (and (boundp bookmarkp-use-region-flag)
                   bookmarkp-use-region-flag)
          (let ((bmk-name (or (bookmarkp-get-buffer-name bookmark)
                              (file-name-nondirectory
                               (bookmark-get-filename bookmark)))))
            (when bmk-name
              (with-current-buffer bmk-name
                (setq deactivate-mark nil)))))
      (error nil))))


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Setup ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
