all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
To: "'Stefan Monnier'" <monnier@iro.umontreal.ca>,
	"'Eli Zaretskii'" <eliz@gnu.org>
Cc: 11999@debbugs.gnu.org
Subject: bug#11999: 24.1.50; New Info file suffix ".info" breaks `Info-find-node-2'
Date: Sun, 22 Jul 2012 07:34:29 -0700	[thread overview]
Message-ID: <1B7EF119D99541B6ABAFC4FB523F494A@us.oracle.com> (raw)
In-Reply-To: <jwvhat0m8oo.fsf-monnier+emacs@gnu.org>

> > Stefan, could you perhaps provide some insight?  What is a "pilot
> > error" in this context,
> 
> A error of the user rather than of the author of the code.

Yes, that's what I understood by "pilot error" (the former part: an error by the
user).

That is not what is going on when a user looks up a term that does not happen to
be in the index (which is what this bug report was about).  The user is doing
nothing wrong there.

And I'm guessing, without checking in detail and based only on the fact that so
many calls to `error' were changed to `user-error' in info.el, that there might
be additional inappropriate uses of `user-error' in info.el - perhaps many of
them.

And perhaps other files were also subjected to such a wholesale replacement.
This kind of change requires time, analysis, & judgment.  The person making the
change at any given occurrence needs to read, understand the code, and
(especially) think of the user.

> > and how should Lisp programs use this new facility to (supposedly)
> > provide better diagnostics and/or better error handling?
> 
> user-error is just a standard "debug-ignored-error".  So instead of
> using error plus adding the text of the error to debug-ignored-errors,
> you can just user user-error.
> 
> If Drew gets a user-error that drops him in the debugger, it's because
> he removed` user-error' from debug-ignored-errors.

Not really.  C-h v debug-ignored-errors:

,----
| debug-ignored-errors is a variable defined in `C source code'.
| Its value is
| (search-failed "^Invalid face:? " beginning-of-line beginning-of-buffer
end-of-line end-of-buffer end-of-file buffer-read-only file-supersession
user-error)
| 
| Original value was 
| (beginning-of-line beginning-of-buffer end-of-line end-of-buffer end-of-file
buffer-read-only file-supersession user-error)
|
...
`----

[BTW, as you can see, that value is printed too wide - 158 chars wide!.  It
should be limited (pretty-printed with filling to the usual max width), in line
with the rest of a *Help* buffer.]

And a quick test shows that use of `user-error' does not enter the debugger for
me, whereas use of `error' does.  So there must be something else going on here.

But I just tried the original recipe again, and now it does not enter the
debugger.  I've tried to see what I might have changed locally in the meantime,
but I haven't found anything yet.  I have not changed `debug-ignored-errors', of
that I am certain.

At any rate, let's not worry for this bug about whether the debugger is entered.
That can be discussed later if necessary, and I have already said that I do not
have an opinion about whether it should be entered for such an error (i.e., like
this one in Info).

The real questions for this bug are (1) whether all of the occurrences of
`user-error' in info.el are appropriate (in particular, the one for index
lookup) and (2) whether the doc about `user-error' is accurate and clear.

> >> An index lookup that finds no hit is NOT "expected to be 
> >> the result of an incorrect manipulation on the part of
> >> the user, rather than the result of an actual problem." 
> 
> By "actual problem", I meant "a bug in the code", i.e. a problem that
> can be fixed by correcting the code.

That too is what I guessed, at least the latter part: a coding mistake.

But that description is a false, binary choice.  The same false choice is
presented by "A error of the user rather than of the author of the code."  There
are uses of error signaling (and more generally, alerting the user and perhaps
returning to top level) that are neither.

IOW, there is a lot that is neither an error by the user nor a mistake in the
code.  Without clarifying the doc & design wrt this middle ground, we will
continue to (a) confuse users and (b) have inappropriate uses of either `error'
or `user-error'.






  reply	other threads:[~2012-07-22 14:34 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-20 16:13 bug#11999: 24.1.50; New Info file suffix ".info" breaks `Info-find-node-2' Drew Adams
2012-07-20 18:30 ` Andreas Schwab
2012-07-20 18:45   ` Drew Adams
2012-07-20 19:19     ` Andreas Schwab
2012-07-20 20:03       ` Drew Adams
2012-07-20 20:08         ` Andreas Schwab
2012-07-20 20:09           ` Drew Adams
2012-07-20 20:11             ` Andreas Schwab
2012-07-20 20:47         ` Eli Zaretskii
2012-07-20 20:43     ` Eli Zaretskii
2012-07-20 21:08       ` Drew Adams
2012-07-21  8:47         ` Eli Zaretskii
2012-07-21 13:58           ` Drew Adams
2012-07-22  9:50           ` Stefan Monnier
2012-07-22 14:34             ` Drew Adams [this message]
2012-07-22 15:16             ` Eli Zaretskii
2012-07-23  8:53               ` Stefan Monnier
2012-07-23 13:54                 ` Drew Adams
2012-07-23 23:28                   ` Stefan Monnier
2012-07-24  1:30                     ` Drew Adams
2012-07-24  9:02                       ` Stefan Monnier
2012-07-24 16:38                 ` Eli Zaretskii
2012-07-24 21:53                   ` Stefan Monnier
2012-07-25 16:06                     ` Eli Zaretskii
2012-07-25 23:53                       ` Stefan Monnier
2012-07-26  3:06                         ` Eli Zaretskii
2012-07-26 23:18                           ` Stefan Monnier
2012-07-27  6:49                             ` Eli Zaretskii
2012-07-28 21:36                               ` Stefan Monnier
2012-07-29  2:50                                 ` Eli Zaretskii
2012-07-30  9:30                                   ` Stefan Monnier
2012-07-30 13:35                                     ` Eli Zaretskii
2012-07-29  6:30                                 ` Juri Linkov

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

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

  git send-email \
    --in-reply-to=1B7EF119D99541B6ABAFC4FB523F494A@us.oracle.com \
    --to=drew.adams@oracle.com \
    --cc=11999@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.