I don't use supercite myself, but I'm reporting a problem encountered
by a friend of mine whom I just convinced to switch to XEmacs.
He has the following variable set, which is compliant with what the doc says.
(setq sc-attrib-selection-list
'(("sc-from-address"
((".*" . (bbdb/sc-consult-attr (sc-mail-field "sc-from-address")))
))))
However, this doesn't work. A diff between stallmacs's supercite and ours
shows this (the function sc-select-attribution is unchanged):
[...]
(defun sc-scan-info-alist (alist)
"Find a match in the info alist that matches a regexp in ALIST."
(let ((sc-mumble "")
rtnvalue)
(while alist
(let* ((elem (car alist))
(infokey (car elem))
(infoval (sc-mail-field infokey))
(mlist (car (cdr elem))))
(while mlist
(let* ((ml-elem (car mlist))
(regexp (car ml-elem))
(thing (cdr ml-elem)))
(if (string-match regexp infoval)
;; we found a match, time to return
- (setq rtnvalue thing
+ (setq rtnvalue (if (consp thing)
+ (car thing)
+ thing)
mlist nil
alist nil)
;; else we didn't find a match
(setq mlist (cdr mlist))
))) ;end of mlist loop
(setq alist (cdr alist))
)) ;end of alist loop
rtnvalue))
Moreover, I found this ChangeLog entry in *our* source:
1999-03-18 Raymond Toy <toy(a)rtp.ericsson.se>
* supercite.el: The wrong thing was returned when the match was a
list.
This ChangeLog is very imprecise, but looks like it is related to this
problem. I'm suspecting that this change was made to the function in order to
match a bogus value for the variable above, namely, were the dot between
REGEXP and ATTRIBUTION was missing.
How is it that we have a divergent version of supercite anyway ? It is
supposed to be maintained externally.
--
/ / _ _ Didier Verna
http://www.inf.enst.fr/~verna/
- / / - / / /_/ / EPITA / LRDE mailto:didier@lrde.epita.fr
/_/ / /_/ / /__ / 14-16 rue Voltaire Tel. +33 (1) 44 08 01 77
94276 Kremlin-Bicêtre cedex Fax. +33 (1) 44 08 01 99