Skip to content

Commit

Permalink
Rename system-info to describe-system-info and add it to SPC h d s
Browse files Browse the repository at this point in the history
  • Loading branch information
syl20bnr committed Aug 1, 2015
1 parent 6798c5b commit e97c85e
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 23 deletions.
29 changes: 16 additions & 13 deletions core/core-spacemacs.el
Original file line number Diff line number Diff line change
Expand Up @@ -232,20 +232,23 @@ 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 ()
(defun spacemacs/describe-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)))
(let ((sysinfo (format
(concat "#### System Info\n"
"- OS: %s\n"
"- Emacs: %s\n"
"- Spacemacs: %s\n"
"- Spacemacs branch: %s\n"
"- Layers:\n```elisp\n%s```\n")
system-type
emacs-version
spacemacs-version
(spacemacs/git-get-current-branch)
(pp dotspacemacs-configuration-layers))))
(kill-new sysinfo)
(message (concat "%s\nInformation has been copied to clipboard.\n"
"You can past it in gitter chat.") sysinfo)))

(provide 'core-spacemacs)
26 changes: 16 additions & 10 deletions doc/DOCUMENTATION.org
Original file line number Diff line number Diff line change
Expand Up @@ -136,12 +136,17 @@
- [[#line-formatting][Line formatting]]
- [[#replacing-text-with-iedit][Replacing text with iedit]]
- [[#iedit-states-key-bindings][iedit states key bindings]]
- [[#state-transitions][State transitions]]
- [[#in-iedit-state][In iedit state]]
- [[#in-iedit-insert-state][In iedit-insert state]]
- [[#examples][Examples]]
- [[#replacing-text-in-several-files][Replacing text in several files]]
- [[#commenting][Commenting]]
- [[#deleting-files][Deleting files]]
- [[#editing-lisp-code][Editing Lisp code]]
- [[#lisp-key-bindings][Lisp Key Bindings]]
- [[#lisp-state-key-bindings][Lisp state key bindings]]
- [[#emacs-lisp-specific-key-bindings][Emacs lisp specific key bindings]]
- [[#managing-projects][Managing projects]]
- [[#registers][Registers]]
- [[#errors-handling][Errors handling]]
Expand Down Expand Up @@ -1066,16 +1071,17 @@ bindings.
information about functions, variables, modes etc. These commands are bound
thusly:

| Key Binding | Description |
|-------------+----------------------------------------|
| ~SPC h d b~ | describe bindings in a =helm= buffer |
| ~SPC h d c~ | describe current character under point |
| ~SPC h d f~ | describe a function |
| ~SPC h d k~ | describe a key |
| ~SPC h d m~ | describe current modes |
| ~SPC h d p~ | describe a package |
| ~SPC h d t~ | describe a theme |
| ~SPC h d v~ | describe a variable |
| Key Binding | Description |
|-------------+-------------------------------------------------------|
| ~SPC h d b~ | describe bindings in a =helm= buffer |
| ~SPC h d c~ | describe current character under point |
| ~SPC h d f~ | describe a function |
| ~SPC h d k~ | describe a key |
| ~SPC h d m~ | describe current modes |
| ~SPC h d p~ | describe a package |
| ~SPC h d s~ | copy ready to paste system information in gitter chat |

This comment has been minimized.

Copy link
@swaroopch

swaroopch Aug 1, 2015

Contributor

Can this be simplified to "copy system information that you can paste in gitter chat" or something similar?

| ~SPC h d t~ | describe a theme |
| ~SPC h d v~ | describe a variable |

Other help key bindings:

Expand Down
1 change: 1 addition & 0 deletions spacemacs/keybindings.el
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ Ensure that helm is required before calling FUNC."
(spacemacs||set-helm-key "hdk" describe-key)
(spacemacs||set-helm-key "hdm" describe-mode)
(spacemacs||set-helm-key "hdp" describe-package)
(evil-leader/set-key "hds" 'spacemacs/describe-system-info)
(spacemacs||set-helm-key "hdt" describe-theme)
(spacemacs||set-helm-key "hdv" describe-variable)
(spacemacs||set-helm-key "hL" helm-locate-library)
Expand Down

0 comments on commit e97c85e

Please sign in to comment.