unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: 21091@debbugs.gnu.org
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)	[thread overview]
Message-ID: <37c2e51c-3593-4e67-ae29-ce8705a412bf@default> (raw)
In-Reply-To: <87inyyait0.fsf@gnus.org>

> > 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.





  reply	other threads:[~2016-09-04  0:08 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-19  3:57 bug#21091: 25.0.50; `isearch-done' called before `isearch-update' raises wrong-type-arg error Drew Adams
2016-04-30 21:27 ` Lars Ingebrigtsen
2016-09-04  0:08   ` Drew Adams [this message]
2016-09-04  3:45 ` npostavs
2016-09-04  5:43   ` Drew Adams
2016-09-04 20:47     ` npostavs

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=37c2e51c-3593-4e67-ae29-ce8705a412bf@default \
    --to=drew.adams@oracle.com \
    --cc=21091@debbugs.gnu.org \
    --cc=larsi@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).