Re: Problem creating record

"Roland Winkler" <[email protected]>
Newsgroups gmane.emacs.bbdb.user
Message-ID <[email protected]>
On Sun Jun 25 2017 Angel de Vicente wrote:
> ,----
> | (require 'bbdb)
> | (bbdb-initialize 'gnus 'message)
> | (bbdb-mua-auto-update-init 'gnus 'message)
> | (setq bbdb-mua-update-interactive-p '(query . create)
> |       bbdb-update-records-p 'query
> |       bbdb-mua-auto-update-p 'query)
> | (setq bbdb-file "~/.bbdb"
> |       bbdb-mua-pop-up-window-size 3
> |       bbdb-layout 'one-line
> |       bbdb-pop-up-window-size 5
> |       bbdb-complete-mail-allow-cycling t)
> | (add-hook 'bbdb-notice-mail-hook 'bbdb-auto-notes)
> | 
> | ; From a message on 19 Jun 2017 by Wes Hardaker in bbdb-info
> | ; to solve an issue with ivy + bbdb
> | ;(otherwise we can try with just C-M-j (bound to ivy-immediate-done)
> | 
> | (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))
> `----
> 
> Not perfect, but quite close to what I wanted. Now when I'm reading
> mails from inside Gnus, the BBDB buffer shows the record for the sender
> and it is updated automatically when I move from one message to another,
> and it asks me whether I want to add a new record when it finds one that
> is not in the database (if I don't want to add that person, it can be a
> bit annoying, because it will ask me everytime I see a mail from that
> person, not remembering I said 'no' already to that mail).
> 
> To make it perfect I would prefer to:
> * if the sender is not in the database, get an empty BBDB buffer
> * to be able to create (not automatically, but issuing a command, so I
>   can decide when/if to add it to the database) a new record with the
>   info from the sender (similar to the old BBDB ":" behaviour).

You have enabled both the "manual update" of BBDB via the line

  (bbdb-initialize 'gnus 'message) 

as well as "auto-update" of BBDB via

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

and both run in the "query" mode.  But it seems that the auto-update
is too aggressive for you, because it is performed immediately for
*every* message you are reading.  So you probably did not even
notice that you would get the less aggresive manual update by
hitting ":" for those messages, where you want to query or update
BBDB in a more selective manor.

So you may want to disable the auto-update by deleting the line

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

Often, having both the manual and the auto-update enabled may make
sense only if the auto-update is less aggressive, using, e.g., the
"search" mode.  Then you can run a more aggressive mode like "query"
manually by hitting ":".

Notes: 

- BBDB would need to maintain a 2nd database of email addresses or
  names that should not go into BBDB in order to ask you only once
  whether you want to put an address into BBDB.

- If BBDB doesn't know anything about the senders or recipients,
  I do not see a need to pop up an empty buffer.  This is also similar
  to all other BBDB search commands that will not pop up a BBDB buffer
  if the search did not match any records.  (I believe BBDB 2 behaved
  the same, though I am not sure.

  Of course, you can also run BBDB in a dedicated window that will
  never be taken over by anything else.  And / or run the function
  bbdb-undisplay-records (not a command)) to get an empty BBDB
  buffer.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
[email protected]
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.