emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [External] : Re: Completions and history


From: Juri Linkov
Subject: Re: [External] : Re: Completions and history
Date: Wed, 13 Apr 2022 10:50:30 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu)

>> Does Icicles support history completion in eshell and comint?
>
> Yes, I believe so.
>
> Command `icicle-comint-command':
>
>  Retrieve a previously used command.
>  Use this in a `comint-mode' buffer such as `*shell*' or
>  `*inferior-lisp*'.

It seems `icicle-comint-command' does the same as
`comint-dynamic-list-input-ring' bound to `C-c C-l'.

Maybe the same key `C-c C-l' could be bound by default
in the minibuffer to enable history completion?

BTW, currently this command highlights the header line only partly.
Here is a fix to keep text properties by replace-match:

diff --git a/lisp/comint.el b/lisp/comint.el
index 56082f622a..88eaf1120e 100644
--- a/lisp/comint.el
+++ b/lisp/comint.el
@@ -1110,7 +1110,8 @@ comint-dynamic-list-input-ring
          (use-local-map keymap))
        (forward-line 3)
        (while (search-backward "completion" nil 'move)
-         (replace-match "history reference")))
+         (replace-match (apply #'propertize "history reference"
+                               (text-properties-at (point))))))
       (sit-for 0)
       (message "Hit space to flush")
       (setq comint-dynamic-list-input-ring-window-conf conf)
diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el
index f60af482da..a4a04fc4ec 100644
--- a/lisp/minibuffer.el
+++ b/lisp/minibuffer.el
@@ -1895,9 +1980,7 @@ completions-detailed
   :version "28.1")
 
 (defcustom completions-header-format
-  (propertize "%s possible completions:\n"
-              'face 'shadow
-              :help "Please select a completion")
+  (propertize "%s possible completions:\n" 'face 'shadow)
   "Format of completions header.
 It may contain one %s to show the total count of completions.
 When nil, no header is shown."

reply via email to

[Prev in Thread] Current Thread [Next in Thread]