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

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

Re: Force directory recompile


From: Tim Johnson
Subject: Re: Force directory recompile
Date: Thu, 18 Mar 2021 12:42:22 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1



On 3/18/21 11:29 AM, Joost Kremers wrote:
On Thu, Mar 18 2021, Tim Johnson wrote:
Using GNU Emacs 27.1 on ubuntu 20.04
with the following code:

emacs --batch --eval '(byte-recompile-directory "~/.emacs.d")'

fails to recompile anything.

As mentioned in the documentation for `byte-recompile-directory`, it only
recompiles `.el` files if a) there is a corresponding `.elc` file and b) that
`.elc` file is older than the `.el` file. I assume either or both conditions
aren't met. If the second condition is met, simply using `touch` on the source
files should do the trick.

Since I am moving to a new machine with a different emacs version
I anticipate that it is important to recompile all packages I.E. *.el files.
If you use `package.el`, you should be able to reinstall all your packages using
`package-install-selected-packages`.

Thanks Joost, when I OP'd I was having a problem with documentation. Now that
I can read docs the code I was looking for is

emacs --batch --eval '(byte-recompile-directory "~/.emacs.d" 0 t)'

which applies the force option.
cheers

--
Tim (always-a-noob t)
tj49.com




reply via email to

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