* Re:Re:Re: [PATCH] 0001-Add-icomplete-count-format
@ 2021-06-18 9:08 Manuel Uberti
2021-06-29 6:56 ` tumashu
0 siblings, 1 reply; 4+ messages in thread
From: Manuel Uberti @ 2021-06-18 9:08 UTC (permalink / raw)
To: emacs-devel
Thank you for working on this. I do hope this gets reviewed/merged soon.
My reason: I like the count but only when using search commands such as
`consult-ripgrep'. At the moment I am using Vertico, and I enable the count
locally only for these kind of search commands.
All the best
--
Manuel Uberti
www.manueluberti.eu
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re:Re:Re:Re: [PATCH] 0001-Add-icomplete-count-format
2021-06-18 9:08 Re:Re:Re: [PATCH] 0001-Add-icomplete-count-format Manuel Uberti
@ 2021-06-29 6:56 ` tumashu
2021-08-15 19:27 ` João Távora
0 siblings, 1 reply; 4+ messages in thread
From: tumashu @ 2021-06-29 6:56 UTC (permalink / raw)
To: Manuel Uberti; +Cc: emacs-devel@gnu.org
At 2021-06-18 17:08:56, "Manuel Uberti" <manuel.uberti@inventati.org> wrote:
>Thank you for working on this. I do hope this gets reviewed/merged soon.
Me too :-)
>
>My reason: I like the count but only when using search commands such as
>`consult-ripgrep'. At the moment I am using Vertico, and I enable the count
>locally only for these kind of search commands.
>
>
>All the best
>
>--
>Manuel Uberti
>www.manueluberti.eu
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Re:Re:Re: [PATCH] 0001-Add-icomplete-count-format
2021-06-29 6:56 ` tumashu
@ 2021-08-15 19:27 ` João Távora
0 siblings, 0 replies; 4+ messages in thread
From: João Távora @ 2021-08-15 19:27 UTC (permalink / raw)
To: tumashu; +Cc: Manuel Uberti, emacs-devel
[-- Attachment #1: Type: text/plain, Size: 742 bytes --]
I've been doing since emacs work again finally. This is now in my radar,
along with other icomplete things. Sorry for the long delay.
João
On Tue, Jun 29, 2021, 07:57 tumashu <tumashu@163.com> wrote:
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> At 2021-06-18 17:08:56, "Manuel Uberti" <manuel.uberti@inventati.org>
> wrote:
> >Thank you for working on this. I do hope this gets reviewed/merged soon.
>
> Me too :-)
>
> >
> >My reason: I like the count but only when using search commands such as
> >`consult-ripgrep'. At the moment I am using Vertico, and I enable the
> count
> >locally only for these kind of search commands.
> >
> >
> >All the best
> >
> >--
> >Manuel Uberti
> >www.manueluberti.eu
>
[-- Attachment #2: Type: text/html, Size: 1345 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] 0001-Add-icomplete-count-format
@ 2021-06-10 7:51 tumashu
2021-06-10 16:23 ` Philip Kaludercic
0 siblings, 1 reply; 4+ messages in thread
From: tumashu @ 2021-06-10 7:51 UTC (permalink / raw)
To: emacs-devel@gnu.org
[-- Attachment #1.1: Type: text/plain, Size: 1 bytes --]
[-- Attachment #1.2: Type: text/html, Size: 111 bytes --]
[-- Attachment #2: 0001-Add-icomplete-count-format.patch --]
[-- Type: application/octet-stream, Size: 1926 bytes --]
From 6074e1f4c5564e5d9e56041cc7db6fd7125571cb Mon Sep 17 00:00:00 2001
From: Feng Shu <tumashu@163.com>
Date: Thu, 10 Jun 2021 15:48:51 +0800
Subject: [PATCH] Add icomplete-count-format.
* lisp/icomplete.el (icomplete-count-format): New variable.
(icomplete-exhibit): Use icomplete-count-format.
---
lisp/icomplete.el | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)
diff --git a/lisp/icomplete.el b/lisp/icomplete.el
index 08b4ef2030..0881bade98 100644
--- a/lisp/icomplete.el
+++ b/lisp/icomplete.el
@@ -70,6 +70,10 @@ icomplete-hide-common-prefix
:type 'boolean
:version "24.4")
+(defcustom icomplete-count-format (cons "%-7s" "%s/%s ")
+ "Format string used for the candidate count."
+ :type '(choice (const nil) (cons string string)))
+
(defvar icomplete-tidy-shadowed-file-names nil
"If non-nil, automatically delete superfluous parts of file names.
For example, if the user types ~/ after a long path name,
@@ -696,12 +700,13 @@ icomplete-exhibit
(overlay-put
icomplete-overlay 'before-string
(and icomplete-scroll
- (let ((past (length icomplete--scrolled-past)))
- (format
- "%s/%s "
- (1+ past)
- (+ past
- (safe-length completion-all-sorted-completions))))))
+ (format (car icomplete-count-format)
+ (let ((past (length icomplete--scrolled-past)))
+ (format
+ (cdr icomplete-count-format)
+ (1+ past)
+ (+ past
+ (safe-length completion-all-sorted-completions)))))))
(overlay-put icomplete-overlay 'after-string text))))))))
(defun icomplete--affixate (md prospects)
--
2.30.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] 0001-Add-icomplete-count-format
2021-06-10 7:51 tumashu
@ 2021-06-10 16:23 ` Philip Kaludercic
2021-06-11 0:09 ` tumashu
0 siblings, 1 reply; 4+ messages in thread
From: Philip Kaludercic @ 2021-06-10 16:23 UTC (permalink / raw)
To: tumashu; +Cc: emacs-devel@gnu.org
tumashu <tumashu@163.com> writes:
> From 6074e1f4c5564e5d9e56041cc7db6fd7125571cb Mon Sep 17 00:00:00 2001
> From: Feng Shu <tumashu@163.com>
> Date: Thu, 10 Jun 2021 15:48:51 +0800
> Subject: [PATCH] Add icomplete-count-format.
>
> * lisp/icomplete.el (icomplete-count-format): New variable.
> (icomplete-exhibit): Use icomplete-count-format.
> ---
> lisp/icomplete.el | 17 +++++++++++------
> 1 file changed, 11 insertions(+), 6 deletions(-)
>
> diff --git a/lisp/icomplete.el b/lisp/icomplete.el
> index 08b4ef2030..0881bade98 100644
> --- a/lisp/icomplete.el
> +++ b/lisp/icomplete.el
> @@ -70,6 +70,10 @@ icomplete-hide-common-prefix
> :type 'boolean
> :version "24.4")
>
> +(defcustom icomplete-count-format (cons "%-7s" "%s/%s ")
> + "Format string used for the candidate count."
> + :type '(choice (const nil) (cons string string)))
You need a
:version "28.1"
here.
> (defvar icomplete-tidy-shadowed-file-names nil
> "If non-nil, automatically delete superfluous parts of file names.
> For example, if the user types ~/ after a long path name,
> @@ -696,12 +700,13 @@ icomplete-exhibit
> (overlay-put
> icomplete-overlay 'before-string
> (and icomplete-scroll
> - (let ((past (length icomplete--scrolled-past)))
> - (format
> - "%s/%s "
> - (1+ past)
> - (+ past
> - (safe-length completion-all-sorted-completions))))))
> + (format (car icomplete-count-format)
Does this really have to be another format string? Or would this always
just be used for justification?
> + (let ((past (length icomplete--scrolled-past)))
> + (format
> + (cdr icomplete-count-format)
> + (1+ past)
> + (+ past
> + (safe-length completion-all-sorted-completions)))))))
> (overlay-put icomplete-overlay 'after-string text))))))))
>
> (defun icomplete--affixate (md prospects)
--
Philip K.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re:Re: [PATCH] 0001-Add-icomplete-count-format
2021-06-10 16:23 ` Philip Kaludercic
@ 2021-06-11 0:09 ` tumashu
2021-06-17 3:24 ` tumashu
0 siblings, 1 reply; 4+ messages in thread
From: tumashu @ 2021-06-11 0:09 UTC (permalink / raw)
To: Philip Kaludercic; +Cc: emacs-devel@gnu.org
[-- Attachment #1: Type: text/plain, Size: 2579 bytes --]
At 2021-06-11 00:23:19, "Philip Kaludercic" <philipk@posteo.net> wrote:
>tumashu <tumashu@163.com> writes:
>
>> From 6074e1f4c5564e5d9e56041cc7db6fd7125571cb Mon Sep 17 00:00:00 2001
>> From: Feng Shu <tumashu@163.com>
>> Date: Thu, 10 Jun 2021 15:48:51 +0800
>> Subject: [PATCH] Add icomplete-count-format.
>>
>> * lisp/icomplete.el (icomplete-count-format): New variable.
>> (icomplete-exhibit): Use icomplete-count-format.
>> ---
>> lisp/icomplete.el | 17 +++++++++++------
>> 1 file changed, 11 insertions(+), 6 deletions(-)
>>
>> diff --git a/lisp/icomplete.el b/lisp/icomplete.el
>> index 08b4ef2030..0881bade98 100644
>> --- a/lisp/icomplete.el
>> +++ b/lisp/icomplete.el
>> @@ -70,6 +70,10 @@ icomplete-hide-common-prefix
>> :type 'boolean
>> :version "24.4")
>>
>> +(defcustom icomplete-count-format (cons "%-7s" "%s/%s ")
>> + "Format string used for the candidate count."
>> + :type '(choice (const nil) (cons string string)))
>
>You need a
>
> :version "28.1"
Added.
>
>here.
>
>> (defvar icomplete-tidy-shadowed-file-names nil
>> "If non-nil, automatically delete superfluous parts of file names.
>> For example, if the user types ~/ after a long path name,
>> @@ -696,12 +700,13 @@ icomplete-exhibit
>> (overlay-put
>> icomplete-overlay 'before-string
>> (and icomplete-scroll
>> - (let ((past (length icomplete--scrolled-past)))
>> - (format
>> - "%s/%s "
>> - (1+ past)
>> - (+ past
>> - (safe-length completion-all-sorted-completions))))))
>> + (format (car icomplete-count-format)
>
>Does this really have to be another format string? Or would this always
>just be used for justification?
This is mainly used for justification, but, maybe someone can do other eye candy things, for example:
1/1000 => M-x:
100/1000 => M-x:
by the way, icomplete-count-format is *copy* from vertico-count-format :-)
>
>> + (let ((past (length icomplete--scrolled-past)))
>> + (format
>> + (cdr icomplete-count-format)
>> + (1+ past)
>> + (+ past
>> + (safe-length completion-all-sorted-completions)))))))
>> (overlay-put icomplete-overlay 'after-string text))))))))
>>
>> (defun icomplete--affixate (md prospects)
>
>--
> Philip K.
[-- Attachment #2: 0001-Add-icomplete-count-format.patch --]
[-- Type: application/octet-stream, Size: 1946 bytes --]
From 63ca72047ec6fd7adff041278260ba00f09f61e8 Mon Sep 17 00:00:00 2001
From: Feng Shu <tumashu@163.com>
Date: Thu, 10 Jun 2021 15:48:51 +0800
Subject: [PATCH] Add icomplete-count-format.
* lisp/icomplete.el (icomplete-count-format): New variable.
(icomplete-exhibit): Use icomplete-count-format.
---
lisp/icomplete.el | 18 ++++++++++++------
1 file changed, 12 insertions(+), 6 deletions(-)
diff --git a/lisp/icomplete.el b/lisp/icomplete.el
index 08b4ef2030..3572eff93d 100644
--- a/lisp/icomplete.el
+++ b/lisp/icomplete.el
@@ -70,6 +70,11 @@ icomplete-hide-common-prefix
:type 'boolean
:version "24.4")
+(defcustom icomplete-count-format (cons "%-7s" "%s/%s ")
+ "Format string used for the candidate count."
+ :type '(choice (const nil) (cons string string))
+ :version "28.1")
+
(defvar icomplete-tidy-shadowed-file-names nil
"If non-nil, automatically delete superfluous parts of file names.
For example, if the user types ~/ after a long path name,
@@ -696,12 +701,13 @@ icomplete-exhibit
(overlay-put
icomplete-overlay 'before-string
(and icomplete-scroll
- (let ((past (length icomplete--scrolled-past)))
- (format
- "%s/%s "
- (1+ past)
- (+ past
- (safe-length completion-all-sorted-completions))))))
+ (format (car icomplete-count-format)
+ (let ((past (length icomplete--scrolled-past)))
+ (format
+ (cdr icomplete-count-format)
+ (1+ past)
+ (+ past
+ (safe-length completion-all-sorted-completions)))))))
(overlay-put icomplete-overlay 'after-string text))))))))
(defun icomplete--affixate (md prospects)
--
2.30.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-08-15 19:27 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-06-18 9:08 Re:Re:Re: [PATCH] 0001-Add-icomplete-count-format Manuel Uberti
2021-06-29 6:56 ` tumashu
2021-08-15 19:27 ` João Távora
-- strict thread matches above, loose matches on Subject: below --
2021-06-10 7:51 tumashu
2021-06-10 16:23 ` Philip Kaludercic
2021-06-11 0:09 ` tumashu
2021-06-17 3:24 ` tumashu
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.