unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* ELPA: new package capf-autosuggest
@ 2021-10-20 21:30 miha
  2021-10-21 13:43 ` Philip Kaludercic
  0 siblings, 1 reply; 9+ messages in thread
From: miha @ 2021-10-20 21:30 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 927 bytes --]

I would like to submit a new package to ELPA. It enchances eshell and
comint (M-x shell for example) by displaying an "auto-suggestion" as you
type, a preview of the most recent matching history element.

Example: if your command history contains "wget example.com" and you
type "wg" at the command prompt, an overlay containing "et example.com"
will be shown after point. You can then type [C-e] to insert the text
from the overlay or [M-f] to insert a word from the overlay and so on.

If there aren't any history candidates that match input, an overlay for
the first completion candidate will be shown.

This package is inspired by the same functionality from the fish
shell[1] and zsh-autosuggestions[2] plugin for the zsh shell.

Source code is available at https://repo.or.cz/emacs-coterm.git

Thanks and best regards.

[1] https://fishshell.com/
[2] https://github.com/zsh-users/zsh-autosuggestions

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 861 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: ELPA: new package capf-autosuggest
  2021-10-20 21:30 ELPA: new package capf-autosuggest miha
@ 2021-10-21 13:43 ` Philip Kaludercic
  2021-10-21 14:10   ` miha
  0 siblings, 1 reply; 9+ messages in thread
From: Philip Kaludercic @ 2021-10-21 13:43 UTC (permalink / raw)
  To: miha; +Cc: emacs-devel

miha@kamnitnik.top writes:

> Source code is available at https://repo.or.cz/emacs-coterm.git

I like the idea, but this link seems to be pointing to the wrong repo
(or at least I just see coterm what was recently added, and nothing
called capf-autosuggest).

-- 
	Philip Kaludercic



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: ELPA: new package capf-autosuggest
  2021-10-21 13:43 ` Philip Kaludercic
@ 2021-10-21 14:10   ` miha
  2021-10-21 14:55     ` Philip Kaludercic
  0 siblings, 1 reply; 9+ messages in thread
From: miha @ 2021-10-21 14:10 UTC (permalink / raw)
  To: Philip Kaludercic; +Cc: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 462 bytes --]

Philip Kaludercic <philipk@posteo.net> writes:

> miha@kamnitnik.top writes:
>
>> Source code is available at https://repo.or.cz/emacs-coterm.git
>
> I like the idea, but this link seems to be pointing to the wrong repo
> (or at least I just see coterm what was recently added, and nothing
> called capf-autosuggest).

Whoops, thanks for pointing this out.

Correct url: https://repo.or.cz/emacs-capf-autosuggest.git
>
> -- 
> 	Philip Kaludercic

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 861 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: ELPA: new package capf-autosuggest
  2021-10-21 14:10   ` miha
@ 2021-10-21 14:55     ` Philip Kaludercic
  2021-10-21 16:01       ` miha
  0 siblings, 1 reply; 9+ messages in thread
From: Philip Kaludercic @ 2021-10-21 14:55 UTC (permalink / raw)
  To: miha; +Cc: emacs-devel

<miha@kamnitnik.top> writes:

> Philip Kaludercic <philipk@posteo.net> writes:
>
>> miha@kamnitnik.top writes:
>>
>>> Source code is available at https://repo.or.cz/emacs-coterm.git
>>
>> I like the idea, but this link seems to be pointing to the wrong repo
>> (or at least I just see coterm what was recently added, and nothing
>> called capf-autosuggest).
>
> Whoops, thanks for pointing this out.
>
> Correct url: https://repo.or.cz/emacs-capf-autosuggest.git

Two notes:

You should add the

--8<---------------cut here---------------start------------->8---
;; Copyright (C) 2021  Free Software Foundation, Inc.
--8<---------------cut here---------------end--------------->8---

notice to the begining of capf-autosuggest.el, and it think it might be
nice to use a version greater than 0.0.

-- 
	Philip Kaludercic



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: ELPA: new package capf-autosuggest
  2021-10-21 14:55     ` Philip Kaludercic
@ 2021-10-21 16:01       ` miha
  2021-10-21 17:17         ` philipk
  2021-10-21 17:18         ` Philip Kaludercic
  0 siblings, 2 replies; 9+ messages in thread
From: miha @ 2021-10-21 16:01 UTC (permalink / raw)
  To: Philip Kaludercic; +Cc: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 958 bytes --]

Philip Kaludercic <philipk@posteo.net> writes:

> <miha@kamnitnik.top> writes:
>
>> Philip Kaludercic <philipk@posteo.net> writes:
>>
>>> miha@kamnitnik.top writes:
>>>
>>>> Source code is available at https://repo.or.cz/emacs-coterm.git
>>>
>>> I like the idea, but this link seems to be pointing to the wrong repo
>>> (or at least I just see coterm what was recently added, and nothing
>>> called capf-autosuggest).
>>
>> Whoops, thanks for pointing this out.
>>
>> Correct url: https://repo.or.cz/emacs-capf-autosuggest.git
>
> Two notes:
>
> You should add the
>
> --8<---------------cut here---------------start------------->8---
> ;; Copyright (C) 2021  Free Software Foundation, Inc.
> --8<---------------cut here---------------end--------------->8---
>
> notice to the begining of capf-autosuggest.el, and it think it might be
> nice to use a version greater than 0.0.

Thanks, now done.
>
> -- 
> 	Philip Kaludercic

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 861 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: ELPA: new package capf-autosuggest
  2021-10-21 16:01       ` miha
@ 2021-10-21 17:17         ` philipk
  2021-10-21 17:18         ` Philip Kaludercic
  1 sibling, 0 replies; 9+ messages in thread
From: philipk @ 2021-10-21 17:17 UTC (permalink / raw)
  To: miha; +Cc: emacs-devel



On 21.10.2021 18:01, miha@kamnitnik.top wrote:

> Thanks, now done.

Great, it builds now.

Looking at the file, there seem to be a few checkdoc issues that could
be easily fixed. I guess that would be nice to see. Along these lines it
might also be cool to mark the Commentary sections "Instillation" (that
could be updated when the package is added), "Configuration", ... as
subsections of Commentary by having them begin with four
semicolons. That way when using outline-minor-mode, you'll see all of
them when the section is folded.

A general question I have is if this could be generalized to a general
completion system? You of course don't have to, I'm asking more out of
personal curiosity.

Otherwise, I can add it the package to ELPA with autosync'ing, unless
there are any objections.



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: ELPA: new package capf-autosuggest
  2021-10-21 16:01       ` miha
  2021-10-21 17:17         ` philipk
@ 2021-10-21 17:18         ` Philip Kaludercic
  2021-10-21 18:14           ` miha
  1 sibling, 1 reply; 9+ messages in thread
From: Philip Kaludercic @ 2021-10-21 17:18 UTC (permalink / raw)
  To: miha; +Cc: emacs-devel


<miha@kamnitnik.top> writes:

> Thanks, now done.

Great, it builds now.

Looking at the file, there seem to be a few checkdoc issues that could
be easily fixed. I guess that would be nice to see. Along these lines it
might also be cool to mark the Commentary sections "Instillation" (that
could be updated when the package is added), "Configuration", ... as
subsections of Commentary by having them begin with four
semicolons. That way when using outline-minor-mode, you'll see all of
them when the section is folded.

A general question I have is if this could be generalized to a general
completion system? You of course don't have to, I'm asking more out of
personal curiosity.

Otherwise, I can add it the package to ELPA with autosync'ing, unless
there are any objections.

-- 
	Philip Kaludercic



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: ELPA: new package capf-autosuggest
  2021-10-21 17:18         ` Philip Kaludercic
@ 2021-10-21 18:14           ` miha
  2021-10-21 18:24             ` Philip Kaludercic
  0 siblings, 1 reply; 9+ messages in thread
From: miha @ 2021-10-21 18:14 UTC (permalink / raw)
  To: Philip Kaludercic; +Cc: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 1771 bytes --]

Philip Kaludercic <philip.kaludercic@fau.de> writes:

> <miha@kamnitnik.top> writes:
>
>> Thanks, now done.
>
> Great, it builds now.
>
> Looking at the file, there seem to be a few checkdoc issues that could
> be easily fixed. I guess that would be nice to see. Along these lines it
> might also be cool to mark the Commentary sections "Instillation" (that
> could be updated when the package is added), "Configuration", ... as
> subsections of Commentary by having them begin with four
> semicolons. That way when using outline-minor-mode, you'll see all of
> them when the section is folded.

Thanks for suggestions, now done.
>
> A general question I have is if this could be generalized to a general
> completion system? You of course don't have to, I'm asking more out of
> personal curiosity.

It already is, enabling 'capf-autosuggest-mode' in an ordinary buffer
displays an auto-suggestion for the first completion at point candidate
as you type. By default, it is only displayed if point is at EOL.
However, I don't advertise this feature that much mostly because I find
it a bit intrusive. For more information, including how to lift the EOL
restriction, you can read the ";;;; Details" section.

History auto-suggestion in comint and eshell is actually just a special
case of this general mechanism for displaying the first completion at
point candidate. In comint and eshell, point is on the last line most of
the time which means that the auto-suggestions aren't obtrusive, in
fact, they are quite helpful. That is why this package mostly advertises
this sub-feature.
>
> Otherwise, I can add it the package to ELPA with autosync'ing, unless
> there are any objections.

Okay, thanks.
>
> -- 
> 	Philip Kaludercic

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 861 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: ELPA: new package capf-autosuggest
  2021-10-21 18:14           ` miha
@ 2021-10-21 18:24             ` Philip Kaludercic
  0 siblings, 0 replies; 9+ messages in thread
From: Philip Kaludercic @ 2021-10-21 18:24 UTC (permalink / raw)
  To: miha; +Cc: emacs-devel

<miha@kamnitnik.top> writes:

> Philip Kaludercic <philip.kaludercic@fau.de> writes:
>
>> <miha@kamnitnik.top> writes:
>>
>>> Thanks, now done.
>>
>> Great, it builds now.
>>
>> Looking at the file, there seem to be a few checkdoc issues that could
>> be easily fixed. I guess that would be nice to see. Along these lines it
>> might also be cool to mark the Commentary sections "Instillation" (that
>> could be updated when the package is added), "Configuration", ... as
>> subsections of Commentary by having them begin with four
>> semicolons. That way when using outline-minor-mode, you'll see all of
>> them when the section is folded.
>
> Thanks for suggestions, now done.

1+

>> A general question I have is if this could be generalized to a general
>> completion system? You of course don't have to, I'm asking more out of
>> personal curiosity.
>
> It already is, enabling 'capf-autosuggest-mode' in an ordinary buffer
> displays an auto-suggestion for the first completion at point candidate
> as you type. By default, it is only displayed if point is at EOL.
> However, I don't advertise this feature that much mostly because I find
> it a bit intrusive. For more information, including how to lift the EOL
> restriction, you can read the ";;;; Details" section.

Yes, I saw that and wanted to know if you were planning to extend
capf-autosuggest in this direction or not. It seems interesting (and I
remember CEDET had something like this), but it isn't easy to get right,
I agree.

>> Otherwise, I can add it the package to ELPA with autosync'ing, unless
>> there are any objections.
>
> Okay, thanks.

I'll wait for a day or so, just to wait for responses.

-- 
	Philip Kaludercic



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2021-10-21 18:24 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-10-20 21:30 ELPA: new package capf-autosuggest miha
2021-10-21 13:43 ` Philip Kaludercic
2021-10-21 14:10   ` miha
2021-10-21 14:55     ` Philip Kaludercic
2021-10-21 16:01       ` miha
2021-10-21 17:17         ` philipk
2021-10-21 17:18         ` Philip Kaludercic
2021-10-21 18:14           ` miha
2021-10-21 18:24             ` Philip Kaludercic

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).