I reported to the list a few weeks ago an intermittent 'mark inactive'
error happening in bbdb-redisplay-records that started when I added

   ("Subject" (".*" last-subj 0 t))

to my bbdb-auto-notes-alist.

I finally spent enough time ignoring everything but the top of the
backtrace, and understand what is happening, but not why people
haven't seen this before.

bbdb-redisplay-records does
    (let ((p (point))
        (m (mark)))

then later does

      (if m (set-mark m)))

obviously expecting (mark) to have returned nil in some circumstances.

My emacs (19.22) apparently signals mark-inactive if the mark is
inactive.

Using

  (let ((p (point))
        (m (if mark-active (mark) nil)))

seems to solve the problem.

Does this make sense?

Diffs follow.

*** 1.1 1994/04/01 23:44:10
--- bbdb-com.el 1994/04/01 23:46:44
***************
*** 202,208 ****
    "Regrinds the contents of the *BBDB* buffer, without scrolling.
  If possible, you should call bbdb-redisplay-one-record instead."
    (let ((p (point))
!       (m (mark)))
      (goto-char (window-start))
      (let ((p2 (point)))
        (bbdb-display-records-1 bbdb-records)
--- 202,208 ----
    "Regrinds the contents of the *BBDB* buffer, without scrolling.
  If possible, you should call bbdb-redisplay-one-record instead."
    (let ((p (point))
!       (m (if mark-active (mark) nil)))
      (goto-char (window-start))
      (let ((p2 (point)))
        (bbdb-display-records-1 bbdb-records)






Reply via email to