blob 71d385869684635c37f1680ad18b5fc6eca00b65 1987 bytes (raw)
name: gnu/packages/patches/spacemacs-rolling-release-inhibit-read-only.patch # note: path name is non-authoritative(*)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
| | The first time that a user runs spacemacs it will open the default configuration from the source tree and modify the buffer. The buffer is read-only since the file it opened is, but since we save the file to the users home directory and not back to it's original location temporarily inhibiting read-only solves our problem.
diff --git a/core/core-dotspacemacs.el b/core/core-dotspacemacs.el
index f28249148..3b7872ff0 100644
--- a/core/core-dotspacemacs.el
+++ b/core/core-dotspacemacs.el
@@ -643,19 +643,20 @@ If ARG is non nil then Ask questions to the user before installing the dotfile."
(with-current-buffer (find-file-noselect
(concat dotspacemacs-template-directory
".spacemacs.template"))
- (dolist (p preferences)
- (goto-char (point-min))
- (re-search-forward (car p))
- (replace-match (cadr p)))
- (let ((install
- (if (file-exists-p dotspacemacs-filepath)
- (y-or-n-p
- (format "%s already exists. Do you want to overwrite it ? "
- dotspacemacs-filepath)) t)))
- (when install
- (write-file dotspacemacs-filepath)
- (message "%s has been installed." dotspacemacs-filepath)
- t))))
+ (let ((inhibit-read-only t))
+ (dolist (p preferences)
+ (goto-char (point-min))
+ (re-search-forward (car p))
+ (replace-match (cadr p)))
+ (let ((install
+ (if (file-exists-p dotspacemacs-filepath)
+ (y-or-n-p
+ (format "%s already exists. Do you want to overwrite it ? "
+ dotspacemacs-filepath)) t)))
+ (when install
+ (write-file dotspacemacs-filepath)
+ (message "%s has been installed." dotspacemacs-filepath)
+ t)))))
(dotspacemacs/load-file)
;; force new wizard values to be applied
(dotspacemacs/init))
|
debug log:
solving 71d3858696 ...
found 71d3858696 in https://yhetil.org/guix-patches/mS425o3U--g_ZZemWqvuUgtTHvBroyNZvJUCP6Dy2ABWdMTmgI1CweiSpOj40xlg1LXarBqJE0krzRh4J-DhzoWQ_jofFDDgxUXg1cvjZUA=@protonmail.com/
applying [1/1] https://yhetil.org/guix-patches/mS425o3U--g_ZZemWqvuUgtTHvBroyNZvJUCP6Dy2ABWdMTmgI1CweiSpOj40xlg1LXarBqJE0krzRh4J-DhzoWQ_jofFDDgxUXg1cvjZUA=@protonmail.com/
diff --git a/gnu/packages/patches/spacemacs-rolling-release-inhibit-read-only.patch b/gnu/packages/patches/spacemacs-rolling-release-inhibit-read-only.patch
new file mode 100644
index 0000000000..71d3858696
Checking patch gnu/packages/patches/spacemacs-rolling-release-inhibit-read-only.patch...
Applied patch gnu/packages/patches/spacemacs-rolling-release-inhibit-read-only.patch cleanly.
index at:
100644 71d385869684635c37f1680ad18b5fc6eca00b65 gnu/packages/patches/spacemacs-rolling-release-inhibit-read-only.patch
(*) Git path names are given by the tree(s) the blob belongs to.
Blobs themselves have no identifier aside from the hash of its contents.^
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).