   (setq buffer-read-only t)
 
   (interactive "p")
+
+;  (message file-table)
   (use-local-map rc-menu-mode-map))
 
 (create-file-selection-form (find-files-and-directories dir-inbox))
 
+(defun get-file-at-line (line)
+  (car (cdr (assoc line file-table))))
 
-

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


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

(defun rc-menu-entry ()
  "Select this line's buffer in this window."
  (interactive)
  (setq filename-to-insert (current-menu-entry))
  (message filename-to-insert)
  (switch-to-buffer (other-buffer))
  (insert-org-image filename-to-insert))


(defun current-menu-entry ()
  "Return buffer described by this line of buffer menu."
  (get-file-at-line (line-number-at-pos)))


;; simply prints a list
(defun print-elements-of-list (list)
