diff options
| author | Craig Jennings <c@cjennings.net> | 2026-02-25 12:07:12 -0600 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-02-25 12:07:12 -0600 |
| commit | c88429fc0f57e6729b58b28093b54c5e817a943c (patch) | |
| tree | 2efce6566f95b3b5529de621ce4c31d814525a01 /modules/custom-buffer-file.el | |
| parent | f5b744f9e15d1f07f41201a56b0376784744d8df (diff) | |
| download | dotemacs-c88429fc0f57e6729b58b28093b54c5e817a943c.tar.gz dotemacs-c88429fc0f57e6729b58b28093b54c5e817a943c.zip | |
feat(buffer): add open-with-default-app and open-with-program keybindings
Wire cj/xdg-open (C-; b o) and cj/open-this-file-with (C-; b O) into
the buffer keymap. Fix xdg-open fallback to try buffer-file-name before
dired context. Remove old C-c x o binding from external-open.
Diffstat (limited to 'modules/custom-buffer-file.el')
| -rw-r--r-- | modules/custom-buffer-file.el | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/modules/custom-buffer-file.el b/modules/custom-buffer-file.el index 92e73c3d..f99a0ee4 100644 --- a/modules/custom-buffer-file.el +++ b/modules/custom-buffer-file.el @@ -32,6 +32,7 @@ ;; mm-decode for email viewing (mm-handle-type is a macro, needs early require) (require 'mm-decode) +(require 'external-open) ;; for cj/xdg-open, cj/open-this-file-with ;; cj/kill-buffer-and-window defined in undead-buffers.el (declare-function cj/kill-buffer-and-window "undead-buffers") @@ -446,7 +447,9 @@ Signals an error if: "S" #'write-file ;; save as "g" #'revert-buffer "w" #'cj/view-buffer-in-eww - "e" #'cj/view-email-in-buffer) + "e" #'cj/view-email-in-buffer + "o" #'cj/xdg-open + "O" #'cj/open-this-file-with) (when (boundp 'cj/custom-keymap) (keymap-set cj/custom-keymap "b" cj/buffer-and-file-map)) @@ -473,7 +476,9 @@ Signals an error if: "C-; b S" "save as" "C-; b g" "revert buffer" "C-; b w" "view in EWW" - "C-; b e" "view email")) + "C-; b e" "view email" + "C-; b o" "open with default app" + "C-; b O" "open with program...")) (provide 'custom-buffer-file) |
