unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
Cc: Emacs-Devel <emacs-devel@gnu.org>
Subject: RE: icomplete.el enhancement
Date: Tue, 13 Apr 2004 16:38:49 -0700	[thread overview]
Message-ID: <FDELKNEBLPKKDCEBEJCBGEHKCDAA.drew.adams@oracle.com> (raw)
In-Reply-To: <jwvd66bldg1.fsf-monnier+emacs@asado.iro.umontreal.ca>

Sorry for the confusion.

I guess several of my fixes were to *old* emacs code that has since been
cleaned up. I've looked again at the icomplete.el code for Emacs 20, and it
doesn't appear to need some of the changes I made. I've checked the behavior
a bit in vanilla (emacs -q) Emacs 20 also.

Off hand, it looks like the only real (minor) improvements I made were 1)
the different faces for stem vs remainders and 2) sorting.

(I also use a modified old library called elect-mbuf.el, and I'm not 100%
sure that I don't still need some of my changes to adapt icomplete to that.)

Again, sorry for the confusion. See below.

 - Drew

-----Original Message-----
From: monnier@iro.umontreal.ca [mailto:monnier@iro.umontreal.ca]
Sent: Tuesday, April 13, 2004 3:37 PM
To: Drew Adams
Cc: Emacs-Devel
Subject: Re: icomplete.el enhancement


> * When several completions are possible, the common completion stem
(prefix)
> is distinguished from the different completion remainders (suffixes).
> The two are shown in different faces, which are user-definable
(variables).
> Without this enhancement, incremental completion can be quite confusing
> (*not even worth it*), IMO.

>> I don't understand.  icomplete shows the common completion prefix (i.e.
the
>> string that would be inserted should the user hit TAB) between
parentheses
>> already.
>> Do you mean that your code just highlights this part in a different color
>> (additionally to the use of parentheses)?  Or does it do something
different?

Yes, you're right; sorry for the confusion: Different faces is apparently
all I added here.

> * The completion alternatives are sorted (using string<).

>> I think icomplete deserves indeed some improvement in this area.  It
should
>> also allow "cycling" and selection of the first element, as done in
iswitchb.

I'm not sure I understand the cycling. Are you thinking of applying a
most-recently used ordering, and then cycling the list?

> * Icompletion is not done if the minibuffer input begins with `(', since
the
> input is not a command name (it is probably an Emacs Lisp expression to be
> submitted for evaluation).

>> I don't understand: icomplete-mode is not activated if there is no
>> minibuffer-completion-table, so it's not activated in M-: and such.  If
you
>> see it activated when it shouldn't be, you should report it as a bug, but
>> using `(' as a hint is most likely not the right way to fix it.

I think you may be right. My definition of icomplete-exhibit is virtually
identical to the one in icomplete.el, except for this additional filter,
which inhibits action if the input starts with (, ", ', or a digit. This is
probably no longer needed.

(not (looking-at
"\\(\\s-+$\\|\\s-*\\(\\s(\\|\\s\"\\|\\s'\\|\\s<\\|[0-9]\\)\\)"))

> * Out of the box, icompletion interferes with the
> `minibuffer-completion-table' (or vice versa). To fix this, the following
> Emacs primitives have been redefined so that they avoid icompletion:
>   . read-from-minibuffer
>   . read-no-blanks-input
>   . read-string

>> Huh?  icomplete is already never enabled in such cases, AFAIK.

Ditto. Probably no longer needed.

      reply	other threads:[~2004-04-13 23:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-13 21:24 icomplete.el enhancement Drew Adams
2004-04-13 22:36 ` Stefan Monnier
2004-04-13 23:38   ` Drew Adams [this message]

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=FDELKNEBLPKKDCEBEJCBGEHKCDAA.drew.adams@oracle.com \
    --to=drew.adams@oracle.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 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).