From 3a8444a8c22a00ccacc4ab2dafe702bd26f3ce77 Mon Sep 17 00:00:00 2001 From: fpi Date: Fri, 13 May 2022 09:58:02 +0200 Subject: squash! [WIP] Make next command act on local host --- emacs-init.org | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/emacs-init.org b/emacs-init.org index d84bdc4..9abdd35 100644 --- a/emacs-init.org +++ b/emacs-init.org @@ -1862,11 +1862,16 @@ Make next command act on local host. #+begin_src emacs-lisp :noweb-ref fpi-bindings (defmacro fpi/as-local (func) (let ((default-directory temporary-file-directory)) - func + (eval func) ;; (shell-command "explorer") )) (fpi/as-local (pwd)) (fpi/as-local default-directory) +(defmacro fpi/explorer-as-local () + (let* ((file (or (dired-get-subdir) + (dired-get-filename))) + (cmd (backquote (shell-command ,(format "explorer %s" file))))) + (backquote (fpi/as-local ,cmd)))) #+end_src ** Base commands (simple.el) #+begin_src emacs-lisp -- cgit v1.2.3