Re: Problem creating record

2017-06-19 Thread Angel de Vicente
Hi Wes,

Wes Hardaker  writes:
> I've been meaning to solve this problem for months.  It's been driving
> me nuts not to be able to create new records, so your message finally
> prompted me to dive into things and have come up with the following
> solution:
>
>   (defadvice bbdb-read-string (before bbdb-read-string-no-ivy activate)
> (ivy-mode 0))
>   (defadvice bbdb-read-string (after bbdb-read-string-yes-ivy activate)
> (ivy-mode 1))
>
> If you put the above into your emacs initialization it'll turn off
> ivy-mode while bbdb is prompting for strings.

Exactly what I was looking for. Many thanks for sharing the code.

Cheers,
-- 
Ángel de Vicente
http://www.iac.es/galeria/angelv/  
-
ADVERTENCIA: Sobre la privacidad y cumplimiento de la Ley de Protección de 
Datos, acceda a http://www.iac.es/disclaimer.php
WARNING: For more information on privacy and fulfilment of the Law concerning 
the Protection of Data, consult http://www.iac.es/disclaimer.php?lang=en


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/

Re: Problem creating record

2017-06-19 Thread Angel de Vicente
Hi Roland,

many thanks for your help


"Roland Winkler"  writes:
>> 2. Once the BBDB buffer is shown, I would like that when I move to
>>another message, the BBDB buffer is updated automatically: now I have
>>to press ":" again to see the new sender, and if the sender is not in
>>BBDB, it just shows the previous sender, where ideally an empty
>>buffer would be better
>
> A continuously updated BBDB buffer is maintained via bbdb-mua-auto-update.
>
> See the section "Noninteractive functions" in README.

I have tried to follow the instructions there, but I don't seem to be
able to get it working

In my .emacs file I have:
,
| (require 'bbdb)
| (bbdb-initialize 'gnus 'message)
| (bbdb-mua-auto-update-init)
`

and I have modified the variables mentioned in the README file

bbdb-mua-pop-up is:
,
| bbdb-mua-pop-up is a variable defined in ‘bbdb.el’.
| Its value is t
`

,
| bbdb-mua-auto-update-p is a variable defined in ‘bbdb.el’.
| Its value is ‘query’
`

but the BBDB buffer is still not updated when I move from one message to
another in Gnus.


>> 3. Pressing ":" again gets rid of the BBDB buffer
>
> Either you let BBDB handle these things interactively via commands
> like bbdb-mua-display-records bound to ":" (see above, your item 1.),
> or you do them non-interactively (your item 2.)
>
> Anything else "do what I mean" you might have to hack on your own.

I would be happy to do this interactively, but I don't see any command
to close the BBDB buffer? (Do I just have to define my own?)


>> 4. If the sender is not in the database press some key and offer the
>>option to include it in the database.
>
> Interactive commands: bind bbdb-mua-update-interactive-p to your liking
> (see README).
>
> Noninteractively: see again the section "Noninteractive functions"
> in README.


OK, changing it to (query . query) now BBDB offers me to add a record to
the database.
,
| bbdb-mua-update-interactive-p is a variable defined in ‘bbdb.el’.
| Its value is (query . query)
| Original value was (search . query)
`


So, I'm very close to getting it to do what I would like, the only
important missing part is that I would like that once I have pressed ":"
and the BBDB buffer is visible, when I move to another mail message the
contents in the BBDB buffer are updated automatically.
-- 
Ángel de Vicente
http://www.iac.es/galeria/angelv/  
-
ADVERTENCIA: Sobre la privacidad y cumplimiento de la Ley de Protección de 
Datos, acceda a http://www.iac.es/disclaimer.php
WARNING: For more information on privacy and fulfilment of the Law concerning 
the Protection of Data, consult http://www.iac.es/disclaimer.php?lang=en


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/

Re: Problem creating record

2017-06-19 Thread Roland Winkler
On Mon Jun 19 2017 Greg Bognar wrote:
> I am in the same situation with Wanderlust, so it seems a general
> BBDB3 problem.  With BBDB2 I was able to do something similar to
> what you describe in WL.  Now BBDB never asks to harvest any
> address (unless I press :), no matter what settings I try.  I
> asked about it on this list a few months ago, but didn't get
> anything useful.

Have you looked into the README file?

I know, it is not perfect.  But it should get you started.

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: Problem creating record

2017-06-19 Thread Roland Winkler
On Mon Jun 19 2017 Angel de Vicente wrote:
> Ideally I would like:
> 
> 1. when reading a message, see if the sender is in my database (I can do
>that by pressing ":")

It seems you figured this out.

> 2. Once the BBDB buffer is shown, I would like that when I move to
>another message, the BBDB buffer is updated automatically: now I have
>to press ":" again to see the new sender, and if the sender is not in
>BBDB, it just shows the previous sender, where ideally an empty
>buffer would be better

A continuously updated BBDB buffer is maintained via bbdb-mua-auto-update.

See the section "Noninteractive functions" in README.

> 3. Pressing ":" again gets rid of the BBDB buffer

Either you let BBDB handle these things interactively via commands
like bbdb-mua-display-records bound to ":" (see above, your item 1.),
or you do them non-interactively (your item 2.)

Anything else "do what I mean" you might have to hack on your own.

> 4. If the sender is not in the database press some key and offer the
>option to include it in the database.

Interactive commands: bind bbdb-mua-update-interactive-p to your liking
(see README).

Noninteractively: see again the section "Noninteractive functions"
in README.

Roland

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: Problem creating record

2017-06-19 Thread Greg Bognar
For the record:

On Mon 19 Jun 2017 at 11:52 Angel de Vicente wrote:
> [...] 
> What I don't seem to get is a nice integration with Gnus as I used to
> have with my previous BBDB version, 2.36. Ideally I would like:
> 
> 1. when reading a message, see if the sender is in my database (I can do
>that by pressing ":")
> 2. Once the BBDB buffer is shown, I would like that when I move to
>another message, the BBDB buffer is updated automatically: now I have
>to press ":" again to see the new sender, and if the sender is not in
>BBDB, it just shows the previous sender, where ideally an empty
>buffer would be better
> 3. Pressing ":" again gets rid of the BBDB buffer
> 4. If the sender is not in the database press some key and offer the
>option to include it in the database.
> 
> If anybody is using BBDB + Gnus and can give me some advice on how to
> get these things done I will appreciate it a lot.

I am in the same situation with Wanderlust, so it seems a general BBDB3 problem.
With BBDB2 I was able to do something similar to what you describe in WL.  Now
BBDB never asks to harvest any address (unless I press :), no matter what
settings I try.  I asked about it on this list a few months ago, but didn't get
anything useful.

Best,
Greg

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: Problem creating record

2017-06-19 Thread Angel de Vicente
Hi,

"Roland Winkler"  writes:

> On Fri Jun 16 2017 Angel de Vicente wrote:
>> I'm not sure if this is due to upgrading to BBDB 3 or due to the
>> other packages that I installed (ivy, counsel, etc.)...
>
> Lots of configuration options have changed from BBDB 2 to 3, see
>
> https://www.emacswiki.org/emacs/UpgradeBBDB
>
> I suggest you first make sure BBDB 3 works for you as expected in an
> Emacs session that doesn't load other packages that may override
> Emacs' default behavior.  (I do not know what "ivy", "counsel" and
> "etc." do.)
>
> Once you got this working you may want to load the other packages,
> too.


The culprit seems to be "ivy". After disabling it, I'm able to create a
new record in BBDB with M-x bbdb-create, and either C-j or just leaving
the fields empty gets me out of the infinite "Street Address" loop
described in my previous message. For the moment I can do it manually,
though later on I will have to figure out how to disable ivy, call
bbdb-create and re-enable ivy.

What I don't seem to get is a nice integration with Gnus as I used to
have with my previous BBDB version, 2.36. Ideally I would like:

1. when reading a message, see if the sender is in my database (I can do
   that by pressing ":")
2. Once the BBDB buffer is shown, I would like that when I move to
   another message, the BBDB buffer is updated automatically: now I have
   to press ":" again to see the new sender, and if the sender is not in
   BBDB, it just shows the previous sender, where ideally an empty
   buffer would be better
3. Pressing ":" again gets rid of the BBDB buffer
4. If the sender is not in the database press some key and offer the
   option to include it in the database.

If anybody is using BBDB + Gnus and can give me some advice on how to
get these things done I will appreciate it a lot.

Many thanks,
-- 
Ángel de Vicente
http://angel-de-vicente.blogspot.com/


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/