From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.help,gmane.emacs.pretest.bugs Subject: RE: stack overflow with (re-search-forward "..." nil t) Date: Tue, 5 Jul 2005 14:57:00 -0700 Message-ID: References: <1120598489.977017.291430@g44g2000cwa.googlegroups.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1120601135 14944 80.91.229.2 (5 Jul 2005 22:05:35 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 5 Jul 2005 22:05:35 +0000 (UTC) Cc: Emacs-Pretest-Bug Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Jul 06 00:05:26 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DpvUt-0003uh-63 for geh-help-gnu-emacs@m.gmane.org; Wed, 06 Jul 2005 00:02:31 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DpvVb-0005UP-Cz for geh-help-gnu-emacs@m.gmane.org; Tue, 05 Jul 2005 18:03:15 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DpvUy-0005P1-93 for help-gnu-emacs@gnu.org; Tue, 05 Jul 2005 18:02:38 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DpvUp-0005Jg-8j for help-gnu-emacs@gnu.org; Tue, 05 Jul 2005 18:02:28 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DpvUp-0005Fz-4W; Tue, 05 Jul 2005 18:02:27 -0400 Original-Received: from [141.146.126.231] (helo=agminet04.oracle.com) by monty-python.gnu.org with esmtp (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA:24) (Exim 4.34) id 1DpvVm-0002lq-9r; Tue, 05 Jul 2005 18:03:26 -0400 Original-Received: from agminet04.oracle.com (localhost [127.0.0.1]) by agminet04.oracle.com (Switch-3.1.7/Switch-3.1.7) with ESMTP id j65Lv7Lg002231; Tue, 5 Jul 2005 16:57:07 -0500 Original-Received: from rgmsgw301.us.oracle.com (rgmsgw301.us.oracle.com [138.1.186.50]) by agminet04.oracle.com (Switch-3.1.7/Switch-3.1.7) with ESMTP id j65Lv6v6002221; Tue, 5 Jul 2005 16:57:06 -0500 Original-Received: from rgmsgw301.us.oracle.com (localhost [127.0.0.1]) by rgmsgw301.us.oracle.com (Switch-3.1.4/Switch-3.1.0) with ESMTP id j65Lv6q6012351; Tue, 5 Jul 2005 15:57:06 -0600 Original-Received: from dradamslap (dhcp-amer-csvpn-gw2-141-144-73-232.vpn.oracle.com [141.144.73.232]) by rgmsgw301.us.oracle.com (Switch-3.1.4/Switch-3.1.0) with SMTP id j65Lv5JY012344 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO); Tue, 5 Jul 2005 15:57:05 -0600 Original-To: X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.6604 (9.0.2911.0) Importance: Normal In-Reply-To: <1120598489.977017.291430@g44g2000cwa.googlegroups.com> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506 X-Brightmail-Tracker: AAAAAQAAAAI= X-Whitelist: TRUE X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:27808 gmane.emacs.pretest.bugs:8304 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:27808 > I don't understand the `noerror' argument to re-search-forward, when it is > `t'. For some kinds of errors it works, but I still get stack-overflow > errors signaled, instead of the function returning nil. The doc string and > Elisp manual simply say that `noerror'=t returns nil in case of error. If you expect it should return nil even in the case of a bad argument, I don't think that was the intention. In fact I'd be complaining if it did work that way. A wrapper is definitely necessary to get that level of safety. I realize now that it is the doc (in particular, Info) that is not clear enough (for me). It should clearly state that it returns nil (for NOERROR=t) when a match is not found, instead of saying that it does so when the "function fails".