How To Install emacs-blacken on Fedora 36
Introduction
In this tutorial we learn how to install emacs-blacken
on Fedora 36.
What is emacs-blacken
Blacken uses black to format a Python buffer. It can be called explicitly on a certain buffer, but more conveniently, a minor-mode ‘blacken-mode’ is provided that turns on automatically running black on a buffer before saving. To automatically format all Python buffers before saving, add the function blacken-mode to python-mode-hook (add-hook ‘python-mode-hook ‘blacken-mode)
We can use yum
or dnf
to install emacs-blacken
on Fedora 36. In this tutorial we discuss both methods but you only need to choose one of method to install emacs-blacken.
Install emacs-blacken on Fedora 36 Using dnf
Update yum database with dnf
using the following command.
sudo dnf makecache --refresh
After updating yum database, We can install emacs-blacken
using dnf
by running the following command:
sudo dnf -y install emacs-blacken
Install emacs-blacken on Fedora 36 Using yum
Update yum database with yum
using the following command.
sudo yum makecache --refresh
After updating yum database, We can install emacs-blacken
using yum
by running the following command:
sudo yum -y install emacs-blacken
How To Uninstall emacs-blacken on Fedora 36
To uninstall only the emacs-blacken
package we can use the following command:
sudo dnf remove emacs-blacken
emacs-blacken Package Contents on Fedora 36
/usr/share/doc/emacs-blacken
/usr/share/doc/emacs-blacken/README.md
/usr/share/emacs/site-lisp/blacken
/usr/share/emacs/site-lisp/blacken/blacken.el
/usr/share/emacs/site-lisp/blacken/blacken.elc
/usr/share/emacs/site-lisp/site-start.d/blacken-init.el
References
Summary
In this tutorial we learn how to install emacs-blacken
on Fedora 36 using yum and [dnf]((/fedora/36/dnf/).