unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Herbert Euler <herberteuler@hotmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: Two problems of completion
Date: Tue, 29 Apr 2008 23:47:34 -0400	[thread overview]
Message-ID: <jwvy76w3tav.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <BAY143-W271E6DA6CB49DBBE037031DAD80@phx.gbl> (Herbert Euler's message of "Wed, 30 Apr 2008 10:57:29 +0800")

> Currently SPC is bound to minibuffer-complete-word in minibuffer.
> With partial completion facilities implemented for minibuffer, I don't
> know whether it is still right to bind SPC to this command, but if so
> I find two problems.

> 1. Special case: the string before completion is the empty string "".

> In this case, completion--try-word-completion will see a completion
> available, i.e. ("" . 0), and then try firstly completing with " " (""
> + " ") and then "-" ("" + "-").  Partial completion often (e.g. in a
> command execution context, i.e. typing M-x then typing SPC) returns a
> result of ("-" . 0), make a completion available.

> I think when the user press SPC directly in such a case, it means that
> the user wants to see a list of available completions, instead of
> wanting a partially completed word.  So this case might need special
> handling.

Yes, it looks like a poor situation indeed.  Then again pressing SPC at
an empty minibuffer might be because you do want to insert a leading SPC
(to enter the name of a hidden buffer, for example).

I see that `partial-completion-mode' suffers from the same problem.

Hmm... not sure what to do.


> 2. Minibuffer content rewriting.

> The current minibuffer content rewriting facility in
> completion--do-completion seems not for partial completion.

I've just fixed a bug w.r.t computation of the new position of point
after completion.   I believe that's what you were experiencing,


        Stefan




  reply	other threads:[~2008-04-30  3:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-30  2:57 Two problems of completion Herbert Euler
2008-04-30  3:47 ` Stefan Monnier [this message]
2008-04-30 22:01 ` Richard M Stallman
2008-05-23 15:20 ` Stefan Monnier
2008-05-23 16:12   ` Herbert Euler

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=jwvy76w3tav.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@gnu.org \
    --cc=herberteuler@hotmail.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 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).