all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Mauro Aranda <maurooaranda@gmail.com>
To: emacs-devel@gnu.org
Subject: widget-complete and C-g to hide *Completions*
Date: Tue, 12 Jan 2021 21:19:13 -0300	[thread overview]
Message-ID: <5ffe3c83.1c69fb81.8b3eb.1997@mx.google.com> (raw)

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.



             reply	other threads:[~2021-01-13  0:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-13  0:19 Mauro Aranda [this message]
2021-01-13  3:00 ` widget-complete and C-g to hide *Completions* Stefan Monnier
2021-01-13 12:17   ` Mauro Aranda

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5ffe3c83.1c69fb81.8b3eb.1997@mx.google.com \
    --to=maurooaranda@gmail.com \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.