

A Peek at Emacs 24.4: Auto-indentation by Default - mjn
http://emacsredux.com/blog/2014/01/19/a-peek-at-emacs-24-dot-4-auto-indentation-by-default/

======
pavpanchekha
It's great that the Emacs team sees the need for more modern defaults. Emacs's
great power, of course, is its ability to change to fit the user. But many
new-comers are, I think, turned off by its rather basic default state.
Thrusting every user into Emacs Lisp, while educational, does not hold the new
user's hand very well.

~~~
d0m
I agree. Although the flexibility of configuration is nice, it's sometimes I
big turn-off. Personally, I've had a time where loved to configure Vim and
Emacs (I've used both extensively). These days I'm using Sublime because I'm
overwhelmed and couldn't find the right Emacs plugin equivalent.

By the way, I was using Emacs with vim-mode, obviously ;-)

~~~
jbeja
What plugin are you referring to?

~~~
kroger
Probably evil?

[http://www.emacswiki.org/emacs/Evil](http://www.emacswiki.org/emacs/Evil)

~~~
jbeja
I was asking about the plugin in sublime text that doesn't have a equivalent
in emacs.

BTW: Evil-mode is awesome!.

------
pmr_
I really like where Emacs is going recently. The speed with which new features
move upstream has increased. There is a push by some developers for git to
make contributions easier and even some progress towards modernizing or
replacing good ol' info. That makes me confident that GNU Emacs is going to be
around and that the eco-system is going to stay healthy for some time.

~~~
edavis
It appears a wholesale switch to git is already in the works:
[http://esr.ibiblio.org/?p=5211](http://esr.ibiblio.org/?p=5211)

~~~
pmr_
This is what I was alluding to but just because someone is working on
something in an open source project doesn't mean it is ever going to happen.
Particularly something as controversial as switching to another VCS. If you
don't think this is controversial I encourage you to try it yourself with some
project that is dear to you.

~~~
ibrahima
It's also evident if you go through any big project's mailing list in the past
few years and search for git/mercurial/svn/cvs/dvcs or the like. I followed
Pidgin's devel mailing list for a while. For some reason, when they switched
away from SVN several years ago they switched to a very niche DVCS called
monotone which, among other oddities, had such a large data format/slow clone
process that they had a tarball of the database for download that you had to
then use to initialize your local checkout, because actually cloning the
database the normal way would take too long. I assume they chose it due to
some core developers' familiarity with it or something. Later, they eventually
realized this was a huge barrier to entry for new developers and there was a
protracted discussion/flame war about the replacement. One guy in particular,
felipec, seemed to spend days writing up long detailed posts about how hg was
inferior to git, which were more or less factual, but written in a
snarky/condescending tone, and the core developers never took him seriously
and made it clear that his input was not welcome. It's kind of funny, that guy
ended up writing a bunch of hg to git interoperability scripts ostensibly for
the sake of proving git's superiority, and those are now included in git-
contrib.

So, yeah, (D)VCS choice is probably a bigger holy war than editor, and getting
a project to switch is quite nontrivial. Especially a lot of the projects
you'd want to switch away from some poor DVCS, because they often stick to it
for some non-technical reason (eg. bzr seems to be largely a GNU thing).

------
kleiba
Emacs' indentation system is notoriously difficult to configure, so it's good
to see some work being done in that area. However, the particular point
described in the article is less exciting. I think every serious Emacs user
who wants this behavior (binding RET to newline-and-indent) has it set up this
way already anyway.

Some may consider it a good default behavior (though a matter of taste) for
_some_ modes (such as, e.g., programming language modes) but not for others
(e.g. text-mode). The default behavior so far has been "no automatic indent"
while now it will be "automatic indent". But since it will still be necessary
for the user to maintain a list of modes s/he wants it enabled it for,
therefore this change is really not such a big deal.

IMHO, the most pressing issue with indentation in Emacs is to make it easy for
the user to adapt it, and especially to adjust certain edge cases. Given the
mode-centered architecture of Emacs, this is a big challenge. But questions
about very specific indentation preferences pop up on sites like stackoverflow
all the time: people want to be able to say "I want a continuation of a line
be indented by four spaces, except when the line break is in the middle of the
argument list of a function definition -- then the arguments should all indent
to the same column."

Coming up with a configurable indentation system that works for every mode
would be very cool and thought-after feature.

~~~
agumonkey
I don't know if you were thinking about that, but Emacs provides smie (simple
minded indentation engine)
[https://www.gnu.org/software/emacs/manual/html_node/elisp/SM...](https://www.gnu.org/software/emacs/manual/html_node/elisp/SMIE.html)

used by tuareg-mode and sml-mode (AFAIK) with good results. I never used it
personally but I felt it should be mentioned if someone else wants to dig into
it.

------
bjourne
Most of the time you should use C-j to insert a new line, not RET. If you
press ctrl with your left hand and j with your right it is much more efficient
than RET because you dont have to move your hands from the home row.

~~~
6cxs2hd6
Maybe it depends on how big your hands are, but reaching RET doesn't require a
move off home for me?

Although it does use a pinkie, it's a nice hand-opening gesture, like when
playing piano. As opposed to the left-pinkie hand-scrunching gestures that
give some folks trouble.

~~~
bjourne
Perhaps it does. I can't press RET while my three other fingertips rests on j,
k, l. But I can press Ctrl (or Caps-Lock which I've remapped) comfortably with
resting fingers on s, d, f.

------
jbeja
I love emacs and vim, but this days i am using emacs with evil-mode because
IMHO emacs plugins have a higher quality than vim ones.

~~~
kansface
This is by no coincidence. Vim has a crippled plugin architecture.

------
blueskin_
Why do people like auto-indentation? It's just extra work undoing it when it
decides I need indents when I don't, plus the mental overhead of "will it
autoindent here?" all the time. Pasting is the worst, especially when it
decides that as some config starts with a comment, it should turn it all into
comments.

:set formatoptions-=ro and :set noautoindent are the first lines in my vimrc.

------
Peaker
I've had to revert back to emacs 23, because it seems emacs 24 has had a huge
performance regression in its c-mode.

Does anyone have any information about whether c-mode breakage in emacs 24 is
a known/fixed issue?

~~~
to3m
Which OS? Is this just c-mode?

~~~
Peaker
As far as I noticed it's just c-mode on Linux Mint.

------
codex
So Emacs innovation is basically at a halt, then.

