I add a keybind to `bbdb-snarf`.
So when I'm in am email of Org-mode thread.
1. At the line of header To: Org-mode <emacs-orgm...@gnu.com>
2. press that keybinding (bbdb-snarf).
3. I already have a record in BBDB database, then BBDB popup error: (error
"BBDB: marker absent").
My Emacs version: 24.3.50.1
My Linux: Ubuntu 14.20
And here is my BBDB init file:
```emacs-lisp
(require 'bbdb)
;; (bbdb-initialize)
(bbdb-initialize 'message 'sendmail 'supercite 'w3 'gnus)
(unless (boundp 'my-bbdb-prefix-map)
(define-prefix-command 'my-bbdb-prefix-map))
(define-key my-tools-prefix-map (kbd "b") 'my-bbdb-prefix-map)
(defun my-bbdb-open-or-switch ()
(interactive)
(if (get-buffer "*BBDB*")
(switch-to-buffer "*BBDB*")
(bbdb "")
(bury-buffer)
(switch-to-buffer "*BBDB*")))
(define-key my-bbdb-prefix-map (kbd "b") 'my-bbdb-open-or-switch)
(define-key my-bbdb-prefix-map (kbd "c") 'bbdb-create)
;; usage: region select name and email part in To: field. then press this
keybinding.
(define-key my-bbdb-prefix-map (kbd "a") 'bbdb-snarf)
(define-key my-bbdb-prefix-map (kbd "h") 'helm-bbdb)
(setq bbdb-file (expand-file-name "~/Org/BBDB/bbdb")
bbdb-completion-display-record t
bbdb-image 'name ; display records with an image.
bbdb-image-path (expand-file-name "~/Org/BBDB/avatars/")
;; bbdb-image-suffixes '(".png" ".jpg" ".gif" ".xpm")
;; bbdb-sound-files
bbdb-default-label-list '("personal" "home" "work" "company"
"organization" "other")
bbdb-default-country "China"
bbdb-dial-local-prefix "86" ; "+86" TODO: is this right?
bbdb-default-area-code "86"
bbdb-snarf-rule-alist '((us
bbdb-snarf-surrounding-space
;; bbdb-snarf-phone-nanp bbdb-snarf-url
bbdb-snarf-mail
bbdb-snarf-empty-lines
bbdb-snarf-name
;; bbdb-snarf-address-us
bbdb-snarf-empty-lines
;; bbdb-snarf-notes
bbdb-snarf-name-mail)
(mail
bbdb-snarf-mail-address))
bbdb-snarf-default-label-alist '((phone . "work") (address . "work")
(company . "company"))
bbdb-snarf-rule-default 'mail
;; bbdb-snarf-url 'url
;; bbdb-address-format-list
bbdb-add-mails 'query
;; bbdb-time-stamp-format "%Y-%m-%d %r %Z"
;; bbdb-address-label-list
bbdb-need-to-sort t
;; bbdb-case-fold-search nil
bbdb-completion-list t
bbdb-complete-mail t
bbdb-completion-display-record t
bbdb-new-mails-primary 'query
;; bbdb-ignore-redundant-mails 'query
bbdb-ignore-message-alist '(("From" .
"no.?reply\\|DAEMON\\|daemon\\|facebookmail\\|twitter")
;; (("To" "CC") .
"mailing-list-1\\|mailing-list-2")
)
)
;;; define variant faces for variant xfields
;; TODO: improve it
(setq bbdb-name-face-alist '((mail . bbdb-field-mail)
(mail-alias . bbdb-field-mail-alias)))
(defface bbdb-field-mail
'((t (:inherit bbdb-field-name :foreground "green yellow")))
"Face used for BBDB fields."
:group 'bbdb-faces)
(defface bbdb-field-mail-alias
'((t (:inherit bbdb-field-name :foreground "yellow")))
"Face used for BBDB fields."
:group 'bbdb-faces)
(dolist (hook '(message-setup-hook
mu4e-compose-mode-hook
))
(add-hook hook 'bbdb-mail-aliases))
;;; BBDB [M-TAB] conflicts with ispell.
;; name <email>, name <email>
(defun my-enable-bbdb-complete-key ()
(define-key message-mode-map (kbd "M-TAB") 'bbdb-complete-mail))
(dolist (hook '(message-mode-hook
mu4e-compose-mode-hook
))
(add-hook hook 'my-enable-bbdb-complete-key))
```
[stardiviner] <Hack this world!> GPG key ID: 47C32433
IRC(freeenode): stardiviner Twitter: @numbchild
Key fingerprint = 9BAA 92BC CDDD B9EF 3B36 CB99 B8C4 B8E5 47C3 2433
Blog: http://nagatopain-blog.logdown.com/
On Sat, Aug 2, 2014 at 12:23 PM, Roland Winkler <wink...@gnu.org> wrote:
> On Sat Aug 2 2014 stardiviner wrote:
> > When I use =bbdb-snarf= to add email to a new record.
> > report error:
> > When I try to re-add this email, after lost the record, it report error:
> > =(error "BBDB: marker absent")=
> >
> > I think BBDB show check the database before really do write action.
> > If database has exist the email, then raise exist record, or raise error.
> >
> > BTW, BBDB will raise error when move to next record which is already at
> last
> > record.
> > I think BBDB should not raise this error, just a message in minibuffer is
> > fine.
>
> I am sorry, can you provide a more accurate recipe for how to
> reproduce the bug you observe? See the emacs manual for reporting
> bugs.
>
------------------------------------------------------------------------------
Infragistics Professional
Build stunning WinForms apps today!
Reboot your WinForms applications with our WinForms controls.
Build a bridge from your legacy apps to the future.
http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
_______________________________________________
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/