* Force directory recompile
@ 2021-03-18 18:20 Tim Johnson
2021-03-18 19:29 ` Joost Kremers
2021-03-18 20:36 ` [External] : " Drew Adams
0 siblings, 2 replies; 6+ messages in thread
From: Tim Johnson @ 2021-03-18 18:20 UTC (permalink / raw)
To: MLEmacs
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.
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.
please advise
thanks
--
Tim
tj49.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Force directory recompile
2021-03-18 18:20 Force directory recompile Tim Johnson
@ 2021-03-18 19:29 ` Joost Kremers
2021-03-18 20:42 ` Tim Johnson
2021-03-18 20:36 ` [External] : " Drew Adams
1 sibling, 1 reply; 6+ messages in thread
From: Joost Kremers @ 2021-03-18 19:29 UTC (permalink / raw)
To: Tim Johnson; +Cc: help-gnu-emacs
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`.
--
Joost Kremers
Life has its moments
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [External] : Force directory recompile
2021-03-18 18:20 Force directory recompile Tim Johnson
2021-03-18 19:29 ` Joost Kremers
@ 2021-03-18 20:36 ` Drew Adams
2021-03-18 20:46 ` Tim Johnson
1 sibling, 1 reply; 6+ messages in thread
From: Drew Adams @ 2021-03-18 20:36 UTC (permalink / raw)
To: Tim Johnson, MLEmacs
> 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.
No, I don't think so. Emacs Lisp byte code works across platforms.
Your *.elc should work wherever you try them.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Force directory recompile
2021-03-18 19:29 ` Joost Kremers
@ 2021-03-18 20:42 ` Tim Johnson
0 siblings, 0 replies; 6+ messages in thread
From: Tim Johnson @ 2021-03-18 20:42 UTC (permalink / raw)
To: help-gnu-emacs
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [External] : Force directory recompile
2021-03-18 20:36 ` [External] : " Drew Adams
@ 2021-03-18 20:46 ` Tim Johnson
2021-03-18 20:53 ` Drew Adams
0 siblings, 1 reply; 6+ messages in thread
From: Tim Johnson @ 2021-03-18 20:46 UTC (permalink / raw)
To: help-gnu-emacs
On 3/18/21 12:36 PM, Drew Adams wrote:
>> 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.
> No, I don't think so. Emacs Lisp byte code works across platforms.
> Your *.elc should work wherever you try them.
Thanks Drew, to be clear, I was concerned about differences in the version,
not the platform. I am moving from version 26.3 and a custom compile to
a ubuntu-installed 27.1
Anyway, adding the additional two arguments did the trick in less than a
minute.
regards
--
Tim
tj49.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [External] : Force directory recompile
2021-03-18 20:46 ` Tim Johnson
@ 2021-03-18 20:53 ` Drew Adams
0 siblings, 0 replies; 6+ messages in thread
From: Drew Adams @ 2021-03-18 20:53 UTC (permalink / raw)
To: Tim Johnson, help-gnu-emacs@gnu.org
> >> 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.
> > No, I don't think so. Emacs Lisp byte code works across platforms.
> > Your *.elc should work wherever you try them.
>
> Thanks Drew, to be clear, I was concerned about differences in the version,
> not the platform. I am moving from version 26.3 and a custom compile to
> a ubuntu-installed 27.1
>
> Anyway, adding the additional two arguments did the trick in less than a
> minute.
Sorry, I misread - skipped "with a different emacs version."
(That said, *.elc is often forward-compatible. But yes, it
makes sense to compile in the same version.)
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-03-18 20:53 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-18 18:20 Force directory recompile Tim Johnson
2021-03-18 19:29 ` Joost Kremers
2021-03-18 20:42 ` Tim Johnson
2021-03-18 20:36 ` [External] : " Drew Adams
2021-03-18 20:46 ` Tim Johnson
2021-03-18 20:53 ` Drew Adams
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.