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: Eric S Fraga
Subject: Re: [O] Re: Completing with anything
Date: Tue, 22 Mar 2011 14:13:42 +0000
User-agent: Gnus/5.110016 (No Gnus v0.16) Emacs/24.0.50 (gnu/linux)

Eric Abrahamsen <address@hidden> 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 (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

This looks quite nice; I have been missing the possibility of a regex
search for mail addresses and the combination with ido is quite
appealing.

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...

As always, with Emacs, too many choices, too little time!  ;-)

-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1
: using Org-mode version 7.5 (release_7.5.92.gf702.dirty)



reply via email to

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