0

My config for straight.el is pretty standard

;; Disable package.el in favor of straight.el
(setq package-enable-at-startup nil)

;; Bootstrap straight.el
(defvar bootstrap-version)
(let ((bootstrap-file
      (expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory))
      (bootstrap-version 5))
  (unless (file-exists-p bootstrap-file)
    (with-current-buffer
        (url-retrieve-synchronously
        "https://raw.githubusercontent.com/raxod502/straight.el/develop/install.el"
        'silent 'inhibit-cookies)
      (goto-char (point-max))
      (eval-print-last-sexp)))
  (load bootstrap-file nil 'nomessage))

;; Use straight.el for use-package expressions
(straight-use-package 'use-package)

;; using use-package to configure straight
(use-package straight
  :custom
  (straight-use-package-by-default t)
  (straight-base-dir user-emacs-directory))

I noticed that straight still builds some straight.elc cache file within the repository directory which is set by (straight--repos-dir). Is it possible to have a pure segregation between repos and build for all packages, including straight.el itself?

Tian
  • 288
  • 1
  • 8
  • 2
    Surely `straight.elc` is the byte-compiled version of `straight.el`, just like all normal `.elc` files are the byte-compiled versions of the `.el` equivalents. Is there something different going on here? – phils Nov 14 '21 at 06:44
  • `straight.el` usually stores it's build under the directory set by `(straight--build-dir)`. I was thinking that this should be the case even for the byte compiled version of `straight.el` itself – Tian Nov 14 '21 at 07:42
  • 2
    Where Emacs puts and looks for byte-compiled files has nothing to do with whatever `straight` does. So long as `straight.el` and `straight.elc` are in the same directory, nothing is unusual here. – phils Nov 14 '21 at 10:16
  • 1
    I am slightly confused that there appears to be a *directory* named `straight.el` -- that's a bit strange IMO; but I don't use this library, so I can't say whether or not that's normal. – phils Nov 14 '21 at 10:19
  • you might want to take a look at `straight.el` it's an excellent alternative to `package` as a package manager, that pulls packages directly from github rather than the tarbells, it allows for freezing/reverting of package versions as well. Your comments have been answering in relation to emacs in general, but I am seeking advice with regards to `straight.el` specifically – Tian Nov 14 '21 at 10:38
  • 1
    From what I can see it loads https://github.com/raxod502/straight.el/blob/master/bootstrap.el which byte-compiles `straight.el`. – phils Nov 14 '21 at 14:02

0 Answers0