From: Thien-Thi Nguyen <ttn@gnu.org>
To: emacs-devel@gnu.org
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 [thread overview]
Message-ID: <87bnuldj9c.fsf@zigzag.favinet> (raw)
In-Reply-To: <jwvlhtpwqn1.fsf-monnier+emacsdiffs@gnu.org> (Stefan Monnier's message of "Sun, 25 May 2014 16:29:32 -0400")
[-- Attachment #1: Type: text/plain, Size: 2108 bytes --]
() Stefan Monnier <monnier@iro.umontreal.ca>
() 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 ‘byte-recompile-directory’ 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 ‘auto-save-file-name-p’ and ‘dir-locals-file’ 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
‘byte-recompile-directory’ call.
All of these strike me as inelegant. Maybe now is good time to
address another issue of ‘byte-recompile-directory’, namely that
caller has no control over the order of the files processed. As
author of ELPA package ‘xpm’, 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?
--
Thien-Thi Nguyen
GPG key: 4C807502
(if you're human and you know it)
read my lisp: (responsep (questions 'technical)
(not (via 'mailing-list)))
=> nil
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
next prev parent reply other threads:[~2014-05-26 8:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <E1Wobcl-000254-5a@vcs.savannah.gnu.org>
2014-05-25 20:29 ` [Emacs-diffs] trunk r117152: Arrange to never byte-compile the generated -pkg.el file Stefan Monnier
2014-05-26 8:41 ` Thien-Thi Nguyen [this message]
2014-05-26 18:17 ` Stefan Monnier
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87bnuldj9c.fsf@zigzag.favinet \
--to=ttn@gnu.org \
--cc=emacs-devel@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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).