all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Trying to understand 'icomplete-in-buffer'
@ 2021-07-01 22:55 Gabriel
  2021-07-02  0:43 ` Stefan Monnier
  0 siblings, 1 reply; 4+ messages in thread
From: Gabriel @ 2021-07-01 22:55 UTC (permalink / raw)
  To: emacs-devel

Hi,

I am trying to understand the variable 'icomplete-in-buffer' in
lisp/icomplete.el.

It's a defvar, but users continues to set this variable. I believe it's
due to a lack of documentation or due to a lack of double-dash to mark
it as internal. Some examples:

[1] https://www.reddit.com/r/emacs/comments/fswt7c/using_icomplete_vertically/
[2] https://www.reddit.com/r/emacs/comments/ftq4pq/making_icomplete_more_modern/
[3] https://emacs.stackexchange.com/questions/63340/disable-icomplete-with-emacs-find-file

The bug bug#41805 was opened because of this problem, and closed because
it was a defvar, but there was no clarification regarding the use of
this variable.

Looking at the code, it was introduced in commit 504a03813b (8 years
ago). There are only two references for this variable in the emacs
source tree in the original commit and today: 1) the variable
declaration with a nil value and 2) a condition on 'icomplete-mode' to
add the the function 'icomplete--in-region-setup' to hook
'completion-in-region-mode-hook'. I could not find any external package
that uses this variable.

I tried many approaches to use this variable in combination with
'completion-at-point', but in all cases I got either no results or a
hook error.

Any help is welcome.

Regards,
Gabriel














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

* Re: Trying to understand 'icomplete-in-buffer'
  2021-07-01 22:55 Trying to understand 'icomplete-in-buffer' Gabriel
@ 2021-07-02  0:43 ` Stefan Monnier
  2021-07-04 15:43   ` Gabriel
  0 siblings, 1 reply; 4+ messages in thread
From: Stefan Monnier @ 2021-07-02  0:43 UTC (permalink / raw)
  To: Gabriel; +Cc: emacs-devel

> It's a defvar, but users continues to set this variable. I believe it's
> due to a lack of documentation or due to a lack of double-dash to mark
> it as internal. Some examples:

I wrote it this way because I consider(ed) that code just "proof of
concept" and not working well enough to inflict it on unsuspecting users.


        Stefan




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

* Re: Trying to understand 'icomplete-in-buffer'
  2021-07-02  0:43 ` Stefan Monnier
@ 2021-07-04 15:43   ` Gabriel
  2021-07-04 21:23     ` Stefan Monnier
  0 siblings, 1 reply; 4+ messages in thread
From: Gabriel @ 2021-07-04 15:43 UTC (permalink / raw)
  To: emacs-devel

Stefan Monnier <monnier@iro.umontreal.ca> writes:

> I wrote it this way because I consider(ed) that code just "proof of
> concept" and not working well enough to inflict it on unsuspecting users.
>
>
>         Stefan

Hi Stefan,

Thanks for your response. If you think there is a room for improvements
in this or other parts of the code, tell me and I will be glad to
contribute. It's hard to tell why a code it's the way it's and what
pieces can be changed.

Thanks,
Gabriel



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

* Re: Trying to understand 'icomplete-in-buffer'
  2021-07-04 15:43   ` Gabriel
@ 2021-07-04 21:23     ` Stefan Monnier
  0 siblings, 0 replies; 4+ messages in thread
From: Stefan Monnier @ 2021-07-04 21:23 UTC (permalink / raw)
  To: Gabriel; +Cc: emacs-devel

Gabriel [2021-07-04 12:43:56] wrote:
> Stefan Monnier <monnier@iro.umontreal.ca> writes:
>> I wrote it this way because I consider(ed) that code just "proof of
>> concept" and not working well enough to inflict it on unsuspecting users.
> Thanks for your response. If you think there is a room for improvements
> in this or other parts of the code, tell me and I will be glad to
> contribute. It's hard to tell why a code it's the way it's and what
> pieces can be changed.

The problem is not so much in the code but in the behavior.
If you think the behavior is good enough, then by all means use it, but
I think it's a bit rough around the edges.


        Stefan




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

end of thread, other threads:[~2021-07-04 21:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-07-01 22:55 Trying to understand 'icomplete-in-buffer' Gabriel
2021-07-02  0:43 ` Stefan Monnier
2021-07-04 15:43   ` Gabriel
2021-07-04 21:23     ` Stefan Monnier

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.