all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
blob a51a6719d7cd4e7a7dbd301387c87126577989b0 3456 bytes (raw)
name: etc/snippets/tempel/text-mode.eld 	 # 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
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
 
-*- mode: lisp-data -*-

text-mode :when (git-commit-mode)

(add
 "gnu: Add "
 (p
  (with-temp-buffer
    (magit-git-wash #'magit-diff-wash-diffs
      "diff" "--staged")
    (goto-char (point-min))
    (when (re-search-forward "\\+(define-public \\(\\S-+\\)" nil 'noerror)
      (match-string-no-properties 1)))
  var ) "." n n
 "* " (car (magit-staged-files)) " (" (s var ) "): New variable.")

(remove
 "gnu: Remove "
 (p (with-temp-buffer
      (magit-git-wash #'magit-diff-wash-diffs
        "diff" "--staged")
      (goto-char (point-min))
      (when (re-search-forward "\\-(define-public \\(\\S-+\\)" nil 'noerror)
        (match-string-no-properties 1)))
    var) "." n n
 "* " (car (magit-staged-files)) " (" (s var) "): Delete variable.")

(rename
 "gnu: "
 (p (with-temp-buffer
      (magit-git-wash #'magit-diff-wash-diffs
        "diff" "--staged")
      (beginning-of-buffer)
      (when (search-forward "-(define-public " nil 'noerror)
        (thing-at-point 'sexp 'no-properties)))
    prev-var)
 ": Rename package to "
 (p (with-temp-buffer
      (magit-git-wash #'magit-diff-wash-diffs
        "diff" "--staged")
      (beginning-of-buffer)
      (when (search-forward "+(define-public " nil 'noerror)
        (thing-at-point 'sexp 'no-properties)))
    new-var) "." n n
 "* " (car (magit-staged-files)) " (" (s prev-var) "): Define in terms of" n
 "'deprecated-package'." n
 "(" (s new-var) "): New variable, formerly known as \"" (s prev-var) "\".")

(update
 "gnu: "
 (p (with-temp-buffer
      (magit-git-wash #'magit-diff-wash-diffs
        "diff" "--staged")
      (goto-char (point-min))
      (when (re-search-forward "^[ ]*(define-public \\(\\S-+\\)" nil 'noerror)
        (match-string-no-properties 1)))
    var)
 ": Update to "
 (p (with-temp-buffer
      (magit-git-wash #'magit-diff-wash-diffs
        "diff" "--staged")
      (goto-char (point-min))
      (search-forward "name" nil 'noerror)
      (search-forward "+" nil 'noerror)   ; first change
      (when (and (search-forward "version " nil 'noerror)
                 (looking-at-p "\""))
        (let ((end (save-excursion (search-forward "\")" nil 'noerror))))
          (when end
            (forward-char)
            (buffer-substring-no-properties (point) (- end 2))))))
    version) "." n n
 "* " (car (magit-staged-files)) " (" (s var) "): Update to " (s version) "."
 (mapconcat (lambda (file) (concat "* " file)) (cdr (magit-staged-files))) n)

(addcl
 "gnu: Add cl-"
 (p (replace-regexp-in-string
     "^cl-" "" (with-temp-buffer
                 (magit-git-wash #'magit-diff-wash-diffs
                   "diff" "--staged")
                 (beginning-of-buffer)
                 (when (search-forward "+(define-public " nil 'noerror)
                   (replace-regexp-in-string
                    "^sbcl-" ""
                    (thing-at-point 'sexp 'no-properties)))))
    var) "." n n
 "* " (car (magit-staged-files))
 " (cl-" (s var)  ", ecl-" (s var) ", sbcl-" (s var) "): New variables.")

(https
 "gnu: "
 (p (with-temp-buffer
      (magit-git-wash #'magit-diff-wash-diffs
        "diff" "--staged")
      (goto-char (point-min))
      (when (re-search-forward "^[ ]*(define-public \\(\\S-+\\)" nil 'noerror)
        (match-string-no-properties 1)))
    var)
 ": Use HTTPS home page." n n
 "* " (car (magit-staged-files)) " (" (s var) ")[home-page]: Use HTTPS." n
 (mapconcat (lambda (file) (concat "* " file)) (cdr (magit-staged-files))) n)

debug log:

solving a51a6719d7 ...
found a51a6719d7 in https://yhetil.org/guix/20220811060745.6892-1-ngraves@ngraves.fr/ ||
	https://yhetil.org/guix/20220809102440.10570-1-ngraves@ngraves.fr/

applying [1/1] https://yhetil.org/guix/20220811060745.6892-1-ngraves@ngraves.fr/
diff --git a/etc/snippets/tempel/text-mode.eld b/etc/snippets/tempel/text-mode.eld
new file mode 100644
index 0000000000..a51a6719d7

Checking patch etc/snippets/tempel/text-mode.eld...
Applied patch etc/snippets/tempel/text-mode.eld cleanly.

skipping https://yhetil.org/guix/20220809102440.10570-1-ngraves@ngraves.fr/ for a51a6719d7
index at:
100644 a51a6719d7cd4e7a7dbd301387c87126577989b0	etc/snippets/tempel/text-mode.eld

(*) 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 external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.