aboutsummaryrefslogtreecommitdiff
path: root/org-maint.el
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2019-11-16 22:01:14 -0500
committerKyle Meyer <kyle@kyleam.com>2019-11-16 22:08:40 -0500
commit4d3af2e9713fb28b90d08c58c4d8e3dcce25310a (patch)
tree23c888b0892320ba2b9c90095062284467216f01 /org-maint.el
parentd48a699b1c1f6e949dc7cd2badbc7d32d10bdd18 (diff)
downloadorgmode-backport-notes-4d3af2e9713fb28b90d08c58c4d8e3dcce25310a.tar.gz
Move "new entry" command to library
Diffstat (limited to 'org-maint.el')
-rw-r--r--org-maint.el28
1 files changed, 28 insertions, 0 deletions
diff --git a/org-maint.el b/org-maint.el
index 3e8f8df..db5b16a 100644
--- a/org-maint.el
+++ b/org-maint.el
@@ -37,3 +37,31 @@ If APPLY is non-nil, use 'git apply' instead of 'git am'."
(or (and (re-search-forward "- \\[[ X]\\] \\([A-z0-9]\\{40\\}\\)")
(match-string-no-properties 1))
(user-error "Next revision item not found"))))
+
+(defun org-maint-check-for-new ()
+ "Check for new commits to backport.
+The last commit found is assumed to be the return value of
+`org-maint-rev-from-next-item`, and Emacs ref name that should be
+checked is taken from the Org \"ref\" property."
+ (interactive)
+ (let ((ref (or (org-entry-get (point) "ref")
+ (user-error "No reference found")))
+ (last-rev (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.texi"
+ "etc/ORG-NEWS"
+ "etc/org"
+ "etc/refcards/orgcard.tex"
+ "etc/schema/od-manifest-schema-v1.2-os.rnc"
+ "etc/schema/od-schema-v1.2-os.rnc"
+ "lisp/org")
+ (display-buffer (current-buffer)))))