Skip to content

Commit

Permalink
Add "system-info" fn for IRC support
Browse files Browse the repository at this point in the history
I have seen many "I have a problem" discussions in the Gitter chat which
starts with a barrage of questions "Which OS? Which Emacs version?",
etc., so I thought it may be useful to have one function that will
generate the info to be copy-pasted into the Gitter chat and hence both
the user and others helping in the Gitter chat can jump directly to
solving the problem instead of the support volley to figure out the
setup.

Example output:

ELISP> (spacemacs/system-info)
"OS: darwin Emacs: 24.5.1 Spacemacs: 0.103.0 Spacemacs branch: develop
Layers: ((auto-completion :variables auto-completion-enable-help-tooltip
t) better-defaults emacs-lisp git markdown org (shell :variables
shell-default-height 30 shell-default-position (quote bottom))
syntax-checking version-control c-c++ clojure dash github html osx
python semantic sql)"

References:

From
syl20bnr#2033 (comment) :

> Also what is your emacs version and OS ?

From
syl20bnr#2042 (comment) :

> What's your Emacs version ? I presume it comes from the semantic
layer, can you test without the semantic layer ?
  • Loading branch information
swaroopch authored and syl20bnr committed Aug 1, 2015
1 parent 793134a commit 6798c5b
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -184,9 +184,15 @@ are extensively documented.
If you need help, ask your question in the [Gitter Chat][] and a member of the
community will help you out.

Tip: Run `SPC : spacemacs/system-info` (it gathers info about your
Spacemacs setup and copies to your clipboard) and then paste into the
Gitter chat so that others know the basic info about your setup
necessary to help diagnose any issues you may be facing.

If you prefer IRC, connect to the [Gitter Chat IRC server][] and join the
`#syl20bnr/spacemacs` channel.


# Prerequisites

## Emacs
Expand Down
16 changes: 16 additions & 0 deletions core/core-spacemacs.el
Original file line number Diff line number Diff line change
Expand Up @@ -232,4 +232,20 @@ FILE-TO-LOAD is an explicit file to load after the installation."
(force-mode-line-update))
(spacemacs/check-for-new-version spacemacs-version-check-interval))))

(defun spacemacs/system-info ()
"Gathers info about your Spacemacs setup and copies to clipboard."
(interactive)
(kill-new
(format
(concat "OS: %s"
" Emacs: %s"
" Spacemacs: %s"
" Spacemacs branch: %s"
" Layers: %s")
system-type
emacs-version
spacemacs-version
(spacemacs/git-get-current-branch)
dotspacemacs-configuration-layers)))

(provide 'core-spacemacs)

0 comments on commit 6798c5b

Please sign in to comment.