Compare commits

..

4 commits

Author SHA1 Message Date
4bfcc5f2cd Upgrade to latest Emacs configuration 2023-10-03 22:19:28 -07:00
25d760efc8 Add ‘ace-link’-specific settings 2023-10-03 22:12:22 -07:00
f1e8928c6d Remove unnecessary include 2023-09-29 15:17:09 -07:00
fac6e98dbf Add custom emacs-notmuch package
This fixes a bug that exists in the package that the Notmuch logo doesn't show
up in notmuch-hello. I'll try and make a couple of other changes before opening
a pull request back to Guix to fix it.
2023-09-29 14:35:02 -07:00
4 changed files with 80 additions and 11 deletions

View file

@ -53,7 +53,8 @@
#:select (local-file #:select (local-file
mixed-text-file)) mixed-text-file))
#:use-module ((guix packages) #:use-module ((guix packages)
#:select (package-name)) #:select (package-name
package-input-rewriting))
#:use-module ((guix transformations) #:use-module ((guix transformations)
#:select (options->transformation)) #:select (options->transformation))
#:use-module ((nongnu packages emacs) #:use-module ((nongnu packages emacs)
@ -77,7 +78,8 @@
home-emacs-dashboard-service-type home-emacs-dashboard-service-type
home-emacs-dashboard-configuration home-emacs-dashboard-configuration
home-emacs-eros-service-type home-emacs-eros-service-type
home-emacs-ace-link-service-type)) home-emacs-ace-link-service-type
home-emacs-ace-link-configuration))
#:use-module ((oni home services environment) #:use-module ((oni home services environment)
#:select (home-environment-service)) #:select (home-environment-service))
#:use-module ((oni home services flameshot) #:use-module ((oni home services flameshot)
@ -119,7 +121,8 @@
#:use-module ((oni packages count-emails) #:use-module ((oni packages count-emails)
#:select (count-emails)) #:select (count-emails))
#:use-module ((oni packages emacs) #:use-module ((oni packages emacs)
#:select (emacs-inkplate)) #:select (emacs-inkplate
oni-emacs-notmuch))
#:use-module ((oni packages emacs-config) #:use-module ((oni packages emacs-config)
#:select (emacs-oni-org-roam #:select (emacs-oni-org-roam
emacs-oni-vterm emacs-oni-vterm
@ -195,6 +198,9 @@
`((with-branch . ,(string-append (package-name package) "=master")))) `((with-branch . ,(string-append (package-name package) "=master"))))
package)) package))
(define with-my-emacs-notmuch-package
(package-input-rewriting `((,emacs-notmuch . ,oni-emacs-notmuch))))
(define rincewind-picom-service (define rincewind-picom-service
(service home-picom-service-type (service home-picom-service-type
(home-picom-configuration (home-picom-configuration
@ -262,7 +268,6 @@
tmsu tmsu
mpd-random-albums mpd-random-albums
notmuch notmuch
emacs-notmuch
emacs-inkplate emacs-inkplate
emacs-outli emacs-outli
emacs-guix emacs-guix
@ -277,7 +282,7 @@
emacs-oni-common-lisp emacs-oni-common-lisp
emacs-oni-gui emacs-oni-gui
emacs-oni-magit emacs-oni-magit
emacs-oni-notmuch (with-my-emacs-notmuch-package emacs-oni-notmuch)
emacs-oni-hy emacs-oni-hy
emacs-oni-project emacs-oni-project
emacs-oni-bookmark emacs-oni-bookmark
@ -417,7 +422,11 @@
(service home-emacs-yasnippet-capf-service-type) (service home-emacs-yasnippet-capf-service-type)
(service home-emacs-dashboard-service-type) (service home-emacs-dashboard-service-type)
(service home-emacs-eros-service-type) (service home-emacs-eros-service-type)
(service home-emacs-ace-link-service-type) (service home-emacs-ace-link-service-type
(home-emacs-ace-link-configuration
(default-key "C-S-e")
(goto-address-key "C-S-e")
(org-mode-key "C-S-e")))
(service home-flameshot-service-type) (service home-flameshot-service-type)

View file

@ -4,7 +4,9 @@
define-configuration define-configuration
define-configuration/no-serialization define-configuration/no-serialization
text-config? text-config?
serialize-text-config)) serialize-text-config
define-maybe
maybe-value-set?))
#:use-module ((gnu packages emacs) #:use-module ((gnu packages emacs)
#:select (emacs)) #:select (emacs))
#:use-module ((gnu packages emacs-xyz) #:use-module ((gnu packages emacs-xyz)
@ -48,6 +50,8 @@
home-emacs-ace-link-service-type home-emacs-ace-link-service-type
home-emacs-ace-link-configuration)) home-emacs-ace-link-configuration))
(define-maybe string)
(define-configuration/no-serialization home-emacs-extension (define-configuration/no-serialization home-emacs-extension
(configurations (configurations
(text-config '()) (text-config '())
@ -242,6 +246,15 @@
(package (package
(package emacs-ace-link) (package emacs-ace-link)
"Package to use for setting emacs-ace-link.") "Package to use for setting emacs-ace-link.")
(default-key
(string "o")
"Key to use as the default keybinding.")
(goto-address-key
maybe-string
"Key to use (if any) to bind with goto-address-mode.")
(org-mode-key
maybe-string
"Key to use (if any) to bind with org-mode.")
(configurations (configurations
(text-config '()) (text-config '())
"Configuration for emacs-ace-link.")) "Configuration for emacs-ace-link."))
@ -251,7 +264,22 @@
(configurations (configurations
(append (append
(list (mixed-text-file "ace-link-config" (list (mixed-text-file "ace-link-config"
"(ace-link-setup-default)\n")) ";;;;; ace-link-config starts here.\n"
(format #f "(ace-link-setup-default (kbd ~s))~%"
(home-emacs-ace-link-configuration-default-key config))
(let ((goto-address-key
(home-emacs-ace-link-configuration-goto-address-key config)))
(if (maybe-value-set? goto-address-key)
(string-append (format #f "(defun ace-link-config-set-goto-address-key () (local-set-key (kbd ~s) 'ace-link-addr))~%" goto-address-key)
"(add-hook 'goto-address-prog-mode-hook #'ace-link-config-set-goto-address-key)\n"
"(add-hook 'goto-address-mode-hook #'ace-link-config-set-goto-address-key)\n")
""))
(let ((org-mode-key
(home-emacs-ace-link-configuration-org-mode-key config)))
(if (maybe-value-set? org-mode-key)
(format #f "(with-eval-after-load 'org (define-key org-mode-map (kbd ~s) 'ace-link-org))\n" org-mode-key)
""))
";;;;; ace-link-config ends here.\n"))
(home-emacs-ace-link-configuration-configurations config))))) (home-emacs-ace-link-configuration-configurations config)))))
(define (add-emacs-ace-link-packages config) (define (add-emacs-ace-link-packages config)

View file

@ -13,7 +13,7 @@
#:use-module (oni packages go)) #:use-module (oni packages go))
(define-public emacs-oni-config (define-public emacs-oni-config
(let ((commit "76e4f129563be48048a5f2142924aa3cebee6bb2") (let ((commit "62ec19f8ddc1f19cfcc6399879783d788263f7c2")
(revision "0")) (revision "0"))
(package (package
(name "emacs-oni-config") (name "emacs-oni-config")
@ -26,7 +26,7 @@
(commit commit))) (commit commit)))
(file-name (git-file-name name version)) (file-name (git-file-name name version))
(sha256 (sha256
(base32 "01f6j91wzlnbnidv2kvnm6xdcqb9qpb0a9hsa36l7jm1x94xxfwx")))) (base32 "0j6azmfyf9vlk2n306lijk06m1ci9pm0ywllvpra37s6sn1c2l2c"))))
(build-system emacs-build-system) (build-system emacs-build-system)
(home-page "https://code.ryuslash.org/ryuslash/emacs-config") (home-page "https://code.ryuslash.org/ryuslash/emacs-config")
(synopsis "My Emacs configuration") (synopsis "My Emacs configuration")

View file

@ -2,10 +2,14 @@
#:use-module (guix packages) #:use-module (guix packages)
#:use-module (guix utils) #:use-module (guix utils)
#:use-module (guix download) #:use-module (guix download)
#:use-module ((guix gexp)
#:select (gexp))
#:use-module (guix git-download) #:use-module (guix git-download)
#:use-module (guix build-system emacs) #:use-module (guix build-system emacs)
#:use-module ((guix licenses) #:prefix license:) #:use-module ((guix licenses) #:prefix license:)
#:use-module (gnu packages emacs-xyz)) #:use-module (gnu packages emacs-xyz)
#:use-module ((gnu packages mail)
#:select (notmuch)))
(define-public emacs-inkplate (define-public emacs-inkplate
(let ((commit "0897721a7b3d84aa3f200ae85fddd5fdd370fc42") (let ((commit "0897721a7b3d84aa3f200ae85fddd5fdd370fc42")
@ -412,3 +416,31 @@ new-theme for a while. I couldn't think of a name so I named it after him.")
(synopsis "Completion-At-Point Extension for YASnippet") (synopsis "Completion-At-Point Extension for YASnippet")
(description "A simple capf (Completion-At-Point Function) for completing yasnippet snippets.") (description "A simple capf (Completion-At-Point Function) for completing yasnippet snippets.")
(license license:gpl3)))) (license license:gpl3))))
(define-public oni-emacs-notmuch
(package
(inherit notmuch)
(name "oni-emacs-notmuch")
(build-system emacs-build-system)
(native-inputs '())
(inputs
(list notmuch))
(arguments
(list
#:exclude #~(cons* "make-deps.el" "rstdoc.el" %default-exclude)
#:include #~(cons* "notmuch-logo.svg" %default-include)
#:phases
#~(modify-phases %standard-phases
(add-after 'unpack 'chdir
(lambda _
(chdir "emacs")))
(add-after 'chdir 'patch-paths
(lambda* (#:key inputs #:allow-other-keys)
(let ((notmuch (search-input-file inputs "/bin/notmuch")))
(substitute* "notmuch-lib.el"
(("\"notmuch\"")
(string-append "\"" notmuch "\"")))))))))
(synopsis "Run Notmuch within Emacs")
(description
"This package provides an Emacs-based interface to the Notmuch mail
system.")))