<commit_before>#!/usr/bin/env bash

koopa::install_doom_emacs() { # {{{1
    koopa::install_app \
        --name-fancy='Doom Emacs' \
        --name='doom-emacs' \
        --no-shared \
        --prefix="$(koopa::doom_emacs_prefix)" \
        --version='rolling' \
        "$@"
}

koopa:::install_doom_emacs() { # {{{1
    # """
    # Install Doom Emacs.
    # @note Updated 2021-06-07.
    #
    # Installer flags:
    # https://github.com/hlissner/doom-emacs/blob/develop/core/cli/install.el
    #
    # Useful doom commands:
    # - doctor
    # - upgrade
    #
    # All the fonts (skipped with '--no-fonts' flag below):
    # - all-the-icons.ttf
    # - file-icons.ttf
    # - fontawesome.ttf
    # - material-design-icons.ttf
    # - octicons.ttf
    # - weathericons.ttf
    # """
    local brew_prefix doom install_args prefix repo
    koopa::assert_has_no_args "$#"
    if koopa::is_macos
    then
        brew_prefix="$(koopa::homebrew_prefix)"
        koopa::add_to_path_start "${brew_prefix}/bin"
    fi
    koopa::assert_is_installed 'emacs'
    koopa::activate_python_packages
    prefix="${INSTALL_PREFIX:?}"
    repo='https://github.com/hlissner/doom-emacs'
    koopa::git_clone --branch='develop' "$repo" "$prefix"
    doom="${prefix}/bin/doom"
    koopa::assert_is_executable "$doom"
    install_args=(
        # > '--no-config'
        # > '--no-install'
        '--no-env'
        '--no-fonts'
    )
    "$doom" install "${install_args[@]}"
    "$doom" sync
    "$doom" doctor
    return 0
}

koopa::uninstall_doom_emacs() { # {{{1
    # """
    # Uninstall Doom Emacs.
    # @note Updated 2021-06-08.
    # """
    koopa::uninstall_app \
        --name-fancy='Doom Emacs' \
        --name='doom-emacs' \
        --no-shared \
        --prefix="$(koopa::doom_emacs_prefix)" \
        "$@"
}

koopa::update_doom_emacs() { # {{{1
    # """
    # Update Doom Emacs.
    # @note Updated 2021-06-07.
    #
    # @seealso
    # https://github.com/hlissner/doom-emacs/blob/develop/core/cli/upgrade.el
    # """
    local doom name_fancy
    name_fancy='Doom Emacs'
    koopa::assert_has_no_args "$#"
    doom="$(koopa::locate_doom)"
    koopa::update_start "$name_fancy"
    "$doom" upgrade --force
    "$doom" sync
    koopa::update_success "$name_fancy"
    return 0
}<commit_msg>Don't allow doom to prompt<commit_after>#!/usr/bin/env bash

koopa::install_doom_emacs() { # {{{1
    koopa::install_app \
        --name-fancy='Doom Emacs' \
        --name='doom-emacs' \
        --no-shared \
        --prefix="$(koopa::doom_emacs_prefix)" \
        --version='rolling' \
        "$@"
}

koopa:::install_doom_emacs() { # {{{1
    # """
    # Install Doom Emacs.
    # @note Updated 2021-07-28.
    #
    # Installer flags:
    # https://github.com/hlissner/doom-emacs/blob/develop/core/cli/install.el
    #
    # Useful doom commands:
    # - doctor
    # - upgrade
    #
    # All the fonts (skipped with '--no-fonts' flag below):
    # - all-the-icons.ttf
    # - file-icons.ttf
    # - fontawesome.ttf
    # - material-design-icons.ttf
    # - octicons.ttf
    # - weathericons.ttf
    # """
    local brew_prefix doom install_args prefix repo
    koopa::assert_has_no_args "$#"
    if koopa::is_macos
    then
        brew_prefix="$(koopa::homebrew_prefix)"
        koopa::add_to_path_start "${brew_prefix}/bin"
    fi
    koopa::assert_is_installed 'emacs'
    koopa::activate_python_packages
    prefix="${INSTALL_PREFIX:?}"
    repo='https://github.com/hlissner/doom-emacs'
    koopa::git_clone --branch='develop' "$repo" "$prefix"
    doom="${prefix}/bin/doom"
    koopa::assert_is_executable "$doom"
    install_args=(
        # > '--no-config'
        # > '--no-install'
        '--no-env'
        '--no-fonts'
    )
    "$doom" --yes install "${install_args[@]}"
    "$doom" --yes sync
    "$doom" --yes doctor
    return 0
}

koopa::uninstall_doom_emacs() { # {{{1
    # """
    # Uninstall Doom Emacs.
    # @note Updated 2021-06-08.
    # """
    koopa::uninstall_app \
        --name-fancy='Doom Emacs' \
        --name='doom-emacs' \
        --no-shared \
        --prefix="$(koopa::doom_emacs_prefix)" \
        "$@"
}

koopa::update_doom_emacs() { # {{{1
    # """
    # Update Doom Emacs.
    # @note Updated 2021-07-28.
    #
    # @seealso
    # https://github.com/hlissner/doom-emacs/blob/develop/core/cli/upgrade.el
    # """
    local doom name_fancy
    name_fancy='Doom Emacs'
    koopa::assert_has_no_args "$#"
    doom="$(koopa::locate_doom)"
    koopa::update_start "$name_fancy"
    "$doom" --yes upgrade --force
    "$doom" --yes sync
    koopa::update_success "$name_fancy"
    return 0
}
{'fraction_non_alphanumeric': 0.17461687891215194, 'fraction_numerical': 0.012950571983595942, 'mean_word_length': 2.2865248226950357, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2766592', 'n_tokens_mistral': 1842, 'n_tokens_neox': 1740, 'n_words': 255}