* widget-complete and C-g to hide *Completions*
@ 2021-01-13 0:19 Mauro Aranda
2021-01-13 3:00 ` Stefan Monnier
0 siblings, 1 reply; 3+ messages in thread
From: Mauro Aranda @ 2021-01-13 0:19 UTC (permalink / raw)
To: emacs-devel
When in some mode like emacs-lisp-mode, after the *Completions* buffer
pops up, typing C-g will hide it (at least in emacs -Q).
But when using widget-complete, which uses completion-in-region instead
of completion-at-point, that doesn't happen.
Test case would be like this:
(defcustom foo "black" "..."
:group 'emacs
:type 'color)
Eval and then M-x customize-option RET foo
Move to the color widget and type C-k to erase the value.
Then write something like "bl" and type C-M-i, to get the *Completions*
buffer, with values "black", "blue", at least, hopefully.
Type C-g: Quitting doesn't hide *Completions*, like in other modes
(e.g., emacs-lisp-mode).
I'd like to know why the use of completion-in-region in widget-complete
doesn't turn on completion-in-region-mode, and what would be the steps
to make that happen, but I got lost quickly in the completion code, so
perhaps someone else can take a look. Is it required that
completion-in-region-mode-predicate is non-nil? That is not documented,
but the code seems to expect that.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: widget-complete and C-g to hide *Completions*
2021-01-13 0:19 widget-complete and C-g to hide *Completions* Mauro Aranda
@ 2021-01-13 3:00 ` Stefan Monnier
2021-01-13 12:17 ` Mauro Aranda
0 siblings, 1 reply; 3+ messages in thread
From: Stefan Monnier @ 2021-01-13 3:00 UTC (permalink / raw)
To: Mauro Aranda; +Cc: emacs-devel
> I'd like to know why the use of completion-in-region in widget-complete
> doesn't turn on completion-in-region-mode, and what would be the steps
> to make that happen, but I got lost quickly in the completion code, so
> perhaps someone else can take a look. Is it required that
> completion-in-region-mode-predicate is non-nil?
Yes, `completion-in-region-mode` requires
`completion-in-region-mode-predicate` to do its job, so the caller needs
to set that somehow.
Stefan
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: widget-complete and C-g to hide *Completions*
2021-01-13 3:00 ` Stefan Monnier
@ 2021-01-13 12:17 ` Mauro Aranda
0 siblings, 0 replies; 3+ messages in thread
From: Mauro Aranda @ 2021-01-13 12:17 UTC (permalink / raw)
To: Stefan Monnier; +Cc: emacs-devel
Stefan Monnier <monnier@iro.umontreal.ca> writes:
>> I'd like to know why the use of completion-in-region in widget-complete
>> doesn't turn on completion-in-region-mode, and what would be the steps
>> to make that happen, but I got lost quickly in the completion code, so
>> perhaps someone else can take a look. Is it required that
>> completion-in-region-mode-predicate is non-nil?
>
> Yes, `completion-in-region-mode` requires
> `completion-in-region-mode-predicate` to do its job, so the caller needs
> to set that somehow.
>
>
> Stefan
OK, thanks!
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-01-13 12:17 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-13 0:19 widget-complete and C-g to hide *Completions* Mauro Aranda
2021-01-13 3:00 ` Stefan Monnier
2021-01-13 12:17 ` Mauro Aranda
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.