From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Robert Girault Newsgroups: gmane.emacs.help Subject: Re: re-search-forward hangs Date: Mon, 30 Jul 2018 10:22:24 -0300 Organization: Aioe.org NNTP Server Message-ID: <86sh40rc6q.fsf@dev.null> References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1532963644 23224 195.159.176.226 (30 Jul 2018 15:14:04 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 30 Jul 2018 15:14:04 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (windows-nt) 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 17:14:00 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 1fk9rz-0005u2-KN for geh-help-gnu-emacs@m.gmane.org; Mon, 30 Jul 2018 17:13:59 +0200 Original-Received: from localhost ([::1]:53166 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fk9u6-0007E3-56 for geh-help-gnu-emacs@m.gmane.org; Mon, 30 Jul 2018 11:16:10 -0400 X-Received: by 2002:a1c:f514:: with SMTP id t20-v6mr1835459wmh.22.1532963472080; Mon, 30 Jul 2018 08:11:12 -0700 (PDT) Original-Path: usenet.stanford.edu!h7-v6no8248630wmb.0!news-out.google.com!s23-v6ni31237wmc.0!nntp.google.com!proxad.net!feeder1-2.proxad.net!news.mixmin.net!aioe.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 24 Original-NNTP-Posting-Host: JjoR76Qgbxhqk95xNTZ79w.user.gioia.aioe.org Original-X-Complaints-To: abuse@aioe.org X-Notice: Filtered by postfilter v. 0.8.3 X-Gnus-Delayed: Thu, 02 Aug 2018 10:22:24 -0300 Cancel-Lock: sha1:bbGT4vagIBfWCDQFSD8YJMbT+Zc= Original-Xref: usenet.stanford.edu gnu.emacs.help:223485 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:117610 Archived-At: Andreas Röhler writes: > Hi, > > 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 it to terminate? > Are there reasons for this? The obvious reason is that "" is found anywhere, so this search will always succeed. This makes sense to me. Why do you think this shouldn't happen?