[Top][All Lists]

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

Re: run/load a lisp script before user init file

From: Stefan Monnier
Subject: Re: run/load a lisp script before user init file
Date: Mon, 07 Oct 2013 18:52:36 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

> What's a "reinstallation"?

Installing his package a second time.

>> So I need to find my previous code, erase it.
> No, you don't.  You could use 'require' instead of 'load'.

He's talking about adding the "(load ...)" string into the site-load.el
file.  He clearly doesn't want to add it a second time if it's already
present due to some pre-existing installation.  But using "(require
...)" makes no difference to the problem.  Especially because he want to
be able to *replace* the string added by a previous install.

>> What a complicated process. And this complication makes a lot of
>> error opportunities. Any error in this file makes emacs not start at
>> all. That's dangerous.
> Once again, if you wrap this with ignore-errors, Emacs will always
> start.  No danger here.

If the removal/replacement messes things up, the site-load.el might end
up syntactically invalid.  No amount of `ignore-errors' in there will help.

IOW he simply needs to add the simplest code possible (e.g. a single
`load' or `require' line, with the `noerror' arg set to non-nil), so
it's easy to remove.


reply via email to

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