diff options
| -rw-r--r-- | consult.org | 27 | ||||
| -rw-r--r-- | init.org | 2 | 
2 files changed, 19 insertions, 10 deletions
diff --git a/consult.org b/consult.org index a9193fd..34e015f 100644 --- a/consult.org +++ b/consult.org @@ -131,9 +131,16 @@        (use-package embark          :ensure t          :custom ((embark-quit-after-action nil)) +        :config (defun embark-default-action () +                  (interactive) +                  (pcase-let ((`(,type . ,target) (embark--target))) +                    (embark--act (embark--default-action type) target))) +          :bind (("C-;" . embark-act) +               ("C-'" . embark-default-action)                 (:map minibuffer-local-map -                     (("C-," . embark-become) +                     (("C-'" . embark-default-action) +                      ("C-," . embark-become)                        ("C-o" . embark-export)))))        (use-package embark-consult @@ -242,14 +249,14 @@      #+end_src  *** video url targets      #+begin_src emacs-lisp -      (defvar jao-embark-targets-video-url-rx +      (defvar jao-embark-targets-video-sites +        '("youtu.be" "youtube.com" "blip.tv" "vimeo.com" "infoq.com")) + +      (defun jao-embark--video-url-rx (&optional sites)          (format "^https?://\\(?:www\\.\\)?%s/.+" -                (regexp-opt '("youtu.be" -                              "youtube.com" -                              "blip.tv" -                              "vimeo.com" -                              "infoq.com") -                            t)) +                (regexp-opt (or sites jao-embark-targets-video-sites) t))) + +      (defvar jao-embark-targets-video-url-rx (jao-embark--video-url-rx)          "A regular expression matching URLs that point to video streams")        (defun jao-embark-targets--refine-url (url) @@ -275,8 +282,8 @@        (embark-define-keymap jao-embark-targets-video-url-map          "Actions on URLs pointing to remote video streams."          :parent embark-url-map -        ("v" jao-embark-targets-vlc) -        ("m" jao-embark-targets-mpv)) +        ("RET" jao-embark-targets-mpv) +        ("v" jao-embark-targets-vlc))        (add-to-list 'embark-transformer-alist '(url . jao-embark-targets--refine-url))        (add-to-list 'embark-keymap-alist '(video-url . jao-embark-targets-video-url-map)) @@ -845,6 +845,8 @@      #+end_src  *** completion engine +    We load either [[./consult.org][consult.org]] or [[./counsel.org][counsel.org]] to configure completion +    engines:      #+begin_src emacs-lisp        (defvar jao-completion-engine 'consult)        (jao-load-org (format "%s" jao-completion-engine))  | 
