[Util] Add helper to add bookmarks to be opened by `dired-open-file'

This commit is contained in:
Daniel - 2019-12-13 15:05:44 +01:00
parent 74fa0b05b4
commit 6f375c301f
No known key found for this signature in database
GPG Key ID: 1C7071A75BB72D64
2 changed files with 7 additions and 0 deletions

View File

@ -211,6 +211,7 @@
(bind-key "C-x C-b" #'ibuffer)
(bind-key "C-x g" #'db/helm-shortcuts)
(bind-key "C-x SPC" #'hydra-rectangle/body)
(bind-key "C-x r E" #'db/bookmark-add-dired-external)
(bind-key "C-x r M" #'db/bookmark-add-url)
(bind-key "C-x r v" #'list-registers)
(bind-key "C-x t" #'hydra-toggle/body)
@ -560,6 +561,7 @@
db/one-monitor-xrandr
db/pretty-print-xml
db/bookmark-add-external
db/bookmard-add-dired-external
db/bookmark-add-url
db/lookup-smime-key
db/org-onenote-open

View File

@ -523,6 +523,11 @@ it. The bookmarks will finally be sorted by their name."
(interactive "sLocation: \nsName: ")
(db/bookmark-add-with-handler name location #'db/system-open))
(defun db/bookmark-add-dired-external (location name)
"Add NAME as bookmark to LOCATION that is opened by `dired-open-file'."
(interactive "sLocation: \nsName: ")
(db/bookmark-add-with-handler name location #'dired-open-file))
(defun db/bookmark-add-url (url name)
"Add NAME as bookmark to URL that is opened by `browse-url."
(interactive "sURL: \nsName: ")