From 081043874f735972a1886d5904d36251df1954d1 Mon Sep 17 00:00:00 2001 From: Eshel Yaron Date: Fri, 9 Feb 2024 12:40:08 +0100 Subject: [PATCH] Update Emacs configuration --- .emacs.d/init.el | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/.emacs.d/init.el b/.emacs.d/init.el index 6956fd9..39a97f7 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -105,9 +105,7 @@ ;;; Install packages (elpaca org-transclusion) -(elpaca (sweeprolog - :files ("*.org" "*.texi" "sweep.pl" - "sweeprolog-pce-theme.el" "sweeprolog.el"))) +(elpaca sweeprolog) (elpaca avy) (elpaca (bbdb :repo "https://git.savannah.nongnu.org/git/bbdb.git" @@ -1036,14 +1034,7 @@ as the initial input for completion, and return that directory." (with-eval-after-load 'tramp (tramp-set-completion-function "ssh" '((tramp-parse-netrc "~/.authinfo.gpg"))) - (add-to-list 'backup-directory-alist (cons tramp-file-name-regexp nil)) - (define-advice completion-file-name-table (:filter-args (args) no-remote-file-name-completion) - (let ((string (car args)) - (pred (cadr args)) - (action (caddr args))) - (if (and (file-remote-p string) (eq pred #'file-exists-p)) - (list string nil action) - (list string pred action))))) + (add-to-list 'backup-directory-alist (cons tramp-file-name-regexp nil))) ;;; Configure `proced' @@ -1450,9 +1441,14 @@ as the initial input for completion, and return that directory." (all (let ((completion--input completion--input) (completion-lazy-hilit t)) (completion-all-sorted-completions beg end)))) + (setcdr (last all) nil) (let (minibuffer-message-timeout) - ;; TODO show number of completions and/or use different face when exact. - (minibuffer-message (propertize (car all) 'face 'completions-common-part))))) + (minibuffer-message (concat (propertize (car all) 'face 'bold) + (when (cdr all) + (concat + " and " + (number-to-string (1- (length all))) + " more"))))))) (defun minibuffer-hint-cancel-timer () (when (timerp minibuffer-hint-timer) @@ -1478,8 +1474,11 @@ as the initial input for completion, and return that directory." (if minibuffer-hint-mode (progn (add-hook 'post-self-insert-hook #'minibuffer-hint-start-timer nil t) - (add-hook 'minibuffer-exit-hook #'minibuffer-hint-cancel-timer nil t)) + (add-hook 'minibuffer-exit-hook #'minibuffer-hint-cancel-timer nil t) + (add-hook 'pre-command-hook #'minibuffer-hint-cancel-timer nil t)) (remove-hook 'post-self-insert-hook #'minibuffer-hint-start-timer t) + (remove-hook 'minibuffer-exit-hook #'minibuffer-hint-cancel-timer t) + (remove-hook 'pre-command-hook #'minibuffer-hint-cancel-timer t) (minibuffer-hint-cancel-timer))) (add-hook 'minibuffer-setup-hook (lambda () -- 2.39.2