Generalize `db/frequently-used-features' to also include shortcuts
This commit is contained in:
parent
20cc9f34bb
commit
a9695b9d1a
31
init.el
31
init.el
|
@ -643,20 +643,22 @@
|
||||||
;; * Start Menu via Helm
|
;; * Start Menu via Helm
|
||||||
|
|
||||||
(defcustom db/frequently-used-features
|
(defcustom db/frequently-used-features
|
||||||
'(("Mail" . db/gnus)
|
'(("Mail" ?m db/gnus)
|
||||||
("Agenda" . db/org-agenda)
|
("Agenda" ?a db/org-agenda)
|
||||||
("Init File" . db/find-user-init-file)
|
("Init File" ?i db/find-user-init-file)
|
||||||
("EMMS" . emms)
|
("EMMS" ?M emms)
|
||||||
("Shell" . shell)
|
("Shell" ?s db/run-or-hide-shell)
|
||||||
("EShell" . eshell)
|
("EShell" ?e db/run-or-hide-eshell)
|
||||||
("scratch" . db/scratch)
|
("scratch" ?r db/scratch)
|
||||||
("Info Lookup" . counsel-info-lookup-symbol)
|
("Info Lookup" ?I counsel-info-lookup-symbol)
|
||||||
("Unicode Lookup" . counsel-unicode-char))
|
("Unicode Lookup" ?U counsel-unicode-char))
|
||||||
"Mapping of frequently used features to functions implementing
|
"Mapping of frequently used features to functions implementing
|
||||||
them. Can be used in application shortcuts such as
|
them. Can be used in application shortcuts such as
|
||||||
`db/helm-shortcuts’."
|
`db/helm-shortcuts’. Each entry is a list of three items: a
|
||||||
|
short description, a shortcut character, and the function to
|
||||||
|
call."
|
||||||
:group 'personal-settings
|
:group 'personal-settings
|
||||||
:type '(alist :key-type string :value-type sexp))
|
:type '(repeat (list string character function)))
|
||||||
|
|
||||||
(defcustom db/important-documents-path "~/Documents/library/"
|
(defcustom db/important-documents-path "~/Documents/library/"
|
||||||
"Path to look for documents that can be listed in extended
|
"Path to look for documents that can be listed in extended
|
||||||
|
@ -671,8 +673,11 @@ With given ARG, display files in `db/important-document-path’."
|
||||||
(require 'helm-bookmark)
|
(require 'helm-bookmark)
|
||||||
(helm :sources (list
|
(helm :sources (list
|
||||||
(helm-make-source "Frequently Used" 'helm-source-sync
|
(helm-make-source "Frequently Used" 'helm-source-sync
|
||||||
:candidates #'db/frequently-used-features
|
:candidates (mapcar #'(lambda (entry)
|
||||||
:action '(("Open" . funcall))
|
(cons (car entry)
|
||||||
|
(caddr entry)))
|
||||||
|
db/frequently-used-features)
|
||||||
|
:action '(("Open" . call-interactively))
|
||||||
:filtered-candidate-transformer #'helm-adaptive-sort)
|
:filtered-candidate-transformer #'helm-adaptive-sort)
|
||||||
|
|
||||||
;; if prefix arg is given, extrac files from
|
;; if prefix arg is given, extrac files from
|
||||||
|
|
Loading…
Reference in New Issue