Quantcast
Channel: CodeSection,代码区,Linux操作系统:Ubuntu_Centos_Debian - CodeSec
Viewing all articles
Browse latest Browse all 11063

Marcin Borkowski: Current Emacs version

$
0
0

When mailing to the Emacs devs about bugs, you should obviously mention the version of Emacs you are using. This is usually done with M-x emacs-version , which displays the version info in the minibuffer (or inserts it at point when invoked with a prefix argument). However, if you happen to use a development version of Emacs, compiled from source, this is not very meaningful it does not contain any information about the actual commit hash. I asked about it on the mailing list, and learned about the emacs-repository-get-version funtion (which is not interactive, btw), which returns the VCS’s idea of the “current version” (nowadays it is just Git’s commit hash).

In fact, since I happen to report Emacs bugs once in a while, I have this in my init.el :

(defun insert-debug-version-info () "Insert version of Emacs and 7 characters of the commit hash." (interactive) (insert (format "GNU Emacs %s (commit %s)" emacs-version (substring (emacs-repository-get-version) 0 7))))

CategoryEnglish , CategoryBlog , CategoryEmacs


Viewing all articles
Browse latest Browse all 11063