From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Glenn Morris Newsgroups: gmane.emacs.devel Subject: Re: [salve@debian.org: lisp/mail/supercite.el: sc-select-attribution logic is broken (patch included)] Date: Thu, 26 May 2005 18:21:19 +0100 Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1117128973 30474 80.91.229.2 (26 May 2005 17:36:13 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 26 May 2005 17:36:13 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu May 26 19:36:10 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DbMDD-0003Q8-P0 for ged-emacs-devel@m.gmane.org; Thu, 26 May 2005 19:32:04 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DbMHK-0004ka-Dr for ged-emacs-devel@m.gmane.org; Thu, 26 May 2005 13:36:18 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DbMDM-00033M-1u for emacs-devel@gnu.org; Thu, 26 May 2005 13:32:13 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DbMDF-00030V-Ri for emacs-devel@gnu.org; Thu, 26 May 2005 13:32:06 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DbMDF-0002q2-CR for emacs-devel@gnu.org; Thu, 26 May 2005 13:32:05 -0400 Original-Received: from [131.111.8.131] (helo=ppsw-1.csi.cam.ac.uk) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DbM4d-00046d-9j; Thu, 26 May 2005 13:23:11 -0400 X-Cam-SpamDetails: Not scanned X-Cam-AntiVirus: No virus found X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Original-Received: from cass41.ast.cam.ac.uk ([131.111.69.186]:61161) by ppsw-1.csi.cam.ac.uk (ppsw.cam.ac.uk [131.111.8.131]:25) with esmtp id 1DbM2q-0005E5-5i (Exim 4.51) (return-path ); Thu, 26 May 2005 18:21:20 +0100 Original-Received: from xserv1.ast.cam.ac.uk (xserv1.ast.cam.ac.uk [131.111.69.235]) by cass41.ast.cam.ac.uk (8.12.10+Sun/8.12.10) with ESMTP id j4QHLKoL002538; Thu, 26 May 2005 18:21:20 +0100 (BST) Original-Received: from xalph3.ast.cam.ac.uk (xpc14.ast.cam.ac.uk [131.111.69.34]) by xserv1.ast.cam.ac.uk (Postfix) with ESMTP id 005AC172AD7; Thu, 26 May 2005 18:21:19 +0100 (BST) Original-To: rms@gnu.org X-Spook: wiretap Kach munitions white noise generator illuminati X-Ran: =;0[QQ7M3HfGcJoN9Fw/goY.uwnR`Tf}nuY@GpmZ9T"{~qK88CG!4".+x|\ZQCXA:2`a$O X-Hue: dark goldenrod X-Attribution: GM Mail-Followup-To: rms@gnu.org, emacs-devel@gnu.org In-Reply-To: (Richard Stallman's message of "Wed, 25 May 2005 11:02:19 -0400") User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:37717 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:37717 Richard Stallman wrote: > Is there someone here who can evaluate this proposed patch? > I don't use supercite. I used to use supercite. I think the complaint is correct, but the patch > - --- lisp/mail/supercite.el 2005-04-04 11:19:51.000000000 +0200 > +++ lisp/mail/supercite-dgms.el 2005-05-09 13:30:56.000000000 +0200 > @@ -1174,8 +1174,9 @@ > (setq attribution attrib > attriblist nil)) > ((listp attrib) > - - (setq attribution (eval attrib) > - - attriblist nil)) > + (setq attribution (eval attrib)) > + (when attribution > + (setq attriblist nil)) > (t (error "%s did not evaluate to a string or list!" > "sc-attrib-selection-list")) > ))) is wrong since it leads to an infinite loop when (eval attrib) returns nil. I suggest the following: diff -c -c -w -r1.44 supercite.el *** supercite.el 14 May 2005 11:27:40 -0000 1.44 --- supercite.el 26 May 2005 17:15:39 -0000 *************** *** 1183,1189 **** attriblist nil)) ((listp attrib) (setq attribution (eval attrib) ! attriblist nil)) (t (error "%s did not evaluate to a string or list!" "sc-attrib-selection-list")) ))) --- 1183,1190 ---- attriblist nil)) ((listp attrib) (setq attribution (eval attrib) ! attriblist (if (stringp attribution) nil ! (cdr attriblist)))) (t (error "%s did not evaluate to a string or list!" "sc-attrib-selection-list")) )))