Gnus development mailing list
 help / color / mirror / Atom feed
From: Miles Bader <miles@gnu.org>
Subject: Re: How does one use ecomplete?
Date: Wed, 01 Nov 2006 08:09:37 +0900	[thread overview]
Message-ID: <874ptk13ri.fsf@catnip.gol.com> (raw)
In-Reply-To: <b4mslh51in7.fsf@jpl.org>

Katsumi Yamaoka <yamaoka@jpl.org> writes:
> Well, I don't know how I use TAB for ecomplete (it might be
> because I don't use message-x).  I use neither EUDC nor BBDB,
> but use mail-abbrevs[1] (of which database is ~/.mailrc) and

TAB in message-mode is bound to `message-tab', which for a To: header
by default ends up calling `message-expand-name'.

I think maybe message-expand-name should complete mail aliases (e.g., by
calling `mail-complete'), but it doesn't.  This is it's current
definition:

   (defun message-expand-name ()
     (if (fboundp 'bbdb-complete-name)
         (bbdb-complete-name)
       (expand-abbrev)))

Changing it to:

   (defun message-expand-name ()
     (if (fboundp 'bbdb-complete-name)
         (bbdb-complete-name)
       (and (mail-complete nil) 
            (expand-abbrev))))

Seems to make it work more naturally for me, but I don't know if it's
really the right thing to do...

The "(and (mail-complete nil) (expand-abbrev))" makes it call
expand-abbrev if the preceeding word is a valid alias and was not
expanded by mail-complete -- so hitting TAB once on a unique prefix of
some alias will complete it to the full alias name, and hitting TAB
again (or any other abbrev-expanding key) will then actually expand that
alias.  This seems pretty reasonable behavior to me.

-Miles

-- 
Americans are broad-minded people.  They'll accept the fact that a person can
be an alcoholic, a dope fiend, a wife beater, and even a newspaperman, but if a
man doesn't drive, there is something wrong with him.  -- Art Buchwald




      reply	other threads:[~2006-10-31 23:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-27 16:45 Manoj Srivastava
2006-10-30 23:35 ` Katsumi Yamaoka
2006-10-31 23:09   ` Miles Bader [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

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

  git send-email \
    --in-reply-to=874ptk13ri.fsf@catnip.gol.com \
    --to=miles@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.
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 NNTP newsgroup(s).