A few issues of how auto notes currently works:
- Expansion of bbdb-auto-notes-rules looks cheap operation to me so
caching is unnecessary. Not worth the trouble of user having to
remember changing bbdb-auto-notes-rules-expanded to nil whenever they
change bbdb-auto-notes-rules.
- Another annoyance is that FIELD could only name those in NOTES.
For example:
(setq bbdb-auto-notes-rules
'(("Organization" (".*" organization "\\&"))))
does not update the organisation of the record.
Leo
================
commit d05e500b183f28718ff5f3b98028576d8e1482cc (HEAD, refs/heads/leo)
Date: Thu May 5 13:45:24 2011 +0800
Fix wrong expansion of rules in bbdb-auto-notes
---
lisp/bbdb-mua.el | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
Modified lisp/bbdb-mua.el
diff --git a/lisp/bbdb-mua.el b/lisp/bbdb-mua.el
index f4d691ac..d88aa960 100644
--- a/lisp/bbdb-mua.el
+++ b/lisp/bbdb-mua.el
@@ -812,7 +812,7 @@ (defun bbdb-auto-notes (record)
;; For speed-up expanded rules are stored in
`bbdb-auto-notes-rules-expanded'.
(when (and bbdb-auto-notes-rules
(not bbdb-auto-notes-rules-expanded))
- (let (expanded mua from-to)
+ (let (expanded mua from-to header)
(dolist (rule bbdb-auto-notes-rules)
;; Which MUA do we want?
(if (or (stringp (car rule))
@@ -825,6 +825,7 @@ (defun bbdb-auto-notes (record)
(setq from-to t)
(setq from-to (car rule)
rule (cdr rule)))
+ (setq header (car rule))
(let (string field replace elt-e)
(dolist (elt (cdr rule))
(if (consp (setq string (cdr elt)))
@@ -835,7 +836,7 @@ (defun bbdb-auto-notes (record)
(setq field 'notes
replace nil))
(push (list (car elt) field string replace) elt-e))
- (push (append (list mua from-to) (nreverse elt-e)) expanded)))
+ (push (append (list mua from-to header) (nreverse elt-e))
expanded)))
(setq bbdb-auto-notes-rules-expanded (nreverse expanded))))
(dolist (rule bbdb-auto-notes-rules-expanded)
------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network
management toolset available today. Delivers lowest initial
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
_______________________________________________
[email protected]
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/