Re: bbdb-do-all-records with mail-alias

2014-08-02 Thread H. Dieter Wilhelm
Roland Winkler wink...@gnu.org writes:

 On Mon Jul 28 2014 H. Dieter Wilhelm wrote:
 is it normal that bbdb-do-all-records is *not* working for all entries
 in conjunction with mail-aliases *a, only the entry where the cursor
 is sitting?
 
 I'm using emacs 24.3.92.2 and bbdb 3.1.2...

 The patch below should fix that.

 2014-08-01  Roland Winkler  wink...@gnu.org
   * lisp/bbdb-com.el (bbdb-mail-alias-list): New function.
   (bbdb-add-mail-alias): Handle multiple records via * prefix.
   Allow addition or deletion of multiple aliases per record.  Fix
   docstring.

 2014-08-01  Roland Winkler  wink...@gnu.org
   * lisp/makefile-temp: Fix previous change.

 BBDB is available at
 http://savannah.nongnu.org/projects/bbdb/

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?

-- 
Thank you
  Dieter

Best wishes
H. Dieter Wilhelm
Darmstadt, Germany

--
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/


Re: bbdb-do-all-records with mail-alias

2014-08-02 Thread Roland Winkler
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/