On Sat Feb 2 2013 Ivan Kanis wrote:
> This patch allows to rename e-mail completion with a function. I use it
> to strip accents from people's name. It does two things for me:
> 
>  - I can complete french name without having to switch input method
>  - It puts name in the To: and Cc: field of my e-mail without accents. I
>    don't like RFC 2047 way of quoting accents.

While you submitted this patch, I found myself involved in some
related issues. The code below should improve various things:

- bbdb-complete-mail failed with mail addresses of the form
  `"Foo, Bar" <f...@example.com>' because the starting point for
  completion was the last comma before point. The new code should be
  more robust here.

- The new user variables bbdb-mail-name-format and bbdb-mail-name
  give more flexibility for formatting the name part used by
  bbdb-complete-mail. (Ivan, bbdb-mail-name should solve your
  problem.)

- If the mail address in a message buffer would be formatted
  differently by bbdb-complete-mail (for example, we have
  `JOHN SMITH <f...@bar.com>', but bbdb-complete-mail would insert
  `"Smith, John" <f...@bar.com>'), then prior to considering cycling
  bbdb-complete-mail performs this reformatting.

- The new user variables bbdb-print-name-format and bbdb-print-name
  give more flexibility when printing records.

- The other changes should normally not be noticable.


2013-02-16  Roland Winkler  <wink...@gnu.org>
        * lisp/bbdb.el (bbdb-mail-name-format, bbdb-mail-name): New
        user variables.
        * lisp/bbdb-com.el (bbdb-dwim-mail): Use them.  Always quote the
        name part of a mail address if necessary.
        (bbdb-quoted-string-syntax-table): New internal variable.
        (bbdb-complete-mail): Use it to find starting point for
        completion.  Before proper cycling, reformat the original mail
        address to match an element of dwim-completions.  Use
        completion-ignore-case instead of downcase.  Do not use trimmed
        pattern.  Issue warning message if attempting to create a
        *Completions* buffer with GNU Emacs older than 23.2.  Use the
        default value of completion-list-insert-choice-function to locally
        bind this variable.
        (bbdb-complete-mail-cleanup): New arg beg.  Use indent-relative.

        * lisp/bbdb-print.el (bbdb-print-name-format, bbdb-print-name):
        New user variables.
        (bbdb-print-record): Use them,

2013-02-16  Roland Winkler  <wink...@gnu.org>
        * lisp/bbdb-com.el (bbdb-mail-yank): Bind case-fold-search to t.

2013-02-15  Roland Winkler  <wink...@gnu.org>
        * lisp/bbdb-com.el (bbdb-delete-field-or-record): Handle multiple
        records.

2013-02-15  Roland Winkler  <wink...@gnu.org>
        * lisp/bbdb.el (bbdb-delete-record-internal)
        (bbdb-insert-record-internal, bbdb-overwrite-record-internal): Use
        inhibit-quit.

2013-02-15  Roland Winkler  <wink...@gnu.org>
        * lisp/bbdb.el (bbdb-changed-records, bbdb-hashtable): Doc fix.

2013-02-15  Roland Winkler  <wink...@gnu.org>
        * lisp/bbdb.el (bbdb-modified): Removed.
        (bbdb-buffer, bbdb-after-save, bbdb-delete-record-internal)
        (bbdb-insert-record-internal, bbdb-overwrite-record-internal)
        (bbdb-sort-records): Do not set bbdb-modified.
        (bbdb-mode): Use buffer-modified-p.


BBDB is available at
http://savannah.nongnu.org/projects/bbdb/
To check it out, use
git clone git://git.savannah.nongnu.org/bbdb.git

------------------------------------------------------------------------------
The Go Parallel Website, sponsored by Intel - in partnership with Geeknet, 
is your hub for all things parallel software development, from weekly thought 
leadership blogs to news, videos, case studies, tutorials, tech docs, 
whitepapers, evaluation guides, and opinion stories. Check out the most 
recent posts - join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/

Reply via email to