summaryrefslogtreecommitdiff
path: root/helm-bookmark.el
diff options
context:
space:
mode:
authorThierry Volpiatto <thierry.volpiatto@gmail.com>2018-11-10 12:47:12 +0100
committerThierry Volpiatto <thierry.volpiatto@gmail.com>2018-11-10 12:47:12 +0100
commit091ffe843674480ea1cc7b0ed389ee79a92baa3c (patch)
tree0b1045d7a0628b800fd1705c7e9b028aacea410b /helm-bookmark.el
parentc0cd68abe973074e156af1adc5ce342e1b154542 (diff)
Add jump to bmk other frame
* helm-bookmark.el (helm-bookmark-map): Bind it. (helm-bookmark-jump): Docstring. (helm-bookmark-jump-other-frame): New. (helm-bookmark-jump-other-window): Docstring. (helm--setup-source): Remove frame action as well. (helm-bookmark-run-jump-other-frame): New, the keyboard action. * helm-types.el (helm-type-bookmark-actions): Add jump other frame.
Diffstat (limited to 'helm-bookmark.el')
-rw-r--r--helm-bookmark.el30
1 files changed, 23 insertions, 7 deletions
diff --git a/helm-bookmark.el b/helm-bookmark.el
index 842d4933..a3c0bb8b 100644
--- a/helm-bookmark.el
+++ b/helm-bookmark.el
@@ -99,10 +99,11 @@
(defvar helm-bookmark-map
(let ((map (make-sparse-keymap)))
(set-keymap-parent map helm-map)
- (define-key map (kbd "C-c o") 'helm-bookmark-run-jump-other-window)
- (define-key map (kbd "C-d") 'helm-bookmark-run-delete)
- (define-key map (kbd "C-]") 'helm-bookmark-toggle-filename)
- (define-key map (kbd "M-e") 'helm-bookmark-run-edit)
+ (define-key map (kbd "C-c o") 'helm-bookmark-run-jump-other-window)
+ (define-key map (kbd "C-c C-o") 'helm-bookmark-run-jump-other-frame)
+ (define-key map (kbd "C-d") 'helm-bookmark-run-delete)
+ (define-key map (kbd "C-]") 'helm-bookmark-toggle-filename)
+ (define-key map (kbd "M-e") 'helm-bookmark-run-edit)
map)
"Generic Keymap for emacs bookmark sources.")
@@ -156,12 +157,19 @@
(put 'helm-bookmark-toggle-filename 'helm-only t)
(defun helm-bookmark-jump (candidate)
- "Jump to bookmark from keyboard."
+ "Jump to bookmark action."
(let ((current-prefix-arg helm-current-prefix-arg)
non-essential)
(bookmark-jump candidate)))
+(defun helm-bookmark-jump-other-frame (candidate)
+ "Jump to bookmark in other frame action."
+ (let ((current-prefix-arg helm-current-prefix-arg)
+ non-essential)
+ (bookmark-jump candidate 'switch-to-buffer-other-frame)))
+
(defun helm-bookmark-jump-other-window (candidate)
+ "Jump to bookmark in other window action."
(let (non-essential)
(bookmark-jump-other-window candidate)))
@@ -454,8 +462,10 @@ than `w3m-browse-url' use it."
(call-next-method)
(setf (slot-value source 'action)
(helm-append-at-nth
- (remove '("Jump to BM other window" . helm-bookmark-jump-other-window)
- helm-type-bookmark-actions)
+ (cl-loop for (name . action) in helm-type-bookmark-actions
+ unless (memq action '(helm-bookmark-jump-other-frame
+ helm-bookmark-jump-other-window))
+ collect (cons name action))
'(("Browse project" . helm-bookmark-browse-project)) 1))
(setf (slot-value source 'keymap) helm-bookmark-find-files-map))
@@ -661,6 +671,12 @@ words from the buffer into the new bookmark name."
(put 'helm-bookmark-run-edit 'helm-only t)
+(defun helm-bookmark-run-jump-other-frame ()
+ "Jump to bookmark other frame from keyboard."
+ (interactive)
+ (with-helm-alive-p
+ (helm-exit-and-execute-action 'helm-bookmark-jump-other-frame)))
+
(defun helm-bookmark-run-jump-other-window ()
"Jump to bookmark from keyboard."
(interactive)