From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thien-Thi Nguyen Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] trunk r117152: Arrange to never byte-compile the generated -pkg.el file. Date: Mon, 26 May 2014 10:41:35 +0200 Message-ID: <87bnuldj9c.fsf@zigzag.favinet> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-Trace: ger.gmane.org 1401093532 19415 80.91.229.3 (26 May 2014 08:38:52 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 26 May 2014 08:38:52 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon May 26 10:38:45 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WoqQc-0003ze-Io for ged-emacs-devel@m.gmane.org; Mon, 26 May 2014 10:38:42 +0200 Original-Received: from localhost ([::1]:55395 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WoqQc-0001C0-7e for ged-emacs-devel@m.gmane.org; Mon, 26 May 2014 04:38:42 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33293) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WoqQT-0001AO-D0 for emacs-devel@gnu.org; Mon, 26 May 2014 04:38:39 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WoqQN-0007bi-GG for emacs-devel@gnu.org; Mon, 26 May 2014 04:38:33 -0400 Original-Received: from smtp209.alice.it ([82.57.200.105]:48022) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WoqQN-0007bN-1z for emacs-devel@gnu.org; Mon, 26 May 2014 04:38:27 -0400 Original-Received: from zigzag.favinet (79.1.147.18) by smtp209.alice.it (8.6.060.28) id 52443BB02A603306 for emacs-devel@gnu.org; Mon, 26 May 2014 10:38:25 +0200 Original-Received: from ttn by zigzag.favinet with local (Exim 4.80) (envelope-from ) id 1WoqTa-0006fS-4N for emacs-devel@gnu.org; Mon, 26 May 2014 10:41:46 +0200 Mail-Followup-To: emacs-devel@gnu.org In-Reply-To: (Stefan Monnier's message of "Sun, 25 May 2014 16:29:32 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 82.57.200.105 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:172098 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable () Stefan Monnier () Sun, 25 May 2014 16:29:32 -0400 Sadly that doesn't help for the packages downloaded as tarballs which already come with their own foo-pkg.el. We really should instead call `byte-recompile-directory' telling it to skip the foo-pkg.el. I see the =E2=80=98byte-recompile-directory=E2=80=99 guard expression: ;; It is an ordinary file. Decide whether to compile it. (if (and (string-match emacs-lisp-file-regexp source) ;; The next 2 tests avoid compiling lock files (file-readable-p source) (not (string-match "\\`\\.#" file)) (not (auto-save-file-name-p source)) (not (string-equal dir-locals-file (file-name-nondirectory source)))) ;; do it ) affords us only =E2=80=98auto-save-file-name-p=E2=80=99 and =E2=80=98dir-lo= cals-file=E2=80=99 as possible ways to exclude -pkg.el files, the latter probably a bit easier since it's a variable, w/o modifying the filesystem. If modifying the filesystem is OK, i suppose another way is to make the file temporarily unreadable around the =E2=80=98byte-recompile-directory=E2=80=99 call. All of these strike me as inelegant. Maybe now is good time to address another issue of =E2=80=98byte-recompile-directory=E2=80=99, namely= that caller has no control over the order of the files processed. As author of ELPA package =E2=80=98xpm=E2=80=99, i would like this control and= would be willing to work a bit (i.e., manually specifying the desired order) to get it. I imagine others might desire similarly. Support for explicit ordering (and thus, inclusion) in package.el naturally lends itself to support for -pkg.el (or other user-specified globbing / wildcards, for example) exclusion, a nice (non-)coincidence, no? Would such redesign be compatible w/ the package.el vision? =2D-=20 Thien-Thi Nguyen GPG key: 4C807502 (if you're human and you know it) read my lisp: (responsep (questions 'technical) (not (via 'mailing-list))) =3D> nil --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iEYEARECAAYFAlOC/kMACgkQZwMiJEyAdQI3VACgkqk0Z57JI+kE+tyYXyS9S5VN h30AoNb3fptO8fE1TereoOCKAcOxTMDb =rxTA -----END PGP SIGNATURE----- --=-=-=--