Show path in helm-recentf

36 views
Skip to first unread message

Michael Abrahams

unread,
Jun 11, 2015, 9:57:53 AM6/11/15
to emacs...@googlegroups.com
I would like to extend helm-recentf (and helm-locate, and helm-projectile) to display files with a nice formatted output like helm-buffer, with a shortened file path on the right hand side aligned in a column. It seems like I want to use something like :filtered-candidate-transformer but the source is not easy to read. How should I go about doing this? 


Thierry Volpiatto

unread,
Jun 12, 2015, 8:49:40 AM6/12/15
to emacs...@googlegroups.com
Look at the class helm-recentf-source and modify the filter-one-by-one
function as needed:

Actually it is:

(lambda (c)
(if (and helm-ff-transformer-show-only-basename
(not (consp c)))
(cons (helm-basename c) c)
c))

1) Create your function:

(defun my-recentf-one-by-one-filter (candidate)
<... Modify CANDIDATE as needed => (DISPLAY . REAL)...>)

Where DISPLAY is the part you will see in helm-buffer and REAL the part
(not fancy) that will be used for action functions.

2) Create your source:

(helm-make-source "Recentf" 'helm-recentf-source
:fuzzy-match helm-recentf-fuzzy-match
:filter-one-by-one #'my-recentf-one-by-one-filter)

Thats all.

Hope that help.

--
Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997
Reply all
Reply to author
Forward
0 new messages