[Utils] Make main custom variables for ‘db/helm-shortcuts’ Helm-agnostic
This commit is contained in:
parent
be8d5a3f0f
commit
6d5976a00a
20
init.el
20
init.el
|
@ -511,6 +511,26 @@
|
|||
|
||||
(use-package dash)
|
||||
|
||||
(defcustom db/frequently-used-features
|
||||
'(("Mail" . db/gnus)
|
||||
("Agenda" . db/org-agenda)
|
||||
("Init File" . db/find-user-init-file)
|
||||
("EMMS" . emms)
|
||||
("Shell" . shell)
|
||||
("EShell" . eshell)
|
||||
("scratch" . db/scratch))
|
||||
"Mapping of frequently used features to functions implementing
|
||||
them. Can be used in application shortcuts such as
|
||||
`db/helm-shortcuts’."
|
||||
:group 'personal-settings
|
||||
:type '(alist :key-type string :value-type sexp))
|
||||
|
||||
(defcustom db/important-documents-path "~/Documents/library/"
|
||||
"Path to look for documents that can be listed in extended
|
||||
search commands like `db/helm-shortcuts’."
|
||||
:group 'personal-settings
|
||||
:type 'string)
|
||||
|
||||
(use-package db-utils
|
||||
:commands (endless/fill-or-unfill
|
||||
db/delete-trailing-whitespace-maybe
|
||||
|
|
|
@ -319,39 +319,13 @@ If found, imports the certificate via gpgsm."
|
|||
|
||||
;;; helm configuration
|
||||
|
||||
(defcustom db/helm-frequently-used-features
|
||||
'(("Mail" . db/gnus)
|
||||
("Agenda" . db/org-agenda)
|
||||
("Init File" . db/find-user-init-file)
|
||||
("EMMS" . emms)
|
||||
("Shell" . shell)
|
||||
("EShell" . eshell)
|
||||
("scratch" . db/scratch))
|
||||
"Helm shortcuts for frequently used features."
|
||||
:group 'personal-settings
|
||||
:type '(alist :key-type string :value-type sexp))
|
||||
|
||||
(defvar db/helm-source-frequently-used-features
|
||||
'((name . "Frequently Used")
|
||||
(candidates . db/helm-frequently-used-features)
|
||||
(candidates . db/frequently-used-features)
|
||||
(action . (("Open" . funcall)))
|
||||
(filtered-candidate-transformer . helm-adaptive-sort))
|
||||
"Helm source for `db/helm-frequently-used-features’.")
|
||||
|
||||
(defvar db/helm-source-frequently-visited-locations
|
||||
'((name . "Locations")
|
||||
(candidates . db/helm-frequently-visited-locations)
|
||||
(action . (("Open" . (lambda (entry)
|
||||
(if (consp entry)
|
||||
(funcall (car entry) (cdr entry))
|
||||
(find-file entry))))))
|
||||
(filtered-candidate-transformer . helm-adaptive-sort)))
|
||||
|
||||
(defcustom db/important-documents-path "~/Documents/library/"
|
||||
"Path of important documents."
|
||||
:group 'personal-settings
|
||||
:type 'string)
|
||||
|
||||
(defun db/important-documents ()
|
||||
"Recursively return paths of all files found in `db/important-documents-path’.
|
||||
The result will be a list of cons cells, where the car is the
|
||||
|
|
Loading…
Reference in New Issue