-
-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using xdg-open
on a note
#714
Comments
I'm sorry, but I'm not familiar with consult-notes. I'm guessing its completion candidates are not files, if the procedure you described doesn't work. You might be able to write an embark candidate transformer that converts the candidates to files but doing so will probably require some knowledge of how consult-notes is implemented. |
Thanks for the answer! |
It's a nice package based on some code I put in the consult wiki. I still run my version and this is how I support embark: (defun hrm-notes-grep (cand)
"Run consult-ripgrep in directory of notes file CAND."
(interactive "fNote: ")
(consult-ripgrep (file-name-directory cand)))
(defvar-keymap hrm-notes-map
:doc "Keymap for Embark notes actions."
:parent embark-file-map
"g" #'hrm-notes-grep)
(with-eval-after-load 'embark
(add-to-list 'embark-keymap-alist `(,hrm-notes-category hrm-notes-map))
;; make embark-export use dired for notes
(setf (alist-get hrm-notes-category embark-exporters-alist) #'embark-export-dired)) It's the last few lines you need to tell embark about the notes category, you'll want to change I suppose an alternative would be to set |
Thanks, @hmelman! |
Thanks for the help @hmelman If I include that code in my |
Right, because Embark hasn't been loaded yet. You should move the code that uses embark-file-map into the |
Thanks @oantolin too. Previous issue solved. Now, @hmelman , if I try
Similar end if I try instead |
Try reproducing that problem starting from |
Is it possible to use
xdg-open
on a note afterM-x consult-notes
throughembark
? I am trying:As in 'Run a shell command on a minibuffer candidate file without losing your session' (https://karthinks.com/software/fifteen-ways-to-use-embark/)
Not success because it is applied to something it is not the file name.
or
4. E (embark-export)
5. Select note of interest again and
6. M-x embark-select
7. a (embark-act)
8. ! (like in dired-mode to apply shell commands)
but
! is unefined
Related:
The text was updated successfully, but these errors were encountered: