[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#21091: 25.0.50; `isearch-done' called before `isearch-update' raises
From: |
Drew Adams |
Subject: |
bug#21091: 25.0.50; `isearch-done' called before `isearch-update' raises wrong-type-arg error |
Date: |
Sat, 3 Sep 2016 17:08:41 -0700 (PDT) |
> > Recently someone added `isearch--current-buffer' to isearch.el.
> >
> > This is initially nil. It is given a string value (buffer name) only in
> > `isearch-update'. But it is called in `isearch-done' and expected to
> > have a string value there. If it does not, a wrong-type-arg error is
> > raised...
> >
> > When called at top level, `isearch--current-buffer' is nil, and the
> > wrong-type arg error is raised.
> >
> > I can "fix" the problem that was introduced by wrapping the
> > `isearch-done' call in `ignore-errors'. But I think it would be better
> > for isearch.el not to assume that `isearch-done' is called after
> > `isearch-update'. I don't think there is a reason why the two need to
> > be coupled in that way. Adding variable `isearch--current-buffer' in
> > the way it was done makes the isearch.el code more fragile than it needs
> > to be, I think.
> >
> > Anyway, please consider somehow ensuring that `isearch-done' does not
> > care whether `isearch--current-buffer' has a string value.
>
> If I understand you correctly, I don't think this is a bug. If somebody
> else disagrees, please reopen this bug report.
No reason given? Why do you think it is not a bug? Why do you not
think that "adding variable `isearch--current-buffer' in the way it
was done makes the isearch.el code more fragile than it needs to be"?
Why should the code assume that `isearch-done' is called only after
`isearch-update'? There is nothing inherent in `isearch-done' that
suggests that.
- bug#21091: 25.0.50; `isearch-done' called before `isearch-update' raises wrong-type-arg error,
Drew Adams <=