From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sebastian Rose Subject: Re: further on compiling development version of org-mode without make command Date: Thu, 09 Jul 2009 12:19:52 +0200 Message-ID: <87ws6ikvjr.fsf@kassiopeya.MSHEIMNETZ> References: <87k52i266j.wl%ucecesf@ucl.ac.uk> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MOqfO-0004pF-LH for emacs-orgmode@gnu.org; Thu, 09 Jul 2009 06:15:50 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MOqfJ-0004iS-6f for emacs-orgmode@gnu.org; Thu, 09 Jul 2009 06:15:49 -0400 Received: from [199.232.76.173] (port=54443 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MOqfI-0004hq-OR for emacs-orgmode@gnu.org; Thu, 09 Jul 2009 06:15:44 -0400 Received: from mail.gmx.net ([213.165.64.20]:51004) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1MOqfH-0002GP-R6 for emacs-orgmode@gnu.org; Thu, 09 Jul 2009 06:15:44 -0400 In-Reply-To: <87k52i266j.wl%ucecesf@ucl.ac.uk> (Eric S. Fraga's message of "Wed, 08 Jul 2009 22:52:52 +0100") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Eric S Fraga Cc: emacs-orgmode@gnu.org --=-=-= Eric S Fraga writes: > Hello again, Thanks Eric! Here is the same with some more additions. 1.) Ensure a slash is appended to the directory (i.e. do not create ~/.emacs.d/org/lisporg-install.el) 2.) Optionally, do not compile the sources, but create the org-install.el file. Will this work? 3.) Take an optional argument: the directory to be compiled. 4.) Fix the bug in my previous mail: only existing files can be deleted... As a next step, we could as well drop the usage of dired, right? Sebastian --=-=-= Content-Type: application/emacs-lisp Content-Disposition: inline Content-Transfer-Encoding: quoted-printable (defvar my/org-lisp-directory "~/.emacs.d/org/lisp" "Directory where your org-mode files live.") (defvar my/org-compile-sources t "If `nil', never compile org-sources. `my/compile-org' will only create the autoloads file `org-install.el' then. If `t', compile the sources, too.= ") (setq my/org-lisp-directory "~/emacs/lisp/ext/org-mode/lisp") (defun my/compile-org(&optional directory) "Compile all *.el files that come with org-mode." (interactive) (setq directory (concat (file-truename (or directory my/org-lisp-directory)) "/")) (message directory)) (dired directory) (dired-mark-files-regexp "\\.el$") (let ((list-of-org-files (dired-get-marked-files))) (dolist (f list-of-org-files) ; delete compiled files (if (file-exists-p (concat f "c")) (delete-file (concat f "c")))) (dired-do-load) ; Load files to avoid compile errors (if my/org-compile-sources ; Compile, if `my/org-compile-sourc= es' is t (dired-do-byte-compile)) ;; create the org-install file (require 'autoload) (setq esf/org-install-file (concat directory "org-install.el")) (find-file esf/org-install-file) (erase-buffer) (mapc (lambda (x) (generate-file-autoloads x)) list-of-org-files) (insert "\n(provide (quote org-install))\n") (save-buffer) (byte-compile-file esf/org-install-file))) --=-=-= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --=-=-=--