[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Orgmode] Re: Announcing org-contacts, a bbdb-like contact manager f
From: |
Tassilo Horn |
Subject: |
Re: [Orgmode] Re: Announcing org-contacts, a bbdb-like contact manager for Org |
Date: |
Fri, 11 Feb 2011 11:21:56 +0100 |
User-agent: |
Gnus/5.110011 (No Gnus v0.11) Emacs/24.0.50 (gnu/linux) |
Stefan Monnier <address@hidden> writes:
Hi Stefan,
>> Typing 'a' complete to 'aA' (instead of 'Anne <mailaddress>') and
>> then does nothing since aA is not valid.
>
>> I'm not sure completion-at-point-functions is correctly usable in
>> this same condition as message/bbdb completion was. The latter used
>> to return a function which is marked as decouraged in
>> `completion-at-point-functions' docstring. So org-contacts does not
>> use it. OTOH, returning a (START END COLLECTION) triplet is not very
>> usable since if you return a collection that start with a different
>> character set than (buffer-substring start end), it does not work.
>
> I don't fully understand what you're saying, probably for lack of
> context, but at least it's not true that "if you return a collection
> that start with a different character set than (buffer-substring start
> end), it doesn't work". That simply depends on completion-styles (and
> completion-ignore-case of course).
I've just edebugged Juliens function, and if I try to complete
To: Stefan Monnier <address@hidden>, a<tab>
in this message buffer, his function returns
(376 377 (#("Andreas XXX <address@hidden>" 0 12 (org-category "contacts"
fontified nil))))
which is correct. Case didn't get accounted, and that's the only
possible completion. However, what gets inserted after the "a" is only
a TAB character.
The value of `completion-styles' in the current message buffer is
(basic initials partial-completion),
which should be ok for that kind of completion.
But the global value of completion-ignore-case is nil. So the problem
seems to be that Julien's completion at point functions respects the
value of his own `org-contacts-completion-ignore-case' variable when
*calculating* completions, but it is not considered anymore when the
completion style *applies* the completions.
When I do
(set (make-local-variable 'completion-ignore-case) t)
in the current message buffer and try again, then "a<tab>" is correctly
completed to the Andreas Julien's function calculated. However, I want
case insensitive completion only for contact completion in the headers,
but not in the message body.
So the question is: how can the completion-ignore-case value be
propagated from the completion gathering function in
`completion-at-point-functions' to the function that actually applies
this completion, without having to modify the global or buffer local
value of `completion-ignore-case'?
Bye,
Tassilo
- [Orgmode] Re: Announcing org-contacts, a bbdb-like contact manager for Org, (continued)
- [Orgmode] Re: Announcing org-contacts, a bbdb-like contact manager for Org, Dan Griswold, 2011/02/10
- [Orgmode] Re: Announcing org-contacts, a bbdb-like contact manager for Org, Dan Davison, 2011/02/10
- Re: [Orgmode] Re: Announcing org-contacts, a bbdb-like contact manager for Org, Julien Danjou, 2011/02/10
- Re: [Orgmode] Re: Announcing org-contacts, a bbdb-like contact manager for Org, John Hendy, 2011/02/10
- [Orgmode] Re: Announcing org-contacts, a bbdb-like contact manager for Org, Dan Davison, 2011/02/10
- [Orgmode] Re: Announcing org-contacts, a bbdb-like contact manager for Org, Rodrigo Lazo, 2011/02/10
- [Orgmode] Re: Announcing org-contacts, a bbdb-like contact manager for Org, Tassilo Horn, 2011/02/10
- Re: [Orgmode] Re: Announcing org-contacts, a bbdb-like contact manager for Org, Julien Danjou, 2011/02/10
- Re: [Orgmode] Re: Announcing org-contacts, a bbdb-like contact manager for Org, Stefan Monnier, 2011/02/10
- Re: [Orgmode] Re: Announcing org-contacts, a bbdb-like contact manager for Org,
Tassilo Horn <=
- Re: [Orgmode] Re: Announcing org-contacts, a bbdb-like contact manager for Org, Stefan Monnier, 2011/02/11
- Re: [Orgmode] Re: Announcing org-contacts, a bbdb-like contact manager for Org, Tassilo Horn, 2011/02/11
- Re: [Orgmode] Re: Announcing org-contacts, a bbdb-like contact manager for Org, Stefan Monnier, 2011/02/11
- Re: [Orgmode] Re: Announcing org-contacts, a bbdb-like contact manager for Org, Tassilo Horn, 2011/02/12
- Re: [Orgmode] Re: Announcing org-contacts, a bbdb-like contact manager for Org, Julien Danjou, 2011/02/21
- [Orgmode] Re: Announcing org-contacts, a bbdb-like contact manager for Org, Thierry Volpiatto, 2011/02/11
- Re: [Orgmode] Announcing org-contacts, a bbdb-like contact manager for Org, Darlan Cavalcante Moreira, 2011/02/11
- Re: [Orgmode] Announcing org-contacts, a bbdb-like contact manager for Org, Bastien, 2011/02/12