28 Oct 2024 |
tactfulvessel | thanks | 08:09:01 |
linj | rev is git tag or commit | 08:09:29 |
linj | btw, do not use trivialBuild | 08:09:57 |
linj | I will change that part of the wiki | 08:10:30 |
tactfulvessel | I think i will try switching to doom emacs since the new overlay nix-doom-emacs-unstraightened fixed a lot of issues in nix-doom-emacs | 08:10:55 |
linj | melpaBuild is a good default | 08:10:58 |
tactfulvessel | melpaBuild instead of trivial build, ryt? | 08:11:28 |
tactfulvessel | btw the example in the wiki did not say anything about the configurePhase or installPhase or anything? Does melpaBuild take care of putting things in the right place? | 08:12:44 |
linj | In reply to @tactfulvessel:matrix.org btw the example in the wiki did not say anything about the configurePhase or installPhase or anything? Does melpaBuild take care of putting things in the right place? yes if the package follows the convention | 08:14:10 |
linj | if a package is not on melpa or elpa, it is possible that it does not follow convention though | 08:16:03 |
tactfulvessel | that's why i think I try to switch to doom-emacs using nix-doom-emacs-unstraightened\ | 08:17:24 |
oddparity | When by mistake infinite loop just kill emacs, and then sly will start from zero, I think. Also, is there an easier way, to terminate infinite loop? Also does anyone know in common lisp if (loop for i from 0 do (funcall x) until (> i 3)) can just not have the i-based condition (and for example have a boolean value) so that you can simply have the do {} until(...); functionally and also calculate how many steps you have looped with the until condition? such as (loop for i from 1 do (print i) (funcall x) until otherCondition) I was trying to check this but then I made an infinite loop by mistake | 23:55:59 |
29 Oct 2024 |
rrix | jamming Ctrl-g or send the process SIGUSR1 is usually good enough for me, i have to do something stupid with the undo stack to get emacs so tied up that even those don't work | 00:41:04 |
| @swendel:curious.bio left the room. | 06:24:18 |
@ihar.hrachyshka:matrix.org | let's say I want to give emacs access to some additional dependencies (binaries like go or fd etc. whatever is NOT installed in global home.packages). I figured I can drop these into buildInputs and it kinda works. But this means recompiling emacs every time I need a new thing, plus seems not correct to inject on build when I need these on execution only. Of course, there's always an option to pollute the environment with these, and it also works.
I tried .emacsWithPackages but it doesn't seem to work (is it just for epkgs?)
How do you folks add dependencies for emacs runtime?
| 15:25:38 |
| @rvlobato:matrix.org left the room. | 15:57:52 |
bestlem | Ihar Hrachyshka: One way is to use direnv - emacs has a package envrc and nix has added nix-direnv. When you change to a buffer in a project the environment including exec-path is added to. Thus you only put go on your path when your project needs it. Your emacs packages do all need to be loaded in one lump - I suspect dynamic does not work here as they are all in the same p[rocess and namespace. | 16:36:13 |
@ihar.hrachyshka:matrix.org | this may be complicated by the fact that it's emacs server running as launchd daemon. AFAIU its PATH is determined on server startup, not client connect? | 16:58:18 |
zororg | Yes. But direnv+envrc, makes file visiting buffer change environment variables. | 17:02:27 |
zororg | So you get shell.nix inside emacs (client) buffer | 17:02:55 |
@ihar.hrachyshka:matrix.org | ack, I'll try that. so look like there's no generic way to make a wrapped version of a package with modified PATH scope? | 17:05:53 |
@ihar.hrachyshka:matrix.org | * ack, I'll try that. so looks like there's no generic way to make a wrapped version of a package with modified PATH scope? | 17:06:18 |
zororg | There is. Imo most of the nix packages are wrappers with dependencies and path variables. | 17:07:32 |
zororg | But direnv makes it easy to have project or directory specific environment setup | 17:08:16 |
@ihar.hrachyshka:matrix.org | Ack, thanks for the info.
A slight drawback I see is that direnv requires some additional prep work for env files, and it may require negotiation with projects to include shell.nix / carry your own untracked env settings. This is definitely the way to go for more granular deps, but since I work with python and golang projects every day, and LSP setup for these (and other languages) is table stakes for me, I'd be happy to have golang, pyright, fd etc. embedded into path for any emacs buffer and deal with direnv for more granular tweaks. | 17:13:30 |
zororg | with shell.nix you can have shell with those packages. Just enable direnv in home config, and you are good to go | 17:18:59 |
bestlem | and to load the path from a shell.nix (or dev shell in flake,nix) if not on Linux e.g. on macOS The author of envrc also has the emacs package exec-path-from-shell that will add the environment variables from your shell to those in the emacs daemon | 17:31:08 |
31 Oct 2024 |
| @icy_thought:matrix.org joined the room. | 00:25:27 |
| @icy_thought:matrix.org set a profile picture. | 00:39:29 |
| @icy_thought:matrix.org left the room. | 01:27:21 |