Categories
Follow James Cherti
About the author
James Cherti is an Infrastructure as Code and Software Development Specialist with extensive experience and expertise in software development, Linux system administration, and computer networking. His robust background in the design, implementation, and management of reliable and efficient infrastructure and software highlights his profound skills and knowledge in these areas… (Read more about James Cherti)
Subscribe to the RSS feeds
Recent posts
- Emacs: Maintaining proper indentation in indentation-sensitive programming languages
by James Cherti
As codebases grow, maintaining proper indentation becomes increasingly difficult, especially in languages like Python or YAML, where indentation is not just a matter of style but an important part of the syntax. When working with large code blocks or deeply nested structures, it’s easy to lose track of the correct indentation level, leading to errors and decreased …
Continue reading →
- dir-config.el – Automatically find and evaluate .dir-config.el Elisp files to configure directory-specific settings
by James Cherti
The dir-config.el Emacs package automatically loads and evaluates Elisp code from a .dir-config.el file found in the buffer’s current directory or its closest parent directory. This facilitates adjusting settings or executing functions specific to the directory structure of each buffer. For instance, you can use the dir-config package to: Installation To install the dir-config using straight.el: (use-package …
Continue reading →
- Efficient Emacs startup and configuration with minimal-emacs.d
by James Cherti
Optimizing Emacs for speed and efficiency involves fine-tuning its startup process, managing essential settings, and handling package installations, etc. The minimal-emacs.d repository hosts a minimal Emacs configuration with early-init.el and init.el files designed to serve as a base for your vanilla Emacs configuration, offering a robust foundation for a better vanilla Emacs experience. Installation Execute the following …
Continue reading →
- easysession.el – Easily persist and restore your Emacs editing sessions
by James Cherti
The easysession.el Emacs package is a lightweight session manager for Emacs that can persist and restore file editing buffers, indirect buffers (clones), Dired buffers, the tab-bar, and Emacs frames (including or excluding the frame size, width, and height). It offers a convenient and effortless way to manage Emacs editing sessions and utilizes built-in Emacs functions to persist …
Continue reading →
- outline-indent.el – Indentation based Folding and Outlining in Emacs
by James Cherti
The outline-indent.el Emacs package provides a minor mode that enables code folding and outlining based on indentation levels for various indentation-based text files, such as YAML, Python, and other indented text files. In addition to code folding, outline-indent.el allows moving indented sub-trees up and down, promoting and demoting sections to adjust indentation levels, customizing the ellipsis, and …
Continue reading →
- How to make cron notify the user about a failed command by redirecting its output to stderr only when it fails (non-zero exit code)
by James Cherti
Cron jobs can handle everything from system maintenance to running backups, but monitoring their success or failure can be difficult. One effective way to handle cron job errors is by utilizing a Bash script that sends the output to stderr only if the job fails, which generally makes cron to notify the user about the error that …
Continue reading →
- Emacs: Enhancing up and down subtree movement in outline-mode and outline-minor-mode
by James Cherti
When editing outlined files (e.g., using the built-in outline-minor-mode, or packages like outline-indent.el, outline-yaml.el, etc.), handling subtrees efficiently can significantly enhance productivity, especially when working with complex documents. If you’re familiar with outline-mode or outline-minor-mode, you might have noticed that the built-in functions for moving subtrees up and down, outline-move-subtree-up and outline-move-subtree-down: Here’s how you can address …
Continue reading →
- Introducing elispcomp: Compiling Elisp code directly from the command line
by James Cherti
The elispcomp command line tool allows compiling Emacs Lisp (Elisp) code directly from the terminal or from a shell script. It facilitates the generation of optimized .elc (byte-compiled) and .eln (native-compiled) files, which can significantly improve the performance of Emacs. The tool executes a headless instance of Emacs that recursively scans the specified directories, byte compiling and …
Continue reading →
- Emacs Evil Mode: Disabling the automatic removal of spaces after leaving Insert mode
by James Cherti
By default, Emacs evil-mode removes newly inserted spaces when exiting insert mode. However, some users may find this disruptive to their workflow. This is particularly true for those who edit file formats where trailing spaces are significant or who simply prefer to manage whitespace manually. To prevent the automatic removal of trailing spaces when leaving insert mode, …
Continue reading →
- Emacs: Customizing the Ellipsis (…) in Outline Mode and Outline Minor Mode
by James Cherti
The built-in Emacs outline-mode and outline-minor-mode allow structuring documents with collapsible sections. By default, these modes use an ellipsis (“…”) to indicate folded text. However, the default ellipsis and its face can make it hard to distinguish between folded text and regular text. This is why it can be beneficial to customize the ellipsis. The code snippets …
Continue reading →
(All articles…)