X-Git-Url: https://www.fleuret.org/cgi-bin/gitweb/gitweb.cgi?p=elisp.git;a=blobdiff_plain;f=selector.el;h=bf9a8529970eee52a4f6b68e36bde64d551beed1;hp=a48ef7802d08f749e0a0784451e8cc6e545c8de9;hb=3435c1b2ecff7b6c318809b9f316a6b3e9ac4a02;hpb=6f9cb9511acc6e80bdce30e078b096008b9d7cf9 diff --git a/selector.el b/selector.el index a48ef78..bf9a852 100644 --- a/selector.el +++ b/selector.el @@ -335,7 +335,7 @@ There seems to be header-line refreshing problems with emacs21." (if (file-remote-p s) " " (propertize - (format-time-string "%a %b %e" (elt (file-attributes s) 5)) + (format-time-string "%b %a %e" (elt (file-attributes s) 5)) 'face 'selector/date)) ;; " -- " @@ -347,12 +347,33 @@ There seems to be header-line refreshing problems with emacs21." (substring s 0 (match-end 0)) 'face 'selector/dim) (substring s (match-end 0))) s) + + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + ;; (if (and (boundp 'selector/previous-filename) selector/previous-filename) + ;; (let ((l (abs (compare-strings + ;; selector/previous-filename nil nil + ;; filename nil nil)))) + ;; ;; (if (> l 0) (setq l + ;; (setq selector/previous-filename filename) + ;; (concat (propertize + ;; (substring s 0 l) 'face 'selector/dim) + ;; (substring s l)) + ;; ) + ;; filename + ;; ) + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + ) ) (defun selector/find-file (filename) (if selector/add-to-file-name-history - (add-to-list 'file-name-history filename t)) + (add-to-history 'file-name-history + (replace-regexp-in-string + abbreviated-home-dir "~/" filename) + ) + ) + (find-file filename)) (defun selector/pick-file (filename) @@ -378,6 +399,8 @@ prefix argument, allows to edit the filename after selection." (unless (and (boundp recentf-mode) recentf-mode) (error "recentf mode must be turned on")) + ;; (setq selector/previous-filename "") + (selector/select (mapcar