Add alwaysTangle argument to emacsWithPackagesFromUsePackage

Add an option to tangle all Org mode babel code blocks by default and
update the documentation.
This commit is contained in:
talyz 2020-08-09 18:44:09 +02:00 committed by adisbladis
parent aa199d5e70
commit b900181472
No known key found for this signature in database
GPG key ID: 110BFAD44C6249B7
3 changed files with 51 additions and 28 deletions

View file

@ -1,7 +1,7 @@
{ pkgs, lib }:
let
inherit (import ./repos/fromElisp { inherit pkgs; }) fromElisp fromOrgModeBabelElisp;
inherit (import ./repos/fromElisp { inherit pkgs; }) fromElisp fromOrgModeBabelElisp';
isStrEmpty = s: (builtins.replaceStrings [ " " ] [ "" ] s) == "";
@ -70,14 +70,15 @@ let
# ''
# => [ "direnv" "paredit" ]
parsePackagesFromUsePackage = {
configText,
alwaysEnsure ? false,
isOrgModeFile ? false
configText
, alwaysEnsure ? false
, isOrgModeFile ? false
, alwaysTangle ? false
}:
let
readFunction =
if isOrgModeFile then
fromOrgModeBabelElisp
fromOrgModeBabelElisp' { ":tangle" = if alwaysTangle then "yes" else "no"; }
else
fromElisp;