From 60f3268f6997ffa0a3d089dd0b7685182e5cc904 Mon Sep 17 00:00:00 2001 From: Crazazy Date: Mon, 21 Feb 2022 13:41:38 +0100 Subject: updated emenu properly separate the reading and list function in emenu and all-commands --- emacs.org | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'emacs.org') diff --git a/emacs.org b/emacs.org index 24339ce..b84a311 100644 --- a/emacs.org +++ b/emacs.org @@ -491,10 +491,10 @@ Also, if you just stumbled accross this at random, there is an easy tangle butto (not (file-executable-p fullpath))))) (directory-files path nil directory-files-no-dot-files-regexp nil)))) (split-string (getenv "PATH") ":" t))) - (alias-output (split-string (shell-command-to-string "alias -p | sed -E 's/^alias ([^=]*)=.*$/\1/'") "\n"))) - (ido-completing-read "Command: " (append ls-output alias-output)))) + (alias-output (split-string (shell-command-to-string "alias -p | sed -E 's/^alias ([^=]*)=.*$/\\1/'") "\n"))) + (append ls-output alias-output))) - (defun emenu () + (defun emenu (&optional command-list) "A dmenu-inspired application launcher using a separate emacs frame" (interactive) (with-selected-frame (make-frame '((name . "emenu") @@ -503,7 +503,12 @@ Also, if you just stumbled accross this at random, there is an easy tangle butto (height . 1))) (unwind-protect (progn - (call-process (all-commands) nil 0) + (call-process + (ido-completing-read "Command: " (or + command-list + (all-commands))) + nil + 0) (keyboard-quit)) (delete-frame)))) #+end_src -- cgit 1.4.1-2-gfad0