Re: [O] Re: Completing with anything

2011-04-11 Thread Julien Danjou
On Sun, Apr 10 2011, Stefan Monnier wrote: 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? After completing an abbrev name, yes, but otherwise I don't think so. I.e. why don't you add such a call to

Re: [O] Re: Completing with anything

2011-04-11 Thread Julien Danjou
On Sat, Apr 09 2011, Michael Markert wrote: No, but if it's necessary (or helping) I'll do so. Well, since org-contacts is part of contrib I think it's not necessary, so I'll merge it as it is unless Bastien says I'm wrong. Thanks. -- Julien Danjou ❱ http://julien.danjou.info

Re: [O] Re: Completing with anything

2011-04-11 Thread Bastien
Julien Danjou jul...@danjou.info writes: On Sat, Apr 09 2011, Michael Markert wrote: No, but if it's necessary (or helping) I'll do so. Well, since org-contacts is part of contrib I think it's not necessary, so I'll merge it as it is unless Bastien says I'm wrong. You're right. No need

Re: [O] Re: Completing with anything

2011-04-11 Thread Michael Markert
On 11 Apr 2011, Bastien wrote: Julien Danjou jul...@danjou.info writes: On Sat, Apr 09 2011, Michael Markert wrote: No, but if it's necessary (or helping) I'll do so. Well, since org-contacts is part of contrib I think it's not necessary, so I'll merge it as it is unless Bastien says I'm

Re: [O] Re: Completing with anything

2011-04-09 Thread Julien Danjou
On Sun, Mar 27 2011, Michael Markert wrote: Attached code handles both capturing from summary and message buffer. I'd like to merge this, but I have to ask: did you signed the copyright assignement papers? -- Julien Danjou ❱ http://julien.danjou.info pgpS5hlzc8pzM.pgp Description: PGP

Re: [O] Re: Completing with anything

2011-04-09 Thread Michael Markert
On 9 Apr 2011, Julien Danjou wrote: On Sun, Mar 27 2011, Michael Markert wrote: Attached code handles both capturing from summary and message buffer. I'd like to merge this, but I have to ask: did you signed the copyright assignement papers? No, but if it's necessary (or helping) I'll do

Re: [O] Re: Completing with anything

2011-04-09 Thread Julien Danjou
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

Re: [O] Re: Completing with anything

2011-04-09 Thread Stefan Monnier
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? After completing an abbrev name, yes, but otherwise I don't think so. I.e. why don't you add such a call to org-contacts-message-complete-function? Stefan

Re: [O] Re: Completing with anything

2011-03-26 Thread Michael Markert
On 25 Mar 2011, Julien Danjou wrote: [1 text/plain; utf-8 (quoted-printable)] On Thu, Mar 24 2011, Cian wrote: Can you separate out the gnus specific code at some point. If I ever get any time (two small children and a day job, so big if) I'd like to integrate it into Wanderlust. But

Re: [O] Re: Completing with anything

2011-03-26 Thread Michael Markert
On 26 Mar 2011, Michael Markert wrote: Because Wanderlust keeps several message buffers you have to start capture from within a message buffer, not a summary buffer. But I'll look into it. Attached code handles both capturing from summary and message buffer. Michael (require 'std11) (require

Re: [O] Re: Completing with anything

2011-03-25 Thread Julien Danjou
On Thu, Mar 24 2011, Cian wrote: Can you separate out the gnus specific code at some point. If I ever get any time (two small children and a day job, so big if) I'd like to integrate it into Wanderlust. But currently the code assumes that you're using gnus. Sure, I'll add that to my todo

Re: [O] Re: Completing with anything

2011-03-24 Thread Cian
Can you separate out the gnus specific code at some point. If I ever get any time (two small children and a day job, so big if) I'd like to integrate it into Wanderlust. But currently the code assumes that you're using gnus. On Wed, Mar 23, 2011 at 3:05 PM, Julien Danjou jul...@danjou.info wrote:

Re: [O] Re: Completing with anything

2011-03-23 Thread Julien Danjou
On Tue, Mar 22 2011, Eric S Fraga wrote: How do you invoke it? I am currently struggling with the interactions between .mailrc (emacs mail aliases, expanding as abbrevs) and bbdb (expanding with TAB). This is partly why I haven't even considered using org-contacts yet... I promise you'll

Re: [O] Re: Completing with anything

2011-03-23 Thread Eric S Fraga
Julien Danjou jul...@danjou.info writes: On Tue, Mar 22 2011, Eric S Fraga wrote: How do you invoke it? I am currently struggling with the interactions between .mailrc (emacs mail aliases, expanding as abbrevs) and bbdb (expanding with TAB). This is partly why I haven't even considered

Re: [O] Re: Completing with anything

2011-03-23 Thread Julien Danjou
On Wed, Mar 23 2011, Eric S Fraga wrote: Will you provide a means to capturing email addresses from emails directly into an org-contacts db, as bbdb does with : and ; (the latter for annotation of the entry)? That would be necessary for any move away from bbdb, IMO. This is already

Re: [O] Re: Completing with anything

2011-03-23 Thread Eric S Fraga
Julien Danjou jul...@danjou.info writes: On Wed, Mar 23 2011, Eric S Fraga wrote: Will you provide a means to capturing email addresses from emails directly into an org-contacts db, as bbdb does with : and ; (the latter for annotation of the entry)? That would be necessary for any move

Re: [O] Re: Completing with anything

2011-03-22 Thread Aankhen
On Mon, Mar 21, 2011 at 22:34, Julien Danjou jul...@danjou.info wrote: On Mon, Mar 21 2011, Stefan Monnier wrote: As Tassilo mentions, maybe we could have a post-completion step that can perform some kind of expansion/replacement/cleanup once a valid completion is selected.  I'm not sure what

Re: [O] Re: Completing with anything

2011-03-22 Thread Tassilo Horn
Aankhen aank...@gmail.com writes: Hi Aankhen, Or maybe an upper layer mixing abbrev and completion? Trying one at first, the other one after. This could be useful for message-mode for example, since you probably wants to use both. Isn’t this what hippie-expand does? Oh, yes, it seems so.

Re: [O] Re: Completing with anything

2011-03-22 Thread Julien Danjou
On Tue, Mar 22 2011, Tassilo Horn wrote: So Julien, maybe you want a `try-expand-org-contact' function, and add that to `hippie-expand-try-functions-list', and bind `hippie-expand' to some key. I want to integrate into message-mode. So I don't want to bind any key, nor rebind TAB. :) --

Re: [O] Re: Completing with anything

2011-03-22 Thread Tassilo Horn
Julien Danjou jul...@danjou.info writes: So Julien, maybe you want a `try-expand-org-contact' function, and add that to `hippie-expand-try-functions-list', and bind `hippie-expand' to some key. I want to integrate into message-mode. So I don't want to bind any key, nor rebind TAB. :) Ok, I

[O] Re: Completing with anything

2011-03-22 Thread Dimitri Fontaine
Stefan Monnier monn...@iro.umontreal.ca writes: As Tassilo mentions, maybe we could have a post-completion step that can perform some kind of expansion/replacement/cleanup once a valid completion is selected. I'm not sure what that would look like in terms of code and API, but if someone

Re: [O] Re: Completing with anything

2011-03-22 Thread Eric S Fraga
Eric Abrahamsen e...@ericabrahamsen.net writes: [...] This is what I've been using to insert other people's contact information into emails. Probably no good for general use, but maybe will provide food for thought. #+BEGIN_SRC emacs-lisp (defun my-cite-contact (name) (interactive sName

[O] Re: Completing with anything

2011-03-22 Thread Eric Abrahamsen
Eric S Fraga e.fr...@ucl.ac.uk writes: Eric Abrahamsen e...@ericabrahamsen.net writes: [...] This is what I've been using to insert other people's contact information into emails. Probably no good for general use, but maybe will provide food for thought. #+BEGIN_SRC emacs-lisp (defun

[O] Re: Completing with anything

2011-03-21 Thread Julien Danjou
On Fri, Mar 18 2011, Stefan Monnier wrote: There's a misunderstanding: AFAIK the patch sent by Tassilo does not make the completion-at-point-function return a function that performs completion but does properly return completion data (i.e. region start, region end, and completion table), part

[O] Re: Completing with anything

2011-03-21 Thread Tassilo Horn
Julien Danjou jul...@danjou.info writes: Hi Julien, To be clear, the things that disturbs me is that this simple test case does not work as I would like it to: #+begin_src emacs-lisp (defun jd:completion-at-point-test () (list (point-at-bol) (point) '(Steve John))) (add-to-list

[O] Re: Completing with anything

2011-03-21 Thread Julien Danjou
On Mon, Mar 21 2011, Tassilo Horn wrote: Sorry, but I totally missed the point of the example. :-) Damn it! I tried hard. :-) Isn't completion of L to Lionel at the beginning of a line exactly what your completion function should enable? No. To give a even more concrete application of my

[O] Re: Completing with anything

2011-03-21 Thread Tassilo Horn
Julien Danjou jul...@danjou.info writes: Hi Julien, Isn't completion of L to Lionel at the beginning of a line exactly what your completion function should enable? No. To give a even more concrete application of my example: I'd like org-contacts to give completion for email addresses or

[O] Re: Completing with anything

2011-03-21 Thread Stefan Monnier
There's a misunderstanding: AFAIK the patch sent by Tassilo does not make the completion-at-point-function return a function that performs completion but does properly return completion data (i.e. region start, region end, and completion table), part of which happens to be represented by a

[O] Re: Completing with anything

2011-03-21 Thread Julien Danjou
On Mon, Mar 21 2011, Stefan Monnier wrote: That sentence is obsolete. Sorry 'bout that. A collection can be any function, including a lambda expression. Should I open a bug about that to keep track of it? (asking in case you're already working on a fix or not) completion-at-point-function

[O] Re: Completing with anything

2011-03-21 Thread Stefan Monnier
What I'd like to do is that if the user enters: docTAB is that it can be completed to Emmett Brown gigaw...@delorean.com In a BBDB discussion, I suggested to complete the above to Emmett Brown \doc\ gigaw...@delorean.com, but it's true that you may prefer to keep the nickname

[O] Re: Completing with anything

2011-03-21 Thread Stefan Monnier
As Tassilo mentions, maybe we could have a post-completion step that can perform some kind of expansion/replacement/cleanup once a valid completion is selected. I'm not sure what that would look like in terms of code and API, but if someone wants to try it out a propose a patch to start a

[O] Re: Completing with anything

2011-03-21 Thread Eric Abrahamsen
Stefan Monnier monn...@iro.umontreal.ca writes: As Tassilo mentions, maybe we could have a post-completion step that can perform some kind of expansion/replacement/cleanup once a valid completion is selected. I'm not sure what that would look like in terms of code and API, but if someone

[O] Re: Completing with anything

2011-03-18 Thread Stefan Monnier
For more complex cases, there is also the issue of what to do when some parts of the completion are case-sensitive and other parts aren't (e.g. completion of case-sensitive envvars in case-insensitive file names), although this is less important for completion-at-point than for minibuffer