From 4bae941b4450b3673f22ff7b23d7f8d8a5ac7a7b Mon Sep 17 00:00:00 2001 From: Daniel Borchmann Date: Sat, 25 Nov 2017 20:45:59 +0100 Subject: [PATCH] [Utils] Only show important document with prefix arg --- site-lisp/db-utils.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/site-lisp/db-utils.el b/site-lisp/db-utils.el index edaf057..9a2fe85 100644 --- a/site-lisp/db-utils.el +++ b/site-lisp/db-utils.el @@ -333,14 +333,15 @@ path." ("Find file" . find-file)))) "Helm source for important documents.") -(defun db/helm-shortcuts () +(defun db/helm-shortcuts (arg) "Open helm completion on common locations." - (interactive) + (interactive "p") (require 'helm-files) (require 'helm-bookmark) (helm :sources `(db/helm-source-frequently-used-features db/helm-source-frequently-visited-locations - ,(when (file-directory-p db/important-documents-path) + ,(when (and (= arg 4) + (file-directory-p db/important-documents-path)) 'db/helm-source-important-documents) helm-source-bookmarks helm-source-bookmark-set)))