* How does one use ecomplete?
@ 2006-10-27 16:45 Manoj Srivastava
2006-10-30 23:35 ` Katsumi Yamaoka
0 siblings, 1 reply; 3+ messages in thread
From: Manoj Srivastava @ 2006-10-27 16:45 UTC (permalink / raw)
Hi,
I have been using message-x, which binds <TAB> to
message-x-tab -- which works great, most of the time. Unfortunately,
it also seems to block ecomplete -- I can see all the options that
ecomplete has found in the minibuffer, but there is no way to select
any of them.
So, I stopped using message-x -- with the result that <TAB> in
the to header runs the command message-tab, which consults
message-completion-alist,
("^\\(Resent-\\)?\\(To\\|B?Cc\\):" . message-expand-name)
Now, message-expand-name find my bbdb, and runs
bbdb-complete-name. running expand-abbrev does not help -- No
ecompletion :(
My message-mail-alias-type is set to 'ecomplete, fwiw.
Is there someway to have ecomplete take precedence, or if no
ecomplete matches are found, to have tab fall back to message-tab (or
message-x-tab)? Failing that, How may I add the ecomplete selection
entry point to `message-x-unknown-header-function', which is the
function called when the message-x completion function has not done
anything.
manoj
--
You may be infinitely smaller than some things, but you're infinitely
larger than others.
Manoj Srivastava <srivasta@acm.org> <http://www.golden-gryphon.com/>
1024D/BF24424C print 4966 F272 D093 B493 410B 924B 21BA DABB BF24 424C
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: How does one use ecomplete?
2006-10-27 16:45 How does one use ecomplete? Manoj Srivastava
@ 2006-10-30 23:35 ` Katsumi Yamaoka
2006-10-31 23:09 ` Miles Bader
0 siblings, 1 reply; 3+ messages in thread
From: Katsumi Yamaoka @ 2006-10-30 23:35 UTC (permalink / raw)
>>>>> In <87odrx6724.fsf@glaurung.internal.golden-gryphon.com>
>>>>> Manoj Srivastava wrote:
> I have been using message-x, which binds <TAB> to
> message-x-tab -- which works great, most of the time. Unfortunately,
> it also seems to block ecomplete -- I can see all the options that
> ecomplete has found in the minibuffer, but there is no way to select
> any of them.
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
ecomplete. I type `di', ecomplete shows some candidates in the
minibuffer, and I choose ding@gnus.org among them using M-n, M-p
and RET. Or I type `ding SPC'[2] to get ding@gnus.org using
mail-abbrevs.
[1] To use both mail-abbrevs and ecomplete, I use the following:
--8<---------------cut here---------------start------------->8---
(setq message-mail-alias-type 'ecomplete
message-self-insert-commands '(self-insert-command
egg-self-insert-command))
(add-hook 'message-setup-hook
(lambda nil
(if (fboundp 'mail-abbrevs-setup)
(mail-abbrevs-setup)
(if (fboundp 'mail-aliases-setup)
(mail-aliases-setup)))))
--8<---------------cut here---------------end--------------->8---
[2] I also use TAB, ',', etc. instead of SPC.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: How does one use ecomplete?
2006-10-30 23:35 ` Katsumi Yamaoka
@ 2006-10-31 23:09 ` Miles Bader
0 siblings, 0 replies; 3+ messages in thread
From: Miles Bader @ 2006-10-31 23:09 UTC (permalink / raw)
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-10-31 23:09 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-10-27 16:45 How does one use ecomplete? Manoj Srivastava
2006-10-30 23:35 ` Katsumi Yamaoka
2006-10-31 23:09 ` Miles Bader
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).