From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Ben Bacarisse Newsgroups: gmane.emacs.help Subject: Re: re-search-forward hangs Date: Mon, 30 Jul 2018 15:36:16 +0100 Organization: A noiseless patient Spider Message-ID: <87bmao4wpr.fsf@bsb.me.uk> References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1532961500 25205 195.159.176.226 (30 Jul 2018 14:38:20 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 30 Jul 2018 14:38:20 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Jul 30 16:38:16 2018 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fk9JP-0006Tw-TN for geh-help-gnu-emacs@m.gmane.org; Mon, 30 Jul 2018 16:38:16 +0200 Original-Received: from localhost ([::1]:52997 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fk9LW-0006hT-OE for geh-help-gnu-emacs@m.gmane.org; Mon, 30 Jul 2018 10:40:26 -0400 Original-Path: usenet.stanford.edu!goblin2!goblin1!goblin.stu.neva.ru!eternal-september.org!feeder.eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 24 Original-Injection-Info: reader02.eternal-september.org; posting-host="b3e133b6860e48286587f6bb1c7ef85a"; logging-data="22583"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/TU81C1Gvm2pXW48u9t0+xyYb10gUb3j4=" Cancel-Lock: sha1:OHwTjeCwEri2zBOerqacpx9ATJI= sha1:SYJ85nLeyWIT0W/29BgL5y4NW+I= X-BSB-Auth: 1.c0a2ad122ada9a368ad6.20180730153616BST.87bmao4wpr.fsf@bsb.me.uk Original-Xref: usenet.stanford.edu gnu.emacs.help:223484 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:117609 Archived-At: Andreas Röhler writes: > emacs -Q, when evaluating from in scratch-buffer > > (while (re-search-forward "" nil t 1)) > > Emacs hangs. > > Same with plain > > (while (search-forward "" nil t 1)) > > Expect it terminating. Why do you expect a difference? I would expect both to loop indefinitely (and they do in my slightly older Emacs). > Are there reasons for this? Both loop because the match always succeeds. Neither match moves point so neither can fail. -- Ben.