   (while files-and-dirs
     (setq cur-entry (car files-and-dirs))
     (message (cdr (assoc 'dir cur-entry)))
-    (setq cur-dirname (assoc 'dir cur-entry))
+    (setq cur-dirname (cdr (assoc 'dir cur-entry)))
     (setq cur-files (cdr (assoc 'file cur-entry)))
 
-    (insert (cdr (assoc 'dir cur-entry)))
+    (insert cur-dirname)
     (insert "\n")
     (insert (make-string 20 ?-))
     (insert "\n")

  (switch-to-buffer "*Inbox Selection*")
  (kill-all-local-variables)
  (setq buffer-read-only nil)
  (let ((inhibit-read-only t))
    (erase-buffer))
  (remove-overlays)

(define-key rc-menu-mode-map "\C-m" 'rc-menu-entry)


(defun insert-org-image (filename)
  (insert (concat "#+CAPTION: " filename "\n"))
  (insert (concat "[[" filename "]]\n")))


(defun rc-menu-quit ()
  "Quit the menu."
  (interactive)
