Magit 4.6 Released

signa111 pts0 comments

Emacsair! Magit 4.6 released

">

Magit 4.6 released

I am excited to announce the release of Magit version 4.6, consisting of 313 commits since the last release half a year ago.<br>The release notes can be found here.

It’s Magit! A Git interface inside Emacs

Magit is a text-based Git user interface that puts an unmatched focus<br>on streamlining workflows. Commands are invoked using short mnemonic<br>key sequences that take the cursor’s position in the highly actionable<br>interface into account to provide context-sensitive behavior.

With Magit you can do nearly everything that you can do when using Git<br>on the command-line, but at greater speed and while taking advantage<br>of advanced features that previously seemed too daunting to use on a<br>daily basis. Many users will find that by using Magit they can become<br>more effective Git user.

For more information about Magit, see<br>https://magit.vc and<br>these blog posts.

Please consider sponsoring my work.<br>Thank you! — Jonas Bernoulli

Blob improvements

The primary focus of this release are blob-visiting buffers. For<br>now the hope is that most users will find working with such buffers<br>slightly more pleasant, without necessarily becoming aware that<br>anything changed. The goal was to pay off technical debt and to<br>prepare for future changes.

Visiting blobs now always involves magit-find-file-noselect, even<br>when an existing buffer may be involved. The behavior of this<br>function is getting closer to that of find-file-noselect.

Implemented support for visiting blobs for the benefit of features<br>such as syntax-highlighting, as opposed to the user visiting it<br>explicitly. Such “volatile” blob buffers are hidden and are cached<br>for a while, in case they are needed again. If the user visits a<br>hidden cached blob, the buffer is renamed to reveal it, and it is<br>no longer subject to garbage collection.

Blobs can now alternatively be visited with nothing but a blob<br>object id (instead of a revision and a path).

Blob-visiting buffers can now be reverted with g, which is useful<br>when the buffer is visited via, e.g., a branch, as opposed to a<br>revision or blob object id. The buffer is not needlessly refreshed,<br>if the blob oid does not change.

Improved support for jumping to the same location in another blob,<br>from a buffer visiting a blob or file.

Experimental syntax highlighting in diffs

Syntax highlighting can now be enabled for diffs. This is disabled<br>by default, because the work is still being performed synchronously,<br>which leads to noticeable delays for large diffs and can be sluggish<br>even for smaller diffs.

A future release is going to add support for asynchronous diff<br>syntax highlighting. (The blob buffer cache added in this release<br>does help, but is not enough.)

Configure magit-diff-fontify-hunk to try out this feature now, but<br>please just disable it again, if it turns out to still be too slow<br>for your taste. If you enable this, you should also customize the<br>new option magit-diff-specify-hunk-foreground and possibly the new<br>option magit-diff-use-indicator-faces as well.

Improved Git hook to Elisp hook bridge

The new Git variables hook.NAME.event and hook.NAME.command are now<br>used to call Elisp hooks from Git hooks.

After waiting for such functionality for two decades, I came to the<br>conclusion that this will never be implemented, and finally added a<br>noisy kludge to get the same functionality anyway, in the previous<br>release. Of course, just one release later, Git added the missing<br>functionality 😝. We now use Git’s variables, which means that Elisp<br>hooks can now only be called from Git hooks when using Git v2.54.0<br>or greater.

Improved commit message authoring

Added support for compiling a list of definitions that are modified<br>in a diff, and for inserting such lists when authoring commit<br>messages. The new commands git-commit-insert-changelog-gnu and<br>git-commit-insert-changelog-plain insert such list and can be<br>invoked from the same menu (on C-c C-i), which is used to insert<br>commit trailers.

When authoring commit messages, complete-symbol now completes<br>against modified definitions and symbols appearing in modified<br>lines.

Please consider making a donation to support my work<br>on<br>Magit,<br>Transient,<br>Forge,<br>Package-Build,

Melpa,<br>Emacsmirror and<br>my<br>other<br>packages.

This is how I make a living.

Thank you! — Jonas Bernoulli

Some alternative donation options are available.

Comments on Reddit and Github.

Posted on 1st July 2026

magit blob release visiting buffer commit

Related Articles