Re: setting bbdb-mua-pop-up to horiz

2013-04-23 Thread Roland Winkler
On Tue Apr 23 2013 Eric Abrahamsen wrote:
 Obviously this clobbers whatever was in bbdb-mua-mode-alist, 

Certainly you should not change bbdb-mua-mode-alist, it's defined as
a constant for good reason. But your personal version of
bbdb-mua-window-p could use a different variable that you defined
acording to your needs.

 and while I was hoping the second `or' clause would allow it to
 work for message mode as well, message mode still pops up with a
 vertical split, at the bottom.

BBDB takes the first window from the list of windows returned by the
function window-list for which bbdb-mua-window-p returns a non-nil value.
So your predicate needs to be more specific.

Roland

--
Try New Relic Now  We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service 
that delivers powerful full stack analytics. Optimize and monitor your
browser, app,  servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: [PATCH] Fix thinko in bbdb-mua-summary-mark

2013-04-21 Thread Roland Winkler
On Sun Apr 21 2013 Leo Liu wrote:
 -  (or (prog1 (functionp bbdb-mua-summary-mark-field)
 -(funcall bbdb-mua-summary-mark-field record))
 +  (or (when (functionp bbdb-mua-summary-mark-field)
 +(funcall bbdb-mua-summary-mark-field record)
 +t)

You are right, thanks. Installed.

--
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis  visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: [bug #38780] configure does not honor --prefix option

2013-04-20 Thread Roland Winkler
On Sat Apr 20 2013 Vincent Belaïche wrote:
 URL:
   http://savannah.nongnu.org/bugs/?38780
 
  Summary: configure does not honor --prefix option
  Project: Insidious Big Brother Database
 Submitted by: vincentb1
 Submitted on: sam. 20 avril 2013 05:41:01 GMT
 Category: None
 Severity: 3 - Normal
   Item Group: None
   Status: None
  Privacy: Public
  Assigned to: None
  Open/Closed: Open
  Discussion Lock: Any
 
 ___
 
 Details:
[snip]
 The problem is in
 
 checking where .elc files should go... $(datadir)/emacs/site-lisp/bbdb
 
 That should have been c:/Programme/GNU/emacs-extension/lisp/bbdb
 
 There should be some --with-lispdir or --prefix option support.

I am confused: have you tried the options --prefix and --with-lispdir?

See the output of ./configure -h

 Another remark is for the tex directory. But I think there is
 already an item open about it.

The generic --prefix option does not appear meaningful to me for the tex
directory.  Use --with-tex-dir instead.

So I guess I should close bug #37911.

--
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis  visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/

Re: To-From-Newsgroup and BBDB

2013-04-18 Thread Roland Winkler
On Wed Apr 17 2013 Vincent Beffara wrote:
 Finally flet is deprecated, and the suggested replacement cl-flet
 does lexical rather than dynamical meaning that it cannot do what
 I want.

For the public code of BBDB I have avoided cl completely.
But for your personal customization that's fine as long as you
understand what you do. And this should remain fine for many more
years, as cl has been around for so long.

Your code looks fine to me, too (as a personal customization of
gnus!). An alternative strategy would be to use the %u format
specifier for this. But I do not know enough about gnus internal to
see how involved that would be.

Roland


 A reasonable replacement is simply to overload the function
 gnus-summary-extract-address-component globally, it is only used
 in %f expansion. So, it might make sense to do this while
 insinuating gnus:
 
 (require 'gnus-sum)
 (defun gnus-summary-extract-address-component (x)
(bbdb-mua-summary-unify x))
 
 and then using plain %f. There is also a gnus-extract-address-component
 which is used much more globally, and it might make sense to tweak that
 instead, but I'm a bit afraid of the unintented consequences and have
 little time to test this.
 
 What do you think?

--
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis  visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: To-From-Newsgroup and BBDB

2013-04-16 Thread Roland Winkler
On Tue Apr 16 2013 Vincent Beffara wrote:
 For some reason this reply wont go through to the mailing list ... Maybe
 it will eventually and there will be 2 copies, sorry if that happens!
 
  Is there a way to combine BBDB with the functionality of %f in summary
  buffers (displaying the recipient if the mail is from me, with a nice
  -  in front) ?
 
  What is BBDB supposed to contribute here? I do not understand what
  you want to achieve.
 
 Sorry for not being clear, let me provide some context here. In Gnus,
 summary buffers provide a list of messages in a given mailbox/feed and
 this is of course customizable. Typically, you would put the date, the
 subject, and the author of the message. But for your own messages, it is
 much more convenient to display the recipient instead, with some
 graphical indication that this is what is shown. Typically, this would
 be done by prefixing something like -  to the displayed name.
 
 This is all done automatically by Gnus, the %f formatting code does
 exactly this, using a regexp match (gnus-ignored-from-addresses) to the
 From: field to determine whether you are the author.
 
 OTOH, Gnus only uses information contained in the message. If the From:
 field contains no full name, for instance, the email address is
 displayed instead. This is where BBDB can help, by looking up the
 address and replacing it with the full name from the db - looks much
 neater this way. This is achieved by the %uB code. In addition, one gets
 an indicator of whether the author is in the db or not, typically a '+'
 in front of the name.
 
 What would be wonderful would be to combine the two, i.e. first
 determine if the message is from me or from somebody else like %f does,
 and then once the correct address for display is chosen, look it up in
 the db like %uB does.

I am sorry, in BBDB v3 there is currently nothing beyond
bbdb-mua-summary-unify and the customization that goes with it.
You need to extend gnus-user-format-function-B defined in
bbdb-insinuate-gnus. The code should be sufficiently modular for
that.

Roland

--
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis  visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: To-From-Newsgroup and BBDB

2013-04-16 Thread Roland Winkler
On Tue Apr 16 2013 Vincent Beffara wrote:
 (defun gnus-user-format-function-f (header)
   (flet ((gnus-summary-extract-address-component 
   (x) (bbdb-mua-summary-unify x)))
 (gnus-summary-from-or-to-or-newsgroups
   gnus-tmp-header gnus-tmp-from)))
 
 It doesn't put the To: field through bbdb because of an 'inline' in the
 gnus function, but that's basically fine, that field is generated from
 the bbdb anyway most of the time.

It looks like you know yet better than me the details of gnus to get
what you want. -- bbdb-mua-summary-unify should come useful in more
such cases.

Roland

--
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis  visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: To-From-Newsgroup and BBDB

2013-04-15 Thread Roland Winkler
On Mon Apr 15 2013 Vincent Beffara wrote:
 Is there a way to combine BBDB with the functionality of %f in summary
 buffers (displaying the recipient if the mail is from me, with a nice
 -  in front) ?

What is BBDB supposed to contribute here? I do not understand what
you want to achieve.

--
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis  visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: setting bbdb-mua-pop-up to horiz

2013-04-15 Thread Roland Winkler
On Tue Apr 16 2013 Eric Abrahamsen wrote:
 Right now, setting bbdb-mua-pop-up to 'horiz splits the *Summary* buffer
 horizontally, not the *Article* buffer! Perhaps because point is in the
 *Summary* buffer when *BBDB* is popped? My *Summary* buffer takes up
 much less of the frame than *Article*, so I would have thought
 `bbdb-pop-up-window' would have identified that as the proper candidate
 for splitting.
 
 Anyhow, I see that `bbdb-pop-up-window' doesn't do anything mua-specific
 (but looking at the mailing-list that appears to have been intentional).

The horizontal splitting is controlled by the arg HORIZ-P of
bbdb-pop-up-window. This is a predicate generated by calling
bbdb-mua-window-p. Essentially, this says that BBDB will split *a*
window used by your MUA that is big enough for splitting. (The
concept used here by bbdb v3 is the same used by v2.) 

You could try instead something like (untested)

(defun bbdb-mua-window-p ()
  Return lambda function matching the selected MUA window.
This return value can be used as arg HORIZ-P of `bbdb-display-records'.
  `(lambda (window) (eq window ,(selected-window

This tries to split the selected window (and no other window).

Or you replace the var bbdb-mua-mode-alist in bbdb-mua-window-p by
something that matches your needs.

--
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis  visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


[BBDB] ChangeLog 2013-04-13 (bbdb-snarf.el revived)

2013-04-13 Thread Roland Winkler
I installed various patches for BBDB that I had lying around for a
little while. Most notably, I revived bbdb-snarf.el which converts
free-form text to BBDB records. Its new code is more flexible and
also more easily customizable than the old code.  Try it out!

The other changes are described below.


2013-04-13  Roland Winkler  wink...@gnu.org
* lisp/bbdb.el (bbdb-utilities-snarf): New custom group.
* lisp/bbdb-snarf.el: New file.
* lisp/Makefile.in, lisp/makefile-temp: Compile it.

2013-04-13  Roland Winkler  wink...@gnu.org
* lisp/bbdb-com.el (bbdb-merge-records): Fix docstring.  Merge
also affixes.  Do not enforce multi-line layout for display.

2013-04-13  Roland Winkler  wink...@gnu.org
* lisp/bbdb.el (bbdb-format-address-default, bbdb-format-address):
Allow city, postcode, state, and country to be nil.

2013-04-13  Roland Winkler  wink...@gnu.org
* lisp/bbdb.el (bbdb-hash-record, bbdb-change-record): Fix
docstring.

2013-04-13  Roland Winkler  wink...@gnu.org
* lisp/bbdb.el (bbdb-new-mails-primary): Change default to query.

2013-04-13  Roland Winkler  wink...@gnu.org
* lisp/bbdb-mua.el (bbdb-mua-summary-unify)
(bbdb-mua-summary-mark): Allow bbdb-mua-summary-mark-field to be a
function.
* lisp/bbdb.el (bbdb-mua-summary-mark-field): Fix docstring.

2013-04-13  Roland Winkler  wink...@gnu.org
* lisp/bbdb.el (bbdb-extract-address-components): New function.
(bbdb-puthash-mail): Use it.
* lisp/bbdb-com.el (bbdb-dwim-mail): Use it.

2013-04-13  Roland Winkler  wink...@gnu.org
* lisp/bbdb-com.el (bbdb-complete-mail): Simplify. Do not throw
error messages that prevent other completion functions to take
over.

2013-04-13  Roland Winkler  wink...@gnu.org
* lisp/bbdb-vm.el (bbdb/vm-auto-folder-field)
(bbdb/vm-virtual-folder-field, bbdb/vm-auto-folder)
(bbdb/vm-auto-add-label-list, bbdb/vm-auto-add-label-field): Fix
docstring.
(bbdb/vm-virtual-folder): Check more carefully whether
vm-virtual-folder-alist contains already what we want to add. Fix
docstring.

2013-04-13  Roland Winkler  wink...@gnu.org
* lisp/bbdb-sc.el (bbdb/sc-attribution-field): Fix docstring.

2013-04-13  Roland Winkler  wink...@gnu.org
* tex/Makefile.in: Acknowledge DESTDIR.


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

--
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis  visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: bbdb database corrupted

2013-04-08 Thread Roland Winkler
On Sun Apr 7 2013 Julien Cubizolles wrote:
 bbdb can't access a lot of my contacts in the .bbdb file anymore. I'm
 not sure exactly when it started but every time I run bbdb, I get for
 example:
 
 --8---cut here---start-8---
 bbdb-format-address-default: Wrong type argument: sequencep, PARIS\
 --8---cut here---end---8---
 
 The message is always about a field with a backslash in it. I'm not sure
 these backslashes were there before or if they got added behind my back,
 by emacs or ASynk (that i use to synchronize with google
 contacts).

For the records:

It seems rather unlikely to me that the above problem is caused by
some recent change in BBDB.  However, to look into such a possiblity
the starting point would always be a more complete lisp backtrace.

--
Minimize network downtime and maximize team effectiveness.
Reduce network management and security costs.Learn how to hire 
the most talented Cisco Certified professionals. Visit the 
Employer Resources Portal
http://www.cisco.com/web/learning/employer_resources/index.html
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Fixed (Pebkac) Re: bug? trying to add email address turns into a loop

2013-03-23 Thread Roland Winkler
On Sat Mar 23 2013 Gijs Hillenius wrote:
  0) I just added a new record to my .bbbd. I do this by hitting the ':'
  key while reading an email message in Gnus. The new contact, lets call
  him First O' Lastname shows up immediately in the minibuffer, so far
  so good.
 
 Thanks to Roland for spotting the error here. It was a simple case of 
 
 First O' Lastname not equal to
 First O'Lastname
 
 Bbdb works as it should.

Thanks, I am glad to hear this.

Roland

--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: bug? trying to add email address turns into a loop

2013-03-21 Thread Roland Winkler
On Wed Mar 20 2013 Gijs Hillenius wrote:
 0) I just added a new record to my .bbbd. I do this by hitting the ':'
 key while reading an email message in Gnus. The new contact, lets call
 him First O' Lastname shows up immediately in the minibuffer, so far
 so good.
 
 1) I know that I have a different email address from this contact, so I
 do a search in a few mail folders, find the person's earlier emails and
 open these. I expect bbdb to notice the alternate address and query me
 to add them, but it does not. So I hit ':' again. 

In your example, I assume that all messages refer to the name First
O' Lastname. Otherwise BBDB could not know that these messages
refer to the same person.

BBDB recognizes that the person First O' Lastname uses different
email addresses in different messages if the arg UPDATE-P of
commands like bbdb-mua-display-sender has the value 'update or
'query, see bbdb-mua-update-interactive-p. Also, bbdb-add-mails
should be 'query.

 Bbbd responds by saying the 'person' is not in the bbdb and
 queries me to add it. I hit 'y'. Now bbdb responds by saying the
 record is in the bbdb already.

What is the exact message you get? Which function issues this
message? - I do not get the behavior you describe. But instead BBDB
updates the existing record. I do not know what you are doing
differently.

--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: EUDC and BBDB V3

2013-03-15 Thread Roland Winkler
On Thu Mar 14 2013 Sam Steingold wrote:
  * Brett Presnell cerfa...@fgng.hsy.rqh [2013-03-13 20:46:05 -0400]:
 
  Is anyone out there successfully using EUDC and BBDB V3 together?  I
  keep getting the following:
 
Symbol's function definition is void: bbdb-record-net
 
 it has been renamed to `bbdb-record-mail'.
 See http://www.emacswiki.org/emacs/UpgradeBBDB for more renames.

Sure! The question remains how to arrange the transition from BBDB v2
to BBDB v3 for something like EUDC (which is part of GNU Emacs).
I want to discuss this on the emacs-devel mailing list.
With Emacs 24.3 being released, this might be a good opportunity to
have a release of BBDB v3 before the next relase of GNU Emacs so
that Emacs can be upgraded to BBDB v3.

--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: bbdb-new-mails-primary

2013-03-13 Thread Roland Winkler
On Tue Mar 12 2013 Gijs Hillenius wrote:
 I suggest to make 'query the default value for defcustom
 bbdb-new-mails-primary in bbdb.el. The default is currently 'nil.
 
 Bbdb already queries the user when it notices a contact with a new email
 addres. This is because the default value is 'query for defcustom
 bbdb-add-mails. To me it therefor makes sense it then immediately
 following the first question asks if the new email address should be
 made the primary address or not. With bbdb-new-mails-primary set to
 'nil, the address simply gets added to the end of the collection.

I agree with your suggestion. I cannot tell anymore how the current
default value came into existence. But it is my general strategy
that default values should avoid silent assumptions on what the user
wants. Putting new mail addresses by default at the end is such an
assumption. So instead the default value should be 'query.

I'll change that.

--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: BBDB3 and bbdb-vcard

2013-03-05 Thread Roland Winkler
On Tue Mar 5 2013 Colin Hall wrote:
 I aim to have bbdb-vcard (any fork) work with bbdb3
 (Winkler-Zlatanaov). I started a couple of days ago. I'm using bbdb
 current master installed from this repo:
 
 http://savannah.nongnu.org/projects/bbdb/
 
 and bbdb-vard.el current master from this repo:
 
 https://github.com/tohojo/bbdb-vcard

A quick glance through bbdb-vcard gives me the code snippet

  (bbdb-record-set-mail
   bbdb-record (union vcard-email bbdb-nets :test 'string=))
  (bbdb-record-set-address
   bbdb-record (union vcard-adrs bbdb-addresses :test 'equal))
  (bbdb-record-set-phone bbdb-record
  (union vcard-tels bbdb-phones :test 'equal))

For use of bbdb-vcard with BBDB 3, I strongly recommend to replace
any calls of bbdb-record-set-foo with bbdb-record-set-field, which
ensures overall consistency and integrity of BBDB.

Also, if you find that the main code of BBDB 3 does not work for
your purposes / should be modified, post this here.

Beyond this, I do not know much about bbdb-vcard.

If possibly bbdb-vcard.el should be integrated into a future version
of BBDB 3, please assign the copyright for your work on BBDB / Emacs
to the Free Software foundation. This will help us to make BBDB free
software, see http://www.gnu.org/philosophy/philosophy.html
(Contact me for details.)

Roland

--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: [BBDB] ChangeLog 2013-02-16

2013-02-28 Thread Roland Winkler
On Wed Feb 27 2013 Ivan Kanis wrote:
 I find the documentation of the variable confusing. What's a
 Xfield?

We had this discussion a little while ago on this list.

Extra (user-defined) fields were generally called notes fields.
Each of these fields has a key to identify and distinguish this
field from other user-defined fields. And the most common
user-defined field used the key notes. So notes refered both to
all user-defined fields, and to the particular field with key
notes -- very confusing. Doc strings talked about things like the
notes field mail-alias. Similarly, BBDB internals had confusing
names because it was note clear whether they refered to all extra
fields or to the extra field with key notes.

Now all these extra fields are subsumed under the generic name
xfields. This makes the lingo in docstrings much clearer. Beyond
this, the change in lingo should be invisible to most users. (The
names of BBDB internals were changed, too. But anyway, users should
better use bbdb-record-set-field and bbdb-record-field for their own
code.)

--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


[BBDB] ChangeLog 2013-02-16 (was: [PATCH] change e-mail name completion)

2013-02-16 Thread Roland Winkler
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/


Re: [BBDB] ChangeLog 2013-02-02 (avoid text properties more carefully)

2013-02-03 Thread Roland Winkler
On Sun Feb 3 2013 Sriram Karra wrote:
 On Sun, Feb 3, 2013 at 5:54 AM, Sriram Karra karra@gmail.com wrote:
 
   On Saturday, February 2, 2013, Roland Winkler wrote
 Currently I am hesitant to make such changes because it could become
 difficult to ensure the overall consistency between what happens in
 different parts of BBDB.  I'll keep your patch in mind, but I do not
 want to promise that I want to add such a patch in the near future.
 
 Although I leave the final call on this to you, I am just a bit
 curious because I feel your position stated above is somewhat
 different from the one in our earlier thread, reproduced in part
 below. Specifically I took the earlier conversation to mean you
 had agreed that we could put in some filtering out code right now,
 even before we find a valid use case for having text properties in
 the database. Was it just a misunderstanding on my part?

I am not sure I understand what you mean. What do you mean here by
filtering out code? Where should this happen? Do you want to
change things high-level, where we feed BBDB, or low-level, where
things are actually stored in the db, or do you want to change
things somewhere in between?

What I wanted to say below refered to the first and the last of the
above three issues:

- When grabbing text for BBDB, the respective high-level code should
  make sure that text properties ARE removed so that they do not
  enter BBDB (because currently BBDB cannot make use of them).

  Yet as a matter of clarity it should be clear where this cleaning
  happens.

- Somewhere in between high- and low-level code, the BBDB should
  make sure that text properties are NOT removed by function calls
  such as substring-no-properties that can be replaced by calls
  such as substring.

Once there are more meaningful applications for these text
properties in BBDB (I have some rather vague ideas in mind, too
vague to get into any coding efforts), then one can think about the
last step of how to include text properties low-level in the db
itself, including a user variable that disables this feature without
corrupting the overall integrity of the database. As I am a bit
worried about the last point, I do not want to do anything along
these lines before I have thought it through more carefully.

Does this make sense?

Roland

  Roland said: 
   Sriram said: 
 Roland said:
    
 Yet all the text processing in between the grabbing of text
 strings and adding them to the database should preserve text
 properties.
  
   Makes a lot of sense. And we could do all this even before we come
   up with any real use of having text properties in the database,
   making it more flexible but keeping the database format more
   predictable for those who desire it to be so.
  
  Exactly.
 

--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_jan
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/

[BBDB] ChangeLog 2013-02-02 (avoid text properties more carefully)

2013-02-02 Thread Roland Winkler
Following recent discussions with Sriram on this list, the patch
below tries to avoid more carefully that text properties
accidentally enter BBDB.

If users have their own code to feed BBDB, it is, however, their
responsibility to ensure that text properties do not accidentally
enter BBDB.

2013-02-02  Roland Winkler  wink...@gnu.org
* lisp/bbdb.el (bbdb-mail-user-agent): Use non-nil default taken
from mail-user-agent.
(bbdb-lastname-re, bbdb-lastname-suffix-re): New
user variables.
(bbdb-divide-name): Use them.  Pass first and last name through
bbdb-string-trim.

* lisp/bbdb-mua.el (bbdb-canonicalize-mail): Always pass mail
through bbdb-string-trim.
(bbdb-canonicalize-mail-1): Always pass mail through
bbdb-string-trim.
(bbdb-canonical-hosts): Use regxp-opt instead of regexp-quote.
(bbdb-message-clean-name-default): Re-arrange clean-up steps.  Use
substring-no-properties.

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

--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_jan
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: [PATCH] change e-mail name completion

2013-02-02 Thread Roland Winkler
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.

Isn't this what currently the xfield mail-name is supposed to
handle? I understand that this can be cumbersome. But then I suggest
to introduce a user variable which, if non-nil, holds a function
called with one arg, the current record.  The function should return
a string NAME which bbdb-dwim-mail should use.
(As an alternative, one could also allow cons pairs (FIRST . LAST).)

This appears more flexible to me. What do you think?

--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_jan
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: [BBDB] ChangeLog 2013-02-02 (avoid text properties more carefully)

2013-02-02 Thread Roland Winkler
On Sat Feb 2 2013 Sriram Karra wrote:
 On Sat, Feb 2, 2013 at 6:40 PM, Roland Winkler wink...@gnu.org wrote:
 
 Following recent discussions with Sriram on this list, the
 patch below tries to avoid more carefully that text properties
 accidentally enter BBDB.
 
 Great! I am not familiar with BBDB internals enough to understand
 the full patch, but I assume you mean any MUA action is guaranteed
 not to introduce any text properties into the db?

I have done a few more tests, and I am still confused how the text
properties ended up in BBDB. So without knowing the loophole, I am
hesitant to claim that it got fixed and BBDB could guarantee not to
introduce any text properties into the db.

 I was working on a configuration variable based low-level control
 to filter out stuff. The attached patch tries to do that by fixing
 the bbdb-defstruct macro. Do you think it will work for all cases?

Currently I am hesitant to make such changes because it could become
difficult to ensure the overall consistency between what happens in
different parts of BBDB.  I'll keep your patch in mind, but I do not
want to promise that I want to add such a patch in the near future.

I find it more important to pay attention that high-level code does
not feeed text properties to BBDB unintentionally.

--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_jan
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/

Re: Vector form for strings in ~/.bbdb

2013-01-27 Thread Roland Winkler
On Sun Jan 27 2013 Daniel Doherty wrote:
 For what it's worth, I would like to see text properties kept out
 of the db until there is some need for them. Right now, one of the
 big pluses for BBDBv3 to my mind is that it allows two-way syncing
 with Sriram's Asynk facility, which is what motivated me to try to
 make the move to begin with.

As I said before:

If one day text properties are added to BBDB:

(1) this should bring some noticable advantage to BBDB

(2) this should include an option to completely disable this feature
(I guess without such a user option, it would not be BBDB
anymore. BBDB is fully customizable.)

Roland

--
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnnow-d2d
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: Vector form for strings in ~/.bbdb

2013-01-25 Thread Roland Winkler
On Thu Jan 24 2013 Sriram Karra wrote:
 On Wed, Jan 23, 2013 at 9:35 PM, Roland Winkler wink...@gnu.org wrote:
 On Wed Jan 23 2013 Sriram Karra wrote:
  #(John 0 4 (fontified nil))
 Could you be a bit more specific? Which version of BBDB are
 you talking about?
 
 BBDB v3
 
 Is it your own experience, or are you talking about someone else?
 
 Someone else's. I could not reproduce it myself. The report came
 to me because ASynK is not able to process this vector form, and a
 sync of BBDB to google was failing.

Thanks, now I understand better what you are talking about.

 I guess that text properties can end up in the database itself if
 you are using something like (buffer-)substring instead of
 (buffer-)substring-no-properties when grabbing a fontified text
 string that ends up in BBDB.
 
 The function bbdb-divide-name uses substring to extract the first and last
 names. Let me check if changing that fixes the issue for the user who
 complained about that.

OK!

 At any rate given what you have mentioned, does it make sense to
 use the -no-properties versions consistently across the code base?
 I could see ~25 instances in total.

This would be too radical. For a command such as
bbdb-copy-records-as-kill it makes sense to copy text properties.
But I just went through the code and replaced occurences of
(buffer-)substring with (buffer-)substring-no-properties where
copying text properties appears not meaningful to me. I'll install
this patch shortly. The functions which do not copy text properties
are anyway simpler than the ones that do copy them. So there is no
need to call the latter unless the text properties should be kept.

Yet I want to ask: Where did the text string come from that was
decorated with some text property so that the text string including
its text properties ended up in BBDB? I cannot see how this could
happen with the plain code of BBDB 3. Could it be that the user who
reported this problem was using some customization to feed BBDB that
was grabbing text strings including their text properties? Then this
is what he or she should fix first.

Roland

--
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnnow-d2d
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/

Re: Vector form for strings in ~/.bbdb

2013-01-25 Thread Roland Winkler
On Thu Jan 24 2013 Sriram Karra wrote:
 The function bbdb-divide-name uses substring to extract the first
 and last names.

Note that this code uses both substring and match-string.  And the
latter uses substring, too (not substring-no-properties).  So it
really does not make sense to try to rely on functions like 
bbdb-divide-name to make sure that text properties do not propagate
into the database.  I guess this must have been a basic design
decision for GNU Emacs years ago: By default GNU Emacs could either
always propagate text properties, unless one explicitly uses a
function such as substring-no-properties.  Or by default these
functions would not propagate text properties.  The design decision
was made in the former way, I believe for good reason.  Otherwise,
each function like match-string would require a second variant
match-string-with-properties. Basic built-in functions like concat
copy the text properties of their args, too.

Yet this implies that you need to be careful when grabbing a text
string: do you want to grab it with its text properties or without
them.

--
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnnow-d2d
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: Vector form for strings in ~/.bbdb

2013-01-23 Thread Roland Winkler
On Wed Jan 23 2013 Sriram Karra wrote:
 In some instances it has been observed that the strings written to
 the .bbdb file are in vector form containing some fontification
 metadata. For e.g. in the field position for a contact's first
 name, where one would normally expect to find a string John one
 finds, instead, this:
 
 #(John 0 4 (fontified nil))
 
 It has been reported that this happens for contacts inserted from
 Gnus using bbdb-mua-display-sender function, although it has not
 been reproducible by others. So it is likely some customization or
 some version-specific behaviour triggering this.

I am sorry, this sounds a bit like a vague fairy tale from nowhere
land. Could you be a bit more specific? Which version of BBDB are
you talking about? Is it your own experience, or are you talking
about someone else?

I guess that text properties can end up in the database itself if
you are using something like (buffer-)substring instead of
(buffer-)substring-no-properties when grabbing a fontified text
string that ends up in BBDB.

--
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnnow-d2d
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/

Re: BBDB failed to handle what it considers duplicates

2013-01-13 Thread Roland Winkler
On Sat Jan 12 2013 Leo Liu wrote:
 It seems we are going back in time. The problem is name cannot
 single-handedly identify a record. Having used BBDB since v2 I
 have nearly a thousand records. Duplicates happen and v3 can not
 handle it or handle it badly.

End of the year I installed a bunch of patches that also affect
duplicate records the way we discussed it before: duplicate records
are always cached so that completion offers all duplicate records.
If you still find buggy behavior in whatever sense, then please
describe a reproducible recipe. The above is not helpful.

--
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnmore_123012
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: [BBDB] ChangeLog 2013-01-13 (completion for organization field)

2013-01-13 Thread Roland Winkler
On Sun Jan 13 2013 Roland Winkler wrote:
 The patch below provides completion for the organization field using
 completing-read-multiple.  This requires GNU Emacs from the trunk
 (version  24.3).  Only the latter handles multi-character separators
 properly.

To avoid confusion: with a less recent version of GNU Emacs (at
least GNU Emacs 23) BBDB 3 works fine, too. Yet the above feature
will not be available to you.

--
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnmore_123012
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: [BBDB] ChangeLog 2013-01-13 (completion for organization field)

2013-01-13 Thread Roland Winkler
On Sun Jan 13 2013 Roland Winkler wrote:
 The patch below provides completion for the organization field using
 completing-read-multiple.  This requires GNU Emacs from the trunk
 (version  24.3).  Only the latter handles multi-character separators
 properly.


Now this should work as promised!


2013-01-13  Roland Winkler  wink...@gnu.org
* lisp/bbdb.el (bbdb-parse-records): Set bbdb-xfield-labels-list
and bbdb-organization-list to nil only once.


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

--
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnmore_123012
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: BBDB failed to handle what it considers duplicates

2013-01-11 Thread Roland Winkler
On Sat Jan 12 2013 Leo Liu wrote:
  In my mail yesterday, I only thought of bbdb-complete-mail being
  affected by duplicate records. BBDB's MUA interface is actually more
  subtle. Here I can think of situations where BBDB can get confused
  and give strange results if, say, a message uses a name matching
  multiple records, but the email address of the message, does not
  match any of these records. - Probably, this is a yet more exotic
  situation than multiple records with the same name. Maybe there are
  other situations (possibly yet more exotic) affected by this.
 
 I hope you have time to fix these problems ;)

???  Do you want the excotic or the very excotic problems fixed?
I think we should keep some priorities in mind. If you do have a
real-worl problem, then please describe how it can be reproduced.

Roland

--
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122912
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: vm-pcrisis.el (was: [BBDB] ChangeLog 2012-12-30) buffer support)

2013-01-03 Thread Roland Winkler
On Wed Jan 2 2013 Uday S Reddy wrote:
 In any case, transtitioning to BBDB 3.0 is difficult at the moment
 because it is incompatible with BBDB 2 in various ways. If you can
 define aliases (using defalias and defvaralias) so that the BBDB 2
 functions/variables are mapped to BBDB 3 functions/variables, then
 it would become possible to plug in BBDB 3 into the various MUA's.

While BBDB 2 had evolved over years, its user interface with its
user variables, functions and commands had become fairly convoluted.
A major goal for BBDB 3 has been to make this user interface more
coherent and transparent (while preserving / extending the features
of BBDB). Therefore, defalais and defvaralias cannot provide a
simple backward compatibility mode mapping BBDB 3 to BBDB 2.

Roland

--
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122712
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: [PATCH] TAB completion for organization field

2013-01-03 Thread Roland Winkler
On Thu Jan 3 2013 Stefan Monnier wrote:
 You can use a minibuffer-with-setup-hook to change the keymap used in
 your particular completing-read-multiple calls.

Thanks, that seems reasonable.

 Yes, that's currently a limitation of crm.el.  Patch welcome.

I already looked into crm.el. I'll let you know.

Roland

--
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122712
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


vm-pcrisis.el (was: [BBDB] ChangeLog 2012-12-30) buffer support)

2012-12-31 Thread Roland Winkler
On Mon Dec 31 2012 Rene wrote:
 It appears vm-pcrisis.el is heavily making use of bbdb code. I
 wonder whether a BBDB3 version of vm-pcrisis.el has been produced
 so far?

While I do like using VM myself, I am rather hesitant to touch its
code.  I can't help thinking that it needs a major rewrite similar
to BBDB. Of course, rewriting VM is yet a much bigger project than
rewriting BBDB.

Roland

--
Master SQL Server Development, Administration, T-SQL, SSAS, SSIS, SSRS
and more. Get SQL Server skills now (including 2012) with LearnDevNow -
200+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
SALE $99.99 this month only - learn more at:
http://p.sf.net/sfu/learnmore_122512
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


[BBDB] ChangeLog 2012-12-30 (Supercite and MUA Summary buffer support)

2012-12-30 Thread Roland Winkler
On Tue Sep 11 2012 Wes Hardaker wrote:
 One missing thing in my book is the bbdb-sc replacement.  I loved
 supercite but haven't been able to use it since going to bbdb3.  And,
 seriously, I'm constantly tempted to go back because a better binding
 doesn't exist.

I cleaned up the old file bbdb-sc.el to make it compatible with
BBDB 3 and made it part of the BBDB 3 repository on Savannah. Yet I
am not a supercite user myself; so I cannot check whether this code
works with BBDB 3 the way it is supposed to. Compared to BBDB 2,
nothing in the BBDB-Supercite interface should have changed.

Is there possibly anything about bbdb-sc.el that _should_ change to
get rid of oddities in this code or bring it otherwise up to speed
with BBDB 3 / more recent versions of supercite in GNU Emacs?
I noticed that bbdb/sc-set-attr calls bbdb-annotate-message.
Currently this happens with bbdb-annotate-message's arg UPDATE-P
being nil meaning 'update. Should this be customizable to allow more
aggressive behavior?

Comments welcome.

On Thu Dec 27 2012 Eric Abrahamsen wrote:
 Ivan Kanis ivan.ka...@googlemail.com writes:
  bbdb-gnus.el contains some code for announcing BBDB records in the
  summary buffer. It includes the user variables
 
bbdb/gnus-summary-mark-known-posters
bbdb/gnus-summary-show-bbdb-names
bbdb/gnus-summary-prefer-bbdb-data
bbdb/gnus-summary-prefer-real-names
 
  controling what is actually displayed and when.  Is anyone using this?
  I found that it is rather difficult to figure out how these four
  variables control the announcements.
 
  I am not using any of this.
 
 I'm not either, and wouldn't like to override names in the From header,
 but I would definitely use 'mark-known-posters' if it was easy to
 configure.

I tried to clean up these things:

- I realized that both Gnus and VM can support this. (I do not know
  about other MUAs, suggestions welcome.) So I gave the functions
  and user variables more generic names. The real job is now done
  by the functions bbdb-mua-summary-unify and bbdb-mua-summary-mark
  (see there).

- The user interface has been simplified: now there are fewer
  variables to configure, yet they give more options, see

bbdb-mua-summary-unification-list
bbdb-mua-summary-mark-field
bbdb-mua-summary-mark
bbdb-mua-summary-unify-format-letter
bbdb-mua-summary-mark-format-letter

- Insinuation of this feature requires the usual call of
  bbdb-initialize for the respective MUA (Gnus / VM).

  Yet more importantly you need to customize
  gnus-summary-line-format / vm-summary-format, see
  bbdb-mua-summary-unify-format-letter and
  bbdb-mua-summary-mark-format-letter.
  The user variables gnus-summary-line-format and vm-summary-format
  are too complex to let bbdb-initialize do this job.


2012-12-30  Roland Winkler  wink...@gnu.org
* configure.ac: Option --with-tex-dir renamed from
--with-texmf-dir.

2012-12-30  Roland Winkler  wink...@gnu.org
* lisp/bbdb-sc.el: New file
* lisp/Makefile.in, lisp/makefile-temp, lisp/bbdb.el
(bbdb-init-forms, bbdb-initialize): Use it.

2012-12-30  Roland Winkler  wink...@gnu.org
* INSTALL: List all BBDB configure options.
* aclocal.m4, tex/Makefile.in: Option --with-tex-dir renamed from
--with-texmf-dir.

2012-12-30  Roland Winkler  wink...@gnu.org
* lisp/bbdb-gnus.el: Do not use eval-and-compile.
(bbdb/gnus-split-myaddr-regexp): Do not use obsolete variable
gnus-local-domain.
(bbdb/gnus-split-private-field, bbdb/gnus-split-public-field): Fix
docstring.

* lisp/bbdb-vm.el, lisp/bbdb-message.el, lisp/bbdb-mhe.el: Do not
use eval-and-compile.

2012-12-30  Roland Winkler  wink...@gnu.org
* lisp/bbdb.el (bbdb-mua-summary-unification-list)
(bbdb-mua-summary-mark-field, bbdb-mua-summary-mark)
(bbdb-mua-summary-unify-format-letter)
(bbdb-mua-summary-mark-format-letter): New user variables.

* lisp/bbdb-mua.el (bbdb-mua-summary-unify)
(bbdb-mua-summary-mark): New functions.

* lisp/bbdb-gnus.el (bbdb/gnus-summary-mark-known-posters)
(bbdb/gnus-mark-known-posters)
(bbdb/gnus-summary-known-poster-mark)
(bbdb/gnus-summary-show-bbdb-names)
(bbdb/gnus-header-show-bbdb-names)
(bbdb/gnus-summary-prefer-bbdb-data)
(bbdb/gnus-summary-prefer-real-names)
(bbdb/gnus-header-prefer-real-names)
(bbdb/gnus-summary-user-format-letter)
(bbdb/gnus-summary-in-bbdb-format-letter)
(bbdb/gnus-message-marker-field, bbdb/gnus-summary-get-sender)
(bbdb/gnus-summary-sender-in-bbdb): Removed.
(bbdb-insinuate-gnus): Use bbdb-mua-summary-unify and
bbdb-mua-summary-mark.

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

Re: [PATCH] TAB completion for organization field

2012-12-30 Thread Roland Winkler
On Fri Dec 28 2012 Stefan Monnier wrote:
  rewrite. But I believe it does not (yet?) offer completion when the
  result of the completion is supposed to be a list of values.
 
 IIUC completing-read-multiple should do what you want (and has been
 included in Emacs for a while, at least since Emacs-22 if not longer).

The keymap used by completing-read-multiple binds SPC to
crm-complete-word. For users not expecting completion, this has two
consequence that might appear counterintuitive:

- If one string in the list of return values is supposed to contain
  the SPC character (which I do not find unusual in the context of,
  say, the organization field of BBDB), this requires C-q SPC.

- In BBDB, the list of organizations is displayed with the
  two-character string ,  as separator. Likewise, this list of
  organizations is generated from the return value of read-string
  using split-string with separator [ \t\n]*[;,][ \t\n]*. Such
  regexps are not supported by crm-separator. (The latter must be a
  single character string).

I still believe that completing-read-multiple is a cool feature and
I might like to use it myself for entering organizations into BBDB.
Yet I do not know whether all users will be happy with this feature
in the context of BBDB's organization field. So it might be better
to make it customizable whether BBDB uses read-string or
completing-read-multiple.

Roland

--
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnmore_123012
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: [PATCH] TAB completion for organization field

2012-12-28 Thread Roland Winkler
On Fri Dec 28 2012 Eric Abrahamsen wrote:
 Yup, I thought of this problem but it seems like it's fudged in
 other places (ie you can't complete on subsequent values in an AKA
 field) so I figured this was good enough for now.

It's different in the sense that the values of the organization
field are shared more often among different records. For something
like AKA this would be odd.  But AKAs are used in the MUA interface.
For the organization field this would not be possible. Ultimately,
this defines the difference between these fields from a more
conceptual point of view.

 Not quite sure I understood that... I was under the impression
 that the organization field just holds a list of strings: the
 names of various organizations. Is that what you meant by
 attributes for a record?

Yes. The organization field is an attribute in the sense that
usually it is useless to distinguish individual records. But it can
help to classify the records in BBDB.

 I can make a record for an organization, with its organization name in
 the name field, and say an office front desk number in the phone field,
 etc, but them is there a way of indicating that a separate record (for a
 person), works there? I can't fill the person's organization field with
 a foreign key to the organization record, right?
 
 I realize this is approaching a relational database model, and is
 a can of worms that's probably not worth opening. I was just curious.

Ultimately this is not so different from, say, families of friends.
In a a way, families are just small organizations. It would be nice
if such records could share fields like the mailing address and home
phone numbers. But I have no clue how to implement that within BBDB.

Roland

--
Master HTML5, CSS3, ASP.NET, MVC, AJAX, Knockout.js, Web API and
much more. Get web development skills now with LearnDevNow -
350+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122812
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: [PATCH] TAB completion for organization field

2012-12-28 Thread Roland Winkler
On Fri Dec 28 2012 Stefan Monnier wrote:
  rewrite. But I believe it does not (yet?) offer completion when the
  result of the completion is supposed to be a list of values.
 
 IIUC completing-read-multiple should do what you want (and has been
 included in Emacs for a while, at least since Emacs-22 if not longer).

Thank you, I learned something new here.

Roland

--
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122912
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: [PATCH] TAB completion for organization field

2012-12-27 Thread Roland Winkler
On Fri Dec 28 2012 Eric Abrahamsen wrote:
 No one asked for this, but it's something I've wanted for a while, so I
 did it, and am attaching a patch if it's of general interest.
 
 I often add multiple records for different people at the same
 organization, and have wanted tab completion when creating/editing the
 organization field. This patch creates and populates a
 bbdb-organization-list variable on startup, and offers completion from
 that list when editing or creating organization fields.

Thanks. Me too, I thought about this. So far, I did not implement
this because the organization field holds a list of values. This
makes tab completion more tricky if one wants to put multiple
entries into this field.

Recently the GNU Emacs completion engine went through a major
rewrite. But I believe it does not (yet?) offer completion when the
result of the completion is supposed to be a list of values.

(Stefan, you were largely involved in this rewrite. Can you comment?
Thanks.)

 Just out of curiosity, has there ever been a plan to make organizations
 first-class citizens in the database?

What's that? - The organization field holds (a list of) ATTRIBUTES
for a record. If a record should refer to a (single) organization
instead of a person such that the organization is not the attribute
for something else, I suggest that the name of that organization
should go into the name field. I think that anything else asks for
trouble. (Say, typically multiple records will have the same entries
in the organization field for all your friends / colleagues in an
organization.)

Roland

--
Master HTML5, CSS3, ASP.NET, MVC, AJAX, Knockout.js, Web API and
much more. Get web development skills now with LearnDevNow -
350+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122812
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


[BBDB] ChangeLog 2012-12-26 (make quit-window restore the window configuration)

2012-12-26 Thread Roland Winkler
On Wed Aug 15 2012 Charles Philip Chan wrote:
 Roland Winkler wink...@gnu.org writes:
  I hope to learn something new here: In what way did you use the
  electric mode of BBDB v2? What are you missing without it?
 
 I like the window configuration restored after using bbdb.

The patch below should fix this. Thanks to Martin Rudalics who
helped me with the window internals.

A proper solution requires GNU Emacs 24. For Emacs 23 the required
functions do not exist. As a workaround, you can now make the *BBDB*
window weakly dedicated. That should most often have the same effect.

 On another note, it would be nice if there are settings for the
 window size both under and outside of a MUA. I would like to have
 a much smaller window in Gnus then if bbdb is called up
 interactively.

See the new variable bbdb-mua-pop-up-window-size which complements
bbdb-pop-up-window-size.

Also, I made bbdb-message-pop-up an obsolete alias for
bbdb-mua-pop-up. The latter name is more consistent with other
variable names.

Finally, this patch enables horizontal window splitting not only
with the mua-auto-update feature. But you get a horizontally split
BBDB window with any of the respective bbdb-mua-* commands, if the
value of bbdb-mua-pop-up is 'horiz.


2012-12-26  Roland Winkler  wink...@gnu.org
* lisp/bbdb.el (bbdb-dedicated-window): New user variable.
(bbdb-mua-pop-up): Renamed from bbdb-message-pop-up.  Doc fix.
(bbdb-mua-pop-up-window-size): New variable.
(bbdb-pop-up-window-size): Doc fix.  Allow value t.
(bbdb-pop-up-window): Use it.  Simplify.  Use
display-buffer-record-window / set-window-dedicated-p so that the
BBDB window is popped up such that quit-window can delete it.
Suggested by Martin Rudalics.
(bbdb-display-records): Clean up.

* lisp/bbdb-mua.el (bbdb-mua-mode-alist): New variable.
(bbdb-mua): Use it.
(bbdb-mua-window-p): New function.
(bbdb-mua-display-records, bbdb-mua-edit-field)
(bbdb-mua-auto-update): Use it.


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

--
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


[BBDB] ChangeLog 2012-12-27 (small fixes)

2012-12-26 Thread Roland Winkler
On Mon Sep 10 2012 Leo wrote:
 On 2012-09-10 12:21 +0800, Roland Winkler wrote:
  Is this all?? Let's see what pops up next...
 
 There is one buglet that is pretty annoying i.e. after
 bbdb-transpose-fields point is moved to the beginning of the record. I
 think it should stay in the same field of the record before and after
 the transposition.

I agree that this is annoying. The culprit is the function
bbdb-redisplay-record. When it redisplays a record after whatever
modification, it puts point at the beginning of the record. It would
be better if it restored point as close as possible to where it was
before the alteration of the record.

Currently I do not have a good (robust) idea how to fix this. It is
on my to-do list. Yet I do not give this the highest priority. But
patches are welcome.

 I have these commits sitting in my local git repo and I think they might
 be good for upstream so I am posting them here.

 +(run-hooks 'bbdb-load-hook)

Please use `eval-after-load'. This implements load hooks for any
emacs package.

  (defmacro bbdb-mua-wrapper (rest body)
Perform BODY in a MUA buffer.
 +  (declare (debug t))

Thanks, done.

 @@ -574,9 +574,11 @@ (defun bbdb-insinuate-gnus ()
;; `gnus-article-read-summary-keys' provides an additional wrapper
;; that restores the window configuration.
(define-key gnus-summary-mode-map : 'bbdb-mua-display-sender)
 +  (define-key gnus-article-mode-map : 'bbdb-mua-display-sender)
;; For `bbdb-mua-edit-field-sender' it is probably OK if
;;`gnus-article-read-summary-keys' restores the window configuration.
(define-key gnus-summary-mode-map ; 'bbdb-mua-edit-field-sender)
 +  (define-key gnus-article-mode-map ; 'bbdb-mua-edit-field-sender)

Thanks, done.

  (defun bbdb-grab-url (record url)
Grab URL and store it in RECORD.
 -  (interactive (list (bbdb-completing-read-record Add URL for: )
 - (browse-url-url-at-point)))
 +  (interactive (let ((url (or (browse-url-url-at-point)
 +  (error No url at point
 + (list (bbdb-completing-read-record
 +(format Add %s for:  url)) url)))

Thanks, done.


2012-12-27  Roland Winkler  wink...@gnu.org
* lisp/bbdb-mua.el (bbdb-mua-wrapper): Add edebug support.
Suggested by Leo sdl@gmail.com.

* lisp/bbdb-gnus (bbdb-insinuate-gnus): Fix keybindings for
gnus-article-mode.  Suggested by Leo sdl@gmail.com.

* lisp/bbdb-com.el (bbdb-grab-url): Fail early if no URL at point.
Suggested by Leo sdl@gmail.com.

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

--
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122712
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Announcing BBDB records in the Gnus summary buffer

2012-12-26 Thread Roland Winkler
bbdb-gnus.el contains some code for announcing BBDB records in the
summary buffer. It includes the user variables

  bbdb/gnus-summary-mark-known-posters
  bbdb/gnus-summary-show-bbdb-names
  bbdb/gnus-summary-prefer-bbdb-data
  bbdb/gnus-summary-prefer-real-names

controling what is actually displayed and when.  Is anyone using this?
I found that it is rather difficult to figure out how these four
variables control the announcements.

I suggest to replace these four variables by two variables

  bbdb/gnus-summary-use-bbdb

establishing a prioritized list of possibilities to consider.
The elements of this list may include something like

  bbdb-name, bbdb-mail, msg-name, msg-mail, from

Say, if the first element of this list is bbdb-name, then the
announcement should first try to use the BBDB name found for the
sender of the message. Then try to obey the 2nd element, etc.

Does this make sense? Comments and suggestions are welcome.

--
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122712
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


[BBDB] ChangeLog 2012-12-25

2012-12-25 Thread Roland Winkler
On Sun Aug 12 2012 Leo wrote:
 BTW,
 
 (bbdb-defstruct record
   firstname lastname affix aka organization phone address mail notes cache)
 
 We should rename `notes' in the above to `ext' (for extensions). `notes'
 and `note' are both used in the BBDB and they confuse me every time.

The above got discussed on this list a little while ago.
The third patch below replaces the internal name `notes' for the
list of custom fields by `xfields'. This change should remain
invisible for most users. Yet it cleaned up the code significantly.

I have defined (obsolete-)aliases for user variables and commands
such as bbdb-search-notes and bbdb-sort-notes.

The other patches are bug and doc fixes.


2012-12-25  Roland Winkler  wink...@gnu.org
* lisp/bbdb-vm.el: (bbdb/vm-auto-add-label-list)
(bbdb/vm-auto-add-label-field): Doc fix.
(bbdb/vm-auto-add-label): Doc fix and cleanup.

2012-12-25  Roland Winkler  wink...@gnu.org
* README: Minor docfix.

2012-12-25  Roland Winkler  wink...@gnu.org
* lisp/bbdb.el, lisp/bbdb-com.el, lisp/bbdb-mua.el:
* lisp/bbdb-print.el, lisp/bbdb-anniv.el, lisp/bbdb-ispell.el:
* lisp/bbdb-migrate.el, lisp/bbdb-vm.el, lisp/bbdb-gnus.el: For
the user-defined fields of a record replace the generic internal
name `notes' by `xfield'.

* lisp/bbdb.el (bbdb-layout-alist, bbdb-name-format, bbdb-image)
(bbdb-default-domain, bbdb-auto-notes-rules)
(bbdb-mail-alias-field, bbdb-name-face-alist, bbdb-record-type)
(bbdb-timestamp, bbdb-creation-date)
(bbdb-display-name-organization): Doc fix.
(bbdb-xfields-sort-order): Renamed from bbdb-notes-sort-order
(bbdb-merge-xfield-function-alist): Renamed from
bbdb-merge-notes-function-alist
(bbdb-xfield-label-list): Renamed from bbdb-notes-label-list.
(bbdb-record-xfields): Renamed from bbdb-record-Notes.
(bbdb-record-set-xfields): Renamed from bbdb-record-set-Notes.
(bbdb-record-xfield): Renamed from bbdb-record-note.
(bbdb-record-set-xfield): Renamed from bbdb-record-set-note.
(bbdb-record-xfield-intern): Renamed from bbdb-record-note-intern.
(bbdb-record-xfield-split): Renamed from bbdb-record-note-split
(bbdb-set-xfield-labels): Renamed from bbdb-set-notes-labels
(bbdb-merge-xfield): Renamed from bbdb-merge-note.

* lisp/bbdb-com.el (bbdb-search, bbdb, bbdb-compare-records)
(bbdb-create-internal, bbdb-edit-field): Doc fix.
(bbdb-search-xfields): Renamed from bbdb-search-notes.
(bbdb-message-search): Make search more robust.
(bbdb-sort-xfields): Renamed from bbdb-sort-notes.

2012-12-25  Roland Winkler  wink...@gnu.org
* lisp/bbdb.el (bbdb-parse-records): If multiple records have the
same name, hash all these records.
(bbdb-allow-duplicates): Doc fix.


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

--
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: Don't show names, disable pop-ups

2012-12-18 Thread Roland Winkler
On Tue Dec 18 2012 brom...@lavabit.com wrote:
 Actually, the above works out of the box, but it uses the following
 formatting:
 
 To: John Doe j...@example.com
 
 I want to use this formatting instead:
 
 To: j...@example.com

See bbdb-mail-avoid-redundancy

 Also, BBDB shows some garbage[*] in the echo area if person's name
 doesn't match the name field from the .bbdb file. This happens when
 I'm checking some emails in some group.
 
 Can I disable this?
 
 [*] byte-code: Wrong number of arguments: (lambda (target old new)
 (replace-regexp-in-string old new target)), 4

I assume you use BBDB 3 from Savannah. This code does not use
anywhere the symbol name `target'. So I assume that this bug is due
to your own or some third-party code.

I am sorry, I cannot help you with that.

--
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: weird match

2012-10-18 Thread Roland Winkler
On Wed Oct 17 2012 Sam Steingold wrote:
  I don't know your personal extensions of BBDB.
 I have none.

For almost all user variables from BBDB's MUA interface their values
may be user-defined functions. You actually requested quite a few of
these variables. Certainly, these functions can give rise to the
behavior you observe.

Roland

--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: weird match

2012-10-18 Thread Roland Winkler
 what other variables could be relevant?

It will be much easier if you try to disable once all your
customizations (emacs -q). Then it becomes clearer where things
are going wrong.

--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: weird match

2012-10-16 Thread Roland Winkler
On Tue Oct 16 2012 Sam Steingold wrote:
 In gnus gmane.science.biology.informatics.conductor summary, the message
 From: Sam [guest] gu...@bioconductor.org
 is marked as sent my a known user and *BBDB* shows
 
 Sam Robb
mail: sam.r...@timesys.com, sam.r...@timesys.com

Do you have some reproducible recipe? By now, I've seen three or
four such messages from you, where you complained about odd behavior
of BBDB, but you never provided a reproducible recipe.

Roland

--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: weird match

2012-10-16 Thread Roland Winkler
On Tue Oct 16 2012 Sam Steingold wrote:
  In gnus gmane.science.biology.informatics.conductor summary, the message
  From: Sam [guest] gu...@bioconductor.org
  is marked as sent my a known user and *BBDB* shows
  
  Sam Robb
 mail: sam.r...@timesys.com, sam.r...@timesys.com
 
  Do you have some reproducible recipe?  By now, I've seen three or
  four such messages from you, where you complained about odd behavior
  of BBDB, but you never provided a reproducible recipe.
 
 I understand your frustration, but what kind of reproducible recipe
 can I offer you?
 Give you my gmail password + my whole bbdb? :-)
 
 I thought that a combination of the From line and the bbdb record
 should suffice. If it is not, please tell me how to debug this:
 e.g., what functions are called to match the From line to a bbdb
 record.

I can merely say that I cannot reproduce this.
Forget the gnus stuff. Put

  Sam [guest] gu...@bioconductor.org

into the To: field of a message. Call

  bbdb-mua-display-recipients

What do you get? If I setup this test, the [guest] in the name
gets ignored (see mail-extract-address-components). So Sam becomes
the last name of the above recipient. And this should not match the
entry of Sam Robb. (It doesn't do that for me.)

I don't know your personal extensions of BBDB.

Roland

--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: BBDB failed to handle what it considers duplicates

2012-10-15 Thread Roland Winkler
On Mon Oct 15 2012 Leo wrote:
 In BBDB3 (a few months old), duplicates were allowed by default.
 So if you typed a substring in a mailer that matches two duplicate
 records, it gave you an opportunity to choose.

As I tried to explain, the old code was broken in various ways. Yet
comments in the code suggested that by default BBDB should behave
the way I implemented it. In that sense, I tried to follow the old
code without considering all side effects.

 Recent BBDB3 doesn't allow duplicates by default. It does
 mail-completion from the first record of the duplicates. The
 others are ignored.

I guess I start to understand, where your problem is coming from.
When BBDB loads the database, bbdb-allow-duplicates is nil, and
there are multiple records with the same name, then only the first
record with this name is hashed (so that it becomes available for
things like completion). While the code relevant for this was broken
in BBDB v2, nonetheless it contained fragments of code and comments
related to this behavior advertising this as intended behavior.

I think the point is: a variable like bbdb-allow-duplicates should
only affect the creation of new records as well as possibly issuing
a warning if the database contains duplicate records when loaded.
But it should not affect the usage of the records present in the
database for things like completion. Otherwise things get rather
obscured. (You got fooled!)

I'll change the code accordingly (unless someone tells me there is a
problem I overlooked, or someone proposes a yet better scheme).

  I don't have any real-world scenarios to test here. Do you get what
  you expect to get when bbdb-allow-duplicates is t and you have
  multiple records with the same name?
 
 Exactly! My BBDB db has records of the same name since a few years ago.

In my mail yesterday, I only thought of bbdb-complete-mail being
affected by duplicate records. BBDB's MUA interface is actually more
subtle. Here I can think of situations where BBDB can get confused
and give strange results if, say, a message uses a name matching
multiple records, but the email address of the message, does not
match any of these records. - Probably, this is a yet more exotic
situation than multiple records with the same name. Maybe there are
other situations (possibly yet more exotic) affected by this.

Roland

--
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: BBDBv3 bug report: Running ./configure ignores --prefix for tex files

2012-10-15 Thread Roland Winkler
On Mon Oct 15 2012 Ben Sturmfels wrote:
 When install BBDBv3, I ran `./configure --prefix=/home/ben/local`
 wanting everything to be installed in under this directory (based on my
 reading of `./configure --help`).
 
 The output belows shows that .tex files default to being installed in
 /usr/local/share/texmf/bbdb regardless of the --prefix setting.
 
 Would it be appropriate for these files to go into
 PREFIX/share/texmf/bbdb by default?
 
 This appears to be because if --with-texmf-dir isn't specified,
 configure runs `kpsexpand \$TEXMFLOCAL` to get the default directory,
 which for me returns /usr/local/share/texmf.

Good point. I am not an expert with this so that I do not know the
best strategy for such a thing. Is there anybody reading this who
can help? Or does anyone know a package with a few TeX files
similar to what BBDB comes with so that one could look at what these
packages are doing?

Thanks,

Roland

--
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: BBDB failed to handle what it considers duplicates

2012-10-14 Thread Roland Winkler
On Sun Oct 14 2012 Leo wrote:
 Sure. So bbdb-no-duplicates was renamed to bbdb-allow-duplicates while
 keeping the same value which amounts to disallow duplicates by default
 and that is exactly what caused me all the trouble.

The annoying thing was that I kept both the default value and the
docstring, that is, the docstring did not match what the variable
name suggested and the old default did not match what the docstring
recommended. This previous situation was very confusing.

 In my view, bbdb-no-duplicates defaults to nil says a lot about people
 caring duplicates.

I am sorry, I am confused. What do you want to say here?

--
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: Address completion question

2012-10-14 Thread Roland Winkler
On Sun Oct 14 2012 Alan Schmitt wrote:
 Now completion does nothing (just shows the possibilities when
 there is more than one) when I try it.

What are you trying to do / expecting to get when BBDB opens a
window with possible completions?

For me, the completions buffer says at the top the usual two lines
of any completions buffer

  Click mouse-2 on a completion to select it.
  In this buffer, type RET to select the completion near point.

When I follow this recipe I get what I want (and what was promised).
What do you get?

--
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: Address completion question

2012-10-14 Thread Roland Winkler
On Sun Oct 14 2012 Stephen Leake wrote:
  I thought it would. The documentation says If non-nil cycle mail
  addresses when calling `bbdb-complete-mail'. which is exactly what I
  want: cycle through the possible completions when completing mails. Am I
  reading the documentation wrong?
 
 Note that the doc says addresses, while you said completions; that
 is crucial. 
 
 I agree it would be nice if it also cycled thru multiple matching records.

I'd find this rather orthogonal to what Emacs normally does when
opening a completions buffer. Of course, you could suggest on the
emacs-devel mailing list that for ANY Emacs completions buffer one
should be able to cycle through the listed completions. I doubt that
this would be an efficient scheme.

Note also that BBDB's cycling is different in the sense that it does
not pop up a window with the list of elements it will cycle through.
All in all, I find bbdb-complete-mail's behavior already
sufficiently different from how Emacs normally performs completions
so that I would not want to further deviate from the default
behavior.

Roland

--
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: Address completion question

2012-10-14 Thread Roland Winkler
On Sun Oct 14 2012 Alan Schmitt wrote:
  For me, the completions buffer says at the top the usual two lines
  of any completions buffer
 
Click mouse-2 on a completion to select it.
In this buffer, type RET to select the completion near point.
 
  When I follow this recipe I get what I want (and what was promised).
  What do you get?
 
 Yes, this works. 

Here BBDB much relies on standard emacs code (and standard behavior)
for handling a list of possible completions. 

 I'm trying to choose a completion without using the mouse nor
 moving the point to the window.

I never thought about what you are suggesting. Maybe it is generally
useful. You can always submit a feature request for such a thing
(using M-x report-emacs-bug).

Roland

--
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: BBDB failed to handle what it considers duplicates

2012-10-14 Thread Roland Winkler
On Sat Oct 13 2012 Roland Winkler wrote:
 See bbdb-allow-duplicates.
 
[snip]
 
 Also, the docstring of this variable expresses the fact...
 ...that so far in BBDB's history nobody considered the case of
 records with duplicate names important enough to extend the code of
 bbdb-complete-mail to handle such records properly.

I never checked that till I tried it a minute ago. Could it be that
the docstring of bbdb-allow-duplicates is outdated in the sense that
BBDB v3's bbdb-complete-mail (and other parts of the code) handles
such duplicate records fine so that bbdb-allow-duplicates need not
warn the user anymore about confusion when doing completion?

I don't have any real-world scenarios to test here. Do you get what
you expect to get when bbdb-allow-duplicates is t and you have
multiple records with the same name?

Thanks,

Roland

--
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: BBDB failed to handle what it considers duplicates

2012-10-13 Thread Roland Winkler
On Sat Oct 13 2012 Leo wrote:
 I just noticed BBDB no longer completes some emails because they are
 part of a record that BBDB considers a duplicate.
 
 This change is annoying and has caused me a lot of trouble sending
 emails to wrong recipients.

Can you please be more specific? Under what circumstances did BBDB
what, which now it does not do anymore?

 BTW, I personally think not having a UID field is a bad design from the
 beginning. There is nothing in a record that can uniquely identify a
 record.

When does this matter? Please explain. BBDB has the features it
needed for what people expected from it. Revising the design
from the beginning is not so easy after 20 years.

Also, is this related to BBDB's handling of duplicates? If not,
please open a new thread. Otherwise things tend to get lost.

Roland

--
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: Some small improvements

2012-10-13 Thread Roland Winkler
On Sat Oct 13 2012 Leo wrote:
 On 2012-09-11 09:21 +0800, Roland Winkler wrote:
  Thanks. I need to check these more carefully
 
 Any update on this?

I am sorry, I am rather busy with other things till end of the
month. I cannot do anything big with BBDB till then.

Roland

--
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: BBDB failed to handle what it considers duplicates

2012-10-13 Thread Roland Winkler
On Sun Oct 14 2012 Leo wrote:
 Yes, it is related. The way BBDB3 handles duplicates is pretty bad. Try
 to create two records with the same name. It throws an error in emacs
 -q. 

See bbdb-allow-duplicates.

I guess it is fair to say that this variable was introduced long ago
not as a bug, but as a feature. Depending on circumstances, it could
be more likely that duplicate entries inadvertently refer to the
same person.

Also, the docstring of this variable expresses the fact...

 On 2012-10-13 19:57 +0800, Roland Winkler wrote:
  Can you please be more specific? Under what circumstances did BBDB
  what, which now it does not do anymore?
 
 Create a bbdb db with two duplicate records and each has an email.
 
 Try completing emails in gnus or whatever mailer.
 
 Type a substring that matches both emails and complete. Only one email
 address is completed. The other is ignored.

...that so far in BBDB's history nobody considered the case of
records with duplicate names important enough to extend the code of
bbdb-complete-mail to handle such records properly. If this is
urgent for you, you might want to look into this function yourself.

Actually, I am not sure this requires a UID field. Instead, it may
be sufficient that bbdb-complete-mail does not immediately exit one
of its loops if it found one record matching a name. Instead it
needs to continue looking for matching records.

Note that BBDB's hash table associates elements in, say, the
organization field with multiple records. In the same way it *can*
associate a name with multiple records. Merely, details are not yet
spelled out in the code. See the warning in bbdb-allow-duplicates.

Roland

--
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: Address completion question

2012-10-13 Thread Roland Winkler
On Sat Oct 13 2012 Alan Schmitt wrote:
 When I try to complete and address and several match, after tab I get
 a window with all the possible matches. If I hit tab again I get the
 following message
 
 #window ... is not a live window
 
 where ... is a number, and the window is closed. The only time I can
 complete an address is when there is a single match.
 
 I have (setq bbdb-complete-mail-allow-cycling t) in my configuration.
 Am I doing something wrong or is this a bug?

Which version of emacs are you using? bbdb-complete-mail uses some
code for popping up a completion window that only works with GNU
Emacs 24. I want to replace it with something that works also with
GNU Emacs 23. But this is still on my to-do list.

Roland

--
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: Address completion question

2012-10-13 Thread Roland Winkler
On Sat Oct 13 2012 Alan Schmitt wrote:
 Roland Winkler wink...@gnu.org writes:
 
  Which version of emacs are you using? bbdb-complete-mail uses some
  code for popping up a completion window that only works with GNU
  Emacs 24. I want to replace it with something that works also with
  GNU Emacs 23. But this is still on my to-do list.
 
 I'm on 24.2 (homebrew compiled, os x).

Then I am not sure what your problem is. I do not have 24.2. But
both 24.1 and the trunk work fine for me.

 When I try to complete and address and several match, after tab I get
 a window with all the possible matches. If I hit tab again I get the
 following message
 
 #window ... is not a live window
 
 where ... is a number, and the window is closed. The only time I can
 complete an address is when there is a single match.

What is tab bound to for you? By default bbdb-complete-mail gets
bound to M-tab. Can you send a backtrace of when things go wrong
(plus a description of what you did to get it)?

 I have (setq bbdb-complete-mail-allow-cycling t) in my configuration.

That should not be relevant here.

Roland

--
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


[BBDB] ChangeLog 2012-09-23

2012-09-23 Thread Roland Winkler
On Sun Sep 16 2012 Stephen Leake wrote:
 It is not at all obvious that update has anything to do with
 display. In addition, the help for bbdb-mua-auto-update-init
 says nothing about display.

The patch below hopefully clarifies these things. The docstring of
bbdb-mua-auto-update-init now points to bbdb-mua-auto-update which
is the function doing the real work, and the latter mentions
display, too.

Also, I updated the README file for this.

 I suggest that bbdb-initialize call bbdb-mua-auto-update-init with
 the same list of MUA's, but offer a way to then override that. Or
 have bbdb-initialize take two lists, if they are typically
 different.

I have intentionally separated these things, and the reason for this
has long been explained in the docstrings of bbdb-mua-auto-update-init
and bbdb-initialize.

  Then it doesn't make sense that bbdb-message-pop-up defaults to nil
  implying that BBDB updates the records silently (probably very
  confusing for many users).
 
 Actually, I would expect updates to be silent. More precisely, I
 expect update to be orthogonal to display; I should be able to
 do either without the other, and control them separately.

That's exactly the purpose of having bbdb-message-pop-up as a
separate user variable. so that you can do the above.

 I suggest bbdb-pop-up-window-size should be 4 (current default is
 0.5). The typical entry will have a name, an email address, and an
 aka; no need to waste space on blank lines. The focus is on
 reading mail, not reading bbdb entries, so making the mail window
 and the bbdb window the same size is wrong.
 
 Another alternative is to always shrink the bbdb popup window to
 wrap the content, with a max size of 6 or so. I would probably
 find that annoying; the size of the mail window would keep
 changing.

I am rather hesitant with claims concerning a typical usage of
BBDB. However, I want to go over this code once more, first of all
to make it more robust such that quit-window restores the window
configuration. From a more technical perspective, this means that I
want to make this code match the standard scheme for setting up a
buffer window. I do not know yet what this will involve. Possibly,
this also includes the possibility to make user customization more
flexible.


2012-09-23  Roland Winkler  wink...@gnu.org
* lisp/bbdb.el (bbdb-mua-auto-update-p): Doc fix.
(bbdb-message-pop-up): Change default to t.

* lisp/bbdb-mua.el (bbdb-mua-auto-update)
(bbdb-mua-auto-update-init): Doc fix.
(bbdb-mua-auto-update): Simplify.

* README: Clarify usage of bbdb-mua-auto-update.


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

--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://ad.doubleclick.net/clk;258768047;13503038;j?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


[BBDB] Changelog 2012-09-23 part 2 (with notes for BBDB lisp hackers)

2012-09-23 Thread Roland Winkler
On Wed Aug 1 2012 Roland Winkler wrote:
 Part of BBDB (yes, even v2) has allowed the possibility that a mail
 address in a record is not just a plain sm...@foo.com. But the
 record of, say, Johnathan Smith may also contain an RFC 822 address
 such as John Smith sm...@foo.com. 
 
 Johnathan Smith
phone (home): (123) 456-7890
mail: sm...@example.com, John Smith sm...@foo.com,
  Joe Smith j...@bar.com

The patch below tries to make sure that mail entries containing
RFC-822 mail addresses such as John Smith sm...@foo.com in the
example above are handled properly throughout BBDB. Essentially, it
decomposes such a mail address into a name part John Smith and a
stripped mail address sm...@foo.com. The name part is treated as
an AKA. The stripped mail address is used, for example, by BBDB's
MUA interface to identify the record for the sender or recipient of
a message.

However, if all records in your database are of the plain form
sm...@foo.com, the patch below should not be noticeable for you.

To make this work efficiently, BBDB caches extra AKAs such as
John Smith and the stripped addresses such as sm...@foo.com.
So changing the mail entry for a record requires a bit of extra care
to make sure that the cache gets updated, too. All this is similar
to various extra steps BBDB is taking to ensure the integrity of the
database. To make all this work reliable, I added the following
(taken from the updated README file):

Notes for BBDB lisp hackers:


If you write your own functions and commands to modify BBDB records,
do not call the low-level functions bbdb-record-set-* such as
bbdb-record-set-aka, bbdb-record-set-mail etc. The recommended
sequence of calls is

- one or multiple calls of bbdb-record-set-field for the respective
  fields to be changed. This not only sets the fields, but it also
  ensures the integrity of the database. Also, this makes your code
  more robust with respect to possible future changes of BBDB's
  innermost internals.

- a call of bbdb-change-record which updates the database after a
  change of record.

- If the changed record is displayed in the *BBDB* buffer, call
  bbdb-redisplay-record.


2012-09-23  Roland Winkler  wink...@gnu.org
Add more complete support for mail entries containing RFC-822
addresses such as John Smith sm...@foo.com in the record of
Johnathan Smith.

* lisp/bbdb.el (bbdb-defstruct): Doc fix.  Improve doc string of
functions defined via this macro.
(bbdb-cache-mail-aka, bbdb-cache-mail-canon): New elements of
bbdb-record-cache.
(bbdb-record-mail-aka, bbdb-record-mail-canon): New functions.
(bbdb-hash-p): New function.
(bbdb-gethash): Use it.
(bbdb-puthash-mail): New function.
(bbdb-hash-record): Use it.
(bbdb-record-field): Renamed from bbdb-record-get-field.
New field values mail-canon, mail-aka and aka-all.  Doc fix.
(bbdb-record-get-field): Obsolete function alias.
(bbdb-record-set-field): Doc fix. Update hash for mail entries
such as John Smith sm...@foo.com.
(bbdb-delete-record-internal): Use canonical mail addresses and
all AKAs when cleaning up the hash.

* lisp/bbdb-com.el (bbdb-search): Use bbdb-record-field.
(bbdb-search-duplicates): Use bbdb-record-mail-canon.
(bbdb-message-search): Simplify.
(bbdb-edit-field): Doc fix.
(bbdb-ident-point, bbdb-transpose-fields)
(bbdb-delete-field-or-record): Use bbdb-record-field.
(bbdb-completion-predicate): Use bbdb-hash-p.
(bbdb-complete-mail): Compare with all AKAs.  A plain message
search should be sufficient.

* lisp/bbdb-mual.el (bbdb-annotate-message): Compare with
canonical mail addresses.

* lisp/bbdb-ispell.el (bbdb-ispell-export): Use bbdb-record-field.

* README: Notes for BBDB lisp hackers added.


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

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: Integrating with gnus

2012-09-15 Thread Roland Winkler
On Sat Sep 15 2012 Charles Philip Chan wrote:
 Oh, I forgot to add, you need to customize the variable
 bbdb-message-pop-up:
 
 ,
 | bbdb-message-pop-up's value is t
 | Original value was nil

Now I start to understand what you want to achieve and where things
appear to fail. So we are really talking about the default values of
some user variables.

I am trying to give the user variables default values that are not
too aggressive. But right now I do not understand anymore why the
default of bbdb-message-pop-up is nil. Anyway, the user needs to
call bbdb-mua-auto-update-init to get this working. Then it doesn't
make sense that bbdb-message-pop-up defaults to nil implying that
BBDB updates the records silently (probably very confusing for many
users). So I'll change the default of bbdb-message-pop-up to t.

Are there other user variables for which the default values are
irritating or confusing?

--
How fast is your code?
3 out of 4 devs don\\\'t know how their code performs in production.
Find out how slow your code is with AppDynamics Lite.
http://ad.doubleclick.net/clk;262219672;13503038;z?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: Integrating with gnus

2012-09-14 Thread Roland Winkler
On Fri Sep 14 2012 Gijs Hillenius wrote:
 yeah, I could not get that working here either
 
 However, Vincent Bernat suggests:
 
 http://comments.gmane.org/gmane.emacs.gnus.general/81908
 
 ,
 | (add-hook 'bbdb-notice-mail-hook 'bbdb-auto-notes)
 | (add-hook 'gnus-article-prepare-hook 'vbe/gnus/bbdb-display-record)
 | (defun vbe/gnus/bbdb-display-record ()
 |   Display appropriate BBDB record for the current message.
 |   (unless
 |   (bbdb-mua-display-records nil 'search)
 | ;; No record found, close the BBDB popup
 | (let ((window (get-buffer-window bbdb-buffer-name)))
 |   (when window (delete-window window)
 `
 
 which works.

What problem is this patch supposed to solve? Why the call of
bbdb-auto-notes? I am not a Gnus expert. Yet it appears to me that
something is not working the way it is supposed to. There should be
no need to define such a function.

It should be sufficient to call

(bbdb-mua-auto-update-init 'gnus 'message)

plus possibly customizing bbdb-mua-auto-update-p.
(See the README file.)

Roland

--
How fast is your code?
3 out of 4 devs don\\\'t know how their code performs in production.
Find out how slow your code is with AppDynamics Lite.
http://ad.doubleclick.net/clk;262219672;13503038;z?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: Integrating with gnus

2012-09-13 Thread Roland Winkler
On Thu Sep 13 2012 Sam Steingold wrote:
  * Norman Walsh a...@ajnyfu.pbz [2012-09-13 07:02:13 -0700]:
  Anyone know the incantation for Gnus+BBDB 3.x integration?
 
 (require 'bbdb)
 (require 'bbdb-loaddefs)
 (bbdb-initialize 'gnus 'message)
 (bbdb-mua-auto-update-init 'gnus 'message)

The first line is not needed, see the INSTALL file.
See also the README file. (Unfortunately the documentation of BBDB v3
is still rather incomplete.)

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: Record %s does not exist

2012-09-13 Thread Roland Winkler
On Thu Sep 13 2012 Sam Steingold wrote:
 (defun sds-bbdb-add-name (rec name)
   Decide whether to change the record name.
   (let ((n1 (bbdb-record-firstname rec))
 (nl (bbdb-record-lastname rec)))
 (cond ((and (null n1) (null nl)) t)
   ((or (string= n1 name) (string= nl name)) nil)
   (t 'query
 (setq 'bbdb-add-name 'sds-bbdb-add-name)

You surely know that setq is a special form that prevents evaluation
of its first arg.

--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://ad.doubleclick.net/clk;258768047;13503038;j?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: Is ; (bbdb-mua-edit-field-sender) broken in gnus?

2012-09-10 Thread Roland Winkler
On Mon Sep 10 2012 Leo wrote:
 The first group should display info without querying users for anything
 and it should also display something when some contacts are not in the
 database.
 
   (defadvice bbdb-mua-display-sender (after sender-not-found-feedback
 activate)
 Give user feedback when senders cannot be found in BBDB.
 (when (and (eq (ad-get-arg 0) 'search)
(not ad-return-value))
   (let ((names (mapconcat 'car (bbdb-get-address-components 'sender) ,
 )))
 (message-nolog %s not found in BBDB names

This can be made more verbose. - This should also consider the case
that a message can have multiple recipients, where only some of them
have records in BBDB.

 The second group let users update existing contacts as well as adding
 new ones i.e. it should ask the users to create new entries.
 
 These commands are infrequently used i.e. the ability to customise them
 is not very important for me if they have good defaults. I hadn't
 customised any of these commands in the 4+ years I was using BBDB2.

What do you propose more explicitly? Should the latter commands use
something else instead of the car of bbdb-mua-update-interactive-p
to figure out what action to take?

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: Is ; (bbdb-mua-edit-field-sender) broken in gnus?

2012-09-10 Thread Roland Winkler
On Mon Sep 10 2012 Leo wrote:
 The first group should display info without querying users for anything

I forgot to say: The above is exactly the default of BBDB v3.
The default car of bbdb-mua-update-interactive-p is 'search.

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: Some small improvements

2012-09-10 Thread Roland Winkler
On Mon Sep 10 2012 Leo wrote:
 I have these commits sitting in my local git repo and I think they might
 be good for upstream so I am posting them here.

Thanks. I need to check these more carefully

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: Update: Where is BBDB going

2012-09-10 Thread Roland Winkler
On Mon Sep 10 2012 Leo wrote:
 On 2012-09-10 12:21 +0800, Roland Winkler wrote:
  Is this all?? Let's see what pops up next...
 
 There is one buglet that is pretty annoying i.e. after
 bbdb-transpose-fields point is moved to the beginning of the record. I
 think it should stay in the same field of the record before and after
 the transposition.

Noted.

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


[BBDB] ChangeLog 2012-09-09 (unified scheme for customizing how BBDB analyzes messages)

2012-09-09 Thread Roland Winkler
On Fri Sep 7 2012 Roland Winkler wrote:
  Everytime I read one of these messages, BBDB asks me if I'd like
  to change the name of some-real-person to The Bug Tracking System
  or add some-real-person to some-other-real-person.
 
 You are struggling with similar problems... I extended the allowed
 values for bbdb-accept-name-mismatch to include regexps and
 functions. This should hopefully solve most problems of that kind.
 See the updated doc string of bbdb-accept-name-mismatch.

Just after I pushed this patch, I wanted to do something similar
with mail addresses. There was the user variable bbdb-add-mails for
this. But the details of how things could be customized were rather
different. Also, there were the user variables
bbdb-use-alternate-names and bbdb-new-mails-always-primary, again
serving for related problems, but each of them using its own scheme.

With the patch below, I tried to clean up these things.
Unfortunately, this resulted in a few more backward
incompatibilities:

  bbdb-accept-name-mismatch  - bbdb-add-name
  bbdb-use-alternate-names   - bbdb-add-aka
  bbdb-new-mails-always-primary  - bbdb-new-mails-primary

Yet the new scheme with the user variables bbdb-add-name,
bbdb-add-aka, bbdb-add-mails, and bbdb-new-mails-primary should be
both much more transparent and more powerful. See the docstring of
these variables.


2012-09-09  Roland Winkler  wink...@gnu.org
Provide unified scheme for customizing how BBDB analyzes messages.

* lisp/bbdb.el (bbdb-add-name): Renamed from
bbdb-accept-name-mismatch.
(bbdb-add-aka): Renamed from bbdb-use-alternate-names.
(bbdb-new-mails-primary): Renamed from
bbdb-new-mails-always-primary.
(bbdb-add-name, bbdb-add-aka, bbdb-add-mails)
(bbdb-new-mails-primary): Unify set of allowed values.
(bbdb-add-job, bbdb-eval-spec): New functions.
(bbdb-mode): Update docstring.

* lisp/bbdb-com.el (bbdb-merge-records): Use bbdb-add-aka.

* lisp/bbdb-mua.el (bbdb-annotate-message): Use bbdb-add-name,
bbdb-add-aka, bbdb-add-mails, and bbdb-new-mails-primary.

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

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: Update: Where is BBDB going

2012-09-09 Thread Roland Winkler
On Sun Sep 9 2012 Roland Winkler wrote:
 I just want to give here a brief update on my further plans with
 BBDB.  Currently, I have three open issues on my BBDB to-do list:
 
 - Notes - xfield
   (see the recent thread name for list of notes fields on this list)
 
 - pop up *BBDB* buffer properly
   (see the recent thread BBDB3  Electric Popup Window)
 
 - clean up gnus interface
   While I do not know too much about Gnus, I thought that there are
   a few things that could help to make BBDB's Gnus interface more
   transparent. (So far, I did not do much with the Gnus-specific
   features of BBDB.)

I forgot one feature I already have in beta test (also previously
discussed here, to be installed soon):

  proper handling of mail addresses of the form
  Joe Smith sm...@example.com in the record of John Smith.

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: bbdb-ignore-message-alist

2012-09-08 Thread Roland Winkler
On Tue Aug 28 2012 Mitchel Humpherys wrote:
 I'd like to configure bbdb to not auto-notice addresses in mailing
 list mail. I'm trying to use the `X-Mailing-List' and
 `X-Mailman-Version' headers, since those seem to be consistently
 present on all the mailing lists I read, but it doesn't seem to be
 working (i.e. bbdb still offers to save email addresses from mails
 containing those headers)... What am I doing wrong?
 
 (setq bbdb-ignore-message-alist
   '(((X-Mailman-Version X-Mailing-List) . .*)))

I am trying to crosspost this on the gnus mailing list, too, because
your problem has to do with some subtleties of Gnus that go beyond
my knowledge of Gnus.

Gnus has two functions for accessing headers of a message,
gnus-fetch-field and gnus-fetch-original-field. The latter uses
gnus-original-article-buffer. I do not know which buffer the former
function is using. Only gnus-original-article-buffer contains the
X-* headers you want to access. But BBDB currently uses
gnus-fetch-field to access the headers of a Gnus message. So that's
why BBDB believes the messages had no X-* headers.

So my question is: What should BBDB do to access the headers of a
Gnus message in a way that is both reliable and efficient?

Thanks,

Roland


--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


[BBDB] ChangeLog 2012-09-8 (bbdb-ignore-message-alist)

2012-09-08 Thread Roland Winkler
On Sat Sep 8 2012 Roland Winkler wrote:
 Gnus has two functions for accessing headers of a message,
 gnus-fetch-field and gnus-fetch-original-field. The latter uses
 gnus-original-article-buffer. I do not know which buffer the former
 function is using. Only gnus-original-article-buffer contains the
 X-* headers you want to access. But BBDB currently uses
 gnus-fetch-field to access the headers of a Gnus message. So that's
 why BBDB believes the messages had no X-* headers.

I found a thread from last year on essentially the same question
that died at some point, see in particular

 http://permalink.gmane.org/gmane.emacs.gnus.general/78741

So I replaced the call of gnus-fetch-field by
gnus-fetch-original-field.  Let me know if now
bbdb-ignore-message-alist works for you as expected.

2012-09-08  Roland Winkler  wink...@gnu.org
* lisp/bbdb-mua.el (bbdb-message-header): Use
gnus-fetch-original-field so that bbdb-select-message does not get
fooled by an apparent absence of some headers.

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

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


[BBDB] ChangeLog 2012-09-07

2012-09-07 Thread Roland Winkler
On Tue Aug 21 2012 Sam Steingold wrote:
 I have John Smith ... in bbdb, but he sometimes sends mail as John ...
 and then bbdb asks me to change his name to John (wrong) or to add
 John as an AKA (stupid).

On Fri Sep 7 2012 Norman Walsh wrote:
 One of the internal systems where I work sends bug track messages.
 They all come like this:
 
From: The Bug Tracking System some-real-per...@example.com
 
 Everytime I read one of these messages, BBDB asks me if I'd like
 to change the name of some-real-person to The Bug Tracking System
 or add some-real-person to some-other-real-person.

You are struggling with similar problems... I extended the allowed
values for bbdb-accept-name-mismatch to include regexps and
functions. This should hopefully solve most problems of that kind.
See the updated doc string of bbdb-accept-name-mismatch.

2012-09-07  Roland Winkler  wink...@gnu.org
* lisp/bbdb.el (bbdb-accept-name-mismatch): Allow value being a
regexp or function.
* lisp/bbdb-mua.el (bbdb-annotate-message): Use these new values.

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

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: bbdb-ignore-message-alist

2012-09-01 Thread Roland Winkler
On Tue Aug 28 2012 Mitchel Humpherys wrote:
 I'd like to configure bbdb to not auto-notice addresses in mailing
 list mail. I'm trying to use the `X-Mailing-List' and
 `X-Mailman-Version' headers, since those seem to be consistently
 present on all the mailing lists I read, but it doesn't seem to be
 working (i.e. bbdb still offers to save email addresses from mails
 containing those headers)... What am I doing wrong?
 
 (setq bbdb-ignore-message-alist
   '(((X-Mailman-Version X-Mailing-List) . .*)))

It works for me (I just double-checked).

What is your value of bbdb-mua-auto-update-p? You need something
like the default of this variable to enable what you want.

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


[BBDB] ChangeLog 2012-09-01 (bug fixes)

2012-09-01 Thread Roland Winkler
2012-09-01  Roland Winkler  wink...@gnu.org
* lisp/bbdb-mua.el (bbdb-mua-edit-field): Bug fix.

2012-09-01  Roland Winkler  wink...@gnu.org
* lisp/bbdb.el (bbdb-record-set-field): Bug fix.

2012-09-01  Roland Winkler  wink...@gnu.org
* lisp/bbdb.el (bbdb-with-print-loadably): New macro.
(bbdb-insert-record-internal, bbdb-overwrite-record-internal)
(bbdb-sort-records): Use it.

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

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: Is ; (bbdb-mua-edit-field-sender) broken in gnus?

2012-08-31 Thread Roland Winkler
On Thu Aug 30 2012 Roland Winkler wrote:
 On Fri Aug 31 2012 Leo wrote:
  On 2012-08-30 23:27 +0800, Roland Winkler wrote:
   Should bbdb-mua-update-interactive-p turned into a list instead of a
   cons pair to offer yet more flexibility?
  
  The level of indirection here looks like a sign of over-engineering. We
  should make the user commands (bbdb-mua-edit-field-sender etc)
  straightforward to understand and customise without needing to read too
  many places.
 
 My intention was to have one user variable
 bbdb-mua-update-interactive-p for all MUA commands so that all these
 commands behave similarly according to what the user wants. What do
 you propose instead more specifically?

I guess I should mention here one more thing:

The MUA commands of BBDB come in sets:

- bbdb-mua-display-records, bbdb-mua-display-sender,
  bbdb-mua-display-recipients

- bbdb-mua-annotate-sender, bbdb-mua-annotate-recipients

- bbdb-mua-edit-field, bbdb-mua-edit-field-sender,
  bbdb-mua-edit-field-recipients

bbdb-mua-update-interactive-p controls the behavior of all these
commands. Among other things, this also ensures that these sets of
commands behave consistently the same (as compared to having
separate user variables for each of these commands).

On the other hand: a too sophisticated scheme for customizing these
commands beyond bbdb-mua-update-interactive-p does not make sense
because each of these commands has just a few lines of code. (I went
through some effort to separate user commands from the nitty-gritty
low-level details.) Thus it is easier to write a new command fitting
specific needs than writing a sophisticated customization for some
user variable.

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: Is ; (bbdb-mua-edit-field-sender) broken in gnus?

2012-08-30 Thread Roland Winkler
On Thu Aug 30 2012 Leo wrote:
 I just tried it again. Unfortunately by default it pops up an empty
 record window (screenshot attached). Something is wrong here.

Now I see what you mean. Yes, there is a simple silly bug here. If
there are no records for a message (no existing records and BBDB is
configured such that it should not create new records), then BBDB
should not pop up an empty *BBDB* buffer.

 BBDB of 2012-03-04 actually asks the user whether they want to add
 to BBDB.

Still that's a separate issue. The old BBDB snapshot you refer to
was inconsistent in the sense that bbdb-mua-edit-field-sender did
not obey bbdb-mua-update-interactive-p. The code got updated since
then to make the behavior among different BBDB MUA commands more
consistent. Now they all obey bbdb-mua-update-interactive-p for
whether they should only use existing records or possibly also
create new ones.

Should bbdb-mua-update-interactive-p turned into a list instead of a
cons pair to offer yet more flexibility?

Roland

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: Is ; (bbdb-mua-edit-field-sender) broken in gnus?

2012-08-30 Thread Roland Winkler
On Fri Aug 31 2012 Leo wrote:
 On 2012-08-30 23:27 +0800, Roland Winkler wrote:
  Should bbdb-mua-update-interactive-p turned into a list instead of a
  cons pair to offer yet more flexibility?
 
 The level of indirection here looks like a sign of over-engineering. We
 should make the user commands (bbdb-mua-edit-field-sender etc)
 straightforward to understand and customise without needing to read too
 many places.

My intention was to have one user variable
bbdb-mua-update-interactive-p for all MUA commands so that all these
commands behave similarly according to what the user wants. What do
you propose instead more specifically?

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: Is ; (bbdb-mua-edit-field-sender) broken in gnus?

2012-08-28 Thread Roland Winkler
On Wed Aug 29 2012 Leo wrote:
 I cannot seem to add any new entry. Tested with BBDB git.

Using VM instead of Gnus, it works fine for me.  

There is an unfortunate inconsistency about this command (due to
historical reasons): the prefix arg makes it query for the field
that is edited. So it must always use the car of
bbdb-mua-update-interactive-p. What value do you have for the car of
this variable?

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: name for list of notes fields

2012-08-25 Thread Roland Winkler
On Tue Aug 21 2012 Roland Winkler wrote:
 On Tue Aug 21 2012 Leo wrote:
  bbdb-record-x tells me it is about extensions. Additionally, fields
  contained in x become meaningful, such as bbdb-record-x-uid,
  bbdb-record-set-x-uid etc. That is clarify that can not be attained
  otherwise. Just some random thoughts.
 
 The way BBDB works it does not have functions for individual fields
 such as bbdb-record-set-x-uid, and it does not need them.

Kind of natural would be `xfield' instead of `x' as a name for the
*list* of extra (custom) fields of a record. Certainly this matches
the lingo that both Leo and I used above.

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: (wrong-type-argument char-or-string-p \.\.\.)

2012-08-20 Thread Roland Winkler
On Mon Aug 20 2012 Sam Steingold wrote:
 this is because
 
 (bbdb-record-organization record)
  == (Princeton University Psychology MIT MIT Brain MIT Brain 
 Cognitive Science MIT BRAINCOGSCI Harvard William James Hall HARVARD
 PSYCHOLOGY HARVARD PSYCHOLOGY \.\.\.)
 
 with the ... literal appearing in the .bbdb file.
 
 Now I will have to hunt down what was there before the data corruption.
 
 Please bind print-length et al to nil while saving bbdb!

print-length is not intended as a user variable and it
defaults to nil. If you change such a default, you should
certainly be prepared for unexpected surprises.

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: bbdb-end-marker: (wrong-type-argument number-or-marker-p nil)

2012-08-20 Thread Roland Winkler
Do you have a recipe to reproduce the backtrace below?

On Mon Aug 20 2012 Sam Steingold wrote:
 Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil)
   /=(909445 nil)
   (and (/= (point) bbdb-end-marker) (not (looking-at \\[)))
   (if (and (/= (point) bbdb-end-marker) (not (looking-at \\[))) (error Not
 inserting before a record (%s) (point)))
   (let ((debug-on-error t)) (if (and (/= (point) bbdb-end-marker) (not
 (looking-at \\[))) (error Not inserting before a record (%s) (point
   (bbdb-debug (if (and (/= (point) bbdb-end-marker) (not (looking-at \\[)))
 (error Not inserting before a record (%s) (point
   (let* ((print-escape-newlines t) (tail (memq record bbdb-records)) (_
 (unless tail (error BBDB record absent: %s record))) (cache
 (bbdb-record-cache record))) (bbdb-debug (if (= (bbdb-cache-marker cache)
 (point-min)) (error Cache marker is %s (bbdb-cache-marker cache
 (goto-char (bbdb-cache-marker cache)) (bbdb-debug (if (and (/= (point)
 bbdb-end-marker) (not (looking-at \\[))) (error Not inserting before a
 record (%s) (point (bbdb-record-set-cache record nil) (insert
 (prin1-to-string record) \n) (delete-region (point) (if (cdr tail)
 (bbdb-record-marker (car (cdr tail))) bbdb-end-marker)) (bbdb-record-set-cache
 record cache) (bbdb-debug (if (= (if (cdr tail) (bbdb-record-marker (car (cdr
 tail))) bbdb-end-marker) (bbdb-record-marker record)) (error Overwrite
 failed))) (setq bbdb-modified t) record)
   (save-current-buffer (set-buffer buffer) (let* ((print-escape-newlines t)
 (tail (memq record bbdb-records)) (_ (unless tail (error BBDB record absent:
 %s record))) (cache (bbdb-record-cache record))) (bbdb-debug (if (=
 (bbdb-cache-marker cache) (point-min)) (error Cache marker is %s
 (bbdb-cache-marker cache (goto-char (bbdb-cache-marker cache)) (bbdb-debug
 (if (and (/= (point) bbdb-end-marker) (not (looking-at \\[))) (error Not
 inserting before a record (%s) (point (bbdb-record-set-cache record nil)
 (insert (prin1-to-string record) \n) (delete-region (point) (if (cdr tail)
 (bbdb-record-marker (car (cdr tail))) bbdb-end-marker)) (bbdb-record-set-cache
 record cache) (bbdb-debug (if (= (if (cdr tail) (bbdb-record-marker (car
 ...)) bbdb-end-marker) (bbdb-record-marker record)) (error Overwrite
 failed))) (setq bbdb-modified t) record))
   (with-current-buffer buffer (let* ((print-escape-newlines t) (tail (memq
 record bbdb-records)) (_ (unless tail (error BBDB record absent: %s
 record))) (cache (bbdb-record-cache record))) (bbdb-debug (if (=
 (bbdb-cache-marker cache) (point-min)) (error Cache marker is %s
 (bbdb-cache-marker cache (goto-char (bbdb-cache-marker cache)) (bbdb-debug
 (if (and (/= (point) bbdb-end-marker) (not (looking-at \\[))) (error Not
 inserting before a record (%s) (point (bbdb-record-set-cache record nil)
 (insert (prin1-to-string record) \n) (delete-region (point) (if (cdr tail)
 (bbdb-record-marker (car (cdr tail))) bbdb-end-marker)) (bbdb-record-set-cache
 record cache) (bbdb-debug (if (= (if (cdr tail) (bbdb-record-marker (car
 ...)) bbdb-end-marker) (bbdb-record-marker record)) (error Overwrite
 failed))) (setq bbdb-modified t) record))
   (if window (with-selected-window window . #1=((let* ((print-escape-newlines
 t) (tail (memq record bbdb-records)) (_ (unless tail (error BBDB record
 absent: %s record))) (cache (bbdb-record-cache record))) (bbdb-debug (if (=
 (bbdb-cache-marker cache) (point-min)) (error Cache marker is %s
 (bbdb-cache-marker cache (goto-char (bbdb-cache-marker cache)) (bbdb-debug
 (if (and (/= ... bbdb-end-marker) (not ...)) (error Not inserting before a
 record (%s) (point (bbdb-record-set-cache record nil) (insert
 (prin1-to-string record) \n) (delete-region (point) (if (cdr tail)
 (bbdb-record-marker (car ...)) bbdb-end-marker)) (bbdb-record-set-cache record
 cache) (bbdb-debug (if (= (if ... ... bbdb-end-marker) (bbdb-record-marker
 record)) (error Overwrite failed))) (setq bbdb-modified t) record)))
 (with-current-buffer buffer . #1#))
   (let* ((buffer (bbdb-buffer)) (window (get-buffer-window buffer))) (if
 window (with-selected-window window . #1=((let* ((print-escape-newlines t)
 (tail (memq record bbdb-records)) (_ (unless tail ...)) (cache
 (bbdb-record-cache record))) (bbdb-debug (if (= ... ...) (error Cache marker
 is %s ...))) (goto-char (bbdb-cache-marker cache)) (bbdb-debug (if (and ...
 ...) (error Not inserting before a record (%s) ...))) (bbdb-record-set-cache
 record nil) (insert (prin1-to-string record) \n) (delete-region (point) (if
 (cdr tail) (bbdb-record-marker ...) bbdb-end-marker)) (bbdb-record-set-cache
 record cache) (bbdb-debug (if (= ... ...) (error Overwrite failed))) (setq
 bbdb-modified t) record))) (with-current-buffer buffer . #1#)))
   (bbdb-with-db-buffer (let* ((print-escape-newlines t) (tail (memq record
 bbdb-records)) (_ (unless tail (error BBDB record absent: %s record)))
 (cache (bbdb-record-cache record))) (bbdb-debug (if (= 

Re: cache error

2012-08-20 Thread Roland Winkler
Do you have a recipe to reproduce the backtrace below?

On Mon Aug 20 2012 Sam Steingold wrote:
 Debugger entered--Lisp error: (wrong-type-argument arrayp nil)
   bbdb-cache-set-fl-name(nil XXX XXX)
   (let ((fl-name (bbdb-concat (quote name-first-last) first last)) (lf-name
 (bbdb-concat (quote name-last-first) last first)) (cache (bbdb-record-cache
 record))) (bbdb-cache-set-fl-name cache fl-name) (bbdb-cache-set-lf-name cache
 lf-name) (bbdb-puthash fl-name record) (bbdb-puthash lf-name record) fl-name)
   bbdb-record-set-name([...] t t)
   bbdb-record-name-lf([...])
   bbdb(steingold full-multi-line)
   call-interactively(bbdb nil nil)

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: name for list of notes fields

2012-08-20 Thread Roland Winkler
On Sun Aug 19 2012 Leo wrote:
 On 2012-08-19 00:36 +0800, Roland Winkler wrote:
  I guess `x' is really just a prefix -- for what? I'd prefer a more
  mnemonic name here.
 
 Fair enough though using 'x' to mean extension is not uncommon. For
 example, in emacs, we have a few libs: files-x, dired-x etc.

I know where the prefix x comes from in this context. Still I do not
see how the code of BBDB becomes more clear if BBDB internals such
as bbdb-record-Notes are renamed to bbdb-record-x. There are good
reasons why Emacs commonly does not use names like foo-bar-x.

In any case, 99% percent of all BBDB users should not notice such a
change even if they write their own functions or commands to
customize BBDB.

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: name for list of notes fields

2012-08-18 Thread Roland Winkler
On Fri Aug 17 2012 Leo wrote:
 Would you be OK with 'x'? I got the idea from vcard where custom
 fields are prefixed with x-.

I guess `x' is really just a prefix -- for what? I'd prefer a more
mnemonic name here.

Roland

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: BBDB V3 Home page at: http://www.nongnu.org/bbdb/

2012-08-18 Thread Roland Winkler
On Thu Aug 16 2012 Sriram Karra wrote:
 I think it is time we start putting together some stuff for a
 proper Official BBDB v3 Page. Savannah provides for a project
 home page at the above URL. I can help set something up, perhaps
 in some community editable format (tiddlywiki, for e.g.) or
 something along those lines. What do you think?

I agree that it will be nice to have a web page, though my time is
limited for such a thing. We need to find out what kind of things the
(non)gnu web server supports. Is this documented somewhere?



--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: BBDB3 Electric Popup Window

2012-08-15 Thread Roland Winkler
On Wed Aug 15 2012 Charles Philip Chan wrote:
 I migrated to bbdb3 yesterday and so far I like it better than
 bbdb2. The only thing that I don't like is that the popup window is not
 electric anymore. Are there any plans for it?

Hey, you seem to be the first one who was using the electric mode of
BBDB v2. Actually, this was removed from BBDB v3 just a few days ago
due to some general design flaws of the electric mode (things not
particularly related to BBDB) and because it appeared that BBDB did
not get any extra functionality from the electric mode. You might
want to take a look at these recent threads on this list.

I hope to learn something new here: In what way did you use the
electric mode of BBDB v2? What are you missing without it?

Roland

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: name for list of notes fields

2012-08-15 Thread Roland Winkler
On Tue Aug 14 2012 Ivan Kanis wrote:
 I have the following patch floating about. Would it affect me?

This is safe.

 +(defun bbdb-record-edit-notes ()
 +  Edit notes of current record.
 +  (interactive)
 +  (bbdb-edit-field (bbdb-current-record) 'notes))

High-level functions such as bbdb-edit-field and
bbdb-record-set-field are intended as an intermediate layer to the
nitty-gritty internals of BBDB.

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: BBDB3 Electric Popup Window

2012-08-15 Thread Roland Winkler
On Wed Aug 15 2012 Charles Philip Chan wrote:
 Roland Winkler wink...@gnu.org writes:
  I hope to learn something new here: In what way did you use the
  electric mode of BBDB v2? What are you missing without it?
 
 I like the window configuration restored after using bbdb.

...Makes sense. But electric mode is really not needed here. 
The *BBDB* buffer should be displayed such that -if possible-
a plain quit-window restores the window configuration.
Yet somehow BBDB's approach is (has been) such that it fools
quit-window. I'll try to find out how that can be fixed.

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: name for list of notes fields

2012-08-14 Thread Roland Winkler
On Tue Aug 14 2012 Leo wrote:
 On 2012-08-14 05:34 +0800, Roland Winkler wrote:
  However, Leo's proposed change could also affect function names such
  as bbdb-record-note and bbdb-record-set-note that address individual
  note fields. To be internally consistent, these should become
  something like bbdb-record-ext and bbdb-record-set-ext. I am a bit
  hesitant to make such a change.
 
 Thanks Roland for the explanation.
 
 Come to think about it again, 'ext' is not a good name. I wonder if
 there is one that doesn't look like note/notes/Notes? ;)

I thought about this for a little while because the name clash in
the BBDB internals really annoyed me. In the end, the defstruct
change from notes to Notes was the best that came to my mind.
But as I said before: better suggestions welcome!

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: name for list of notes fields (was Re: Add some BBDB tests)

2012-08-13 Thread Roland Winkler
On Mon Aug 13 2012 Ivan Kanis wrote:
 Roland Winkler wink...@gnu.org wrote:
  On Sun Aug 12 2012 Leo wrote:
  (bbdb-defstruct record
firstname lastname affix aka organization phone address mail notes cache)
  
  We should rename `notes' in the above to `ext' (for extensions). `notes'
  and `note' are both used in the BBDB and they confuse me every time.
 
 My vote is to keep notes. I have used BBDB for years and have never seen
 note (without an s at the end). Furthermore ext makes me think of phone
 of extension which I think this field is not about.

Leo's proposal only affects BBDB internals. As I said in my previous
email, the proposed change should not be noticeable for most users.
The question is about the generic internal name for user-defined
note fields. A note field is a cons (LABEL . VALUE), where LABEL is
the name of the note field chosen by the user (and visible to the
user), and VALUE is its value (a string). The most common value for
LABEL is `notes'. Previously the internal name for the list of all
such cons pairs was also `notes' which was very confusing, as noted
by Leo. I replaced this internal name by `Notes'. Leo didn't know I
recently made this change. He suggested `ext' instead.

However, Leo's proposed change could also affect function names such
as bbdb-record-note and bbdb-record-set-note that address individual
note fields. To be internally consistent, these should become
something like bbdb-record-ext and bbdb-record-set-ext. I am a bit
hesitant to make such a change.

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: Why V3

2012-08-12 Thread Roland Winkler
On Sun Aug 12 2012 Sriram Karra wrote:
 OK what you are saying is v2 allows single notes string field, but
 a list of cons pairs is still valid in v2, right?

Correct (to the best of my knowledge of v2)

 So a v3 unmigrate features that leaves the notes field as it is
 in v3 (list of cons pairs) would still produce a valid v2
 database.

I believe so.

 So yeah, an unmigrate feature certainly looks easily
 implementable. 

I assume so, too.

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: Why V3 (Was: Re: Fwd: BBDB development shifted from sourceforge to savannah)

2012-08-11 Thread Roland Winkler
On Sat Aug 11 2012 Sriram Karra wrote:
 Further, throwing them away could just be stashing the fields
 into the notes list.

Certainly. But if you then decide to give v3 a second try, you will
not get back what you had before.

 Just for the record, can you tell us about all the changes in the
 file format? I know:
 
 - a new field called affix now appears as the third field of the record
 - organizations is a list instead of a ';' delimited string.

The above is correct.

Also, there is one Notes field in each record which usually holds
the list of note fields, which in turn are cons pairs (KEY . VALUE).
Some pieces of BBDB v2 also allowed the Notes field to be a single
string, instead of the list of cons pairs. I do not know whether
this was just a historical thing left over in the code, or whether
this was still a fully supported feature. V3 definitely relies on
having a list of cons pairs (KEY . VALUE) in the Notes field and
bbdb-migrate converts a single Notes string accordingly. Obviously,
going back to a Notes field with a single string would break pretty
much everything.

For the other things, someone could write a function bbdb-unmigrate
to go back to v2 and post it here.

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: Add some BBDB tests

2012-08-10 Thread Roland Winkler
On Sat Aug 11 2012 Leo wrote:
 A few weeks ago I upgraded to BBDB git head and experienced some odd
 behaviours that I have to revert to my last working copy which is some
 months old.

Certainly it would be good if you could post here if anything
appears to be a true regression.

 BBDB2 has some nice tests to ensure regression doesn't happen as
 often. Would that be a good idea for bbdb3?

I guess in principle yes - yet setting up such a test suite and
making sure that it does what it is supposed to do, is by itself a
significant project, even if there was such a thing for BBDB2.

I think it happens for good reasons that the GNU Emacs project (and
most of its subprojects I am aware of) does not have such test
suites. There is not enough manpower available to make such a thing
work effectively.

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: Why V3 (Was: Re: Fwd: BBDB development shifted from sourceforge to savannah)

2012-08-10 Thread Roland Winkler
On Fri Aug 10 2012 Sriram Karra wrote:
 I have updated site (http://bbdb.sourceforge.net/) with a note
 pointing to Savannah.  That done,  I now feel it is best to just
 leave that site alone. Any FAQ etc. should reside on the Savannah
 site. Thoughts?

Thanks a lot for doing this. Two things:

- My first name is Roland

- I suggest to replace the 2nd paragraph by something like the
  following

  It is important to note that at the moment v3 can import a BBDB
  database from v2. Also, most concepts of the user interface have
  been preserved (plus many new concepts have been added to make
  BBDB yet more powerful). However, beyond this point v3 is not
  backwards compatible with v2. A database from v3 cannot be used
  with v2. Also, the names of many commands and user variables have
  been changed and v3 currently does not support Xemacs.
  
  Therefore, the rest of the page below will be kept around in
  state at least till support for Xemacs has been addressed
  somehow.

You also mentioned backward compatibility that should / could be
addressed. I do not know what this could mean more specifically.
(I do not expect it will ever be feasible / useful to provide a
compatiblity mode that allows a user of v2 to switch to v3 without
worrying about anything.)

Roland

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: Why V3 (Was: Re: Fwd: BBDB development shifted from sourceforge to savannah)

2012-08-10 Thread Roland Winkler
On Sat Aug 11 2012 Sriram Karra wrote:
 I have rewritten along lines you have suggested and pushed it. Please take a
 look.

Looks fine to me, thanks,

 Backwards compatibility for me would mean a few distinct things:
 
 1. Will my old customizations work with the new code
 #1 might never get fixed given the direction we've headed.

My intention has been to make the concepts more transparent. So yes,
making old customizations work in an automated would be very
difficult.

 2. If I use BBDB v3 and don't like it can I go back to v2
 #2 can and should get fixed. I find it quite amusing in fact, the
 bbdb-migrate stuff has always had the hooks to downgrade to an
 earlier file format version - until now, i.e., when it is needed
 more than ever before really :) One of these days...

Well, the new format allows you to do things you could not do with
the old format. So going back to v2 is only possible by throwing
away the incompatible extensions in the format of v3. I do not
consider this a satisfactory procedure.

Of course, anyone switching from v2 to v3 should first make a copy
of his or her old database. Then if things do not work out for
whatever reason you can fully go back.

Roland

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: First and last names

2012-08-09 Thread Roland Winkler
On Wed Aug 8 2012 Julien Cubizolles wrote:
 I just realized that I switched first and last names in my bbdb
 records : I used to use the first field for the last name... Is there an
 easy way to make the switch back on a record, something like a
 bbdb-switch-first-last-name ?

I am a bit surprised how you possibly achieved this (with either
BBDB v2 or v3). It's hard-coded into BBDB that the first field of a
record holds the first name and the second field holds the last
name. Changing this requires substantial changes in the code.

A completely different thing:

BBDB v3 allows you to display names in different ways, see
bbdb-name-format.  See also bbdb-read-name-format.

Roland

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


[BBDB] ChangeLog 2012-08-09 (remove message cache)

2012-08-09 Thread Roland Winkler
On Tue Jul 17 2012 Roland Winkler wrote:
 When I looked into this, I had a disappointing surprise:
 
 BBDB uses a message cache for caching the BBDB records associated
 with a message. I had made a silly mistake that made the cache
 ineffective in BBDB 3. Well, that bug was easily fixed. But with the
 cache being effective again, some fairly important other things are
 not working anymore.
 
 - The message cache contains for each message those records that
   have been recognized / created when the message was first viewed
   in the MUA. If these were the records matching the recipients
   (say, following a call of bbdb-mua-display-recipients), a
   subsequent call of bbdb-mua-display-sender again displays the
   recipients, because only those records are stored in the cache.
   Not quite the expected behavior.
 
 - Messages are identified in the cache via `assq' and message
   keys. VM uses a message-pointer and rmail uses an integer message
   key that work fine with assq. Yet for gnus, BBDB 2 used the
   function bbdb/gnus-get-message-id that returns the value of the
   Message-ID header of a message as a string. For BBDB 3, I even
   copied this idea for other MUAs... Yet strings don't work with
   assq and all the caching fails.
 
   Here a simple work appears to be assoc instead of assq. Yet this
   is slower than assq, and I have doubts that then all the caching
   is still worth the extra coding effort (in particular, when
   properly keeping track of senders and recipients).
 
 So far, nobody noticed a bottleneck because of the broken message
 cache in BBDB 3. I am tempted to remove this feature altogether...
 (better suggestions welcome)

2012-08-09  Roland Winkler  wink...@gnu.org
Remove message cache that was broken.  There were two problems
with it.  The cache did not distinguish between records associated
with the senders and recipients.  So if a call of
bbdb-mua-display-sender was followed by, say, a call of
bbdb-mua-display-recipients the second call also returned the
senders.  Second, the cache used assq to identify message keys to
operate fast.  Yet most MUAs only provide strings as message keys.

* lisp/bbdb.el (bbdb-message-all-addresses)
(bbdb-notice-mail-hook, bbdb-notice-record-hook): Fix docstring.
(bbdb-message-caching, bbdb-message-cache): Remove.
(bbdb-buffer): Remove cache flushing.

* lisp/bbdb-mua.el (bbdb-update-records): Remove arg msg-key.
Remove caching of records.
(bbdb-message-get-cache, bbdb-message-set-cache)
(bbdb-message-rem-cache): Remove.
(bbdb-mua-update-records): Remove arg msg-key from calls of
bbdb-update-records.

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

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: autoloading failed to define function bbdb-define-all-aliases

2012-08-09 Thread Roland Winkler
On Thu Aug 9 2012 Julien Cubizolles wrote:
 Roland Winkler wink...@gnu.org writes:
 
  On Wed Aug 8 2012 Julien Cubizolles wrote:
  (add-hook 'mail-setup-hook 'bbdb-define-all-aliases)
  (add-hook 'message-setup-hook 'bbdb-define-all-aliases)
 
(add-hook 'mail-setup-hook 'bbdb-mail-aliases)
 
 I can't get it to work. I have several mail adresses with the mail-alias
 field set to auteur but pressing TAB or C-TAB after auteur in the To:
 field doesn't autocomplete.

What do you expect to happen? What are TAB or C-TAB bound to?
You might need something like a call of mail-abbrevs-setup in your
init file. (Completion of mail aliases is different from expansion
that happens when you send a message. All this applies equally to
aliases that you define as described in the Emacs info manual. In
that sense, it has nothing to do with BBDB.)

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: [BBDB] ChangeLog 2012-08-06

2012-08-06 Thread Roland Winkler
On Mon Aug 6 2012 Sam Steingold wrote:
 as with all bury-buffer -- quit-window changes the main idea is that
 bury-buffer preserves the newly created window or frame while
 quit-window deletes it.  basically, whatever has been displayed
 interactively should be removed with quit-window.

Sure, but the point is here that the call of quit-window is preceded
by a call of set-window-configuration that is supposed to restore
the window configuration before the *Completions* window popped up.
So under normal circumstances there will be no *Completions* window
anymore when quit-window is called, see Ivan Kanis' bug report.
The only remaining issue following the call of set-window-configuration
is that the *Completions* buffer is still high in the list of all
buffers, which is handled by bury-buffer.

Do you have a specific example when this approach fails?

I guess a problem could occur if the *Completions* window comes up
with its own frame, so that set-window-configuration does not affect
this frame. Then we might need something like the following

(when bbdb-complete-mail-saved-window-config
  (when (get-buffer-window *Completions*)
(set-window-configuration bbdb-complete-mail-saved-window-config)
(let ((window (get-buffer-window *Completions*)))
  (if (window-live-p window)
  (quit-window nil window)
(bury-buffer *Completions*
  (setq bbdb-complete-mail-saved-window-config nil))

Better suggestions welcome. How are other packages handling this?

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


<    1   2   3   4   5   6   >