summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.org2
-rw-r--r--embark-consult.el10
-rw-r--r--embark-org.el7
-rw-r--r--embark.el30
-rw-r--r--embark.texi2
5 files changed, 38 insertions, 13 deletions
diff --git a/README.org b/README.org
index 1e24838..a010932 100644
--- a/README.org
+++ b/README.org
@@ -579,7 +579,7 @@ Embark used to have a dedicated variable =embark-allow-edit-actions= to
which you could add commands for which Embark should forgo pressing
=RET= for you after inserting the target. Since its effect can also be
achieved via the general =embark-target-injection-hooks= mechanism, that
-variable has been removed to simply Embark. Be sure to update your
+variable has been removed to simplify Embark. Be sure to update your
configuration; if you had something like:
#+begin_src emacs-lisp
diff --git a/embark-consult.el b/embark-consult.el
index 5343237..c89b178 100644
--- a/embark-consult.el
+++ b/embark-consult.el
@@ -7,7 +7,7 @@
;; Keywords: convenience
;; Version: 0.8
;; Homepage: https://github.com/oantolin/embark
-;; Package-Requires: ((emacs "27.1") (embark "0.20") (consult "0.17"))
+;; Package-Requires: ((emacs "27.1") (compat "29.1.4.0") (embark "0.23") (consult "0.35"))
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
@@ -157,7 +157,6 @@ This function is meant to be added to `embark-collect-mode-hook'."
(defvar grep-mode-line-matches)
(defvar grep-num-matches-found)
-(defvar wgrep-header&footer-parser)
(declare-function wgrep-setup "ext:wgrep")
(defvar-keymap embark-consult-revert-map
@@ -200,7 +199,12 @@ This function is meant to be added to `embark-collect-mode-hook'."
(use-local-map (make-composed-keymap
embark-consult-revert-map
(current-local-map)))
- (setq-local wgrep-header&footer-parser #'embark-consult--wgrep-prepare)
+ ;; TODO Wgrep 3.0 and development versions use different names for the
+ ;; parser variable.
+ (defvar wgrep-header/footer-parser)
+ (defvar wgrep-header&footer-parser)
+ (setq-local wgrep-header/footer-parser #'embark-consult--wgrep-prepare
+ wgrep-header&footer-parser #'embark-consult--wgrep-prepare)
(when (fboundp 'wgrep-setup) (wgrep-setup)))
(pop-to-buffer buf)))
diff --git a/embark-org.el b/embark-org.el
index 974f1b8..aa14e66 100644
--- a/embark-org.el
+++ b/embark-org.el
@@ -351,8 +351,13 @@ bound to i."
:parent embark-general-map
"RET" #'org-open-at-point-global
"'" #'org-insert-link
+ "n" #'org-next-link
+ "p" #'org-previous-link
"w" #'embark-org-link-copy-map)
+(dolist (motion '(org-next-link org-previous-link))
+ (cl-pushnew motion embark-repeat-actions))
+
;; The reason for this is left as an exercise to the reader.
;; Solution: Na ryvfc gnetrg znl cebzcg gur hfre sbe fbzrguvat!
(cl-pushnew 'embark--ignore-target
@@ -398,7 +403,7 @@ bound to i."
"T" #'org-tree-to-indirect-buffer
"<left>" #'org-do-promote
"<right>" #'org-do-demote
- "^" #'org-sort
+ "o" #'org-sort
"r" #'org-refile
"R" #'embark-org-refile-here
"I" #'org-clock-in
diff --git a/embark.el b/embark.el
index 6884509..bc35629 100644
--- a/embark.el
+++ b/embark.el
@@ -1248,7 +1248,8 @@ UPDATE is the indicator update function."
keymap
(let ((overriding-terminal-local-map keymap))
(key-binding (seq-take keys (1- (length keys)))
- 'accept-default)))))
+ 'accept-default))))
+ (prefix-arg prefix-arg)) ; preserve prefix arg
(when-let ((win (get-buffer-window embark--verbose-indicator-buffer
'visible)))
(quit-window 'kill-buffer win))
@@ -1282,7 +1283,8 @@ UPDATE is the indicator update function."
(funcall cmd last-command-event)
(embark-keymap-prompter keymap update))
('execute-extended-command
- (intern-soft (read-extended-command)))
+ (let ((prefix-arg prefix-arg)) ; preserve prefix arg
+ (intern-soft (read-extended-command))))
((or 'keyboard-quit 'keyboard-escape-quit)
nil)
(_ cmd))))
@@ -3807,8 +3809,11 @@ with command output. For replacement behavior see
(and replace (current-buffer)))))
(defun embark-open-externally (file)
- "Open FILE using system's default application."
- (interactive "fOpen: ")
+ "Open FILE or url using system's default application."
+ (interactive "sOpen externally: ")
+ (unless (string-match-p "\\`[a-z]+://" file)
+ (setq file (expand-file-name file)))
+ (message "Opening `%s' externally..." file)
(if (and (eq system-type 'windows-nt)
(fboundp 'w32-shell-execute))
(w32-shell-execute "open" file)
@@ -3816,8 +3821,18 @@ with command output. For replacement behavior see
('darwin "open")
('cygwin "cygstart")
(_ "xdg-open"))
- nil 0 nil
- (expand-file-name file))))
+ nil 0 nil file)))
+
+(declare-function bookmark-prop-get "bookmark")
+(declare-function bookmark-completing-read "bookmark")
+
+(defun embark-bookmark-open-externally (bookmark)
+ "Open BOOKMARK in external application."
+ (interactive (list (bookmark-completing-read "Open externally: ")))
+ (embark-open-externally
+ (or (bookmark-prop-get bookmark 'location)
+ (bookmark-prop-get bookmark 'filename)
+ (user-error "Bookmark `%s' does not have a location" bookmark))))
(defun embark-bury-buffer (buf)
"Bury buffer BUF."
@@ -4103,7 +4118,6 @@ library, which have an obvious notion of associated directory."
(file-name-as-directory file)
(file-name-directory file))))
-(autoload 'bookmark-location "bookmark")
(cl-defun embark--cd (&rest rest &key run target type &allow-other-keys)
"Run action with `default-directory' set to the directory of TARGET.
The supported values of TYPE are file, buffer, bookmark and
@@ -4287,6 +4301,7 @@ This simply calls RUN with the REST of its arguments inside
"RET" #'browse-url
"b" #'browse-url
"d" #'embark-download-url
+ "x" #'embark-open-externally
"e" #'eww)
(defvar-keymap embark-email-map
@@ -4476,6 +4491,7 @@ This simply calls RUN with the REST of its arguments inside
"f" #'bookmark-jump-other-frame
"a" 'bookmark-show-annotation
"e" 'bookmark-edit-annotation
+ "x" #'embark-bookmark-open-externally
"$" #'eshell)
(defvar-keymap embark-unicode-name-map
diff --git a/embark.texi b/embark.texi
index 0cbed7e..cc41bf4 100644
--- a/embark.texi
+++ b/embark.texi
@@ -728,7 +728,7 @@ Embark used to have a dedicated variable @samp{embark-allow-edit-actions} to
which you could add commands for which Embark should forgo pressing
@samp{RET} for you after inserting the target. Since its effect can also be
achieved via the general @samp{embark-target-injection-hooks} mechanism, that
-variable has been removed to simply Embark. Be sure to update your
+variable has been removed to simplify Embark. Be sure to update your
configuration; if you had something like:
@lisp