From: Eshel Yaron Date: Fri, 9 Feb 2024 11:40:08 +0000 (+0100) Subject: Update Emacs configuration X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=081043874f735972a1886d5904d36251df1954d1;p=dotfiles.git Update Emacs configuration --- 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 ()