[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: content management in emacs
From: |
Juan Manuel Macías |
Subject: |
Re: content management in emacs |
Date: |
Sat, 27 Feb 2021 21:11:27 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) |
Martin Steffen <msteffen@ifi.uio.no> writes:
> I am not sure about the question. If I send to an email list, it's an
> address in BBDB. So I ``invoke'' BBDB (M-x bbdb) and give it the name of
> the entry (say org-mode). That's analogous to send to a person: If you
> remember the name (or part of the name), you find the entry, send then
> compose an email ("m") on the entry.
There is also helm-bbdb, wich is very useful
(https://github.com/emacs-helm/helm-bbdb). For Gnus I have defined this:
#+begin_src emacs-lisp
(require 'helm-bbdb)
(setq message-completion-alist
'(("^\\(Newsgroups\\|Followup-To\\|Posted-To\\|Gcc\\):" . message-expand-group)
("^\\(Resent-\\)?\\(To\\|B?Cc\\):" .
helm-bbdb-expand-name)
("^\\(Reply-To\\|From\\|Mail-Followup-To\\|Mail-Copies-To\\):" .
helm-bbdb-expand-name)
("^\\(Disposition-Notification-To\\|Return-Receipt-To\\):"
. helm-bbdb-expand-name)))
#+end_src
And to insert an address at point (for example, in Org, in the `mail_to'
property):
#+begin_src emacs-lisp
(defun my-insert-mail-address-helm-bbdb (_candidate)
(save-window-excursion
(helm-bbdb--view-person-action-1 (helm-bbdb--marked-contacts))
(call-interactively 'bbdb-mail-address)
(kill-buffer))
(yank))
(add-to-list 'helm-bbdb-actions '("Insert mail address" .
my-insert-mail-address-helm-bbdb))
#+end_src
Regards,
Juan Manuel