emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] org-contacts email completion by tags


From: Daimrod
Subject: Re: [O] org-contacts email completion by tags
Date: Thu, 05 Jun 2014 20:50:40 +0900
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux)

John Kitchin <address@hidden> writes:

> neat idea. This code does exactly what I need for the completion for a
> whole tag query. It should be possible to integrate that into
> completion.
>
> (defun insert-emails-from-tags (tags)
>   (interactive "sTags: ")
>   (insert
>    (save-window-excursion
>      (find-file "contacts-bbdb.org")
>      (mapconcat
>       'identity
>       (let ((todo-only nil))
>     (org-scan-tags
>      (lambda ()
>        (org-entry-get (point) "EMAIL")) ; action
>      (cdr (org-make-tags-matcher tags)) ; matcher
>      nil)) ", "))))
>
> It should be possible to integrate this into the org-contacts database
> to get this with completion. I will look into this later today. Thanks
> for the ideas.

The completion for group based on tags is done in the function
`org-contacts-complete-group'.

It's been a long time since I played with the completion mechanism, so I
don't remember exactly how it worked. Maybe you can replace the mapcar
with your function, but it might a bit more tricky than that, especially
to handle empty result.

Thanks for your work :)

Best,

-- 
Daimrod/Greg



reply via email to

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