1
0
Fork 0
mirror of https://github.com/emacs-twist/org-babel.git synced 2024-12-14 11:07:30 +00:00
org-babel/nix/default.nix

29 lines
820 B
Nix
Raw Permalink Normal View History

2021-12-03 13:44:34 +00:00
with builtins;
let
excludeOrgSubtreesOnHeadlines = import ./excludeOrgSubtreesOnHeadlines.nix;
2022-01-02 07:22:04 +00:00
selectHeadlines = import ./selectHeadlines.nix;
2021-12-03 13:44:34 +00:00
matchOrgTag = import ./matchOrgTag.nix;
matchOrgHeadline = import ./matchOrgHeadline.nix;
matchOrgHeadlines = headlines: s:
builtins.any (t: matchOrgHeadline t s) headlines;
2021-12-03 14:10:13 +00:00
tangleOrgBabel = import ./tangleOrgBabel.nix;
2021-12-03 13:44:34 +00:00
in
{
# Newer concise APIs
excludeHeadlines = excludeOrgSubtreesOnHeadlines;
2022-01-02 07:22:04 +00:00
inherit selectHeadlines;
tag = matchOrgTag;
headlineText = matchOrgHeadline;
allP = predicates: x: builtins.all (p: p x) predicates;
anyP = predicates: x: builtins.any (p: p x) predicates;
# Deprecated APIs
2021-12-03 13:44:34 +00:00
inherit matchOrgTag matchOrgHeadline matchOrgHeadlines;
inherit excludeOrgSubtreesOnHeadlines;
# Tangle
2021-12-03 13:44:34 +00:00
inherit tangleOrgBabel;
}