From 4dcb1a1ffa2711ca267ce8c306c9da20f3a3b41c Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Sat, 10 Dec 2022 01:51:46 -0500 Subject: org-maint-check-for-new: Move revisions and files into argument list Using a list will make it easier to optionally extend the revisions with more elements (as will be done in the next commit). --- org-maint.el | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/org-maint.el b/org-maint.el index af1f7a1..71b9d31 100644 --- a/org-maint.el +++ b/org-maint.el @@ -1,6 +1,6 @@ ;;; org-maint.el --- Helpers for porting Emacs commits to Org -*- lexical-binding: t; -*- -;; Copyright (C) 2020, 2021 Kyle Meyer +;; Copyright (C) 2020-2022 Kyle Meyer ;; Author: Kyle Meyer @@ -70,26 +70,25 @@ Org files, 2) are contained in the Emacs reference specified by the Org \"ref\" property, and 3) are _not_ included in the revision returned by `org-maint-rev-from-next-item'." (interactive) - (let ((ref (or (org-entry-get (point) "ref") - (user-error "No reference found"))) - (last-rev (org-maint-rev-from-next-item)) + (let ((revs (list (or (org-entry-get (point) "ref") + (user-error "No reference found")) + (concat "^" (org-maint-rev-from-next-item)))) (default-directory org-maint-emacs-dir)) (with-current-buffer (get-buffer-create "*org-maint-new-entries*") (goto-char (point-min)) (erase-buffer) - (insert (format ";; %s..%s\n\n" last-rev ref)) - (call-process "git" nil t nil - "log" "--oneline" - "--format=- [ ] %H%n%n %s%n %an%n %cd%n" - (concat "^" last-rev) ref - "--" - "doc/misc/org.org" - "doc/misc/org-setup.org" - "etc/ORG-NEWS" - "etc/org" - "etc/refcards/orgcard.tex" - "etc/schema/" - "lisp/org") + (insert (format ";; revisions: %S\n\n" revs)) + (apply #'call-process "git" nil t nil + "log" "--oneline" "--format=- [ ] %H%n%n %s%n %an%n %cd%n" + (nconc revs + (list "--" + "doc/misc/org.org" + "doc/misc/org-setup.org" + "etc/ORG-NEWS" + "etc/org" + "etc/refcards/orgcard.tex" + "etc/schema/" + "lisp/org"))) (display-buffer (current-buffer))))) (provide 'org-maint) -- cgit v1.2.3