all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Simon Josefsson <jas@extundo.com>
Subject: Re: Fast completion with visible cue?
Date: Fri, 27 Aug 2004 12:16:44 +0200	[thread overview]
Message-ID: <ilu1xhs3myb.fsf@latte.josefsson.org> (raw)
In-Reply-To: F12C4332-F7F2-11D8-A39C-000D93505B76@swipnet.se

"Jan D." <jan.h.d@swipnet.se> writes:

>> Is the following possible with some ad-on package?  If so, would it
>> make sense to enable the ad-on by default?  If not, what do people
>> think about adding this feature?
>>
>
> ...
>
>> Now, wouldn't it be Really Nice if the minibuffer prompt would
>> contain:
>>
>> Find File: ~/pro[CURSOR]ects/src/foo/doc/drafts/template/help.txt
>>
>> where CURSOR isn't shown verbatim, but indicate where the cursor is,
>> and the latter part of the string is displayed in a light gray color
>> but the earlier part of the string is in black.
>>
>> You could continue typing and TAB complete like the normal prompt, but
>> would be able to open the "suggested" filename (shown in light gray)
>> by simply pressing RET.  To really open a file called "~/pro" you
>> could press SPC DEL or similar.
>
> Care must be taken when implementing this feature.  For example, there
> should be some delay before showing the suggested part.  In Safari
> (the browser on Mac OSX) I find myself often type in a complete path
> and then hit RETURN, just to end up with a longer part that I visited
> previously.  In your example I would type
>
> Find File: ~/projects/src/foo/doc/drafts/[RETURN]
>
> only to find that help.txt is opened again.  The suggested part is added
> in the same millisecond as I hit return.  This behaviour is very 
> annoying.

I've seen it too, and I agree.  I wonder what a good default delay
would be. 100ms?

OTOH, perhaps it is better to display the cue instantly, but to only
use it as the user entry, if it had been shown to the user for 100ms.
So the user can hit RET even when the hint is shown, as long as she
doesn't wait 100ms or more.

Mozilla's URL input uses a pull down input field, so the user would
type ~/pro, and see a pull down input field with matching file names
from the history ring, and can use TAB RET to select the first one.
This is very addictive.  Of course, Emacs couldn't use TAB since it is
already used for old style file name completion.  M-TAB?

Perhaps this latter idea is less disruptive to how things used to
work.  The only difference would be that the minibuffer is enlarged a
few lines to show matching file names from the history ring, and that
M-TAB would allow the user to cycle through those entries, and place
the content of those entries in the first 'Find File: ' line.

Thanks.

  reply	other threads:[~2004-08-27 10:16 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-26 22:37 Fast completion with visible cue? Simon Josefsson
2004-08-26 22:44 ` David Kastrup
2004-08-26 23:13   ` Simon Josefsson
2004-08-27  3:51     ` Dhruva Krishnamurthy
2004-08-27  8:54     ` Andreas Schwab
2004-08-27 13:27       ` Stefan Monnier
2004-08-27 13:37         ` Andreas Schwab
2004-08-26 23:06 ` Andreas Schwab
2004-08-26 23:13   ` Miles Bader
2004-08-29 20:29     ` Juri Linkov
2004-08-30  3:10       ` Dan Nicolaescu
2004-08-30  8:22         ` Juri Linkov
2004-08-27  6:33 ` Jan D.
2004-08-27 10:16   ` Simon Josefsson [this message]
2004-08-27  7:29 ` Kim F. Storm
2004-08-27 10:07   ` Simon Josefsson
2004-08-27 10:33     ` Kim F. Storm

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=ilu1xhs3myb.fsf@latte.josefsson.org \
    --to=jas@extundo.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.