From c970a86cd6c8f75014805b299577c44c2ee3dfa0 Mon Sep 17 00:00:00 2001 From: James Patrick Date: Mon, 30 Jan 2023 14:58:25 -0500 Subject: [PATCH] Add modification warnings to emacs configuration. --- emacs/+keybinds.el | 3 +++ emacs/+orgmode.el | 3 +++ emacs/config.el | 3 +++ emacs/config.org | 17 +++++++++++++++++ emacs/init.el | 2 ++ 5 files changed, 28 insertions(+) diff --git a/emacs/+keybinds.el b/emacs/+keybinds.el index eb1abeb..9f16a12 100644 --- a/emacs/+keybinds.el +++ b/emacs/+keybinds.el @@ -1,5 +1,8 @@ ;;; +keybinds.el -*- lexical-binding: t; -*- +;;; This file is generated via tangles from the config.org file. Do not modify this file. +;;; Any modifications here will be clobbered and versioned over. Seriously just don't. + (setq doom-localleader-key ",") (map! :leader diff --git a/emacs/+orgmode.el b/emacs/+orgmode.el index fe7d0f2..1e5ff9e 100644 --- a/emacs/+orgmode.el +++ b/emacs/+orgmode.el @@ -1,5 +1,8 @@ ;;; +orgmode.el -*- lexical-binding: t; -*- +;;; This file is generated via tangles from the config.org file. Do not modify this file. +;;; Any modifications here will be clobbered and versioned over. Seriously just don't. + (require 'org) (custom-set-variables '(org-directory "~/org/")) diff --git a/emacs/config.el b/emacs/config.el index 7bfa995..09e5916 100644 --- a/emacs/config.el +++ b/emacs/config.el @@ -1,5 +1,8 @@ ;;; config.el -*- lexical-binding: t; -*- +;;; This file is generated via tangles from the config.org file. Do not modify this file. +;;; Any modifications here will be clobbered and versioned over. Seriously just don't. + (setq which-key-idle-delay 0.1) (setq doom-fallback-buffer-name "Doom" diff --git a/emacs/config.org b/emacs/config.org index dea1ddc..493f260 100644 --- a/emacs/config.org +++ b/emacs/config.org @@ -70,6 +70,14 @@ There [[https://nullprogram.com/blog/2016/12/22/][minor but non-zero start time replace =config.el= with the filename being loaded. +*** Warn user to modify =*.el= files directly. + +#+name:modification-warning +#+begin_src emacs-lisp +;;; This file is generated via tangles from the config.org file. Do not modify this file. +;;; Any modifications here will be clobbered and versioned over. Seriously just don't. +#+end_src + *** Speedup =whichkey= response =whichkey= is slow to respond, lets make it a bit faster. @@ -114,6 +122,7 @@ The configuration is below is pulled from the template =init.example.el= provide #+attr_html: :collapsed t #+begin_src emacs-lisp :tangle "init.el" :noweb no-export :comments no ;;; init.el -*- lexical-binding: t; -*- +<> ;; This file controls what Doom modules are enabled and what order they load ;; in. Remember to run 'doom sync' after modifying it! @@ -471,6 +480,10 @@ Below is a sample snippet from Rameez Khan's [[https://rameezkhan.me/posts/2020/ ;;; +keybinds.el -*- lexical-binding: t; -*- #+end_src +*** Modification warning message. +#+begin_src emacs-lisp :tangle "+keybinds.el" :noweb no-export :comments no +<> +#+end_src *** Local Leader Lets set the local leader to =,=. We may want to remap this to =;= later. Both of these seem to have issues with potential key conflicts with evil-snipe. This seems to primarily exists with regards to org-mode. Github issue can be found [[https://github.com/doomemacs/doomemacs/issues/4242][here]]. @@ -509,6 +522,10 @@ This file will be needed for emacs batch automations, where its not reasonable t ;;; +orgmode.el -*- lexical-binding: t; -*- #+end_src +*** Modification warning message. +#+begin_src emacs-lisp :tangle "+orgmode.el" :noweb no-export :comments no +<> +#+end_src *** Importing org This file may get consumed via emacs batch scripting, so we need ot make sure the orgmode is actually loaded. diff --git a/emacs/init.el b/emacs/init.el index 0e5724a..c9bc0e8 100644 --- a/emacs/init.el +++ b/emacs/init.el @@ -1,4 +1,6 @@ ;;; init.el -*- lexical-binding: t; -*- +;;; This file is generated via tangles from the config.org file. Do not modify this file. +;;; Any modifications here will be clobbered and versioned over. Seriously just don't. ;; This file controls what Doom modules are enabled and what order they load ;; in. Remember to run 'doom sync' after modifying it!