On Sat Aug 2 2014 H. Dieter Wilhelm wrote:
> Yes, with above change it is possible to create mail-aliases with
> bbdb-do-all-records in a *sequential* way for all entries.  Thanks
> 
> Would it also be possible to do this for all selected entries with the
> same value of a mail-alias *at once*. Can I achieve this with defining a
> function bbdb-init-mail-alias?

If you have a scheme how your aliases, are derived, say, from the
name of each record, this function may come handy.  

However, bbdb-add-mail-alias is intended as interactive command,
giving the user some control.  If you want to define the same alias
for multiple records, you could define a wrapper for
bbdb-add-mail-alias which calls this function for each record and
with arg ALIAS being whatever you like it to be.  This way you could
skip all the interactive parts of bbdb-add-mail-alias.

Possible scenarios for such things are too diverse to define
multiple commands to cover all possible cases.  In your case, it
seems to me you want something like (untested!)

(defun my-bbdb-add-mail-alias (records alias)
  "Add same ALIAS to RECORDS."
  (interactive (list (bbdb-do-records)
                     (bbdb-read-string "Alias: ")))
  (dolist (record records)
    (bbdb-add-mail-alias record nil alias)))

------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
_______________________________________________
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/

Reply via email to