mirror of
https://github.com/pestctrl/emacs-config.git
synced 2026-06-14 12:21:20 +00:00
Fixed read order, cache executables with thread
This commit is contained in:
parent
bcdfa98a27
commit
47aee8f0c3
1 changed files with 10 additions and 6 deletions
16
config.org
16
config.org
|
|
@ -195,19 +195,22 @@
|
||||||
|
|
||||||
(use-package dmenu)
|
(use-package dmenu)
|
||||||
|
|
||||||
|
(make-thread
|
||||||
|
#'dmenu--cache-executable-files)
|
||||||
|
|
||||||
|
|
||||||
(defun read-program ()
|
(defun read-program ()
|
||||||
(funcall #'completing-read dmenu-prompt-string
|
(funcall #'ido-completing-read "$ "
|
||||||
(append dmenu--history-list
|
(append dmenu--history-list
|
||||||
(cl-remove-if (lambda (x)
|
(cl-remove-if (lambda (x)
|
||||||
(member x dmenu--history-list))
|
(member x dmenu--history-list))
|
||||||
dmenu--cache-executable-files))
|
dmenu--cache-executable-files))))
|
||||||
nil
|
|
||||||
'confirm
|
|
||||||
nil
|
|
||||||
'dmenu--history-list))
|
|
||||||
|
|
||||||
(defun launch-program (command &optional process-name)
|
(defun launch-program (command &optional process-name)
|
||||||
(interactive (list (read-program)))
|
(interactive (list (read-program)))
|
||||||
|
(setq dmenu--history-list (cons command (remove command dmenu--history-list)))
|
||||||
|
(when (> (length dmenu--history-list) dmenu-history-size)
|
||||||
|
(setcdr (nthcdr (- dmenu-history-size 1) dmenu--history-list) nil))
|
||||||
(let ((name (or process-name command)))
|
(let ((name (or process-name command)))
|
||||||
(start-process-shell-command name nil command)))
|
(start-process-shell-command name nil command)))
|
||||||
|
|
||||||
|
|
@ -2091,6 +2094,7 @@
|
||||||
*** General config
|
*** General config
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(require 'mu4e)
|
(require 'mu4e)
|
||||||
|
|
||||||
(add-to-list 'mu4e-view-actions
|
(add-to-list 'mu4e-view-actions
|
||||||
'("ViewInBrowser" . mu4e-action-view-in-browser) t)
|
'("ViewInBrowser" . mu4e-action-view-in-browser) t)
|
||||||
(global-set-key (kbd "<f8>") 'mu4e)
|
(global-set-key (kbd "<f8>") 'mu4e)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue