all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: Eli Zaretskii <eliz@gnu.org>, Drew Adams <drew.adams@oracle.com>
Cc: 20625@debbugs.gnu.org
Subject: bug#20625: 25.0.50; doc of `define-error` is incorrect
Date: Sat, 23 May 2015 09:02:56 -0700 (PDT)	[thread overview]
Message-ID: <531f0ede-5afb-4c72-bcaf-3ef56e447f1e@default> (raw)
In-Reply-To: <<83oalb1gvn.fsf@gnu.org>>

> I've grepped all the uses of 'error-message property in the Emacs
> sources, and I only see uses that expect the value to be a string.

What can I say, beyond what I said?  I don't think that is really
relevant.  A nil value means (I think) precisely that an error
condition is declared that has no associated message string.  The
fact that no code makes use of such an error condition doesn't
mean anything significant, IMO.

IIUC, the use of `bookmark-errors' with a nil value in bookmark.el
is precisely the same as its use of `bookmark-errors' with
`error-condition' prior to Emacs 24.4.  It declares, even if it
does not define an error message for, an error condition that
is more general than `bookmark-error-no-filename'.

It tells programmers who might define their own bookmark errors
to have them, like `bookmark-error-no-filename', inherit from
condition `bookmark-errors'.  That seems reasonable to me.  But
of course it is not necessary - users can just have their new
bookmark errors inherit from `error'.

Now you could argue that the presence of `bookmark-errors' in
bookmark.el prior to Emacs 24.4 was a mistake.  That is the
same argument as saying that its presence now is a mistake.
But if you suppose that it is a good idea to predefine a general
error class for bookmark code, then I don't see why doing so
using `define-error' is any less meaningful/reasonable than
doing so using property `error-conditions' directly.

> I cannot describe in the docs something I don't understand.  I hope
> someone who will would either fix the docs or post here what it
> means for that property to have a nil value, and then I can put
> that in the docs.

I tried to explain the meaning, as I understand it.  Perhaps
the person who changed the Emacs 24.3 bookmark.el code to use
`define-error', or the person who introduced `define-error' to
Emacs 24.4, can confirm what I said or otherwise weigh in here.

Meanwhile, perhaps you could consider mentioning that the
MESSAGE value can be nil.  (This doc bug would remain open, as
long as what nil means is not described, but at least the type
of MESSAGE would not be incorrectly specified).  And perhaps
you could consider making parameter MESSAGE optional (since,
in effect, it is).





       reply	other threads:[~2015-05-23 16:02 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <<10eb5733-c84c-491d-86ca-2d6a05b80e7d@default>
     [not found] ` <<83oalb1gvn.fsf@gnu.org>
2015-05-23 16:02   ` Drew Adams [this message]
     [not found] <<b9eb3f53-8dec-4157-8a96-7634274687ac@default>
     [not found] ` <<83382n38et.fsf@gnu.org>
2015-05-23 14:48   ` bug#20625: 25.0.50; doc of `define-error` is incorrect Drew Adams
2015-05-23 14:57     ` Eli Zaretskii
2015-05-23 16:15     ` Stefan Monnier
2015-05-23 16:22       ` Drew Adams
2015-05-21 21:04 Drew Adams
2015-05-23 10:17 ` Eli Zaretskii
2016-04-30 19:25 ` Lars Ingebrigtsen
2016-04-30 19:42   ` Drew Adams

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=531f0ede-5afb-4c72-bcaf-3ef56e447f1e@default \
    --to=drew.adams@oracle.com \
    --cc=20625@debbugs.gnu.org \
    --cc=eliz@gnu.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 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.