<commit_before>#+title:  Operating System Configuration/Packages
#+author: <NAME>
#+email:  <EMAIL>
#+date:   2020:06:25
#+tags:   os operating-system
#+STARTUP: fold

Manage your operating system packages from inside Emacs. =system-packages=
understands a lot of package managers by default, but you can always register
more.

* NOTE: system-packages can be very slow
  =system-packages= uses TRAMP to connect to your package manager, which can be
  incredibly slow if you have not set your PS1 environment variable to something
  simple (like =tramp $=). See my =.bashrc= file for an example of how to set
  your prompt for TRAMP integration.

* Example of registering a new package manager
  For example, to add =pacaur= as a system package manager for your OS, use the
  following approach:

  #+begin_src emacs-lisp :tangle no
    (add-to-list 'system-packages-supported-package-managers
                 '(pacaur .
                          ((default-sudo . nil)
                           (install . "pacaur -S")
                           (search . "pacaur -Ss")
                           (uninstall . "pacaur -Rs")
                           (update . "pacaur -Syu")
                           (clean-cache . "pacaur -Sc")
                           (log . "cat /var/log/pacman.log")
                           (get-info . "pacaur -Qi")
                           (get-info-remote . "pacaur -Si")
                           (list-files-provided-by . "pacaur -Ql")
                           (verify-all-packages . "pacaur -Qkk")
                           (verify-all-dependencies . "pacaur -Dk")
                           (remove-orphaned . "pacaur -Rns $(pacman -Qtdq)")
                           (list-installed-packages . "pacaur -Qe")
                           (list-installed-packages-all . "pacaur -Q")
                           (list-dependencies-of . "pacaur -Qi")
                           (noconfirm . "--noconfirm"))))
  #+end_src

  You may then need to adjust =system-packages-package-manager= and
  =system-packages-use-sudo= accordingly:

  #+BEGIN_SRC emacs-lisp :tangle no
    (setq system-packages-use-sudo t)
    (setq system-packages-package-manager 'pacaur)
  #+END_SRC
* use-package specification
  #+begin_src emacs-lisp
    (use-package system-packages
      :init
      (when (memq system-type '(gnu gnu/linux))
        ;; Preface system-packages commands with `sudo' when using Linux.  Most
        ;; modern package managers allow you to use them without `sudo', so this
        ;; approach should be avoided if at all possible.
        (setq system-packages-use-sudo t)))<commit_msg>Small change<commit_after>#+title:  Operating System Configuration/Packages
#+author: <NAME>
#+email:  <EMAIL>
#+date:   2020:06:25
#+tags:   os operating-system
#+STARTUP: fold

Manage your operating system packages from inside Emacs. =system-packages=
understands a lot of package managers by default, but you can always register
more.

* NOTE: system-packages can be very slow
  =system-packages= uses TRAMP to connect to your package manager, which can be
  incredibly slow if you have not set your PS1 environment variable to something
  simple (like =tramp $=). See my =.bashrc= file for an example of how to set
  your prompt for TRAMP integration.

* Example of registering a new package manager
  For example, to add =pacaur= as a system package manager for your OS, use the
  following approach:

  #+begin_src emacs-lisp :tangle no
    (add-to-list 'system-packages-supported-package-managers
                 '(pacaur .
                          ((default-sudo . nil)
                           (install . "pacaur -S")
                           (search . "pacaur -Ss")
                           (uninstall . "pacaur -Rs")
                           (update . "pacaur -Syu")
                           (clean-cache . "pacaur -Sc")
                           (log . "cat /var/log/pacman.log")
                           (get-info . "pacaur -Qi")
                           (get-info-remote . "pacaur -Si")
                           (list-files-provided-by . "pacaur -Ql")
                           (verify-all-packages . "pacaur -Qkk")
                           (verify-all-dependencies . "pacaur -Dk")
                           (remove-orphaned . "pacaur -Rns $(pacman -Qtdq)")
                           (list-installed-packages . "pacaur -Qe")
                           (list-installed-packages-all . "pacaur -Q")
                           (list-dependencies-of . "pacaur -Qi")
                           (noconfirm . "--noconfirm"))))
  #+end_src

  You may then need to adjust =system-packages-package-manager= and
  =system-packages-use-sudo= accordingly:

  #+BEGIN_SRC emacs-lisp :tangle no
    (setq system-packages-use-sudo t)
    (setq system-packages-package-manager 'pacaur)
  #+END_SRC

* use-package specification
  #+begin_src emacs-lisp
    (use-package system-packages
      :init
      (when (memq system-type '(gnu gnu/linux))
        ;; Preface system-packages commands with `sudo' when using Linux.  Most
        ;; modern package managers allow you to use them without `sudo', so this
        ;; approach should be avoided if at all possible.
        (setq system-packages-use-sudo t)))
{'fraction_non_alphanumeric': 0.10354015987818804, 'fraction_numerical': 0.0034259611724400457, 'mean_word_length': 1.805659369994661, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, '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': '7132967', 'n_tokens_mistral': 1575, 'n_tokens_neox': 1468, 'n_words': 472}