this post was submitted on 28 Oct 2023
0 points (50.0% liked)

Emacs

314 readers
2 users here now

A community for the timeless and infinitely powerful editor. Want to see what Emacs is capable of?!

Get Emacs

Rules

  1. Posts should be emacs related
  2. Be kind please
  3. Yes, we already know: Google results for "emacs" and "vi" link to each other. We good.

Emacs Resources

Emacs Tutorials

Useful Emacs configuration files and distributions

Quick pain-saver tip

founded 1 year ago
MODERATORS
 

I am trying to replace straight with Elpaca but I have some troubles with loading some of my local packages that are not from Melpa.

The use-case is to load laas a package for latex snippets. I use the following code

(use-package aas
:elpaca nil
:load-path  (lambda () (expand-file-name "custom/" user-emacs-directory))
)

(use-package laas
:elpaca nil
:load-path  (lambda () (expand-file-name "custom/" user-emacs-directory))
:config
(aas-set-snippets 'laas-mode
;; set condition!
:cond #'texmathp ; expand only while in math
"On" "O(n)"
"O1" "O(1)"
;; bind to functions!
"Sum" (lambda () (interactive)
(yas-expand-snippet "\\sum_{$1}^{$2} $0"))
"Span" (lambda () (interactive)
(yas-expand-snippet "\\Span($1)$0"))
"lr(" (lambda () (interactive)
(yas-expand-snippet "\\left($0\\right)"))
"lr[" (lambda () (interactive)
(yas-expand-snippet "\\left[$0\\right]"))
"lr{" (lambda () (interactive)
(yas-expand-snippet "\\left\\{$0\\right\\}"))
)
(laas-mode)
)

Both files `aas.el` and `laas.el` are in my `(lambda () (expand-file-name "custom/" user-emacs-directory))` durectory and with straight these lines of code worked well but when I switched to Elpaca, laas was not loaded anymore. I tried to add :after tex, do not change anything. I tried to add a hook for latex mode and it also do not change, the laas package is not even loaded.

Can someone help me with this please?

no comments (yet)
sorted by: hot top controversial new old
there doesn't seem to be anything here