From: Glenn Morris <rgm@gnu.org>
To: Jambunathan K <kjambunathan@gmail.com>
Cc: 10125@debbugs.gnu.org, stelian.iancu@gmail.com
Subject: bug#10125: 24.0.91; package.el (org): Macros in tar packages & order of byte compilation
Date: Thu, 24 Nov 2011 14:53:04 -0500 [thread overview]
Message-ID: <hffwhdqov3.fsf__45119.1325708807$1322164428$gmane$org@fencepost.gnu.org> (raw)
In-Reply-To: <v062i9tk0d.fsf@fencepost.gnu.org> (Glenn Morris's message of "Thu, 24 Nov 2011 14:09:38 -0500")
Glenn Morris wrote:
> fresh Emacs instance. There's no reason the "package manager" could not
> spawn a separate Emacs in batch-mode as a sub-job to do the compilation.
Very lightly tested version:
*** lisp/emacs-lisp/package.el 2011-11-20 03:48:53 +0000
--- lisp/emacs-lisp/package.el 2011-11-24 19:48:49 +0000
***************
*** 595,600 ****
--- 595,612 ----
(error "Package does not untar cleanly into directory %s/" dir))))
(tar-untar-buffer))
+ (defun package-compile (directory)
+ "Compile the Lisp files in DIRECTORY."
+ (with-current-buffer (get-buffer-create "*package-compile*")
+ (goto-char (point-max))
+ (pop-to-buffer (current-buffer))
+ (or (zerop (call-process "emacs" nil t t "--batch" "--eval"
+ (format
+ "(progn (setq load-path (cons \"%s\" load-path))
+ (batch-byte-recompile-directory 0))" directory)
+ directory))
+ (error "Compiling the package gave an error"))))
+
(defun package-unpack (name version)
(let* ((dirname (concat (symbol-name name) "-" version))
(pkg-dir (expand-file-name dirname package-user-dir)))
***************
*** 603,610 ****
(let* ((default-directory (file-name-as-directory package-user-dir)))
(package-untar-buffer dirname)
(package-generate-autoloads (symbol-name name) pkg-dir)
! (let ((load-path (cons pkg-dir load-path)))
! (byte-recompile-directory pkg-dir 0 t)))))
(defun package--write-file-no-coding (file-name)
(let ((buffer-file-coding-system 'no-conversion))
--- 615,621 ----
(let* ((default-directory (file-name-as-directory package-user-dir)))
(package-untar-buffer dirname)
(package-generate-autoloads (symbol-name name) pkg-dir)
! (package-compile pkg-dir))))
(defun package--write-file-no-coding (file-name)
(let ((buffer-file-coding-system 'no-conversion))
***************
*** 645,652 ****
pkg-file
nil nil nil 'excl))
(package-generate-autoloads file-name pkg-dir)
! (let ((load-path (cons pkg-dir load-path)))
! (byte-recompile-directory pkg-dir 0 t)))))
(defmacro package--with-work-buffer (location file &rest body)
"Run BODY in a buffer containing the contents of FILE at LOCATION.
--- 656,662 ----
pkg-file
nil nil nil 'excl))
(package-generate-autoloads file-name pkg-dir)
! (package-compile pkg-dir))))
(defmacro package--with-work-buffer (location file &rest body)
"Run BODY in a buffer containing the contents of FILE at LOCATION.
next prev parent reply other threads:[~2011-11-24 19:53 UTC|newest]
Thread overview: 96+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-10 21:07 RFE: require and load-path-shadowing Achim Gratz
2013-01-10 23:43 ` Glenn Morris
2013-01-11 1:57 ` bug#10125: " Stefan Monnier
2011-11-24 12:12 ` 24.0.91; package.el (org): Macros in tar packages & order of byte compilation Jambunathan K
2002-01-01 0:33 ` bug#10125: " Jambunathan K
2011-11-24 13:05 ` Eli Zaretskii
2011-11-24 17:22 ` Jambunathan K
2011-11-24 19:09 ` Glenn Morris
2011-11-24 19:09 ` Glenn Morris
2011-11-24 19:53 ` Glenn Morris [this message]
2011-11-24 19:53 ` Glenn Morris
2011-11-25 12:15 ` Jambunathan K
2011-11-25 12:15 ` Jambunathan K
2011-11-25 14:07 ` Chong Yidong
2011-11-25 14:07 ` Chong Yidong
2011-11-25 14:57 ` Stefan Monnier
2011-11-25 19:15 ` Glenn Morris
2011-11-25 19:21 ` Glenn Morris
2011-11-25 19:21 ` Glenn Morris
2011-11-25 19:15 ` Glenn Morris
2011-11-25 14:57 ` Stefan Monnier
2011-11-25 18:19 ` Glenn Morris
2011-11-25 19:01 ` Glenn Morris
2011-11-25 19:01 ` Glenn Morris
2011-11-25 18:19 ` Glenn Morris
2011-11-24 22:55 ` Stelian Iancu
2011-11-24 22:55 ` Stelian Iancu
2011-11-24 23:54 ` Glenn Morris
2011-11-24 23:54 ` Glenn Morris
2011-11-25 3:31 ` Jambunathan K
2011-11-25 12:32 ` Stelian Iancu
2011-11-25 12:32 ` Stelian Iancu
2011-11-25 12:58 ` Jambunathan K
2011-11-25 3:31 ` Jambunathan K
2011-11-25 8:10 ` Eli Zaretskii
2011-11-25 8:10 ` Eli Zaretskii
2011-11-25 18:20 ` Glenn Morris
2011-11-25 18:20 ` Glenn Morris
2011-11-24 17:22 ` Jambunathan K
2013-01-11 16:06 ` bug#10125: RFE: require and load-path-shadowing Achim Gratz
2013-01-11 16:56 ` Stefan Monnier
2013-01-11 16:56 ` Stefan Monnier
2013-01-11 16:06 ` Achim Gratz
2013-01-11 19:53 ` Achim Gratz
2013-01-11 22:52 ` Stefan Monnier
2013-01-12 8:15 ` Eli Zaretskii
2013-01-12 8:15 ` Eli Zaretskii
2013-01-11 22:52 ` Stefan Monnier
2013-01-11 19:53 ` Achim Gratz
2013-01-12 10:15 ` Achim Gratz
2013-01-12 10:15 ` Achim Gratz
2013-01-12 13:34 ` Bastien
2013-01-12 13:34 ` Bastien
2013-01-12 14:03 ` Stefan Monnier
2013-01-12 14:23 ` Bastien
2013-01-12 16:12 ` Stefan Monnier
2013-01-12 17:34 ` Bastien
2013-01-12 17:34 ` Bastien
2013-01-12 16:12 ` Stefan Monnier
2013-01-12 14:23 ` Bastien
2013-01-12 14:03 ` Stefan Monnier
2013-01-12 10:20 ` Achim Gratz
2013-01-12 10:20 ` Achim Gratz
2013-01-12 12:07 ` Eli Zaretskii
2013-01-12 13:28 ` Stefan Monnier
2013-01-12 13:28 ` Stefan Monnier
2013-01-12 13:55 ` Eli Zaretskii
2013-01-12 13:55 ` Eli Zaretskii
2013-01-12 18:42 ` Glenn Morris
2013-01-12 18:42 ` Glenn Morris
2013-01-12 12:07 ` Eli Zaretskii
2013-01-12 16:29 ` Achim Gratz
2013-01-12 16:29 ` Achim Gratz
2013-01-12 17:01 ` Achim Gratz
2013-01-12 17:01 ` Achim Gratz
2013-01-12 18:39 ` Eli Zaretskii
2013-01-12 18:39 ` Eli Zaretskii
2013-01-13 7:46 ` Achim Gratz
2013-01-13 7:46 ` Achim Gratz
2013-01-13 7:52 ` Achim Gratz
2013-01-13 7:52 ` Achim Gratz
2013-01-15 19:34 ` Achim Gratz
2013-01-15 19:34 ` Achim Gratz
2013-01-16 9:45 ` Kevin Rodgers
2013-01-16 10:06 ` Andreas Schwab
2013-01-16 14:59 ` Kevin Rodgers
2013-01-16 14:59 ` Kevin Rodgers
2013-01-16 10:06 ` Andreas Schwab
2013-01-16 9:45 ` Kevin Rodgers
2013-01-11 2:45 ` Jambunathan K
2013-01-11 2:45 ` Jambunathan K
2013-01-11 1:57 ` Stefan Monnier
2013-01-11 8:21 ` Achim Gratz
2013-01-20 7:38 ` Achim Gratz
2013-01-20 20:17 ` Glenn Morris
2013-01-21 6:53 ` Achim Gratz
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='hffwhdqov3.fsf__45119.1325708807$1322164428$gmane$org@fencepost.gnu.org' \
--to=rgm@gnu.org \
--cc=10125@debbugs.gnu.org \
--cc=kjambunathan@gmail.com \
--cc=stelian.iancu@gmail.com \
/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.