From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: =?UTF-8?Q?Andreas_R=c3=b6hler?= Newsgroups: gmane.emacs.help Subject: Re: re-search-forward hangs Date: Mon, 30 Jul 2018 22:15:21 +0200 Message-ID: References: <83tvogpzcr.fsf@gnu.org> <86va8w5xeu.fsf@dev.null> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1532981434 32382 195.159.176.226 (30 Jul 2018 20:10:34 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 30 Jul 2018 20:10:34 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux i686; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 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 22:10:30 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 1fkEUw-0008Ls-1Q for geh-help-gnu-emacs@m.gmane.org; Mon, 30 Jul 2018 22:10:30 +0200 Original-Received: from localhost ([::1]:55674 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fkEX2-0006vM-Rd for geh-help-gnu-emacs@m.gmane.org; Mon, 30 Jul 2018 16:12:40 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54933) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fkEWa-0006v1-PA for help-gnu-emacs@gnu.org; Mon, 30 Jul 2018 16:12:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fkEWX-00009B-KV for help-gnu-emacs@gnu.org; Mon, 30 Jul 2018 16:12:12 -0400 Original-Received: from mout.kundenserver.de ([212.227.126.135]:33209) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fkEWX-00007z-9A for help-gnu-emacs@gnu.org; Mon, 30 Jul 2018 16:12:09 -0400 Original-Received: from [192.168.178.35] ([188.103.24.235]) by mrelayeu.kundenserver.de (mreue003 [212.227.15.167]) with ESMTPSA (Nemesis) id 0Louat-1gC8YG2zJT-00gpLG for ; Mon, 30 Jul 2018 22:12:07 +0200 In-Reply-To: <86va8w5xeu.fsf@dev.null> Content-Language: en-US X-Provags-ID: V03:K1:Hh1k4qk6o1lNShP+B2YVDbgTIj+2oJJ5b24eipfB0CJ0S+EqKUB O9F0GU55J50Fhw4KBUF8ABc1LA9AVDQgYPOQcq6gbKYGKW559otNo75dma1b+eeCOeO8+oK UJrLI55s93qWSy7vGYBgFtrwjbCvFg6Iz4qLoLPjOQFDm+0OXZo6Q2LQyNLz71hoye2PuzY sKuZx12hW/LsQGZjUiP9w== X-UI-Out-Filterresults: notjunk:1;V01:K0:5fKb3VDE7JA=:YIfiF7zKFuRrvWmAJdSxZ2 /Ah74jR9mNoLLi9iFH/7A1rESa8yaMI5ctmR/aZ3EXyZBwiQHQVh8CuswZB9N4dNd348HgnSr dmJ7WflTf2pd7BZrrCBBtr4H1RubdAOJY65LHy4X/wvOTtTSXRBZPgr+/acYiMJsESvDeiN3x BUXWOl+Ona53kXidSGCTyNQrFwldssDHk5iZ2k473LZz86SMYUDTRMNqOXoNbmp5rtHaY2Qtr +ch7fN0IhApUVTRN4krRf3Nv5CfCprDLNvV+8WT4IH0rUE6I4EMy9i8pLJjG0u26bEDYOAGjB tGm3tgEDAifhw94aACr4MPvDxAkv1eoMnups74yCLQBt2sMI0WoUk7Wrp0sIpVFEnMbRZensA v5gLjVMYUZ2cqFJd7sfi0uDXS8r/sAzdiHBC4Fm26rtuDOb4oNtwp8qOMIY32PVUgloclVpIC zLNPyVNn0CwuDkbIIO+LTXx3FF4UMUy+UdHAwm/CPwG6o4ND+X5OIFpU0RXk1JOD7MUREzQac 7Yzluwxk72duuAqNELlTSMq0F1vkGd+RfQ6kQHxUsrqWpiCC4nzqf6l5E3PjOSOk18LrkURdg WmafKEPOr4x9jfNe5CdPrTQ8PzXx00TuyA2RXidyGQtEJen6pgFMTXM8U33KVECWxk6LvnwRW PxdSUvoAfU6jfYHcrO0nxBkWGoDQSY7Ek7jles3RdTQ1LbDo8WZcYN9pNQUJV2CDDtxzf3wSD b/ieRKhBphBDXUi7 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 212.227.126.135 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:117614 Archived-At: On 30.07.2018 21:35, Robert Girault wrote: > Andreas Röhler writes: > >> On 30.07.2018 16:33, Eli Zaretskii wrote: >>>> From: Andreas Röhler >>>> Date: Mon, 30 Jul 2018 14:24:06 +0200 >>>> >>>> (while (re-search-forward "" nil t 1)) >>>> >>>> Emacs hangs. >>>> >>>> Same with plain >>>> >>>> (while (search-forward "" nil t 1)) >>>> >>>> Expect it terminating. >>>> >>>> Are there reasons for this? >>> >>> Why did you expect it to terminate? >> >> Expect a call of search-forward from EOB not being successful. > > I see. But searching for the empty string seems to be an always > successful operation as long as you have a string. The empty string is > before or after any character in a string, so I would expect it to be > always found by {re-}search-forward. > Hmm, when trying at BOB with some content, changing the times argument (message "%s" (search-forward "" nil t 1)) (message "%s" (search-forward "" nil t 2)) (message "%s" (search-forward "" nil t 3)) the result remains "43" - looks like the match is not regular.