From c86a03d8c3857cc7e1ad754a84ace5e136be3f39 Mon Sep 17 00:00:00 2001 From: Jaidyn Ann <10477760+JadedCtrl@users.noreply.github.com> Date: Wed, 2 Oct 2024 10:10:45 -0500 Subject: [PATCH] Fix shell-command composition bug --- imeks.el | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/imeks.el b/imeks.el index cd1edec..e519a68 100644 --- a/imeks.el +++ b/imeks.el @@ -94,23 +94,23 @@ if an X keyboard." (nconc delete-frame-functions '(imeks--handle-delete-frame)) - +;; ;;; Util ;;; ――――――――――――――――――――――――――――――――――――― (defun xdotool-type-string (string &optional delay) "Types a STRING to the current X display, using xdotool.\n Optionally waits a DELAY in seconds before typing the string." (let* ((sleep-cmd - (format "sleep %f;" (or delay 0))) + (format "sleep %f" (or delay 0))) (type-cmds (mapcar (lambda (line) (format "%s type \"$(cat <<'EOF'\n%s\nEOF\n)\"" imeks-xdotool-path line)) (string-lines string))) (type-cmd ; Work-around, since not all programs accept a typed newline. - (reduce (lambda (a b) - (format "%s; %s key return; %s" a imeks-xdotool-path b)) - type-cmds)) + (seq-reduce (lambda (a b) + (format "%s; %s key return; %s" a imeks-xdotool-path b)) + type-cmds "")) (cmd-string (concat sleep-cmd type-cmd))) (call-process "bash" nil 0 nil