Move patches to its own directory

This commit is contained in:
Thiago Kenji Okada
2022-07-08 16:48:39 +01:00
parent 744cfb8a1d
commit ffa42074ba
6 changed files with 4 additions and 4 deletions

View File

@@ -0,0 +1,8 @@
--- a/evil-escape.el
+++ b/evil-ewcape.el
@@ -1,4 +1,4 @@
- ;;; evil-escape.el --- Escape from anything with a customizable key sequence
+;;; evil-escape.el --- Escape from anything with a customizable key sequence
;; Copyright (C) 2014-2015 syl20bnr
;;

28
patches/fix-paths.patch Normal file
View File

@@ -0,0 +1,28 @@
diff --git a/core/autoload/config.el b/core/autoload/config.el
index 1e643cf49..501cbfba4 100644
--- a/core/autoload/config.el
+++ b/core/autoload/config.el
@@ -23,7 +23,7 @@
(defun doom/find-file-in-private-config ()
"Search for a file in `doom-private-dir' inside nixos-config."
(interactive)
- (doom-project-find-file doom-private-dir))
+ (doom-project-find-file "@private@"))
;;;###autoload
(defun doom/goto-private-init-file ()
diff --git a/modules/app/rss/config.el b/modules/app/rss/config.el
index c5657eec8..34f303420 100644
--- a/modules/app/rss/config.el
+++ b/modules/app/rss/config.el
@@ -18,8 +18,8 @@ easier to scroll through.")
(use-package! elfeed
:commands elfeed
:init
- (setq elfeed-db-directory (concat doom-local-dir "elfeed/db/")
- elfeed-enclosure-default-dir (concat doom-local-dir "elfeed/enclosures/"))
+ (setq elfeed-db-directory (concat doom-cache-dir "elfeed/db/")
+ elfeed-enclosure-default-dir (concat doom-cache-dir "elfeed/enclosures/"))
:config
(setq elfeed-search-filter "@2-week-ago "
elfeed-show-entry-switch #'pop-to-buffer

View File

@@ -0,0 +1,82 @@
From aa6b52ddbf17b9abc4ad9f30f3d430445b2b6923 Mon Sep 17 00:00:00 2001
From: ckie <git-525ff67@ckie.dev>
Date: Fri, 1 Jul 2022 18:34:52 +0300
Subject: [PATCH] Nix integration
---
core/core-cli-lib.el | 2 +-
core/core.el | 18 ++++++------------
2 files changed, 7 insertions(+), 13 deletions(-)
diff --git a/core/core-cli-lib.el b/core/core-cli-lib.el
index 5881bb564..8d5a9381d 100644
--- a/core/core-cli-lib.el
+++ b/core/core-cli-lib.el
@@ -111,7 +111,7 @@ If nil, falls back to less.")
Only applies if (exit! :pager) or (exit! :pager?) are called.")
-(defvar doom-cli-log-file-format (expand-file-name "logs/cli.%s.%s.%s" doom-local-dir)
+(defvar doom-cli-log-file-format (expand-file-name "logs/cli.%s.%s.%s" doom-cache-dir)
"Where to write any output/log file to.
Must have two arguments, one for session id and the other for log type.")
diff --git a/core/core.el b/core/core.el
index 07254e602..23d26843a 100644
--- a/core/core.el
+++ b/core/core.el
@@ -143,7 +143,7 @@ envvar will enable this at startup.")
(defconst doom-local-dir
(if-let (localdir (getenv-internal "DOOMLOCALDIR"))
(expand-file-name (file-name-as-directory localdir))
- (concat doom-emacs-dir ".local/"))
+ "@local@/")
"Root directory for local storage.
Use this as a storage location for this system's installation of Doom Emacs.
@@ -152,14 +152,15 @@ These files should not be shared across systems. By default, it is used by
`doom-etc-dir' and `doom-cache-dir'. Must end with a slash.")
;; DEPRECATED
-(defconst doom-etc-dir (concat doom-local-dir "etc/")
+; nix-doom-emacs: This doesn't meet XDG but backwards compatibility is a thing.
+(defconst doom-etc-dir "~/.local/doom"
"Directory for non-volatile local storage.
Use this for files that don't change much, like server binaries, external
dependencies or long-term shared data. Must end with a slash.")
;; DEPRECATED
-(defconst doom-cache-dir (concat doom-local-dir "cache/")
+(defconst doom-cache-dir "~/.cache/doom"
"Directory for volatile local storage.
Use this for files that change often, like cache files. Must end with a slash.")
@@ -167,15 +168,7 @@ Use this for files that change often, like cache files. Must end with a slash.")
(defconst doom-docs-dir (concat doom-emacs-dir "docs/")
"Where Doom's documentation files are stored. Must end with a slash.")
-(defconst doom-private-dir
- (if-let (doomdir (getenv-internal "DOOMDIR"))
- (expand-file-name (file-name-as-directory doomdir))
- (or (let ((xdgdir
- (expand-file-name "doom/"
- (or (getenv-internal "XDG_CONFIG_HOME")
- "~/.config"))))
- (if (file-directory-p xdgdir) xdgdir))
- "~/.doom.d/"))
+(defconst doom-private-dir (expand-file-name (file-name-as-directory (getenv-internal "DOOMDIR")))
"Where your private configuration is placed.
Defaults to ~/.config/doom, ~/.doom.d or the value of the DOOMDIR envvar;
@@ -238,6 +231,7 @@ users).")
;; Don't store eln files in ~/.emacs.d/eln-cache (where they can easily be
;; deleted by 'doom upgrade').
(add-to-list 'native-comp-eln-load-path (concat doom-cache-dir "eln/"))
+ (add-to-list 'native-comp-eln-load-path (concat doom-cache-dir "cache/eln/"))
(with-eval-after-load 'comp
;; HACK Disable native-compilation for some troublesome packages
--
2.36.1

View File

@@ -0,0 +1,22 @@
--- a/restart-emacs.el 1970-01-01 02:00:01.000000000 +0200
+++ b/restart-emacs.el 2021-06-13 14:37:50.520954543 +0300
@@ -94,12 +94,13 @@
"Get absolute path to binary of currently running Emacs.
On Windows get path to runemacs.exe if possible."
- (let ((emacs-binary-path (expand-file-name invocation-name invocation-directory))
- (runemacs-binary-path (when (memq system-type '(windows-nt ms-dos))
- (expand-file-name "runemacs.exe" invocation-directory))))
- (if (and runemacs-binary-path (file-exists-p runemacs-binary-path))
- runemacs-binary-path
- emacs-binary-path)))
+ (if (getenv "NIX_DOOM_EMACS_BINARY") (getenv "NIX_DOOM_EMACS_BINARY")
+ (let ((emacs-binary-path (expand-file-name invocation-name invocation-directory))
+ (runemacs-binary-path (when (memq system-type '(windows-nt ms-dos))
+ (expand-file-name "runemacs.exe" invocation-directory))))
+ (if (and runemacs-binary-path (file-exists-p runemacs-binary-path))
+ runemacs-binary-path
+ emacs-binary-path))))
(defun restart-emacs--record-tty-file (current &rest ignored)
"Save the buffer which is being currently selected in the frame.