Skip to content
Stack Exchange for Emacs
Branch: master
Clone or download
vermiculus Merge pull request #359 from vermiculus/bug/358
Do not corrupt the answer list while sorting
Latest commit 49358ea Jan 14, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
bot Update copyrights Jan 29, 2018
resources Add new icon Feb 8, 2015
test Improve question printing logic. Apr 7, 2015
.agignore Start tracking tag-bot data Jan 4, 2015
.gitignore Update .gitignore Jan 4, 2015
.travis.yml Hotfix Travis/Gitter integration Jan 7, 2015 Include bug report instructions in CONTRIBUTING Feb 11, 2015
Cask Use package-file directive in Cask Dec 12, 2014
Makefile Merge pull request #198 from vermiculus/organize Jan 4, 2015 Fix typo on Sep 18, 2018
list-and-question.png Add screenshot Dec 21, 2014
sx-auth.el Use new home for authentication Jun 6, 2018
sx-babel.el Update copyrights Jan 29, 2018
sx-button.el Update copyrights Jan 29, 2018
sx-cache.el Update copyrights Jan 29, 2018
sx-compose.el Update copyrights Jan 29, 2018
sx-encoding.el Update copyrights Jan 29, 2018
sx-favorites.el Update copyrights Jan 29, 2018
sx-filter.el Update copyrights Jan 29, 2018
sx-inbox.el bugfix: propertize unread inbox items Feb 12, 2018
sx-interaction.el Update copyrights Jan 29, 2018
sx-load.el Update copyrights Jan 29, 2018
sx-method.el Update copyrights Jan 29, 2018
sx-networks.el Update copyrights Jan 29, 2018
sx-notify.el Update copyrights Jan 29, 2018
sx-question-list.el Update copyrights Jan 29, 2018
sx-question-mode.el Merge pull request #337 from basil-conto/blc/get-win Feb 9, 2018
sx-question-print.el Do not modify the answer list when sorting Jan 13, 2019
sx-question.el Update copyrights Jan 29, 2018
sx-request.el Update copyrights Jan 29, 2018
sx-search.el Update copyrights Jan 29, 2018
sx-site.el Update copyrights Jan 29, 2018
sx-switchto.el Update copyrights Jan 29, 2018
sx-tab.el Update copyrights Jan 29, 2018
sx-tag.el Define sx-tag--format-tags to format multiple tags. Feb 14, 2015
sx-time.el Update copyrights Jan 29, 2018
sx-user.el Update copyrights Jan 29, 2018
sx.el File issue using Magithub if available Feb 9, 2018 Update copyrights Jan 29, 2018

SX – Stack Exchange for Emacs Chat.svg

SX is a full-featured Stack Exchange mode for GNU Emacs 24+. Using the official API, it provides a versatile experience for the Stack Exchange network within Emacs itself.



As always, C-h m is the definitive resource for functionality, but here are a few highlights:

Viewing Questions

Question Lists

View questions with one of the sx-tab- commands. These translate roughly to the different ‘tabs’ that you can view on the official site. Implemented tabs include:

All questions.
u Unanswered questions.
U Unanswered questions in your followed tags.
f Featured questions.
* Your starred questions.
h The frontpage of the site.
m Toggle between the meta and main sites.
n Newest questions first.
v Highest-scoring questions first.
w Hot questions of the week.

Inside SX buffers, you can switch to other tabs by typing s followed by the key listed with the tab above. You can also use sx-tab-switch (s t) to switch between tabs with completion. Each of these opens up a list of questions, and you can further customize the ordering of the list with O. Other keys include:

n and p
Navigate the list.
j and k
Navigate while viewing the question in a separate buffer.
s s
Switch site.
Visit the thing-at-point in your browser.
Copy the thing-at-point (usually a link).
u and d
Upvote and downvote.
Open the question buffer.

Questions and Answers

u and d
Upvote and downvote the question, answer, or comment at point.
Add an answer.
Edit the question or answer (or comment if it’s yours; the usual rules apply)
Star the question.
Delete the question/answer/comment if you are able.
Copy code at point.

Your Inbox

View your inbox
Visit inbox item


SX is now available on MELPA! Both the stable release and the development version can be found there. Install it via the Package Menu or just run

M-x package-install RET sx RET


If you are going to be doing any asking/answering/commenting/upvoting/downvoting/ etc., you must use sx-authenticate to provide SX with an authentication token to act on your behalf.

After authentication, you will be redirected to the project page. This page will prominently display your authentication token. Keep this secret! It’s as good as your password as far as StackExchange is concerned. Copy and paste the token into the prompt in Emacs.

SX will store this authentication token in plain text in the sx folder of your .emacs.d. Please take any and all steps necessary to protect the security of your account. This token is as good as a password.

Sample Keybindings

With use-package

(require 'use-package)

(use-package sx
  (bind-keys :prefix "C-c s"
             :prefix-map my-sx-map
             :prefix-docstring "Global keymap for SX."
             ("q" . sx-tab-all-questions)
             ("i" . sx-inbox)
             ("o" . sx-open-link)
             ("u" . sx-tab-unanswered-my-tags)
             ("a" . sx-ask)
             ("s" . sx-search)))

Standard (With Prefix Key)

Shamelessly stolen from Endless Parentheses.

(define-prefix-command 'launcher-map)
(global-set-key (kbd "s-l") 'launcher-map)
(define-key launcher-map "qq" #'sx-tab-all-questions)
(define-key launcher-map "qi" #'sx-inbox)
(define-key launcher-map "qo" #'sx-open-link)
(define-key launcher-map "qu" #'sx-tab-unanswered-my-tags)
(define-key launcher-map "qa" #'sx-ask)
(define-key launcher-map "qs" #'sx-search)


Please help contribute! Doing any of the following will help us immensely:

For a better view of all of the open issues, take a look at our lovely Waffle board. Feel free to take the torch on anything in backlog or ready. If you have thoughts on any other issues, don’t hesitate to chime in!

See also



SX has no explicit need for an icon, although standard SVG files have been gathered in resources/ if anyone would fancy a crack at it.

You can’t perform that action at this time.