From 6a217db896120ce0b23d73c35c620170306ca6db Mon Sep 17 00:00:00 2001 From: TEC Date: Sun, 3 Jan 2021 17:47:55 +0800 Subject: [PATCH] Org ml patch finder: ignore resolved patches --- config.org | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/config.org b/config.org index ee16773..3efcd6c 100644 --- a/config.org +++ b/config.org @@ -3801,21 +3801,23 @@ change that. (defun org-ml-current-patches () "Get the currently open patches, as a list of alists. Entries of the form (subject . id)." - (mapcar - (lambda (entry) - (cons - (format "%-8s %s" - (propertize - (replace-regexp-in-string "T.*" "" - (plist-get entry :date)) - 'face 'font-lock-doc-face) - (propertize - (replace-regexp-in-string "\\[PATCH\\] ?" "" - (plist-get entry :summary)) - 'face 'font-lock-keyword-face)) - (plist-get entry :id))) - (with-current-buffer (url-retrieve-synchronously "https://updates.orgmode.org/data/patches") - (json-parse-buffer :object-type 'plist)))) + (delq nil + (mapcar + (lambda (entry) + (unless (plist-get entry :fixed) + (cons + (format "%-8s %s" + (propertize + (replace-regexp-in-string "T.*" "" + (plist-get entry :date)) + 'face 'font-lock-doc-face) + (propertize + (replace-regexp-in-string "\\[PATCH\\] ?" "" + (plist-get entry :summary)) + 'face 'font-lock-keyword-face)) + (plist-get entry :id)))) + (with-current-buffer (url-retrieve-synchronously "https://updates.orgmode.org/data/patches") + (json-parse-buffer :object-type 'plist))))) (defun org-ml-select-patch-thread () "Find and apply a proposed Org patch."