emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Re: Completing with anything


From: Julien Danjou
Subject: Re: [O] Re: Completing with anything
Date: Sat, 09 Apr 2011 17:11:14 +0200
User-agent: Gnus/5.110016 (No Gnus v0.16) Emacs/24.0.50 (gnu/linux)

On Mon, Mar 21 2011, Julien Danjou wrote:

> I see, that makes sense. I think that completion is not what I want to
> use as Tassilo suggested. I've been that way just because this is what
> is used in `message.el'. Maybe it requires a change too to turn towards
> an `abbrev' use. :)

Actually, it does not require any change, but there is an issue I'm not
sure how to resolve.

On <tab>, message-mode calls `completion-at-point-function', which calls
first my `org-contacts-message-complete-function' and then
`message-completion-function'.

If you type someone's nickname, `org-contacts-message-complete-function'
will not return any match. So I hacked it to return only the nickname,
like 'j<tab>' would return 'jd'.

Then, using the abbrev table, I manage to make jd expand to my
name+email but I have to press space. If I press <tab>, the completion
kicks in, and re-complete 'jd' to 'jd', and `expand-abbrev' is never
called. I need to press 'space', which is not very handy.

It seems that completion and abbrev are (too much) orthogonal: you
cannot easily complete an item from the abbrev table using completion.

So now, I wonder: wouldn't it be a good idea to add a call to
`expand-abbrev' just after `completion-at-point' is being called?

-- 
Julien Danjou
❱ http://julien.danjou.info

Attachment: pgplwvjcodatc.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]