!ZmUSesoOjmVsKbzFbp:nixos.org

Nix Emacs

785 Members
All things Nix/Emacs! https://github.com/nix-community/emacs-overlay | For Doom Emacs: https://matrix.to/#/#doom-emacs:nixos.org176 Servers

Load older messages


SenderMessageTime
31 Oct 2024
@icy-thought:matrix.orgIcy-Thought joined the room.01:40:11
@brsvh:mozilla.orgBurgess Chang Hi, when installing elpaPackages.setup, I encountered the error:
Error: error ("file has no `lexical-binding' directive on its first line")

It seems this issue was caused by byte-compiling setup-pkg.el. However, setup-pkg.el has the correct no-byte-compile setting, as shown below:

;; Generated package description from setup.el  -*- no-byte-compile: t -*-
(define-package "setup" "1.4.0" "Helpful Configuration Macro" '((emacs "26.1")) :commit "858ea70760426a9e1fa1ce1f21fb8f8d62bd1803" :authors '(("Philip Kaludercic" . "philipk@posteo.net")) :maintainer '("Philip Kaludercic" . "~pkal/public-inbox@lists.sr.ht") :keywords '("lisp" "local") :url "https://git.sr.ht/~pkal/setup")

I am puzzled, has anyone encountered a similar issue?

Detailed log: https://paste.mozilla.org/Hux9R7rS
07:13:36
@jgosset:matrix.orgjgosset joined the room.12:00:45
@me:linj.techlinj
In reply to @brsvh:mozilla.org
Hi, when installing elpaPackages.setup, I encountered the error:
Error: error ("file has no `lexical-binding' directive on its first line")

It seems this issue was caused by byte-compiling setup-pkg.el. However, setup-pkg.el has the correct no-byte-compile setting, as shown below:

;; Generated package description from setup.el  -*- no-byte-compile: t -*-
(define-package "setup" "1.4.0" "Helpful Configuration Macro" '((emacs "26.1")) :commit "858ea70760426a9e1fa1ce1f21fb8f8d62bd1803" :authors '(("Philip Kaludercic" . "philipk@posteo.net")) :maintainer '("Philip Kaludercic" . "~pkal/public-inbox@lists.sr.ht") :keywords '("lisp" "local") :url "https://git.sr.ht/~pkal/setup")

I am puzzled, has anyone encountered a similar issue?

Detailed log: https://paste.mozilla.org/Hux9R7rS
looks like https://debbugs.gnu.org/cgi/bugreport.cgi?bug=67916, but that says this should be a warning instead of error
12:02:46
@brsvh:mozilla.orgBurgess Chang
In reply to @me:linj.tech
looks like https://debbugs.gnu.org/cgi/bugreport.cgi?bug=67916, but that says this should be a warning instead of error
Got it. For now, I'm skip it temporarily by overriding `ignoreCompilationError`. Is there an attribute available to control warnings as errors?
12:15:02
@me:linj.techlinjnot that I know of12:16:55
@me:linj.techlinjIt is weird that it is indeed a warning for some other packages that I tested12:19:46
@brsvh:mozilla.orgBurgess Chang yes, I only found setup.el. 12:23:18
@yut0:matrix.orgyut0 joined the room.23:36:41
@yut0:matrix.orgyut0 Is there a way to build emacs with configurations such that the entire thing (binary + config) is distributable? i.e. Similar to how kickstart-nix.nvim produces a package that includes the config file so that any file in ~/.config/nvim won't affect the behavior of the package? 23:45:05
@yut0:matrix.orgyut0 In other words, I'm wondering if there's a way to make an emacs package such that ~/.emacs.d or whatever file configures emacs in my home directory doesn't affect the emacs in my package? 23:45:59
1 Nov 2024
@rczb:envs.netrczb How can Nix quotes be handled properly in Emacs? Smartparens seems not very smart for this case. In fact, its smartness causes wrong matching of '' (and some other cases as well) and it acts worse than the stupid nvim-autopairs of Neovim. 01:17:29
@rczb:envs.netrczb I think it would need complicate configuration of "permissions" to work well. Is there any solution that can recognize the tree-sitter grammar and "just know" how to match quotes? 01:20:16
@antifuchs:asf.computerantifuchsI had a little smartparens thing that was supposed to keep them balanced, but neither that nor electric-pair do it well02:42:31
@antifuchs:asf.computerantifuchsI did try to write this tree-sitter thing too, but the issue with it is that there just are a ton (more than I could come up with) of ways for a buffer to no longer parse, and you’d have to store previous parse states to compare the damaged regions, and then that is not easy/possible because the tree is only valid for the current buffer contents02:44:26
@antifuchs:asf.computerantifuchsLike, it’d be really really cool if there was a thing. Maybe with a “shadow” buffer that gets updated when there’s a valid parse? But again, many kinds of damage - made worse by a pair of single quotes being ambiguous02:45:42
@rczb:envs.netrczb Nix IDE of VSCodium just work well. I don't konw how it does. However, Nix IDE with nil randomly reports some parsing errors. 03:22:24
@brsvh:mozilla.orgBurgess Chang
In reply to@yut0:matrix.org
In other words, I'm wondering if there's a way to make an emacs package such that ~/.emacs.d or whatever file configures emacs in my home directory doesn't affect the emacs in my package?
This is feasible, in fact, I’m doing it now. I package all configurations into a single epkg, then require it in the user-init-file.
05:17:52
@brsvh:mozilla.orgBurgess ChangHowever, this approach has some limitations. If the configuration depends on external programs, it is hard to set the real store path within Emacs Lisp files.05:19:29
@brsvh:mozilla.orgBurgess Chang May be it is necessary to create an wrapper for emacs to add additional drv paths to the PATH. 05:21:13
@brsvh:mozilla.orgBurgess Chang If you're looking for a portable configuration, I suggest taking a look at emacs-twist.

https://github.com/emacs-twist/twist.nix
05:25:41
@yut0:matrix.orgyut0Thanks! That looks like what I'm looking for18:34:33
2 Nov 2024
@wleslie:matrix.orgwleslie joined the room.03:53:13
@wleslie:matrix.orgwleslieGreetings! I'm somewhat new to nix. I used the emacs overlay in a VM a few months ago and loved it, and now I'm trying to get it set up on a new VM. Is there a recommended version of the overlay that works against nixos-24.05? I'm getting `error: function 'anonymous lambda' called with unexpected argument 'nongnuDevelPackages' as above. I've run nix-channel --update and built with my emacsWithPackagesFromUsePackage expression commented out, so as far as I can tell I'm up to date.04:04:45
@wleslie:matrix.orgwleslie * Greetings! I'm somewhat new to nix. I used the emacs overlay in a VM a few months ago and loved it, and now I'm trying to get it set up on a new VM. Is there a recommended version of the overlay that works against nixos-24.05? I'm getting `error: function 'anonymous lambda' called with unexpected argument 'nongnuDevelPackages'` as above. I've run nix-channel --update and built with my emacsWithPackagesFromUsePackage expression commented out, so as far as I can tell I'm up to date. 04:05:20
@adis:blad.isadisbladis
In reply to @wleslie:matrix.org
Greetings! I'm somewhat new to nix. I used the emacs overlay in a VM a few months ago and loved it, and now I'm trying to get it set up on a new VM. Is there a recommended version of the overlay that works against nixos-24.05? I'm getting `error: function 'anonymous lambda' called with unexpected argument 'nongnuDevelPackages'` as above. I've run nix-channel --update and built with my emacsWithPackagesFromUsePackage expression commented out, so as far as I can tell I'm up to date.
Update your channel. The addition of nongnu devel was backported https://github.com/NixOS/nixpkgs/pull/331072
04:09:09
@wleslie:matrix.orgwleslie
In reply to @adis:blad.is
Update your channel. The addition of nongnu devel was backported https://github.com/NixOS/nixpkgs/pull/331072
Thank you for your reply. I'm sorry, is this not updating my channel?
$ nix-channel --update nixos
unpacking channels...
$ nix-channel --list
nixos https://nixos.org/channels/nixos-24.05
$
05:15:50
@wleslie:matrix.orgwleslie
In reply to @wleslie:matrix.org
Thank you for your reply. I'm sorry, is this not updating my channel?
$ nix-channel --update nixos
unpacking channels...
$ nix-channel --list
nixos https://nixos.org/channels/nixos-24.05
$
ah, sorry, it's different for root, I see
05:16:35
@wleslie:matrix.orgwleslie
In reply to @wleslie:matrix.org
ah, sorry, it's different for root, I see
we have emacs! thank you muchly.
05:48:15
3 Nov 2024
@oneeyed:matrix.orgSam joined the room.14:35:08

Show newer messages


Back to Room ListRoom Version: 6