Skip to content

Commit d21ccad

Browse files
committed
docs(readme): update custom eln cache location instructions
Recent builds seem to pre-allocate empty `*.eln.tmp` files rather than empty `*.eln` files. So the issue of empty `*.eln` files preventing Emacs from starting should no longer be an issue. I'm leaving #3 open for now, in case anyone is using older git SHAs from the list of known good commits in #6.
1 parent 036d2a8 commit d21ccad

File tree

1 file changed

+3
-16
lines changed

1 file changed

+3
-16
lines changed

README.md

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -160,26 +160,13 @@ By default natively compiled `*.eln` files will be cached in
160160
the first element of the `comp-eln-load-path` variable. The path string must end
161161
with a `/`.
162162

163-
Also it seems somewhat common that some `*.eln` files are left behind with a
164-
zero-byte file size if Emacs is quit while async native compilation is in
165-
progress. Such empty files causes errors on startup, and needs to be deleted.
166-
167163
Below is an example which stores all compiled `*.eln` files in `cache/eln-cache`
168-
within your Emacs configuration directory, and also deletes any `*.eln` files in
169-
said directory which have a file size of zero bytes:
164+
within your Emacs configuration directory:
170165

171166
```elisp
172167
(when (boundp 'comp-eln-load-path)
173-
(let ((eln-cache-dir (expand-file-name "cache/eln-cache/"
174-
user-emacs-directory))
175-
(find-exec (executable-find "find")))
176-
(setcar comp-eln-load-path eln-cache-dir)
177-
;; Quitting emacs while native compilation in progress can leave zero byte
178-
;; sized *.eln files behind. Hence delete such files during startup.
179-
(when find-exec
180-
(call-process find-exec nil nil nil eln-cache-dir
181-
"-name" "*.eln" "-size" "0" "-delete" "-or"
182-
"-name" "*.eln.tmp" "-size" "0" "-delete"))))
168+
(setcar comp-eln-load-path
169+
(expand-file-name "cache/eln-cache/" user-emacs-directory)))
183170
```
184171

185172
### Issues

0 commit comments

Comments
 (0)