From debbugs-submit-bounces@debbugs.gnu.org Thu May 21 17:04:48 2015 Received: (at submit) by debbugs.gnu.org; 21 May 2015 21:04:48 +0000 Received: from localhost ([127.0.0.1]:52416 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YvXe3-0000TC-BT for submit@debbugs.gnu.org; Thu, 21 May 2015 17:04:48 -0400 Received: from eggs.gnu.org ([208.118.235.92]:38635) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YvXe0-0000Sn-Q3 for submit@debbugs.gnu.org; Thu, 21 May 2015 17:04:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YvXdu-000583-Od for submit@debbugs.gnu.org; Thu, 21 May 2015 17:04:39 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:43233) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YvXdu-00057u-Lp for submit@debbugs.gnu.org; Thu, 21 May 2015 17:04:38 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52138) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YvXdt-0006IS-II for bug-gnu-emacs@gnu.org; Thu, 21 May 2015 17:04:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YvXdq-00056d-DA for bug-gnu-emacs@gnu.org; Thu, 21 May 2015 17:04:37 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:17887) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YvXdq-00056D-6r for bug-gnu-emacs@gnu.org; Thu, 21 May 2015 17:04:34 -0400 Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id t4LL4W82015327 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 21 May 2015 21:04:32 GMT Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userv0022.oracle.com (8.13.8/8.13.8) with ESMTP id t4LL4VVe004452 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for ; Thu, 21 May 2015 21:04:32 GMT Received: from abhmp0004.oracle.com (abhmp0004.oracle.com [141.146.116.10]) by userv0121.oracle.com (8.13.8/8.13.8) with ESMTP id t4LL4VAA001697 for ; Thu, 21 May 2015 21:04:31 GMT MIME-Version: 1.0 Message-ID: Date: Thu, 21 May 2015 14:04:31 -0700 (PDT) From: Drew Adams To: bug-gnu-emacs@gnu.org Subject: 25.0.50; doc of `define-error` is incorrect X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9 (901082) [OL 12.0.6691.5000 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Source-IP: userv0022.oracle.com [156.151.31.74] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) >From `C-h f': (define-error NAME MESSAGE &optional PARENT) Define NAME as a new error signal. MESSAGE is a string that will be output to the echo area if such an error is signaled without being caught by a `condition-case'. PARENT is either a signal or a list of signals from which it inherits. Defaults to `error'. No, MESSAGE is not necessarily a string. It is a required argument, but the code explicitly makes use of the case where it is nil. And existing code delivered with Emacs (e.g. bookmark.el) makes use of a nil MESSAGE. That case should be documented. The doc in the manual has the same bug (node Error Symbols). MESSAGE is *not* necessarily a string. In GNU Emacs 25.0.50.1 (i686-pc-mingw32) of 2014-10-20 on LEG570 Bzr revision: 118168 rgm@gnu.org-20141020195941-icp42t8ttcnud09g Windowing system distributor `Microsoft Corp.', version 6.1.7601 Configured using: `configure --enable-checking=3Dyes,glyphs CPPFLAGS=3D-DGLYPH_DEBUG=3D1' From debbugs-submit-bounces@debbugs.gnu.org Sat May 23 06:17:29 2015 Received: (at 20625) by debbugs.gnu.org; 23 May 2015 10:17:30 +0000 Received: from localhost ([127.0.0.1]:53447 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Yw6Uf-00047k-Sf for submit@debbugs.gnu.org; Sat, 23 May 2015 06:17:29 -0400 Received: from mtaout20.012.net.il ([80.179.55.166]:58721) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Yw6Ua-00047Q-FF for 20625@debbugs.gnu.org; Sat, 23 May 2015 06:17:24 -0400 Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0NOS00D00S3PKM00@a-mtaout20.012.net.il> for 20625@debbugs.gnu.org; Sat, 23 May 2015 13:17:13 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NOS00D0SSKPHW30@a-mtaout20.012.net.il>; Sat, 23 May 2015 13:17:13 +0300 (IDT) Date: Sat, 23 May 2015 13:17:14 +0300 From: Eli Zaretskii Subject: Re: bug#20625: 25.0.50; doc of `define-error` is incorrect In-reply-to: X-012-Sender: halo1@inter.net.il To: Drew Adams Message-id: <83382n38et.fsf@gnu.org> References: X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 20625 Cc: 20625@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > Date: Thu, 21 May 2015 14:04:31 -0700 (PDT) > From: Drew Adams > > >From `C-h f': > > (define-error NAME MESSAGE &optional PARENT) > > Define NAME as a new error signal. > MESSAGE is a string that will be output to the echo area if such an error > is signaled without being caught by a `condition-case'. > PARENT is either a signal or a list of signals from which it inherits. > Defaults to `error'. > > No, MESSAGE is not necessarily a string. It is a required argument, but > the code explicitly makes use of the case where it is nil. And existing > code delivered with Emacs (e.g. bookmark.el) makes use of a nil MESSAGE. > That case should be documented. AFAICS, users of this property will yield strange messages if MESSAGE is nil. So shouldn't we at least advise that it's a string? Also, what exactly is the purpose of bookmark.el's using nil there? From debbugs-submit-bounces@debbugs.gnu.org Sat May 23 10:49:02 2015 Received: (at 20625) by debbugs.gnu.org; 23 May 2015 14:49:02 +0000 Received: from localhost ([127.0.0.1]:54042 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YwAjS-0003Yt-45 for submit@debbugs.gnu.org; Sat, 23 May 2015 10:49:02 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:31819) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YwAjM-0003Yc-29 for 20625@debbugs.gnu.org; Sat, 23 May 2015 10:48:56 -0400 Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id t4NEmjAo003609 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 23 May 2015 14:48:45 GMT Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserv0021.oracle.com (8.13.8/8.13.8) with ESMTP id t4NEmjNj000469 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Sat, 23 May 2015 14:48:45 GMT Received: from abhmp0001.oracle.com (abhmp0001.oracle.com [141.146.116.7]) by aserv0122.oracle.com (8.13.8/8.13.8) with ESMTP id t4NEmjBk024572; Sat, 23 May 2015 14:48:45 GMT MIME-Version: 1.0 Message-ID: <10eb5733-c84c-491d-86ca-2d6a05b80e7d@default> Date: Sat, 23 May 2015 07:48:46 -0700 (PDT) From: Drew Adams To: Eli Zaretskii , Drew Adams Subject: RE: bug#20625: 25.0.50; doc of `define-error` is incorrect References: <> <<83382n38et.fsf@gnu.org>> In-Reply-To: <<83382n38et.fsf@gnu.org>> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9 (901082) [OL 12.0.6691.5000 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Source-IP: aserv0021.oracle.com [141.146.126.233] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 20625 Cc: 20625@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) > > MESSAGE is not necessarily a string. It is a requiredargument, > > but the code explicitly makes use of the case where it is nil. > > And existing code delivered with Emacs (e.g. bookmark.el) makes > > use of a nil MESSAGE. That case should be documented. >=20 > AFAICS, users of this property will yield strange messages if > MESSAGE is nil. So shouldn't we at least advise that it's a string? >=20 > Also, what exactly is the purpose of bookmark.el's using nil there? I'm no expert in this, and I wasn't the one who changed bookmark.el (in 24.4) to use `define-error'. But it seems that what is meant is that `bookmark-errors' is being declared to be an error condition, but with no definition: no message and no parent (other than the default, `error'). This is the Emacs 24.3 code: (put 'bookmark-error-no-filename 'error-conditions '(error bookmark-errors bookmark-error-no-filename)) (put 'bookmark-error-no-filename 'error-message "Bookmark has no associated file (or directory)") And this is the 24.4+ code: (define-error 'bookmark-errors nil) (define-error 'bookmark-error-no-filename "Bookmark has no associated file (or directory)" 'bookmark-errors) In both cases, `bookmark-errors' is presumably being declared as an error condition, but it is not defined in any way. It is presumably there to provide a more general category than `bookmark-error-no-filename'. That makes sense to me. If my interpretation is correct, then something like that explanation should be added to the doc, I think. Before `define-error', things were clear enough with the doc for property `error-conditions'. It seems that the doc for `define-error' should cover the same cases. I believe that means that with nil MESSAGE, property `error-conditions' is applied (using MESSAGE), and property `error-message' is not (absent or nil value). In fact, I think that the right change would be not only to say what nil MESSAGE means but to make MESSAGE an &optional parameter. From debbugs-submit-bounces@debbugs.gnu.org Sat May 23 10:57:31 2015 Received: (at 20625) by debbugs.gnu.org; 23 May 2015 14:57:31 +0000 Received: from localhost ([127.0.0.1]:54046 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YwArf-0003lE-J6 for submit@debbugs.gnu.org; Sat, 23 May 2015 10:57:31 -0400 Received: from mtaout21.012.net.il ([80.179.55.169]:36815) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YwAra-0003kx-1T for 20625@debbugs.gnu.org; Sat, 23 May 2015 10:57:26 -0400 Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0NOT000004VKWX00@a-mtaout21.012.net.il> for 20625@debbugs.gnu.org; Sat, 23 May 2015 17:57:15 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NOT000TP5JEVM30@a-mtaout21.012.net.il>; Sat, 23 May 2015 17:57:15 +0300 (IDT) Date: Sat, 23 May 2015 17:57:16 +0300 From: Eli Zaretskii Subject: Re: bug#20625: 25.0.50; doc of `define-error` is incorrect In-reply-to: <10eb5733-c84c-491d-86ca-2d6a05b80e7d@default> X-012-Sender: halo1@inter.net.il To: Drew Adams Message-id: <83oalb1gvn.fsf@gnu.org> References: <10eb5733-c84c-491d-86ca-2d6a05b80e7d@default> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 20625 Cc: 20625@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > Date: Sat, 23 May 2015 07:48:46 -0700 (PDT) > From: Drew Adams > Cc: 20625@debbugs.gnu.org > > > > MESSAGE is not necessarily a string. It is a requiredargument, > > > but the code explicitly makes use of the case where it is nil. > > > And existing code delivered with Emacs (e.g. bookmark.el) makes > > > use of a nil MESSAGE. That case should be documented. > > > > AFAICS, users of this property will yield strange messages if > > MESSAGE is nil. So shouldn't we at least advise that it's a string? > > > > Also, what exactly is the purpose of bookmark.el's using nil there? > > I'm no expert in this, and I wasn't the one who changed bookmark.el > (in 24.4) to use `define-error'. > > But it seems that what is meant is that `bookmark-errors' is being > declared to be an error condition, but with no definition: no > message and no parent (other than the default, `error'). > > This is the Emacs 24.3 code: > > (put 'bookmark-error-no-filename > 'error-conditions > '(error bookmark-errors bookmark-error-no-filename)) > (put 'bookmark-error-no-filename > 'error-message > "Bookmark has no associated file (or directory)") > > And this is the 24.4+ code: > > (define-error 'bookmark-errors nil) > (define-error 'bookmark-error-no-filename > "Bookmark has no associated file (or directory)" > 'bookmark-errors) > > In both cases, `bookmark-errors' is presumably being declared > as an error condition, but it is not defined in any way. It > is presumably there to provide a more general category than > `bookmark-error-no-filename'. That makes sense to me. 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. > If my interpretation is correct, then something like that > explanation should be added to the doc, I think. Before > `define-error', things were clear enough with the doc for > property `error-conditions'. It seems that the doc for > `define-error' should cover the same cases. > > I believe that means that with nil MESSAGE, property > `error-conditions' is applied (using MESSAGE), and property > `error-message' is not (absent or nil value). > > In fact, I think that the right change would be not only > to say what nil MESSAGE means but to make MESSAGE an > &optional parameter. 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. From debbugs-submit-bounces@debbugs.gnu.org Sat May 23 12:03:12 2015 Received: (at 20625) by debbugs.gnu.org; 23 May 2015 16:03:12 +0000 Received: from localhost ([127.0.0.1]:54101 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YwBtE-0005Np-AQ for submit@debbugs.gnu.org; Sat, 23 May 2015 12:03:12 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:41041) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YwBt9-0005N7-2u for 20625@debbugs.gnu.org; Sat, 23 May 2015 12:03:07 -0400 Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id t4NG2uK3015989 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 23 May 2015 16:02:56 GMT Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserv0021.oracle.com (8.13.8/8.13.8) with ESMTP id t4NG2tTP025014 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Sat, 23 May 2015 16:02:55 GMT Received: from abhmp0001.oracle.com (abhmp0001.oracle.com [141.146.116.7]) by aserv0122.oracle.com (8.13.8/8.13.8) with ESMTP id t4NG2tpA001445; Sat, 23 May 2015 16:02:55 GMT MIME-Version: 1.0 Message-ID: <531f0ede-5afb-4c72-bcaf-3ef56e447f1e@default> Date: Sat, 23 May 2015 09:02:56 -0700 (PDT) From: Drew Adams To: Eli Zaretskii , Drew Adams Subject: RE: bug#20625: 25.0.50; doc of `define-error` is incorrect References: <<10eb5733-c84c-491d-86ca-2d6a05b80e7d@default>> <<83oalb1gvn.fsf@gnu.org>> In-Reply-To: <<83oalb1gvn.fsf@gnu.org>> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9 (901082) [OL 12.0.6691.5000 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Source-IP: aserv0021.oracle.com [141.146.126.233] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 20625 Cc: 20625@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) > 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). From debbugs-submit-bounces@debbugs.gnu.org Sat May 23 12:15:53 2015 Received: (at 20625) by debbugs.gnu.org; 23 May 2015 16:15:53 +0000 Received: from localhost ([127.0.0.1]:54105 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YwC5U-0005fI-8C for submit@debbugs.gnu.org; Sat, 23 May 2015 12:15:52 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:7894) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YwC5N-0005f0-IH for 20625@debbugs.gnu.org; Sat, 23 May 2015 12:15:46 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0AvEwA731xV/9N+3mhcgxCEAoVVuzcJhH6CTQQCAoE8ORQBAQEBAQEBgQpBBYNdAQEDAVYjBQsLNBIUGA0kiDcIzyMBAQEBAQEBAwEBAQEBHYs6hQUHhC0FtQQjhBQigngBAQE X-IPAS-Result: A0AvEwA731xV/9N+3mhcgxCEAoVVuzcJhH6CTQQCAoE8ORQBAQEBAQEBgQpBBYNdAQEDAVYjBQsLNBIUGA0kiDcIzyMBAQEBAQEBAwEBAQEBHYs6hQUHhC0FtQQjhBQigngBAQE X-IronPort-AV: E=Sophos;i="5.13,465,1427774400"; d="scan'208";a="121934392" Received: from 104-222-126-211.cpe.teksavvy.com (HELO pastel.home) ([104.222.126.211]) by ironport2-out.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 23 May 2015 12:15:35 -0400 Received: by pastel.home (Postfix, from userid 20848) id E523017AA; Sat, 23 May 2015 12:15:34 -0400 (EDT) From: Stefan Monnier To: Drew Adams Subject: Re: bug#20625: 25.0.50; doc of `define-error` is incorrect Message-ID: References: > <83382n38et.fsf@gnu.org>> <10eb5733-c84c-491d-86ca-2d6a05b80e7d@default> Date: Sat, 23 May 2015 12:15:34 -0400 In-Reply-To: <10eb5733-c84c-491d-86ca-2d6a05b80e7d@default> (Drew Adams's message of "Sat, 23 May 2015 07:48:46 -0700 (PDT)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 20625 Cc: 20625@debbugs.gnu.org, Eli Zaretskii X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) > In fact, I think that the right change would be not only > to say what nil MESSAGE means but to make MESSAGE an > &optional parameter. I disagree. The bookmark.el code is just a historical accident. Stefan From debbugs-submit-bounces@debbugs.gnu.org Sat May 23 12:22:58 2015 Received: (at 20625) by debbugs.gnu.org; 23 May 2015 16:22:58 +0000 Received: from localhost ([127.0.0.1]:54114 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YwCCL-0005pf-RP for submit@debbugs.gnu.org; Sat, 23 May 2015 12:22:58 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:43518) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YwCCG-0005pP-7B for 20625@debbugs.gnu.org; Sat, 23 May 2015 12:22:52 -0400 Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id t4NGMe58027976 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 23 May 2015 16:22:41 GMT Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by aserv0021.oracle.com (8.13.8/8.13.8) with ESMTP id t4NGMdLJ025855 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Sat, 23 May 2015 16:22:40 GMT Received: from abhmp0001.oracle.com (abhmp0001.oracle.com [141.146.116.7]) by userv0121.oracle.com (8.13.8/8.13.8) with ESMTP id t4NGMdYF027682; Sat, 23 May 2015 16:22:39 GMT MIME-Version: 1.0 Message-ID: <0fec8ff5-ea94-442e-a00a-8b75f054f8af@default> Date: Sat, 23 May 2015 09:22:40 -0700 (PDT) From: Drew Adams To: Stefan Monnier Subject: RE: bug#20625: 25.0.50; doc of `define-error` is incorrect References: > <83382n38et.fsf@gnu.org>> <10eb5733-c84c-491d-86ca-2d6a05b80e7d@default> In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9 (901082) [OL 12.0.6691.5000 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Source-IP: aserv0021.oracle.com [141.146.126.233] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 20625 Cc: 20625@debbugs.gnu.org, Eli Zaretskii X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) > > In fact, I think that the right change would be not only > > to say what nil MESSAGE means but to make MESSAGE an > > &optional parameter. >=20 > I disagree. The bookmark.el code is just a historical accident. Then please remove it. Either this is an intended feature or it is not. If you don't want `define-error` to provide exactly the same thing that you can get by using property `error-conditions' directly, then leave its definition and doc as they are, but change the `bookmark.el' code back to using `error-conditions' directly, so any code that expects error condition `bookmark-errors' to be available will not be surprised. Or remove it from bookmark.el altogether, if you don't care about such backward compatibility. Or provide a MESSAGE arg for the definition of `bookmark-errors'. One way or another, the doc and behavior should match, and bookmark.el should be made coherent with both. From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 30 15:25:16 2016 Received: (at 20625) by debbugs.gnu.org; 30 Apr 2016 19:25:16 +0000 Received: from localhost ([127.0.0.1]:58433 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1awaVw-00069y-Es for submit@debbugs.gnu.org; Sat, 30 Apr 2016 15:25:16 -0400 Received: from hermes.netfonds.no ([80.91.224.195]:59858) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1awaVu-00069r-Vp for 20625@debbugs.gnu.org; Sat, 30 Apr 2016 15:25:15 -0400 Received: from cm-84.215.1.64.getinternet.no ([84.215.1.64] helo=mouse) by hermes.netfonds.no with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1awaVs-0005tG-3j; Sat, 30 Apr 2016 21:25:14 +0200 From: Lars Ingebrigtsen To: Drew Adams Subject: Re: bug#20625: 25.0.50; doc of `define-error` is incorrect References: Date: Sat, 30 Apr 2016 21:25:11 +0200 In-Reply-To: (Drew Adams's message of "Thu, 21 May 2015 14:04:31 -0700 (PDT)") Message-ID: <87h9eidhm0.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 20625 Cc: 20625@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) Drew Adams writes: >>>From `C-h f': > > (define-error NAME MESSAGE &optional PARENT) > > Define NAME as a new error signal. > MESSAGE is a string that will be output to the echo area if such an error > is signaled without being caught by a `condition-case'. > PARENT is either a signal or a list of signals from which it inherits. > Defaults to `error'. > > No, MESSAGE is not necessarily a string. It is a required argument, but > the code explicitly makes use of the case where it is nil. And existing > code delivered with Emacs (e.g. bookmark.el) makes use of a nil MESSAGE. > That case should be documented. The function doesn't error out if MESSAGE isn't a string, but it still shouldn't be. So I don't think that's a bug. Feel free to submit a new bug report for bookmark.el not supplying a string. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 30 15:25:21 2016 Received: (at control) by debbugs.gnu.org; 30 Apr 2016 19:25:22 +0000 Received: from localhost ([127.0.0.1]:58436 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1awaW1-0006AJ-MB for submit@debbugs.gnu.org; Sat, 30 Apr 2016 15:25:21 -0400 Received: from hermes.netfonds.no ([80.91.224.195]:59865) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1awaW0-0006AA-Dn for control@debbugs.gnu.org; Sat, 30 Apr 2016 15:25:20 -0400 Received: from cm-84.215.1.64.getinternet.no ([84.215.1.64] helo=mouse) by hermes.netfonds.no with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1awaVy-0005tP-C1 for control@debbugs.gnu.org; Sat, 30 Apr 2016 21:25:19 +0200 Date: Sat, 30 Apr 2016 21:25:17 +0200 Message-Id: <87fuu2dhlu.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #20625 X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) tags 20625 notabug close 20625 From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 30 15:42:16 2016 Received: (at 20625) by debbugs.gnu.org; 30 Apr 2016 19:42:16 +0000 Received: from localhost ([127.0.0.1]:58476 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1awamO-0008Fr-Kn for submit@debbugs.gnu.org; Sat, 30 Apr 2016 15:42:16 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:48049) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1awamN-0008Fe-1R for 20625@debbugs.gnu.org; Sat, 30 Apr 2016 15:42:15 -0400 Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id u3UJg7sv024188 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 30 Apr 2016 19:42:08 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userv0022.oracle.com (8.14.4/8.13.8) with ESMTP id u3UJg7su014460 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 30 Apr 2016 19:42:07 GMT Received: from abhmp0019.oracle.com (abhmp0019.oracle.com [141.146.116.25]) by aserv0121.oracle.com (8.13.8/8.13.8) with ESMTP id u3UJg6DQ007316; Sat, 30 Apr 2016 19:42:06 GMT MIME-Version: 1.0 Message-ID: <028438ba-c81a-4ebe-87a8-2057f7f0f9f5@default> Date: Sat, 30 Apr 2016 11:42:04 -0800 (GMT-08:00) From: Drew Adams To: Lars Ingebrigtsen Subject: RE: bug#20625: 25.0.50; doc of `define-error` is incorrect References: <87h9eidhm0.fsf@gnus.org> In-Reply-To: <87h9eidhm0.fsf@gnus.org> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9 (901082) [OL 12.0.6744.5000 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Source-IP: userv0022.oracle.com [156.151.31.74] X-Spam-Score: -3.3 (---) X-Debbugs-Envelope-To: 20625 Cc: 20625@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > > No, MESSAGE is not necessarily a string. It is a required argument, but > > the code explicitly makes use of the case where it is nil. And existin= g > > code delivered with Emacs (e.g. bookmark.el) makes use of a nil MESSAGE= . > > That case should be documented. >=20 > The function doesn't error out if MESSAGE isn't a string, but it still > shouldn't be. So I don't think that's a bug. >=20 > Feel free to submit a new bug report for bookmark.el not supplying a > string. I think it is too bad that `define-error', which was intended to be a friendly wrapper around using `error-conditions' directly, will no longer do all that the latter does. But so be it. Bug #23408 reported, for bookmark.el. Users who wrote similar code, expecting `define-error' to be like using `error-conditions', will need to likewise change their code. From unknown Mon Jun 23 11:27:02 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 29 May 2016 11:24:06 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator