Bowmansarrow

emacs

Short update today, we renamed the Rational Emacs project to Crafted Emacs. Originally, the name was chosen because it sounded cool. However, after thinking about it, it seemed a bit elitist, as if this project was suggesting the only, well, rational way to configure Emacs, which was not the intent. There are many really good ways to configure Emacs, in fact the way you are configuring Emacs is one of them! Turn-key solutions like Prelude, Doom or Nano are also really good.

You might recall, in my last post I hinted this might happen and suggested a possible name: Crafted Emacs. This the new name. This name represents the project better in the following ways:

  • It doesn't sound elitist.
  • It fits better with the ideals of the System Crafters community.
  • It is closer to the intent, a good starting point to craft your own configuration.

During his stream today David Wilson started the process of merging the crafed-rename branch to the master branch. Unfortunately, there were some merge conflicts, so, while he went on with his stream, I managed the merge, resolving the conflicts and pushed the result to the master branch. David renamed the project in GitHub shortly after, and now the former project Rational Emacs is retired and the new project Crafted Emacs has taken its place!

If you happened to be using Rational Emacs, thank you for giving it a try! You may want to pull the changes to sync up with the new project name going forward. Git should work out just fine for you, but if you want to rename the remote to match the project name in GitHub, here are the manual steps:

From the command line:

  • git remote -v This will list the remotes so you can see the URL used. You'll want to copy that in a moment.
  • git remote rename origin rational
  • git remote add origin https://github.com/SystemCrafters/crafted-emacs or, if you happen to be using ssh: git remote add origin git@github.com:SystemCrafters/crafted-emacs
  • git pull origin master This just sycs the branches and tracking going forward. If you have already done a pull before, this should report everything is up-to-date.
  • git remote remove rational This optional step just removes the redundant remote from your list of git remotes for this project.

Update: 2022-07-16

The user Trout_Tickler on reddit helpfully pointed out this command to reset the git url: git remote set-url origin git@github.com:SystemCrafters/crafted-emacs which should replace all the above with a single command. Thanks!!

From Magit:

  • Press M for Remote
  • Press r to rename the remote, you will be prompted for the new name, type one (for example rational) and press enter.
  • Press M for Remote again, then press a to add a new remote. You will be prompted for a name, type origin and press enter. The url is presented for you, change it if you wish, or just leave it alone and press enter again.
  • Press M for Remote again, then press k to remove a remote, and choose the rational name (or whatever you named origin to earlier).
  • Press F to fetch updates, then either p or (my preference) u which should be listed as origin/crafted-emacs

To update your configuration, please see the section in the README which talks about it. I provided an Emacs script, you can run it with the following command:

emacs -Q --batch -l rational2crafted.el

And it should help. It makes a copy of your current config folder (ie ~/.config/rational-emacs/) and then updates the configuration from the new location. It doesn't work with chemacs2 configurations however. For those of you using chemacs2, you'll have to manually transition your configuration. That being said, read through the rational2crafted.el source, you can probably use some of the code from there to craft your own transition script. BLUF, it just renames rational to crafted everywhere. If you just want to do it manually, dired is your friend.

From Dired:

  • Open your crafted-emacs folder, maybe with this from the *scratch* buffer: (dired crafted-config-path)
  • Press %g and type “rational” to mark all the files having the word rational in them.
  • Press Q (yes, shift and the letter q) to replace rational with crafted (you'll have to type in those words), then repeatedly hit ! to change all occurences in each file.

There might be other ways to use dired to handle this situation, but that was the easiest way I could think of quickly.

So, there you go, brand new Crafted Emacs is now available for you to use to craft your own Emacs configuration!

Shameless Plug

If you enjoy configuring Emacs and tweak yours often, you might consider giving Crafted Emacs a try. I'm sure you'll find some rough edges, and when you do, I invite you to open an issue, or submit a pull request. Or, maybe you won't find any rough edges and this will be just the thing you need. I'm not holding my breath on that just yet.

If you enjoy crafting your computing experience, from hacking on Emacs, your Linux/Mac/Windows configuration, maybe your Guix or NixOS home configuration, or whatever it is… consider joining the SystemCrafters community!

Tags: #emacs

Another month gone, this update is rather shorter than the last one with only 3 closed pull requests and 4 new issues raised. Probably the most interesting thing from this month was the stream by David Wilson on the System Crafters YouTube channel where he spoke about the initial goals of the project and wrote his configuration based on Rational Emacs live. Here is a link to the stream beginning where he is talking about the goals and intentions for the project. To summarize his comments, Rational Emacs was intended to be a minimal set of configuration “blocks” to use when writing your own configuration. It might be enough to use without further configuration, but the expectation is some additional work would be needed to completely customize Emacs for your workflow. But, watch the video, he says it better than me.

What's coming next for Rational Emacs? Helper macros? More granular modules? Principles updates? David talks about this topic in his stream, including the potential for a new name! (Crafted Emacs anyone?)

Pull Requests

  • Customization groups were added to provide better organization when using the Customization UI from within Emacs. Customization options now appear in groups according to the module to which they belong.
  • A rational-lisp module was added to provide a base configuration for the Lisp family of languages: Common Lisp, Clojure, Scheme, and Racket.
  • A fix for the Doom modeline configuration.

New Issues

  • An issue was raised about where transient and other state files for Emacs should live. Currently, files like the bookmarks, and diary files live in the Emacs home directory rather than the Rational Emacs path. There is a PR in draft form to resolve this issue.
  • An issue was raised related to the friction caused by adding documentation when modules are added, specifically that the process is not quite straight forward. Some suggestions were made, especially to make use of GitHub actions, but no work has been made to configure those yet.
  • A discussion was started about not having the yasnippets package included and how that left the experience incomplete, especially as several packages provide snippets based on yasnippets.
  • A suggestion for naming modules was raised, specifically to follow a pattern of classifying modules by placing them into a hierarchy of folders, for example language based modules might go in the modules/languages folder. This was also a topic brought up on the recent stream by David Wilson.

Help Wanted!

There are still plenty of modules and documentation which need to be addressed. We'd love to have your pull requests for anything you see to make Rational Emacs more complete. Need ideas? Reach out to me or file an issue and we'll help you out!

Shameless Plug

If you enjoy configuring Emacs and tweak yours often, you might consider giving Rational Emacs a try. I'm sure you'll find some rough edges, and when you do, I invite you to open an issue, or submit a pull request. Or, maybe you won't find any rough edges and this will be just the thing you need. I'm not holding my breath on that just yet.

If you enjoy crafting your computing experience, from hacking on Emacs, your Linux/Mac/Windows configuration, maybe your Guix or NixOS home configuration, or whatever it is… consider joining the SystemCrafters community!

Tags: #emacs

Wow… Somehow I missed a month! Here is the update for June 2022!

I've tried to merge the pull requests as quickly as seemed reasonable while allowing the authors to update them at their own pace. In a few cases, it looked like the pull requests had been abandoned, so I pulled them, updated them, fixed any conflicts and merged them. As of the time of this writing, there are only two pull requests still outstanding, one of which I will be working on pulling, updating, and merging in the next few days or so. The other is a draft PR and I'm hoping the original author will come back to it and finish it as it looks like a really great addition.

Pull Requests

  • Some code cleanup and refactoring for the way the package repositories are updated occurred. Also several bits of documentation were added. Pressing C-h i and then finding the Rational Emacs menu entry now shows more information, in this case the modules rational-project and rational-completion.
  • Speaking of the rational-completion documentation, there are screenshots to help show the configuration working! I didn't even know that was possible (thought the texinfo stuff was text only!), so thanks to Stefan Thesing for the great work on that one!
  • The rational-completion module also received an update to include configuration for corfu, cape, and embark-consult.
  • New modules rational-ide and rational-python are now provided as some work toward addressing developers needs when using Emacs as a development environment.
  • A Troubleshooting section was added to the README which shows how to use packages from melpa by either installing them directly from the list-packages interface, or by using package.el's pinning feature. This information was provided in a few pull requests and Issues, but you had to dig around to find it. Since it has come up a few times, it made more sense to put it in a more obvious place to help users out.

Help Wanted!

There are still plenty of modules and documentation which need to be addressed. We'd love to have your pull requests for anything you see to make Rational Emacs more complete. Need ideas? Reach out to me or file an issue and we'll help you out!

Shameless Plug

If you enjoy configuring Emacs and tweak yours often, you might consider giving Rational Emacs a try. I'm sure you'll find some rough edges, and when you do, I invite you to open an issue, or submit a pull request. Or, maybe you won't find any rough edges and this will be just the thing you need. I'm not holding my breath on that just yet.

If you enjoy crafting your computing experience, from hacking on Emacs, your Linux/Mac/Windows configuration, maybe your Guix or NixOS home configuration, or whatever it is… consider joining the SystemCrafters community!

Tags: #emacs

In my last blog post, I introduced the Rational Emacs project. Since then, I have become one of the maintainers for the project! I was very excited to be asked to join the team and am super thrilled to participate in this capacity. So, since I've been helping out a bit, I thought it might be nice to provide an update on what's been going on since my last post. That being said, I'm not going to cover every single pull request we have merged, but I'll mention some of the more impactful and major changes we've made.

And, as I've been looking into the pull requests as they come in, I've been using Rational Emacs more frequently to the point I've started adding the bits from my personal configuration I find myself missing. So, while in my last post I said I wouldn't be migrating my configuration, it seems that I've been doing exactly that! I'm nearly to the point of having my complete configuration ported over to Rational.

Discussions

  • Using package.el instead of straight.el and related topics saw a lot of traffic. In the end, the consensus was to move to using package.el as it is in alignment with the principles. There were a couple of posts lamenting the switch in one way or another, as those users preferred straight.el. I provided a minimal example configuration to show how to get back to using straight.el for those who preferred it. This was probably the biggest change as it affected every module and was a significant deviation from the initial startup scripts.
  • Using short answers received a number of comments. This setting controls whether Emacs will ask for a y or n response instead of yes or no. In Emacs 27, we use advice for the configuration as it is easy for a user to remove. Originally, we used fset but that is fairly impossible to undo, and as it was set in the rational initialization files, meant a user would have to modify a file that might get overwritten later with a git pull or possibly cause a local conflict which the user must resolve. It is easy to remove the advice, but that issue was raised again recently. In Emacs 28, there is a simple variable which can be toggled, no advice needed.

Pull Requests

Besides the aforementioned switch to using package.el and the use of advice for the short answers configuration in Emacs 27, there were these interesting pull requests:

  • The example configuration didn't work since we used doom-snazzy as an example theme and it is not provided by doom-themes. That was fixed by changing doom-snazzy to doom-one everywhere.
  • Loading of custom.el. This was also an interesting topic of discussion, mostly on the PR itself, but in the end we load the file by default. We prefer the use of customize-set-variable which allows constructors or setters attached to the defcustom declaration to run. This leaves the variables in a “pending” state as they are not written to the custom file, but are loaded each time Emacs starts. However, certain work flows specifically related to Org Agenda files and .dir-locals.el which write to the custom-file and would be “lost” on the next run of Emacs since it wasn't originally loaded at startup. There were several iterations on this and eventually we just settled for the simplest approach of just loading the file if it exists.
  • We started a group for Rational Emacs defcustom variables. There is still more to do on this to refine where module variables show up.
  • There is now a rational-speedbar module for those who want a tree of things similar to other editors. Speedbar is built-in to Emacs, launches in a separate frame, so it doesn't clobber your current frame's window layout, and has some nice features.
  • Info documentation has been started. There is plenty to do with this particular effort, but at least there is a start. If you try C-h i you'll find a menu option called Rational Emacs at the top off the list.

Shameless Plug

If you enjoy configuring Emacs and tweak yours often, you might consider giving Rational Emacs a try. I'm sure you'll find some rough edges, and when you do, I invite you to open an issue, or submit a pull request. Or, maybe you won't find any rough edges and this will be just the thing you need. I'm not holding my breath on that just yet.

If you enjoy crafting your computing experience, from hacking on Emacs, your Linux/Mac/Windows configuration, maybe your Guix or NixOS home configuration, or whatever it is… consider joining the SystemCrafters community!

Finally…

I have really enjoyed working on this project! I'm super thrilled I was asked to participate as a maintainer, so I hope I'm doing a good job. I'll put another update post in the future, maybe this will be a monthly thing. It kinda depends on how much is going on with the project. If there is a lot, maybe a more frequent update pace makes sense. We'll see how it goes.

Tags: #emacs

There is a new project in town! It is called Rational Emacs and is intended to be a sensible starting point for configuring Emacs. I've been contributing to it for a bit (along with many others, of course), and I have learned a few things along the way.

Project Principles

I'm particularly attracted to the principles behind this project. It's always good to start with some basic ideas around how to approach things:

  • Minimal, modular configuration. The intent with this is to provide modules that can be independently included and provides as little as possible for configuration.
  • Prioritize built-in Emacs functionality. I love this! The idea is to use very few external packages, and the ones to use should be chosen for their enhancement of core features rather than complete rewrites. The examples are:
    • project.el instead of Projectile
    • tab-bar-mode instead of Perspective.el or others
    • eglot instead of lsp as it is built to leverage built-in functionality.
    • corfu instead of company
    • And the list goes on.
  • Works well in the terminal. As some people prefer the terminal, or have no option (for example, over an ssh connection), this should still work well.
  • Helps you learn Emacs Lisp. This is a great feature! Things should (ideally) be consistently and clearly written so it is possible to understand what is going on in the configuration.

For myself, I really resonate with these ideas. My own configuration has been growing more and more towards these principles for a while. I stopped using use-package because I wanted to figure out how to manage packages and configuration without macros hiding that from me. I still am using a lot more packages that are not quite that close to core Emacs, but that will be changing soon.

For the things I've contributed, I've tried to keep things reversible as well. So, whatever configuration I provide, the eventual user should be able to easily reverse or override that decision with one of their own.

The Journey So Far

There was an initial flurry of activity the first week and a lot got done quickly. I think for the most part, the community of people participating have agreed on just about everything. The discussions have been super interesting, insightful, and thought provoking. There has been a lot to gain from just reading people's posts on issues and pull requests. It's a very rich field full of diversity!

The second and third weeks have seen much less activity. Life happens, and this project isn't the highest priority for the maintainer. Inevitably, things have slowed to a temporary halt. I'm sure additional people will eventually be added to list of maintainers, but for the moment, we are a little bit stalled.

Stuff I've Learned

There is so much, I'm not sure I'll capture it all here.

  • Skeleton and Tempo are interesting replacements for the venerable Yasnippets package, and both are built-in. Neither are documented very well (at all!) but reading the code was interesting and then providing a skeleton for “rational modules” was fun.
  • Tempel is a nice enhancement to tempo.
  • Corfu as a Company r