gnu-emacs-sources
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Require or Install


From: Olivier Ramonat
Subject: Re: Require or Install
Date: Wed, 19 Sep 2007 18:29:14 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/23.0.0 (gnu/linux)

Hi,

Xavier Maillard <address@hidden> writes:
> Hi,
>
>    Use (require-or-install 'my-package) to install my-package.el from
>    EmacsWiki if require fails.
>
> This is a nice thing. But what I really need (and I am willing to
> code it asap) is a batch installer -i.e. something that can be
> called from a cron job or a Makefile.

You can use require-or-install in a batch mode using :

(require 'require-or-install)
(setq install-elisp-repository-directory "~/.emacs.d/auto/")
(add-path install-elisp-repository-directory)

(unless (file-directory-p install-elisp-repository-directory)
  (make-directory install-elisp-repository-directory))

(setq require-or-install-confirm-flag nil)
(setq install-elisp-confirm-flag nil)

But you'll have to trust the EmacsWiki or the others urls.

> Another question, this time on your code. Why do not you
> "overload" the standard `require' function ? I mean, you could
> unbind `require' and install your own `require'-revisited
> function ?
>
>       Xavier

With no parameters require-or-install will try to get the library from
EmacsWiki. You do not want to do this every times a require fails.

Olivier


reply via email to

[Prev in Thread] Current Thread [Next in Thread]