[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[O] Re: Completing with anything
From: |
Eric Abrahamsen |
Subject: |
[O] Re: Completing with anything |
Date: |
Tue, 22 Mar 2011 11:01:49 +0800 |
User-agent: |
Gnus/5.110016 (No Gnus v0.16) Emacs/23.2 (gnu/linux) |
Stefan Monnier <address@hidden> 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 wants to try it out a propose a patch to
>>> start a discussion, maybe we could add such a thing.
>
>> 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.
>
> That might work even better, yes.
>
>
> Stefan
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 (regexp): ")
(let ((rec)
(records (bbdb-search (bbdb-records) name name name nil nil)))
(if (= (length records) 1)
(setq rec (car records))
(if (zerop (length records))
(error "No matching records")
(setq rec
(let ((int-name (ido-completing-read "Pick one: "
(mapcar 'bbdb-record-name
records))))
(car (bbdb-search (bbdb-records) int-name))))))
(insert (bbdb-dwim-net-address rec))))
#+END_SRC
- [O] Completing with anything (was: [Orgmode] Re: Announcing org-contacts, a bbdb-like contact manager for Org), Julien Danjou, 2011/03/18
- [O] Re: Completing with anything, Stefan Monnier, 2011/03/18
- [O] Re: Completing with anything, Julien Danjou, 2011/03/21
- [O] Re: Completing with anything, Tassilo Horn, 2011/03/21
- [O] Re: Completing with anything, Julien Danjou, 2011/03/21
- [O] Re: Completing with anything, Tassilo Horn, 2011/03/21
- [O] Re: Completing with anything, Stefan Monnier, 2011/03/21
- [O] Re: Completing with anything, Julien Danjou, 2011/03/21
- [O] Re: Completing with anything, Stefan Monnier, 2011/03/21
- [O] Re: Completing with anything,
Eric Abrahamsen <=
- Re: [O] Re: Completing with anything, Eric S Fraga, 2011/03/22
- [O] Re: Completing with anything, Eric Abrahamsen, 2011/03/22
- Re: [O] Re: Completing with anything, Julien Danjou, 2011/03/23
- Re: [O] Re: Completing with anything, Eric S Fraga, 2011/03/23
- Re: [O] Re: Completing with anything, Julien Danjou, 2011/03/23
- Re: [O] Re: Completing with anything, Eric S Fraga, 2011/03/23
- Re: [O] Re: Completing with anything, Cian, 2011/03/24
- Re: [O] Re: Completing with anything, Julien Danjou, 2011/03/25
- Re: [O] Re: Completing with anything, Michael Markert, 2011/03/26
- Re: [O] Re: Completing with anything, Michael Markert, 2011/03/26