Last active
June 9, 2026 19:37
-
-
Save hlissner/7733d13dec09746ea044e2bef98424cb to your computer and use it in GitHub Desktop.
Generate an info dump about your Emacs environment. Usage instructions are in comments.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (defun emacs-info () | |
| (interactive) | |
| (pop-to-buffer | |
| (with-current-buffer (get-buffer-create "*emacs info*") | |
| (erase-buffer) | |
| (let ((standard-output (current-buffer))) | |
| (mapc (lambda (line) | |
| (princ (format "%s %s" (car line) (cdr line))) | |
| (terpri (current-buffer))) | |
| `((generated . ,(format-time-string "%b %d, %Y %H:%M:%S")) | |
| (system ,system-type ,(window-system)) | |
| (emacs ,emacs-version | |
| ,(bound-and-true-p emacs-repository-branch) | |
| ,(and (stringp emacs-repository-version) | |
| (substring emacs-repository-version 0 9)) | |
| ,(format "EMACS=%s/%s" (abbreviate-file-name invocation-directory) invocation-name) | |
| ,(format "EMACSD=%s" (abbreviate-file-name user-emacs-directory))) | |
| (shell . ,(abbreviate-file-name shell-file-name)) | |
| (features ,@system-configuration-features) | |
| (traits ,@(delq | |
| nil (list (cond (noninteractive 'batch) | |
| ((display-graphic-p) 'gui) | |
| ('tty)) | |
| (cond ((daemonp) 'daemon) | |
| ((and (fboundp 'server-running-p) | |
| (server-running-p) | |
| 'server))) | |
| (and (boundp 'doom-version) | |
| `(doom . ,doom-version)) | |
| (and (boundp 'spacemacs-version) | |
| `(spacemacs . ,spacemacs-version)) | |
| (and (boundp 'chemacs-version) | |
| (intern (format "chemacs-%s" chemacs-version))) | |
| (and (featurep 'exec-path-from-shell) | |
| 'exec-path-from-shell) | |
| (and (file-symlink-p user-emacs-directory) | |
| 'symlinked-emacsdir) | |
| (and (stringp custom-file) | |
| (file-exists-p custom-file) | |
| 'custom-file)))) | |
| (elpa ,@(condition-case e | |
| (progn | |
| (unless (bound-and-true-p package--initialized) | |
| (package-initialize)) | |
| (mapcar #'car package-list)) | |
| (error (format "<%S>" e))))))) | |
| (current-buffer)))) |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To use this command:
The
emacs-infocommand will create a new buffer, switch to it, and fill it with an information dump about your Emacs session and environment (which shouldn't include personal/identifiable information; but feel free to modify it as you like).Here are a couple methods to use it. Choose the method that seems easiest or most available to you; they all produce the same result:
Copy the snippet to your Emacs config. Restart Emacs. Type
M-x emacs-info(i.e. alt-x followed byemacs-info). ThenM-x save-bufferto save the emacs-info dump to a file.Copy it into an elisp buffer in Emacs, run
M-x eval-buffer, thenM-x emacs-info.M-x save-bufferto save its contents to a file.Save the snippet to a file, say
emacs-info.el, then run this in the shell:emacs -l emacs-info.el -f emacs-info. This will launch Emacs with the emacs-info buffer visible.M-x save-bufferto save it to a file.What if this doesn't work for me?
If all else fails, execute
emacs --versionin the shell, copy its output to a file, and upload that instead. On linux this is as easy as:emacs --version > emacs-version.txtThen upload
emacs-version.txt.