unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#44726: 28.0.50; [feature/native-comp] Provide a mechanism to populate comp-eln-load-path from the environment
@ 2020-11-18 21:05 Tad
  2020-11-18 21:15 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2020-11-20 14:43 ` Stefan Monnier
  0 siblings, 2 replies; 10+ messages in thread
From: Tad @ 2020-11-18 21:05 UTC (permalink / raw)
  To: 44726; +Cc: Andrea Corallo

Emacs populates `load-path' at startup from `$EMACSLOADPATH' in the
process environment. It would be useful to have an
`$EMACSNATIVELOADPATH' or equivalent to populate `comp-eln-load-path'.

I have implemented a workaround in NixOS with some code in
`site-start.el', but it would probably be useful in other contexts as
well.

    ;; Append paths set via `EMACSNATIVELOADPATH', an environment
    ;; variable made up for this purpose.
    (when-let ((path-env (getenv "EMACSNATIVELOADPATH"))
               (paths-from-env (split-string path-env))
               (paths (seq-filter (lambda (path) (not (string= "" path)))
                                  paths-from-env)))
      (setq comp-eln-load-path
            (append paths comp-eln-load-path)))

Thanks,
Tad





^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2020-11-30 23:25 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-18 21:05 bug#44726: 28.0.50; [feature/native-comp] Provide a mechanism to populate comp-eln-load-path from the environment Tad
2020-11-18 21:15 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-11-18 21:20   ` Tad
2020-11-18 21:41     ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-11-18 21:45       ` Tad
2020-11-19 19:52         ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-11-19 22:50           ` Tad
2020-11-20 10:03             ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-11-30 23:25               ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-11-20 14:43 ` Stefan Monnier

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).