From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#7756: 24.0.50; enhancements to package.el Date: Fri, 31 Dec 2010 11:46:11 -0500 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1293814424 17345 80.91.229.12 (31 Dec 2010 16:53:44 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 31 Dec 2010 16:53:44 +0000 (UTC) Cc: 7756@debbugs.gnu.org To: emacs18@gmail.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Dec 31 17:53:40 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PYiEV-0007l7-QZ for geb-bug-gnu-emacs@m.gmane.org; Fri, 31 Dec 2010 17:53:40 +0100 Original-Received: from localhost ([127.0.0.1]:57141 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PYiEV-0001Kr-3b for geb-bug-gnu-emacs@m.gmane.org; Fri, 31 Dec 2010 11:53:39 -0500 Original-Received: from [140.186.70.92] (port=38162 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PYiEP-0001I3-Oh for bug-gnu-emacs@gnu.org; Fri, 31 Dec 2010 11:53:34 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PYiEO-0007QQ-Ll for bug-gnu-emacs@gnu.org; Fri, 31 Dec 2010 11:53:33 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:59522) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PYiEO-0007QL-KE for bug-gnu-emacs@gnu.org; Fri, 31 Dec 2010 11:53:32 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1PYi1L-0003RB-3j; Fri, 31 Dec 2010 11:40:03 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 31 Dec 2010 16:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 7756 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 7756-submit@debbugs.gnu.org id=B7756.129381355613156 (code B ref 7756); Fri, 31 Dec 2010 16:40:02 +0000 Original-Received: (at 7756) by debbugs.gnu.org; 31 Dec 2010 16:39:16 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PYi0Z-0003Q9-2C for submit@debbugs.gnu.org; Fri, 31 Dec 2010 11:39:15 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.183] helo=ironport2-out.pppoe.ca) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PYi0X-0003Pv-D7 for 7756@debbugs.gnu.org; Fri, 31 Dec 2010 11:39:14 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AmkFAB+XHU3O+Lc+/2dsb2JhbACWII4cdL5vhUoEhGWOGw X-IronPort-AV: E=Sophos;i="4.60,255,1291611600"; d="scan'208";a="86841610" Original-Received: from 206-248-183-62.dsl.teksavvy.com (HELO pastel.home) ([206.248.183.62]) by ironport2-out.pppoe.ca with ESMTP/TLS/ADH-AES256-SHA; 31 Dec 2010 11:46:11 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id 86D6758A74; Fri, 31 Dec 2010 11:46:11 -0500 (EST) In-Reply-To: (Richard Kim's message of "Thu, 30 Dec 2010 09:27:24 -0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Fri, 31 Dec 2010 11:40:03 -0500 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:42958 Archived-At: >>> @@ -338,9 +338,14 @@ >>> (pkg-file (expand-file-name >>> (concat (package-strip-version package) "-pkg") >>> pkg-dir))) >>> - (when (and (file-directory-p pkg-dir) >>> - (file-exists-p (concat pkg-file ".el"))) >>> - (load pkg-file nil t)))) >>> + ;; When one is creating a package and testing it out, it is easy >>> + ;; to forget to add the -pkg.el file. When that happens, it would >>> + ;; be useful to provide feedback to the user rather than silently >>> + ;; failing. That is what (error ...) below is for. >>> + (when (file-directory-p pkg-dir) >>> + (if (file-exists-p (concat pkg-file ".el")) >>> + (load pkg-file nil t) >>> + (error "'%s' file is missing!"))))) >> >> I agree with the intention, but I wonder: why do we pass the `noerror' >> parameter to `load' in the first place? > Thanks for looking into this. > I was focused in adding the error message and neglected to re-examine > the arguments to `load', i.e., I just kept the existing code. I suppose > it was used before my proposed change to prevent signalling error if the > file was not found. With the proposed change, since we check for the > existence of the file prior to calling `load', I suppose it is > appropriate to no longer pass `noerror'. Good catch. Also I'm sure you > have noticed that I forgot to add `pkg-file' argument to (error ...) > expression above. Right, so a simpler way to make the change is to not add an explicit check but instead just remove the `noerror' argument. So your patch is apparently changing a consciously made decision to ignore errors. I tend to agree with the change, but I'd first understand why someone decided to ignore those error. Stefan