On Monday, November 10, 2003 at 08:10:44, Robert P. Goldman wrote:
> 
> Actually, there are pro's and cons to the way BBDB does mail
> aliases. On the "pro" side, you get to see who will receive your
> email.  On the "con" side, the mail alias is stripped away and lost.
> This means that you can't do anything clever anywhere else with
> filing the email (based on addressees), etc.

Recently I though about adding a new hook-variable, i.e.
bbdb-mail-abbrev-expand-hooks called when expanding an
alias.

Something similar as below ... would that help?

Ciao Robert

Index: bbdb-com.el
===================================================================
RCS file: /cvsroot/bbdb/bbdb/lisp/bbdb-com.el,v
retrieving revision 1.169
diff -c -r1.169 bbdb-com.el
*** bbdb-com.el 13 Oct 2003 08:38:53 -0000      1.169
--- bbdb-com.el 11 Nov 2003 09:36:14 -0000
***************
*** 2718,2723 ****
--- 2720,2726 ----
            ;; these to records, which is plenty fast.
            (fset alias (list 'lambda '()
                              (list 'bbdb-mail-abbrev-expand-hook
+                                   alias
                                    (list 'quote
                                          (mapcar (lambda (x)
                                                    (car (bbdb-record-net x)))
***************
*** 2739,2745 ****
        (setq bbdb-define-all-aliases-needs-rebuilt nil)
        (bbdb-define-all-aliases))))
  
! (defun bbdb-mail-abbrev-expand-hook (records)
    (mail-abbrev-expand-hook)
    (when bbdb-completion-display-record
      (if bbdb-use-pop-up
--- 2742,2755 ----
        (setq bbdb-define-all-aliases-needs-rebuilt nil)
        (bbdb-define-all-aliases))))
  
! (defcustom bbdb-mail-abbrev-expand-hook nil
!   "*Hook or hooks invoked each time an alias is expanded.
! The hook is called with two arguments the alias and the list of records."
!   :group 'bbdb-hooks
!   :type 'hook)
! 
! (defun bbdb-mail-abbrev-expand-hook (alias records)
!   (run-hook-with-args 'bbdb-mail-abbrev-expand-hook alias records)
    (mail-abbrev-expand-hook)
    (when bbdb-completion-display-record
      (if bbdb-use-pop-up




-------------------------------------------------------
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
_______________________________________________
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/

Reply via email to