From 5755831bb64b1f6152057b3b5055e9dddc7ecc70 Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Sun, 28 Jan 2024 00:39:45 -0800 Subject: [PATCH] =?UTF-8?q?Add=20=E2=80=98ace-link-notmuch=E2=80=99=20pack?= =?UTF-8?q?age=20and=20configuration?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- oni/home/config/rincewind.scm | 5 ++++ oni/home/services/emacs.scm | 47 ++++++++++++++++++++++++++++++++++- oni/packages/emacs.scm | 24 ++++++++++++++++++ 3 files changed, 75 insertions(+), 1 deletion(-) diff --git a/oni/home/config/rincewind.scm b/oni/home/config/rincewind.scm index c27412f..a18e196 100644 --- a/oni/home/config/rincewind.scm +++ b/oni/home/config/rincewind.scm @@ -88,6 +88,8 @@ home-emacs-eros-service-type home-emacs-ace-link-service-type home-emacs-ace-link-configuration + home-emacs-ace-link-notmuch-service-type + home-emacs-ace-link-notmuch-configuration home-emacs-golden-ratio-service-type home-emacs-pinentry-service-type home-emacs-vterm-service-type @@ -423,6 +425,9 @@ (default-key "C-S-e") (goto-address-key "C-S-e") (org-mode-key "C-S-e"))) + (service home-emacs-ace-link-notmuch-service-type + (home-emacs-ace-link-notmuch-configuration + (default-key "C-S-e"))) (service home-emacs-golden-ratio-service-type) (service home-emacs-pinentry-service-type) (service home-emacs-vterm-service-type diff --git a/oni/home/services/emacs.scm b/oni/home/services/emacs.scm index b7ee6fb..2155b4c 100644 --- a/oni/home/services/emacs.scm +++ b/oni/home/services/emacs.scm @@ -36,7 +36,8 @@ #:select (package?)) #:use-module ((oni packages emacs) #:select (emacs-yasnippet-capf - emacs-golden-ratio)) + emacs-golden-ratio + emacs-ace-link-notmuch)) #:export (home-emacs-service-type home-emacs-configuration @@ -56,6 +57,9 @@ home-emacs-ace-link-service-type home-emacs-ace-link-configuration + home-emacs-ace-link-notmuch-service-type + home-emacs-ace-link-notmuch-configuration + home-emacs-golden-ratio-service-type home-emacs-golden-ratio-configuration @@ -325,6 +329,47 @@ (default-value (home-emacs-ace-link-configuration)) (description "Install and configure emacs-ace-link."))) +;;; Emacs Ace-link notmuch + +(define-configuration/no-serialization home-emacs-ace-link-notmuch-configuration + (package + (package emacs-ace-link-notmuch) + "Package to use for setting emacs-ace-link-notmuch.") + (default-key + (string "o") + "Key to use as the default keybinding.") + (configurations + (text-config '()) + "Configuration for emacs-ace-link-notmuch.")) + +(define (add-emacs-ace-link-notmuch config) + (home-emacs-extension + (configurations + (append + (list (mixed-text-file "ace-link-notmuch-config" + ";;;;; ace-link-notmuch-config starts here.\n" + (format #f "(ace-link-notmuch-setup-default (kbd ~s))~%" + (home-emacs-ace-link-notmuch-configuration-default-key config)) + ";;;;; ace-link-notmuch-config ends here.\n")) + (home-emacs-ace-link-notmuch-configuration-configurations config))))) + +(define (add-emacs-ace-link-notmuch-packages config) + (list (home-emacs-ace-link-notmuch-configuration-package config))) + +(define home-emacs-ace-link-notmuch-service-type + (service-type + (name 'home-emacs-ace-link-notmuch) + (extensions + (list (service-extension + home-emacs-service-type + add-emacs-ace-link-notmuch) + (service-extension + home-profile-service-type + add-emacs-ace-link-notmuch-packages))) + (compose identity) + (default-value (home-emacs-ace-link-notmuch-configuration)) + (description "Install and configure emacs-ace-link-notmuch."))) + ;;; Emacs Golden Ratio (define-configuration/no-serialization home-emacs-golden-ratio-configuration diff --git a/oni/packages/emacs.scm b/oni/packages/emacs.scm index 913d1d8..5fe317b 100644 --- a/oni/packages/emacs.scm +++ b/oni/packages/emacs.scm @@ -519,3 +519,27 @@ headings, and emulates org-mode navigation and structure editing. It is based on the built-in outline-minor-mode and is simple by design, providing just a few key features.") (license license:gpl3+))) + +(define-public emacs-ace-link-notmuch + (let ((commit "fb09673881ef0f7b7ad744c576a19f578df7c51d") + (revision "0")) + (package + (name "emacs-ace-link-notmuch") + (version (git-version "0.0.0" revision commit)) + (source + (origin + (uri (git-reference + (url "https://git.sr.ht/~ryuslash/ace-link-notmuch") + (commit commit))) + (method git-fetch) + (sha256 + (base32 "1wpdimvwkrbic0hybsp5pqaql066yvl1aar37fr5kcm19gbgvcf6")) + (file-name (git-file-name name version)))) + (propagated-inputs + (list emacs-ace-link)) + (build-system emacs-build-system) + (synopsis "ace-link functionality for notmuch") + (description + "ace-link functionality for notmuch") + (license license:gpl3+) + (home-page "https://sr.ht/~ryuslash/ace-link-notmuch/"))))