Re: bbdb-mua-edit-field-sender is broken

2012-03-15 Thread Roland Winkler
On Wed Mar 14 2012 Sam Steingold wrote:
 I am pretty sure that every user who sets
 bbdb-message-all-addresses to non-nil would want this patch:

I guess we were not talking about BBDB if every user had not
strongly diverging opinions about such things. In that sense, I am
rather hesitant to implement a hard-coded binding of a user variable
inside such a command.

Actually, I went through quite some effort to break down the code in
bbdb-mua.el into low-level stuff that I tried to implement as
general and flexibel as possible, and the high-level commands that
have rather small pieces of code. bbdb-mua-edit-field with a body of
11 lines is actually the biggest one. Of course, these high-level
commands provided in bbdb-mua.el do not take advantage of everything
that is implemented on the lower level, in particular if you combine
them with all permutations of settings for user variables used by
these commands.

But hopefully the new setup of the code does make it easier to
customize the high-level commands the way you want them to be
without a need to fiddle with the trickier low-level functions.

Roland

--
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: bbdb-mua-edit-field-sender is broken

2012-03-15 Thread Sam Steingold
 * Roland Winkler jvax...@tah.bet [2012-03-15 05:24:27 -0500]:

 On Wed Mar 14 2012 Sam Steingold wrote:
 I am pretty sure that every user who sets
 bbdb-message-all-addresses to non-nil would want this patch:

 I guess we were not talking about BBDB if every user had not strongly
 diverging opinions about such things. In that sense, I am rather
 hesitant to implement a hard-coded binding of a user variable inside
 such a command.

I understand and share this immediate reaction; however, this hard-coded
binding is a simple bug fix - just try customizing
bbdb-message-all-addresses to t and reading your mail with it for a
while; and use ; - you will immediately see that the current behavior
is just a bug.

-- 
Sam Steingold (http://sds.podval.org/) on Ubuntu 11.10 (oneiric) X 11.0.11004000
http://www.childpsy.net/ http://palestinefacts.org http://jihadwatch.org
http://dhimmi.com http://iris.org.il http://pmw.org.il http://camera.org
Those who beat their swords into plowshares plow for those who do not.

--
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: bbdb-mua-edit-field-sender is broken

2012-03-14 Thread Roland Winkler
On Wed Mar 14 2012 Sam Steingold wrote:
 However, when I hit ; in *Summary*, I am offered to edit the notes for
 _both_ bar-users and f...@gmail.com (because in bbdb-message-headers
 sender is mapper to both From and Reply-To).
 This is ungood.

What do you want instead? Do you want to use different values of
bbdb-message-headers depending on context? You could define a wrapper
that rebinds it according to your taste. (I would guess that there
are too many possiblities / different tastes for a universal
yet still transparent solution.)

Or you could simply remove Reply-To from bbdb-message-headers. It
is a user variable.

Roland

--
Virtualization  Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: bbdb-mua-edit-field-sender is broken

2012-03-14 Thread Sam Steingold
 * Roland Winkler jvax...@tah.bet [2012-03-14 11:07:13 -0500]:

 On Wed Mar 14 2012 Sam Steingold wrote:
 However, when I hit ; in *Summary*, I am offered to edit the notes for
 _both_ bar-users and f...@gmail.com (because in bbdb-message-headers
 sender is mapper to both From and Reply-To).
 This is ungood.

 What do you want instead?

the v2 behavior: ; should let me edit the sender's notes.

 Do you want to use different values of bbdb-message-headers depending
 on context? You could define a wrapper that rebinds it according to
 your taste. (I would guess that there are too many possiblities /
 different tastes for a universal yet still transparent solution.)

I want bbdb to be permissive about display (i.e., show more rather than
less; bbdb-message-headers should be interpreted as show all these)
and restrictive about editing (i.e., edit less rather than more,
bbdb-message-headers should be interpreted as edit the first found).


-- 
Sam Steingold (http://sds.podval.org/) on Ubuntu 11.10 (oneiric) X 11.0.11004000
http://www.childpsy.net/ http://www.PetitionOnline.com/tap12009/
http://truepeace.org http://jihadwatch.org http://memri.org http://iris.org.il
It is easier to deal with a hungry tiger than with a full mule.

--
Virtualization  Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: bbdb-mua-edit-field-sender is broken

2012-03-14 Thread Roland Winkler
On Wed Mar 14 2012 Sam Steingold wrote:
  Do you want to use different values of bbdb-message-headers depending
  on context? You could define a wrapper that rebinds it according to
  your taste. (I would guess that there are too many possiblities /
  different tastes for a universal yet still transparent solution.)
 
 I want bbdb to be permissive about display (i.e., show more rather than
 less; bbdb-message-headers should be interpreted as show all these)
 and restrictive about editing (i.e., edit less rather than more,
 bbdb-message-headers should be interpreted as edit the first
 found).

Looks like you need a wrapper around bbdb-mua-update-records that
rebinds bbdb-message-all-addresses according to the value of the arg
UPDATE-P of bbdb-mua-update-records. (I am not sure this would be
what other users want.)

Roland

--
Virtualization  Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: bbdb-mua-edit-field-sender is broken

2012-03-14 Thread Sam Steingold
 * Roland Winkler jvax...@tah.bet [2012-03-14 14:23:17 -0500]:

 On Wed Mar 14 2012 Sam Steingold wrote:
  Do you want to use different values of bbdb-message-headers depending
  on context? You could define a wrapper that rebinds it according to
  your taste. (I would guess that there are too many possiblities /
  different tastes for a universal yet still transparent solution.)
 
 I want bbdb to be permissive about display (i.e., show more rather than
 less; bbdb-message-headers should be interpreted as show all these)
 and restrictive about editing (i.e., edit less rather than more,
 bbdb-message-headers should be interpreted as edit the first
 found).

 Looks like you need a wrapper around bbdb-mua-update-records that
 rebinds bbdb-message-all-addresses according to the value of the arg
 UPDATE-P of bbdb-mua-update-records. (I am not sure this would be what
 other users want.)

I am pretty sure that every user who sets bbdb-message-all-addresses to
non-nil would want this patch:

diff --git a/lisp/bbdb-mua.el b/lisp/bbdb-mua.el
index 93f0228..b88a561 100644
--- a/lisp/bbdb-mua.el
+++ b/lisp/bbdb-mua.el
@@ -730,7 +730,9 @@ FIELD defaults to 'notes.  With prefix arg, ask for FIELD.
 ((not field)
  (setq field 'notes)))
   (bbdb-mua-wrapper
-   (let ((records (bbdb-mua-update-records header-class)))
+   (let ((records
+  (let ((bbdb-message-all-addresses nil))
+(bbdb-mua-update-records header-class
  (bbdb-display-records records)
  (dolist (record records)
(bbdb-edit-field record field)



-- 
Sam Steingold (http://sds.podval.org/) on Ubuntu 11.10 (oneiric) X 11.0.11004000
http://www.childpsy.net/ http://iris.org.il http://www.memritv.org
http://thereligionofpeace.com http://openvotingconsortium.org
PI seconds is a nanocentury

--
Virtualization  Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/