Compare commits
No commits in common. "2db4ce76077ebda573a03ab44cfab6c3e5243145" and "2159114cba7d8d862013d516c5d6ff4292b6e691" have entirely different histories.
2db4ce7607
...
2159114cba
38
init.el
38
init.el
@ -465,7 +465,6 @@ split horizontally again, but this extra work should not matter much."
|
|||||||
db/find-default-org-file
|
db/find-default-org-file
|
||||||
db/find-default-refile-file
|
db/find-default-refile-file
|
||||||
db/ement-connect
|
db/ement-connect
|
||||||
db/shortcuts
|
|
||||||
db/hex-to-ascii
|
db/hex-to-ascii
|
||||||
db/text-to-hex
|
db/text-to-hex
|
||||||
turn-on-lispy-when-available
|
turn-on-lispy-when-available
|
||||||
@ -2464,7 +2463,6 @@ Note that this workaround is incomplete, as explained in this comment."
|
|||||||
consult-mark
|
consult-mark
|
||||||
consult-yank-pop
|
consult-yank-pop
|
||||||
consult-outline)
|
consult-outline)
|
||||||
:autoload (consult--multi)
|
|
||||||
:init (progn
|
:init (progn
|
||||||
;; Settings taken from https://protesilaos.com/emacs/dotemacs#h:22e97b4c-d88d-4deb-9ab3-f80631f9ff1d
|
;; Settings taken from https://protesilaos.com/emacs/dotemacs#h:22e97b4c-d88d-4deb-9ab3-f80631f9ff1d
|
||||||
(setq consult-line-numbers-widen t
|
(setq consult-line-numbers-widen t
|
||||||
@ -2489,6 +2487,40 @@ Note that this workaround is incomplete, as explained in this comment."
|
|||||||
|
|
||||||
;; * Navigation
|
;; * Navigation
|
||||||
|
|
||||||
|
(defun db/helm-shortcuts (arg)
|
||||||
|
"Open helm completion on common locations.
|
||||||
|
|
||||||
|
With universal argument ARG, inhibit display of files in
|
||||||
|
`db/important-document-path’. This might be helpful when loading
|
||||||
|
is too slow (in this case, `db/important-document-path' should
|
||||||
|
eventuelly be set to nil, however)."
|
||||||
|
(interactive "P")
|
||||||
|
(helm :sources (list
|
||||||
|
(helm-make-source "Frequently Used" 'helm-source-sync
|
||||||
|
:candidates (mapcar #'(lambda (entry)
|
||||||
|
(cons (car entry)
|
||||||
|
(caddr entry)))
|
||||||
|
db/frequently-used-features)
|
||||||
|
:action '(("Open" . call-interactively)))
|
||||||
|
|
||||||
|
helm-source-bookmarks
|
||||||
|
|
||||||
|
;; If no prefix arg is given, extract files from
|
||||||
|
;; `db/important-documents-path’ and list them as well
|
||||||
|
(when (and (not arg)
|
||||||
|
(file-directory-p db/important-documents-path))
|
||||||
|
(let ((search-path (expand-file-name db/important-documents-path)))
|
||||||
|
(helm-make-source "Important files" 'helm-source-sync
|
||||||
|
:candidates (mapcar #'(lambda (file)
|
||||||
|
;; Display only relative path,
|
||||||
|
;; but keep absolute path for
|
||||||
|
;; actions
|
||||||
|
(cons (string-remove-prefix search-path file)
|
||||||
|
file))
|
||||||
|
(directory-files-recursively search-path ""))
|
||||||
|
:action '(("Open externally" . db/system-open)
|
||||||
|
("Find file" . find-file))))))))
|
||||||
|
|
||||||
(use-package ace-window
|
(use-package ace-window
|
||||||
:ensure t
|
:ensure t
|
||||||
:commands (ace-window
|
:commands (ace-window
|
||||||
@ -3142,7 +3174,7 @@ Note that this workaround is incomplete, as explained in this comment."
|
|||||||
(bind-key "C-x C-j" #'dired-jump)
|
(bind-key "C-x C-j" #'dired-jump)
|
||||||
(bind-key "C-x C-r" #'revert-buffer)
|
(bind-key "C-x C-r" #'revert-buffer)
|
||||||
(bind-key "C-x SPC" #'hydra-rectangle/body)
|
(bind-key "C-x SPC" #'hydra-rectangle/body)
|
||||||
(bind-key "C-x g" #'db/shortcuts)
|
(bind-key "C-x g" #'db/helm-shortcuts)
|
||||||
(bind-key "C-x r E" #'db/bookmark-add-external)
|
(bind-key "C-x r E" #'db/bookmark-add-external)
|
||||||
(bind-key "C-x r M" #'db/bookmark-add-url)
|
(bind-key "C-x r M" #'db/bookmark-add-url)
|
||||||
(bind-key "C-x r v" #'list-registers)
|
(bind-key "C-x r v" #'list-registers)
|
||||||
|
|||||||
@ -30,7 +30,6 @@
|
|||||||
(autoload 'find-libary-name "find-func")
|
(autoload 'find-libary-name "find-func")
|
||||||
(autoload 'lm-header "lisp-mnt")
|
(autoload 'lm-header "lisp-mnt")
|
||||||
(autoload 'rectangle-exchange-point-and-mark "rect")
|
(autoload 'rectangle-exchange-point-and-mark "rect")
|
||||||
(autoload 'consult--multi "consult")
|
|
||||||
|
|
||||||
(declare-function w32-shell-execute "w32fns.c")
|
(declare-function w32-shell-execute "w32fns.c")
|
||||||
(declare-function org-password-manager-get-password-by-id nil)
|
(declare-function org-password-manager-get-password-by-id nil)
|
||||||
@ -89,38 +88,6 @@
|
|||||||
(ement-connect :user-id db/matrix-user-id
|
(ement-connect :user-id db/matrix-user-id
|
||||||
:password password)))
|
:password password)))
|
||||||
|
|
||||||
(defun db/shortcuts ()
|
|
||||||
"Open helm completion on common locations."
|
|
||||||
(interactive)
|
|
||||||
(let (sources)
|
|
||||||
(push (list :name "Frequently Used"
|
|
||||||
:items (mapcar #'(lambda (entry)
|
|
||||||
(cons (car entry)
|
|
||||||
(caddr entry)))
|
|
||||||
db/frequently-used-features)
|
|
||||||
:annotate #'(lambda (_) "")
|
|
||||||
:action #'call-interactively)
|
|
||||||
sources)
|
|
||||||
(push 'consult--source-bookmark
|
|
||||||
sources)
|
|
||||||
(when (file-directory-p db/important-documents-path)
|
|
||||||
(let ((search-path (expand-file-name db/important-documents-path)))
|
|
||||||
(push (list :name "Important Files"
|
|
||||||
:narrow ?f
|
|
||||||
:items (mapcar #'(lambda (file)
|
|
||||||
;; Display only relative path,
|
|
||||||
;; but keep absolute path for
|
|
||||||
;; actions
|
|
||||||
(cons (string-remove-prefix search-path file)
|
|
||||||
file))
|
|
||||||
(directory-files-recursively search-path ""))
|
|
||||||
:annotate #'(lambda (_) "")
|
|
||||||
:action #'db/system-open)
|
|
||||||
sources)))
|
|
||||||
(consult--multi (nreverse sources)
|
|
||||||
:require-match t
|
|
||||||
:sort nil)))
|
|
||||||
|
|
||||||
|
|
||||||
;;; General Utilities
|
;;; General Utilities
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user