|
|
Sponsor |
Re: Bug: bbdb-merge-interactively and bbdb-create-internal treat NET differ: msg#00004emacs.bbdb.user
On Monday, February 9, 2004 at 17:18:49, Reiner Steib wrote: > On Sun, Feb 01 2004, Ronan Waide wrote: > > > I've tweaked this to automatically listify the mail addresses if > > they're not already in list form. > > Thanks. > > > Try what's in CVS and see if it works for you. > > `bbdb-merge-interactively' works now. But another (unrelated?) > problem appeared: There is a list of records where we expect a record. Below is a patch for approval, discussion and some other things beside the bug described above ... Index: lisp/bbdb-com.el =================================================================== RCS file: /cvsroot/bbdb/bbdb/lisp/bbdb-com.el,v retrieving revision 1.169 diff -u -r1.169 bbdb-com.el --- lisp/bbdb-com.el 13 Oct 2003 08:38:53 -0000 1.169 +++ lisp/bbdb-com.el 11 Feb 2004 16:40:21 -0000 @@ -981,7 +981,9 @@ (bbdb-change-record record need-to-sort) (bbdb-redisplay-one-record record) ;; (bbdb-offer-save) - (if (and (eq 'property (car field)) (eq 'mail-alias (caadr field))) + (if (and (eq 'property (car field)) + (or (eq 'mail-alias (caadr field)) + (eq 'net (caadr field)))) (setq bbdb-define-all-aliases-needs-rebuilt 'edit)) )) @@ -1206,10 +1208,11 @@ (if bbdb-no-duplicates-p (let ((rest newnets)) (while rest - (let ((old (bbdb-gethash (downcase (car rest))))) - (if (and old (not (eq old bbdb-record))) + (let ((old (delete bbdb-record (bbdb-gethash (downcase (car rest)))))) + (if old (error "net address \"%s\" is used by \"%s\"" - (car rest) (bbdb-record-name old)))) + (car rest) (mapconcat (lambda (r) (bbdb-record-name r)) + old ", ")))) (setq rest (cdr rest))))) ;; then update. (let ((rest oldnets)) @@ -2594,11 +2597,11 @@ "*The type of alias which are created. first: Default is to generate an abbrev which is \"alias\" and expands to the primary net. -star: Generate an extra alias \"<alias>*\" whic expands to all nets of an +star: Generate an extra alias \"<alias>*\" which expands to all nets of an record. -all: Generate an alias as for all nets ('star) and an alias for each net - as \"<alias>n\" where n is the position of the net in the nets of the - record." +all: Generate an alias all nets (as for 'star) and an alias for each net + as \"<alias>n\" where n is the position of the net in the nets of the + record." :group 'bbdb :type '(choice (symbol :tag "Only first" first) (symbol :tag "<alias>* for all nets" star) @@ -2718,6 +2721,7 @@ ;; 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,7 +2743,14 @@ (setq bbdb-define-all-aliases-needs-rebuilt nil) (bbdb-define-all-aliases)))) -(defun bbdb-mail-abbrev-expand-hook (records) +(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 ------------------------------------------------------- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click _______________________________________________ bbdb-info@xxxxxxxxxxxxxxxxxxxxx https://lists.sourceforge.net/lists/listinfo/bbdb-info BBDB Home Page: http://bbdb.sourceforge.net/
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Mail alias, jerome . besnard+news |
|---|---|
| Next by Date: | Re: Mail alias, Robert Widhopf-Fenk |
| Previous by Thread: | Re: Bug: bbdb-merge-interactively and bbdb-create-internal treat NET differently, Reiner Steib |
| Next by Thread: | Re: Bug: bbdb-merge-interactively and bbdb-create-internal treat NET differently, Reiner Steib |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
Free MagazinesCisco NewsReceive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business. subscribe Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field. subscribe The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business. subscribe Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company. subscribe Total Telecom Total Telecom is "The Economist of the communications industry". subscribe |
Home | sitemap
| advertise | OSDir is
an inevitable website.
|