Installation with straight #799
Replies: 8 comments 28 replies
-
The code you copied is out-of-date, namely
The behaviour of EAF also uses its own This works nicely if EAF is installed following the README instructions.
I'm glad to see at least a workaround exists, I hate to see the situation that a package is unusable because of the package manager. It definitely far from the proper way, every time you update EAF and run Unfortunately I don't use straight so I am not confident in what's the best way to do this, I can only guess at the moment.
So is there a If it succeeds, and you |
Beta Was this translation helpful? Give feedback.
-
Okay, thanks.
I think that it specifies which files are transferred when building the package. The content of the folder in I suspect that the recipe I copied is also outdated in that sense, and that back then the But I now realize that streamlining the process might be as easy as adding It could also be possible to take care both of the building and the additional requires by making a recipe pattern for the eaf applications, so that
Yes I tried to use that, but the problem is that the result of
Getting it to work with straight should be easier than with most package managers, because it's essentially trying to take care of the cloning and installation for us. It is easiest for pure elisp packages, but it is also able to install org, vterm or jupyter which also involve system calls. Making a recipe for eaf should be possible.
An easy (as long as we don't care about windows) fix for that is replacing the
Yes and yes and it seemed to (but no folder I suspect that the fact that the json and extension files were not copied over is part of the why. Does the script try to cd where those files are? Or do parts of it silently fail if the files are not present?
It was unchanged when I tried, which I attributed to the fact that the folder was not created (or created somewhere else). I will try to get the recipe to work tomorrow. |
Beta Was this translation helpful? Give feedback.
-
Sure:
Upon restarting emacs, yes. Basically straight sees that the app folder was created, interprets it as a change in the sources, and "rebuilds" (in particular it compiles the new .el files). In particular, running
And restart emacs. Edit: Sorry for messing the conversation flow, I'm not familiar with this feature of github. |
Beta Was this translation helpful? Give feedback.
-
So to comment on your request in syl20bnr/spacemacs#14992. I have found that a problem here is that the
then it works fine. Of course the load path gets added only when eaf.el gets loaded, so to load the packages from the app directory you should wrap them in a
(And the 'autoload' app commands are not available before eaf gets loaded) B.t.w. that latter recipe given in #321 look a little cleaner and works also.
|
Beta Was this translation helpful? Give feedback.
-
I think making use of the |
Beta Was this translation helpful? Give feedback.
-
And when you want to load the apps using use-package, I find that, at least for the browser, you should |
Beta Was this translation helpful? Give feedback.
-
So, to summarize the problem. The steps to take are:
Straight takes care of 1,2 and 3, as well as 6 and 7 if emacs is restarted after 4 and 5. Now, getting the installation script to install the files in the build folder is not too difficult, all we have to do is run it like With those changes, how would you feel about running the installation script the first time the package is run after installing or updating? That would also make it possible to install the package with melpa. |
Beta Was this translation helpful? Give feedback.
-
I got installation working with the following lines of (use-package eaf
:straight (eaf
:type git
:host github
:repo "emacs-eaf/emacs-application-framework"
:files ("*.el" "*.py" "core" "app" "*.json")
:includes (eaf-pdf-viewer eaf-browser) ; Straight won't try to search for these packages when we make further use-package invocations for them
:pre-build (("python" "install-eaf.py" "--install" "pdf-viewer" "browser" "--ignore-sys-deps"))
)
:init (evil-set-initial-state 'eaf-mode 'emacs)) ; Evil mode doesn't work well with eaf keybindings. Load the apps separately with different (use-package eaf-browser
:custom
(eaf-browser-continue-where-left-off t)
(eaf-browser-enable-adblocker t))
(use-package eaf-pdf-viewer) I am not sure about the edit: I deleted the |
Beta Was this translation helpful? Give feedback.
-
Hi,
I am trying to properly install and run eaf with straight, and it is hard to find documentation. I hope that this discussion can both help me and result in a usable guide for other users of straight.
So, first of all, the recipe I use (adapted from #321)
That is not enough, because it does not install the applications. One also needs to run the
install-eaf.py
script. But where? Straight uses separate directories for the source files and the built packages (typically.emacs.d/straight/repos
and.emacs.d/straight/build
).If I run
install-eaf.py
in<repos>/eaf/
I get anapp
directory with all the applications in that folder. However, this does not get added to the load path, because emacs loadseaf.elc
for the library and noteaf.el
, and that file is in<builds>/eaf/
.(require 'eaf)
then looks for anapp
folder in<builds>/eaf/
and does not find any.If I run
install-eaf.py
in<builds>/eaf/
, the directoryapp
is not created (or created somewhere else).(I also have a folder
<repos>/emacs-application-framework
which appeared at some point, but for some reasonstraight
does not build it. That might have to do with the difference in name between the recipeeaf
and the repo.)What seemed to work is to:
./install-eaf.py
in the<repos>/eaf/
folderapp
folder over:cp -r <repos>/eaf/app <builds>/eaf/
Is that the proper way of doing it?
Beta Was this translation helpful? Give feedback.
All reactions