Timeline for byte-recompilation of files under a directory
Current License: CC BY-SA 3.0
20 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Oct 14, 2016 at 8:41 | comment | added | GergelyPolonkai |
@wvxvw I’m not necessarily speaking of this scenario. There are cases when I need a bunch of file names I would normally find with find(1) . And in most of those cases things like Projectile is an overkill (or doesn’t even work).
|
|
Oct 14, 2016 at 8:40 | comment | added | GergelyPolonkai | Unfortunately, I can’t. I use 25.1 at home, but I can’t do the same on my office machine. And I usually update/byte-compile at home. | |
Oct 14, 2016 at 0:04 | comment | added | phils |
Why is it "obvious" that you don't version-control your byte-compiled files? If you use the same version of Emacs (or newer) as the version which compiled the files, then your .elc files are portable, unless you have added some compile-time behaviours which are system-specific.
|
|
Oct 13, 2016 at 23:52 | history | edited | Drew | CC BY-SA 3.0 |
edited tags; edited title
|
Oct 13, 2016 at 20:53 | comment | added | Drew |
Yes, byte-recompile-directory is all you need. And yes, it is recursive. And yes, it won't compile any file that has not yet been compiled (for which there is no *.elc ).
|
|
Oct 13, 2016 at 20:25 | comment | added | wvxvw | Pure Emacs Lisp solution - I don't know. But, in general, this is a task for a build system (of which there are many). All of them have their flaws, but just for the sake of example: you could have SCons track the state of your sources / binaries and recompile them if needed. With some work you could even make it smart enough to figure if the change requires recompilation (eg. if a comment or a docstring were changed - no compilation is needed). | |
Oct 13, 2016 at 17:01 | comment | added | GergelyPolonkai |
Yes, I already switched my own function to byte-recompile-directory ; yet, I'm curious of an answer for the question for other use cases.
|
|
Oct 13, 2016 at 16:56 | comment | added | Dan♦ |
Can I avoid outdated byte-compiled elisp files? doesn't answer the specific question about an elisp equivalent of find , but I think it answers your use case of keeping up-to-date .elc files.
|
|
Oct 13, 2016 at 16:46 | comment | added | GergelyPolonkai |
I'm currently experimenting with use-package . I don't feel it home ground yet, hence I still carry this burden for a while :)
|
|
Oct 13, 2016 at 16:37 | comment | added | T. Verron |
@GergelyPolonkai You don't need to carry your packages with you, though. You could try cask or use-package for packages available on the repos, and el-get for packages which aren't (non-exhaustive list of options).
|
|
Oct 13, 2016 at 16:35 | comment | added | T. Verron |
@JeanPierre Agreed. :)
|
|
Oct 13, 2016 at 16:35 | comment | added | GergelyPolonkai |
I don't compile my init.el , but packages compiles a lot of files (obviously). I sometimes get errors due to this, so I'd like to recompile those files.
|
|
Oct 13, 2016 at 16:32 | comment | added | Tianxiang Xiong |
Have you looked at auto-compile ? Also, you should avoid compiling your init file.
|
|
Oct 13, 2016 at 16:02 | comment | added | JeanPierre | @T.Verron Well, that subdirectories of the provided directory are scanned, but not their own subdirectories. I agree this would be unexpected but I would be more comfortable with the docstring using the word "recursively". | |
Oct 13, 2016 at 15:54 | comment | added | T. Verron | @JeanPierre What else could it mean? | |
Oct 13, 2016 at 15:51 | comment | added | JeanPierre | @T.Verron The docstring says subdirectories are processed but does not say explicitely this applies recursively. Looking at the code, it seems it does, though. | |
Oct 13, 2016 at 15:51 | comment | added | T. Verron | The doc says that it is. | |
Oct 13, 2016 at 15:27 | comment | added | GergelyPolonkai | Am i right to assume it is recursive? The problem usually comes up with ELPA/MELPA packages, of which all has a separate directory. | |
Oct 13, 2016 at 15:17 | comment | added | T. Verron |
byte-recompile-directory may save you some trouble.
|
|
Oct 13, 2016 at 15:14 | history | asked | GergelyPolonkai | CC BY-SA 3.0 |