all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: Alexis <flexibeast@gmail.com>, Eric Hanchrow <eric.hanchrow@gmail.com>
Cc: 19474@debbugs.gnu.org
Subject: bug#19474: 24.4; icomplete fails to insert character with C-x 8
Date: Tue, 12 Jan 2016 21:39:26 -0800 (PST)	[thread overview]
Message-ID: <6750b845-f8d2-4418-b98c-e1f3d17a7911@default> (raw)
In-Reply-To: <87mvsa9jz1.fsf@gmail.com>

> It seems to me that the issue here is that icomplete expects one
> to accept completions via C-j (`minibuffer-force-complete-and-exit`)
> rather than RET (which is bound to `minibuffer-exit`).

Yes, exactly.

> i myself find this behaviour
> counterintuitive, and would prefer that RET also be bound to
> `minibuffer-force-complete-and-exit`, since i would still be able
> to exit the minibuffer via C-g. i wonder if there are people
> relying on RET being bound to `minibuffer-exit`?

Yes, there are.  Icomplete's C-j does not have the same
behavior as RET.  If Icomplete treated RET the way it
treats C-j then that would mean that you could never input
anything that matched a completion candidate, without
choosing that match.

IOW, it would remove the possibility of lax completion.

You could not, for example, use `C-x b' to create a new
buffer `foo' if there were already a buffer `foobar' -
typing `foo RET' would just choose `foobar'.

IOW, even in Icomplete mode, RET is used normally in the
minibuffer: it accepts the text typed so far or, if a
match is required in order to exit and there is only one
possible match, it accepts that match.

C-j for Icomplete mode is used not to input what you have
typed so far but to input the first of the available matches.
IOW, it completes and then exits (similar to what
`minibuffer-complete-and-exit' does).

Completion for `C-x 8 RET' is lax - a match is not required.

This is because you can enter something other than a match
of one of the char names - you can enter a code point.
E.g., you can type `1F4A9 RET' to get your pile of poo.

The code point here is not a _match_ for the char name
(and only char names are completion candidates - there is
no _completion_ against code points).  The code point is
simply another acceptable input, and it has the same effect
(inserts the same char).

---

FWIW, if you were to do this in Icicles, with the default
settings, you _could_ use RET, for this reason:

With the default settings your input for `C-x 8 RET' can
match any combination of parts of a 3-part multi-completion:
char name, code point, and the char itself.  (You can
complete the name or the code point, or both.  And you can
alternatively type the code point or the char to see what
the name is.)

And with the default settings, if your input matches only
a char name or a code point, and if there is only one match,
then that char is inserted.  (Again, you can complete
against the name, the code point, or the char itself, or
any combination of these parts.)

(If option `icicle-read-char-by-name-multi-completion-flag'
is nil, which is not the default value, then the behavior
is similar to vanilla Emacs,except that you get Icicles
matching against the char name.)





  reply	other threads:[~2016-01-13  5:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-30 18:54 bug#19474: 24.4; icomplete fails to insert character with C-x 8 Eric Hanchrow
2016-01-13  4:33 ` Alexis
2016-01-13  5:39   ` Drew Adams [this message]
2016-01-13  7:19     ` Alexis
2016-01-13 15:17       ` Drew Adams
2016-01-22  7:12         ` Alexis

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=6750b845-f8d2-4418-b98c-e1f3d17a7911@default \
    --to=drew.adams@oracle.com \
    --cc=19474@debbugs.gnu.org \
    --cc=eric.hanchrow@gmail.com \
    --cc=flexibeast@gmail.com \
    /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.