mirror of
https://github.com/nix-community/emacs-overlay.git
synced 2025-12-06 02:40:25 -08:00
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:
parent
aa199d5e70
commit
b900181472
3 changed files with 51 additions and 28 deletions
11
parse.nix
11
parse.nix
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue