(chore): Drop f.el and s.el dependency (#2025)

Drops the f.el and implicit s.el dependency.

Co-authored-by: Jethro Kuan <jethrokuan95@gmail.com>
This commit is contained in:
Stefan Kangas
2022-01-16 06:26:20 +01:00
committed by GitHub
parent 001de3a874
commit c0c240b975
9 changed files with 29 additions and 12 deletions

View File

@ -6,7 +6,7 @@
;; URL: https://github.com/org-roam/org-roam
;; Keywords: org-mode, roam, convenience
;; Version: 2.2.0
;; Package-Requires: ((emacs "26.1") (dash "2.13") (f "0.17.2") (org "9.4") (emacsql "3.0.0") (emacsql-sqlite "1.0.0") (magit-section "3.0.0"))
;; Package-Requires: ((emacs "26.1") (dash "2.13") (org "9.4") (emacsql "3.0.0") (emacsql-sqlite "1.0.0") (magit-section "3.0.0"))
;; This file is NOT part of GNU Emacs.
@ -71,7 +71,6 @@
;; majority of them can be found at https://github.com/org-roam and MELPA.
;;
;;; Code:
(require 'f)
(require 'dash)
(require 'rx)
@ -195,7 +194,7 @@ FILE is an Org-roam file if:
(member ext org-roam-file-extensions)
(not (and org-roam-file-exclude-regexp
(string-match-p org-roam-file-exclude-regexp path)))
(f-descendant-of-p path (expand-file-name org-roam-directory))))))
(org-roam-descendant-of-p path (expand-file-name org-roam-directory))))))
(defun org-roam-list-files ()
"Return a list of all Org-roam files under `org-roam-directory'.
@ -260,7 +259,8 @@ If no files are found, an empty list is returned."
(shell-command-to-string it)
(ansi-color-filter-apply it)
(split-string it "\n")
(seq-filter #'s-present? it)))
(seq-filter (lambda (s)
(or (null s) (string= "" s))) it)))
(defun org-roam--list-files-search-globs (exts)
"Given EXTS, return a list of search globs.