From 22c97d03c3202fb551a32b0b9d57f1d9ec543f7b Mon Sep 17 00:00:00 2001 From: Abdelhak Bougouffa Date: Sat, 7 Dec 2024 15:03:56 +0100 Subject: [PATCH] refactor: move `crdt` from `me-docs` to `me-editor` --- modules/me-docs.el | 14 -------------- modules/me-editor.el | 10 ++++++++++ 2 files changed, 10 insertions(+), 14 deletions(-) diff --git a/modules/me-docs.el b/modules/me-docs.el index eb453962..9b85542a 100644 --- a/modules/me-docs.el +++ b/modules/me-docs.el @@ -30,20 +30,6 @@ (pdfgrep-mode 1)) -(defconst +tuntox-available-p (and (executable-find "tuntox") t)) -(defconst +stunnel-available-p (and (executable-find "stunnel") t)) - - -;; Collaborative editing using Conflict-free Replicated Data Types -(use-package crdt - :straight t - :when (or +tuntox-available-p +stunnel-available-p) - :custom - (crdt-tuntox-password-in-url t) - (crdt-use-tuntox +tuntox-available-p) - (crdt-use-stunnel +stunnel-available-p)) - - ;; An Emacs major mode to read and browse RFC documents (use-package rfc-mode :straight t diff --git a/modules/me-editor.el b/modules/me-editor.el index 37cc1172..416b8297 100644 --- a/modules/me-editor.el +++ b/modules/me-editor.el @@ -174,6 +174,16 @@ In some files, there is a mix of spaces and tabs. This uses ("M-" . drag-stuff-right))) +;; Collaborative editing using Conflict-free Replicated Data Types +(use-package crdt + :straight t + :when (or (executable-find "tuntox") (executable-find "stunnel")) + :custom + (crdt-tuntox-password-in-url t) + (crdt-use-tuntox (executable-find "tuntox")) + (crdt-use-stunnel (executable-find "stunnel"))) + + ;; Perform a backup on each file save, real backup for Emacs! (use-package real-backup :straight (:host github :repo "abougouffa/real-backup")