help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Macro aborts even though regexp instance exists - Serious Bug


From: gnuist007
Subject: Re: Macro aborts even though regexp instance exists - Serious Bug
Date: Wed, 24 Oct 2012 19:55:46 -0700 (PDT)
User-agent: G2/1.0

On Oct 23, 8:54 pm, Kevin Rodgers <kevin.d.rodg...@gmail.com> 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.
>
> > \|<=>  OR or disjunction.
>
> > Any solutions?
>
> > This is such a fundamental issue that I think its a bug. When the C-s
> > M-r  is 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 designed
> for interactive use, obviously) signals an error, which terminates the macro
> execution.
>
> That's because there is no way for C-s to know that you _might_ type \|TWO
> 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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]