[imp] Autocomplete auto-select when composing?

Michael Wing marsfurrycreature at gmail.com
Thu Aug 2 13:29:54 UTC 2012


>
> Quoting Michael Wing <marsfurrycreature at gmail.com>:
>>
>>  When composing a message, after typing a few characters into the "To"
>>> field, the autocomplete brings up a dropdown list of matching addresses.
>>> Is there any way to make it so that the address is actually populated IN
>>> the To field?  For instance, if there is only one matching address,
>>> currently I still have to hit Tab, or the down-arrow to select that
>>> address.
>>>
>>
>> That is correct.
>>
>>  Ideally, that one single address would be automatically populated
>>> in the To field.
>>>
>>
>> This is a terrible idea.  Just because there is one entry, doesn't mean
>> that this is the *correct* entry.  That is a dangerous, and incorrect,
>> assumption.
>>
>
> Particularly given the current bug where Imp matches email addresses to
> contacts with multiple emails, but only returns the first email address as
> an auto-complete match.
>
>
>
>> This is a very common scenario:
>>
>> 1. Enter a few characters.
>> 2. Auto-complete comes up with 1 entry, but it is the wrong entry.
>> 3. User realizes that maybe he doesn't have address of user he wants to
>> send to, so he wants to cancel auto-correct.
>> 4. Incorrect auto-correct entry is populated in address box.
>>
>> It is correct UI to require the user to verify that the address is
>> proper/correct.  An address should NEVER be automatically inserted into the
>> address field without user verification.
>>
>> michael
>>
>
>
> ...which, BTW, is what Outlook does - when entering text it offers
> matches, but you have to physically select it (with either mouse or by
> hitting Enter) for that suggestion to be accepted.
>
> Current Imp behaviour is just fine...
>
> Simon
>
>
Actually, I modified the patch a bit more to allow you to hit either a
comma or semi-colon in addition to RETURN to automatically fill in the
top-most selection, while allowing TAB to select and move on.

--- ./keynavlist.js.orig        2012-08-02 08:18:03.000000000 -0500
+++ ./keynavlist.js     2012-08-02 08:28:12.000000000 -0500
@@ -202,7 +202,14 @@
         }

         switch (e.keyCode) {
+
         case Event.KEY_TAB:
+            this.opts.onChoose(this.getCurrentEntry());
+            this.hide();
+            return;
+
+        case 186:  // semi-colon
+        case 188:  // comma
         case Event.KEY_RETURN:
             this.opts.onChoose(this.getCurrentEntry());
             this.hide();
@@ -283,6 +290,7 @@

     getCurrentEntry: function()
     {
+        if (! this.selected) this.markNext();
         return this.selected
             ? this.selected.retrieve('v')
             : null;


More information about the imp mailing list