(emacs-version)
"GNU Emacs 19.29.1 (sparc-sun-sunos4shr) of Mon Jun 26 1995 on quetelet"
(bbdb-version)
"BBDB version 1.50; 18-feb-94."

Hi,
Following someone's advice here, I did the following in .emacs:

(defun sema-split (string separators)
  "bbdb-split modified so that it doesn't break on empty strings"
  (if string
      (let (result (not-separators (concat "^" separators)))
        (save-excursion
          (set-buffer (get-buffer-create " *split*"))
          (erase-buffer) (insert string) (goto-char (point-min))
          (while (progn
                   (skip-chars-forward separators)
                   (skip-chars-forward " \t\n\r")
                   (not (eobp)))
            (let ((begin (point)) p)
              (skip-chars-forward not-separators)
              (setq p (point))
              (skip-chars-backward " \t\n\r")
              (setq result (cons (buffer-substring begin (point)) result))
              (goto-char p)))
          (erase-buffer))
        (nreverse result))))

(defun rmail-bbdb-guess-folder () "Try to find a mail-folder in the BBDB."
  (interactive)
  (let* ((record (bbdb/rmail-update-record))
         (folder (or (bbdb-record-getprop record 'mail-folder)
             (elt (sema-split (bbdb-record-getprop record 'mail-alias) ",") 0)
             (elt (sema-split (elt (bbdb-record-net record) 0) "@") 0))))
    (if folder (expand-file-name folder rmail-secondary-file-directory))))

(setq rmail-output-file-alist '(("." . (rmail-bbdb-guess-folder))))

Well, it worked perfectly for a month(!), but today something has
happened: when I hit C-o in rmail buffer, I get:

Signalling: (invalid-function (macro . #[(vector) "@    BE" [aref vector 6] 3]))
  bbdb-record-net(["Chris" "Thomas" ("OAC Consulting") "UCLA Office of Academic 
Computing; Manager, Systems Programming" (["o:MS 4302" 310 825 7452 0]) nil 
("[EMAIL PROTECTED]" "[EMAIL PROTECTED]") ((creation-date . "12 Aug 95") (timestamp . 
"16 Aug 95") (www . "http://www.ucla.edu/bruinonline/")) ["Chris Thomas" nil #<marker 
at 42786 in .bbdb> nil]])
  rmail-bbdb-guess-folder()
  eval((rmail-bbdb-guess-folder))
  byte-code("@      )
  call-interactively(rmail-output)

Well, I deemed that the trouble is with bbdb-record-net, and tried to
find it.
(describe-function 'bbdb-record-net)
"bbdb-record-net: a Lisp macro in `bbdb'.
not documented"

To my dismay, I could not find (defmacro bbdb-record-net ... in ANY of
the bbdb*.el files. WHAT IS GOING ON?!!!

In a different vein: how do I define a macro (or a function) that takes
any number of arguments (say, to pass them all to (append) or (concat)).

--
<A HREF="http://www.math.ucla.edu/~shteingd">    Sam Steingold    </A>
I would appreciate comments on / corrections of my English from native
English speakers. Thank You!

Reply via email to