
Stack Exchange for Emacs - masolino
https://github.com/vermiculus/sx.el/
======
JeremyBanks
As it happens, the Emacs Stack Exchange site launched in public beta a couple
months ago.

[http://emacs.stackexchange.com/](http://emacs.stackexchange.com/)

(After first seeing the title, I assumed that's what this post was about!)

~~~
Lrigikithumer
That's certainly what the title implies, perhaps "Stack Overflow on Emacs"
would have been a better title.

------
wtbob
This is Yet Another Example of the amazing utility of being able to easily and
stably extend one's environment. emacs is just a text editor, but this project
is changing it into a Stack Exchange client. That's useful!

~~~
tuhdo
Emacs certainly is not just a text editor. Emacs is just a big REPL, a REPL
with a powerful text editor instead of minimal command line interface. Right
on the homepage:
[http://www.gnu.org/software/emacs/](http://www.gnu.org/software/emacs/), it
is written that:

"GNU Emacs is an extensible, customizable text editor—and more. At its core is
an interpreter for Emacs Lisp, a dialect of the Lisp programming language with
extensions to support text editing."

Text editing is a subset of Emacs and Emacs Lisp, not the other way around.

~~~
wtbob
> Emacs certainly is not just a text editor.

I know. But it was written as just a text editor—but an extensible one, and so
it has grown to be a lot more. Which is really pretty awesome.

~~~
tuhdo
> But it was written as just a text editor

No it's not. It is really a big REPL optimized for text processing. You
compare Emacs to the like of Python, not just some random editor. Unlike other
editors that have an _optional_ extension language, if you remove Emacs Lisp,
effective you remove Emacs. Even file opening is written in Emacs Lisp.

~~~
wtbob
Dude, I get what you're saying, but you're like a guy who comments on a
Facebook picture of a newborn with 'The reason you think he's cute is purely
evolutionary.'

Yes, of course emacs is a big REPL optimised text processing. But it's
optimised for text processing because…it started out as a text editor.

The whole point of what I wrote is that emacs started out as a simple text
editor (yes, I'm aware that its origin was as text editing macros for TECO)
and due to its extensibility it can and has become so much more.

Really, I think you got _way_ too hung up on the word 'just.'

We both love emacs. We both love having a fully-extensible text editing
environment.

~~~
tuhdo
Fair enough :)

I just wanted to clarify in case someone read your comments and have a wrong
impression that Emacs is a text editor like Vim. Nothing more, nothing less.

------
tjradcliffe
Emacs makes complex things possible and simple things hard:
[http://www.tjradcliffe.com/?p=74](http://www.tjradcliffe.com/?p=74)

That post is the fifth most popular thing on my blog, all from search-hits
looking for how to count words in Emacs.

~~~
chongli
What's your definition of simple, in this case? A million different users want
a million different simple things. An editor that gives all of these functions
equal weight is not an editor anyone would want to use.

------
omouse
if you're only using StackOverflow, I created a small mode called sos-mode:
[https://github.com/omouse/emacs-sos](https://github.com/omouse/emacs-sos)

The difference is that sos-mode is made for getting answers quickly and being
able to copy/paste any code snippets. The output buffer of answers uses org-
mode so it's easy to tag the list.

A full-blown stackexchange mode may be good if you're answering questions or
looking for a lot of answers but I don't see that happening a lot. Most users
are anonymous (sos-mode doesn't require login) and just want to get some
answer.

------
sayemm
This is a killer idea! Looking forward to seeing where it goes... will be as
helpful, if not more, than ERC has been for me while searching for answers.

------
psp
I never fully "got" emacs even though it was the popular editor during
university times and I occasionally use it for quick server admin stuff.

Today I feel it has missed its boat with good looking and user friendly stuff
available like Sublime Text, Atom, Eclipse and even cloud IDEs.

I cant help but to laugh quietly to addons like this.

~~~
tuhdo
Can Sublime Text/Atom do all of this here:
[https://news.ycombinator.com/item?id=8639804](https://news.ycombinator.com/item?id=8639804)
?

I want to jump to any file at any time regardless of where I am in the project
instantly, can Sublime do it? And even if a project has 30-40k files, it must
be fast and make me jump instantly. See the demos in this guide for details:
[http://tuhdo.github.io/helm-projectile.html](http://tuhdo.github.io/helm-
projectile.html)

Atom has a limit of 2MB text file which is worse than Vim in the 90s.

~~~
giovannibajo1
> I want to jump to any file at any time regardless of where I am in the
> project instantly, can Sublime do it? And even if a project has 30-40k
> files, it must be fast and make me jump instantly

Yes, Sublime handles that smoothly. Do a linux tree clone, enter the
directory, run "subl .", then ctrl+p (or cmd+p) and start typing whatever. It
fuzzy-completes your typing and immediately displays your selection as a
preview in the background as well.

Video here: [https://www.dropbox.com/s/wjc9k8ocwiukq5t/sublime-
linux.mov?...](https://www.dropbox.com/s/wjc9k8ocwiukq5t/sublime-
linux.mov?dl=0)

(note the percentage in the footer, it was indexing in background the files
for code completion and other stuff, since I had just cloned it, but the file
jumping still works smoothly).

I skimmed through your other videos, and I didn't instantly see anything that
I couldn't do with a recent editor as well.

~~~
tuhdo
Emacs also has that preview feature when you move the highlighter to a
selection. However, I feel it annoying because screen keeps changing while I
narrow to a file or a set of files, and luckily it is off by default.

How about other thing? Like switch between source and header files without
configuring anything? Or Jump to any file I see instantly, even without full
filepath and you only have just a name and without typing the filename?
[http://tuhdo.github.io/static/helm-projectile/helm-
projectil...](http://tuhdo.github.io/static/helm-projectile/helm-projectile-
find-files-dwim-1.gif)

Can it do powerful automatic indentation: [https://github.com/Bruce-
Connor/aggressive-indent-mode](https://github.com/Bruce-Connor/aggressive-
indent-mode). It does not only indent the current line, but the whole Semantic
context around your cursor. Demos inside the homepage.

Beautiful compile output: [http://tuhdo.github.io/static/c-ide/compilation-
compile.gif](http://tuhdo.github.io/static/c-ide/compilation-compile.gif)

Open man page for symbol at cursor: [http://tuhdo.github.io/static/part3/helm-
man-woman.gif](http://tuhdo.github.io/static/part3/helm-man-woman.gif)

Emacs can save any arbitrary window layout and restore it later. You can even
have workspace in Emacs, each can store a set of window layouts (i.e. one for
debugging, one for reading doc, one for just source code...), can be saved as
a _bookmark_ and later restore in future session. In Emacs, you can bookmark
everything, even a git commit.

~~~
giovannibajo1
> How about other thing? Like switch between source and header files without
> configuring anything?

Yes (ctrl+alt+up).

> Or Jump to any file I see instantly, even without full file path > and you
> only have just a name and without typing the filename?

I'm not sure I understand. I mentioned fuzzy completion before, the way it
works is that it matches even subparts of the paths and/or filename, with the
only requisite of preserving left to right. For instance if I type "bmx25" I
can find boot-related imx25 files, because it will match the "b" from the boot
path, and then "mx25" from the filename (even a few directories down the
path).

> Can it do powerful automatic indentation:

I never saw such a plugin; generically speaking, plugins can do stuff on
keypresses (in a separate thread of course to avoid blocking), for instance
you can configure the linters to run at each keypress, at each save, every Nth
seconds, after N idle millesconds, etc.

So it depends whether you want to compare the richness of the ecosystem or the
core capabilities of the editor.

> Beautiful compile output:

I honestly don't know; it doesn't that by default, though there might be some
plugin to that effect; when I use compiled languages, I prefer a linter-like
approach to showing compilation errors, so I don't use this kind of plugins in
my own environment.

> Open man page for symbol at cursor

yes, this is supported, though I personally switched to Dash
([http://kapeli.com/dash](http://kapeli.com/dash)) recently, which is similar
but much more powerful than just man, as it allows to cache and index
documentation from dozens of programming environment and frameworks, taking
care of the different formats, etc. So for instance with the same shortcut I
can get the help for a POSIX function from its man page, or a Boost class
method from their official documentation, and everything is blazingly fast
because of local cache and index, so my computer doesn't need to go to
boost.org to show that page.

> Emacs can save any arbitrary window layout and restore it later.

You can do that in Sublime, but you need to define a project (which, in its
most basic form, is just a "save project" command after having opened a
directory); at that point, you have a shortcut to switch between projects with
fuzzy completion, and each project keeps the full workspace, ALSO including
unsaved modifications to files (which sounds crazy but I love it) as it means
that you can do it without even thinking once.

\---

Generally speaking, I don't think there's a world of difference. I find vim
harder to replicate in its more advanced features, with its approach to
command combinations which is totally different from anything else; but emacs
introduced to the world the concept an extendible editor based on complicated,
targeted commands (which is the one in widespread usage today), so I think
that any sufficiently advanced editor can get very close to emacs in most
features.

Obviously emacs has many years of history and contributors that created a vast
ecosystem, but there might also be some ecosystem bias given its legacy (e.g.:
I think it's safe to assert that most web programmers don't use emacs, so I
think it's normal to expect Sublime or Atom support for web programming to be
generically more advanced).

In fact, I don't think Emacs have a specific paradigm that is hard to
replicate, as it's the contrary (what used to be special in Emacs 20 years ago
as become the default for all editors nowadays). We can battle on the last
advanced feature in one specific workflow, but I think the discussion then
becomes anecdoctal or at least very niche-related.

If look at Atom for instance, they introduced a concept where the editor
window is not simply line-based, but they can open graphical windows within
it, which is a paradigm shift which might introduce unique features, very hard
to replicate. See for instance their nested CSS editing feature, which is very
nice because it helps my brain limit the context switching a lot.

~~~
tuhdo
If you want image display, there Emacs has it eons ago, and people write plug-
ins for it, like this one: [https://github.com/josteink/wsd-
mode](https://github.com/josteink/wsd-mode)

Emacs is also a fine PDF reader. I can search text in the PDF file with
highlighting and a table of content side by side. All can be controlled with
the keyboard: [https://tuhdo.github.io/static/emacs-read-
pdf.gif](https://tuhdo.github.io/static/emacs-read-pdf.gif). I never use
Evince again.

~~~
giovannibajo1
No, I don't want image display. I want to replicate Atom's inlining editing
features. Did you look into that? This is one example:
[https://discuss.atom.io/t/expand-css-rules-inline-
html/12437](https://discuss.atom.io/t/expand-css-rules-inline-html/12437)

~~~
tuhdo
i think skewer-mode is close enough: [https://github.com/skeeto/skewer-
mode](https://github.com/skeeto/skewer-mode) for live editing.

I don't think that inlining feature really help much. Generally, if you want
to access a css element in Emacs, you jump in, edit and jump back in an
instant to see your result.

See also web-mode: [http://web-mode.org](http://web-mode.org)

------
VLM
Questions asking us to recommend or find a tool, library or favorite off-site
resource are off-topic for Stack Overflow as they tend to attract opinionated
answers and spam. Instead, describe the problem and what has been done so far
to solve it.

(just kidding. I don't like SE but I'm sure this is a great tool for people
who do like SE.)

~~~
gaalze
Please don't have an opinion when posting on StackExchange. Democracy and
committees are what make America great and why we chose XML over
S-Expressions.

