From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: gnuist007@hotmail.com Newsgroups: gmane.emacs.help Subject: Re: Macro aborts even though regexp instance exists - Serious Bug Date: Wed, 24 Oct 2012 19:55:46 -0700 (PDT) Message-ID: <7d95f8ab-55f5-483a-953e-653cd03ff6a6@o5g2000yqi.googlegroups.com> References: <08df09b8-18cc-4d23-9f2e-b1187f4cfdec__5446.52010216868$1350938726$gmane$org@g8g2000yqp.googlegroups.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1351134015 25522 80.91.229.3 (25 Oct 2012 03:00:15 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 25 Oct 2012 03:00:15 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Oct 25 05:00:23 2012 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TRDgD-0006nz-Nl for geh-help-gnu-emacs@m.gmane.org; Thu, 25 Oct 2012 05:00:21 +0200 Original-Received: from localhost ([::1]:57099 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TRDg5-0003yp-EB for geh-help-gnu-emacs@m.gmane.org; Wed, 24 Oct 2012 23:00:13 -0400 Original-Received: by 10.224.180.141 with SMTP id bu13mr5736522qab.2.1351133746700; Wed, 24 Oct 2012 19:55:46 -0700 (PDT) Original-Received: by 10.236.79.7 with SMTP id h7mr1821006yhe.2.1351133746671; Wed, 24 Oct 2012 19:55:46 -0700 (PDT) Original-Path: usenet.stanford.edu!x14no7025236qar.0!news-out.google.com!r17ni57592152qap.0!nntp.google.com!x14no7318084qar.0!postnews.google.com!o5g2000yqi.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Complaints-To: groups-abuse@google.com Injection-Info: o5g2000yqi.googlegroups.com; posting-host=99.42.78.5; posting-account=HZMwaQgAAABuThfluRZ4FM7A69xRFwOt Original-NNTP-Posting-Host: 99.42.78.5 User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows NT 5.1; rv:12.0) Gecko/20100101 Firefox/12.0,gzip(gfe) Injection-Date: Thu, 25 Oct 2012 02:55:46 +0000 Original-Xref: usenet.stanford.edu gnu.emacs.help:195084 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 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-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:87413 Archived-At: On Oct 23, 8:54=A0pm, Kevin Rodgers wrote: > On 10/22/12 2:40 PM, Swami Tota Ram Shankar wrote: > > > > > > > > > > > Hi emacs users, > > > I write a simple macro which works, however, it fails in a particular > > case. > > > C-s > > M-r > > > to get into isearch-forward-regexp > > > and give a regexp like > > > ONE\|TWO > > > It works for every TWO and ONE as long as there is a ONE ahead of TWO. > > In the last instance, no ONE exists after TWO and it fails. > > > \|<=3D> =A0OR or disjunction. > > > Any solutions? > > > This is such a fundamental issue that I think its a bug. When the C-s > > M-r =A0is used outside the macro definition, the cursor gladly returns > > to the original position when OR is entered and proceeds forward from > > there, but perhaps, the macro aborts. > > It is not a bug: when ONE fails to match the buffer, C-s (which is design= ed > for interactive use, obviously) signals an error, which terminates the ma= cro > execution. > > That's because there is no way for C-s to know that you _might_ type \|TW= O > after ONE. > > So the solution is to make sure that the regexp is not complete after ONE= : > C-s \(ONE\|TWO\) > > > I guess, this can lead to a lot of confusion and time wastage, if the > > user is unaware of this and most likely to neglect it because its > > contrary to normal usage. > > Yes, there is a lot of confusion and wasted time when a user is not aware > of how to use a program. > > > I include more newsgroups because of the seriousness of this bug. > > Whatever :-) > > -- > Kevin Rodgers > Denver, Colorado, USA thanks