From 05dc4d19f01bbf5462af47fb8ae18d6feb8e2613 Mon Sep 17 00:00:00 2001 From: msin32 <103911574+msin32@users.noreply.github.com> Date: Thu, 22 Aug 2024 21:44:10 -0400 Subject: [PATCH] avoid temp file --- emacs-everywhere.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/emacs-everywhere.el b/emacs-everywhere.el index 148f9ab..9762da7 100644 --- a/emacs-everywhere.el +++ b/emacs-everywhere.el @@ -426,8 +426,9 @@ Never paste content when ABORT is non-nil." (when (and (frame-parameter nil 'emacs-everywhere-app) emacs-everywhere-paste-command (not abort)) - (apply #'call-process (car emacs-everywhere-paste-command) - (if (cdr emacs-everywhere-paste-command) nil (make-temp-file nil nil nil "key shift+insert")) nil nil (cdr emacs-everywhere-paste-command))))) + (if (cdr emacs-everywhere-paste-command) (apply #'call-process (car emacs-everywhere-paste-command) + nil nil nil (cdr emacs-everywhere-paste-command)) + (apply #'shell-command-on-region "key shift+insert" nil "dotool" nil nil nil nil nil))))) ;; Clean up after ourselves in case the buffer survives `server-buffer-done' ;; (b/c `server-existing-buffer' is non-nil). (emacs-everywhere-mode -1)