GNU bug report logs - #21091
25.0.50; `isearch-done' called before `isearch-update' raises wrong-type-arg error

Previous Next

Package: emacs;

Reported by: Drew Adams <drew.adams <at> oracle.com>

Date: Sun, 19 Jul 2015 03:59:02 UTC

Severity: minor

Tags: fixed, patch

Found in versions 25.1, 25.0.50

Fixed in version 25.2

Done: npostavs <at> users.sourceforge.net

Bug is archived. No further changes may be made.

Full log


Message #19 received at 21091 <at> debbugs.gnu.org (full text, mbox):

From: Drew Adams <drew.adams <at> oracle.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 21091 <at> debbugs.gnu.org
Subject: RE: 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.




This bug report was last modified 8 years and 251 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.