[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/repology 181671c 4/9: Add new value to `repology-free-o
From: |
Nicolas Goaziou |
Subject: |
[elpa] externals/repology 181671c 4/9: Add new value to `repology-free-only-projects' |
Date: |
Mon, 18 Jan 2021 17:27:53 -0500 (EST) |
branch: externals/repology
commit 181671c7dccd1aa446732726ecc27674d3747b87
Author: Nicolas Goaziou <mail@nicolasgoaziou.fr>
Commit: Nicolas Goaziou <mail@nicolasgoaziou.fr>
Add new value to `repology-free-only-projects'
* repology.el (repology-free-only-projects): Add `include-inknown' to
filter out only identified non-free projects.
(repology-search-projects): Handle new value.
---
repology.el | 20 ++++++++++++++++----
1 file changed, 16 insertions(+), 4 deletions(-)
diff --git a/repology.el b/repology.el
index 17be047..313dfef 100644
--- a/repology.el
+++ b/repology.el
@@ -150,12 +150,21 @@ A value of 0 prevents any caching."
:type 'integer)
(defcustom repology-free-only-projects t
- "When non-nil, return only free projects from searches.
+ "When t, return only free projects from searches.
Declaring a project as free the consequence of a very conservative process.
Free projects with missing licensing information, or too confidential, may be
-ignored. See `repology-check-freedom' for more information."
- :type 'boolean)
+ignored. You can circumvent this by setting the value to `include-unknown'.
+In this case searches also include every project not clearly identified as
+non-free.
+
+A value of nil includes all projects.
+
+See `repology-check-freedom' for more information."
+ :type '(choice
+ (const :tag "Only free projects" t)
+ (const :tag "Free and unknown projects" include-unknown)
+ (const :tag "Every project" nil)))
(defcustom repology-status-faces
'(("incorrect" . error)
@@ -847,7 +856,10 @@ from output, unless `repology-free-only-projects' is nil."
(other (error "Invalid request result: %S"
other))))))))))
(if (not repology-free-only-projects) result
(with-temp-message "Repology: Filtering out non-free projects..."
- (seq-filter (lambda (p) (eq t (repology-check-freedom p))) result)))))
+ (seq-filter (if (eq repology-free-only-projects 'include-unknown)
+ #'repology-check-freedom
+ (lambda (p) (eq t (repology-check-freedom p))))
+ result)))))
(defun repology-report-problems (repository)
"List problems related to REPOSITORY.
- [elpa] externals/repology updated (dd2a8f8 -> d169507), Nicolas Goaziou, 2021/01/18
- [elpa] externals/repology ba478a5 1/9: Rename `repology--license-check' to `repology--license-vote', Nicolas Goaziou, 2021/01/18
- [elpa] externals/repology 77d9cd1 3/9: Rename `repology--check-freedom' to `repology--check-freedom-at-point', Nicolas Goaziou, 2021/01/18
- [elpa] externals/repology 5f496f3 2/9: Rename `repology-free-p' to `repology-check-freedom', Nicolas Goaziou, 2021/01/18
- [elpa] externals/repology 181671c 4/9: Add new value to `repology-free-only-projects',
Nicolas Goaziou <=
- [elpa] externals/repology dca8413 7/9: repology-check-freedom: Use clearer argument name, Nicolas Goaziou, 2021/01/18
- [elpa] externals/repology 7e68447 5/9: Fix typo in docstring, Nicolas Goaziou, 2021/01/18
- [elpa] externals/repology 8b79fe2 6/9: Fix code typo, Nicolas Goaziou, 2021/01/18
- [elpa] externals/repology d169507 9/9: repology-license.el: Add missing author information, Nicolas Goaziou, 2021/01/18
- [elpa] externals/repology c8e1dc4 8/9: New "repology-utils.el" file containing generic tools, Nicolas Goaziou, 2021/01/18