The first version of Emacs was released in 1976. Thus, this piece of software is among the oldest actively developed projects and is way older than perhaps the majority of its users (including my humble self). This is particularly remarkable given that the younger crowd tends to prefer IDEs like Eclipse.
Emacs comes with a steep learning curve. Even if you have been using
it for productive software development for years, you can count on its
built-in guarantee of wow-didnt-know-that-one moments. Just
recently, I stumbled across the
M-x cd function that allows you
to change the directory. While in practice the function is not of much
use, I was still amazed that I had not encountered it before.
In contrast, the mark ring is an often overlooked concept that is
definitely worth considering for your daily workflow. Just like Emacs
keeps track of your
kill-commands in a kill ring, Emacs also
creates a mark ring that saves locations, where you have previously
set/unset marks (using
C-<SPC>). Once you have accumulated a
few marks, you can then cycle through the ring as known from the kill
ring. Two distinct instances of exist:
The basic mark ring has buffer scope only (use
C-u M-x set-mark-command).
The global mark ring saves marks globally. That means, you potentially jump to a completely different buffer (use
The mark ring is ideal to jump back to locations that you have
previously edited. This can be particularly helpful if you are
actually not fully aware of where you ended up in a nested code base
after several semantic-symref lookups. Once you got what you have been
looking for, just jump back to your current construction site. If you
are planning ahead, you can leave a mark via
C-SPC C-SPC such
that you can revisit the location later.
For me, the mark ring gets a rating of occassional time saver. In
most instances you need to return to the previous context only. This
is typical during a
C-s-search, where you simply return to your
previous location via
C-g. If you are editing some code and need
to investigate something, you would split the buffer into two
side-by-side buffers using
C-x 3. Then you can edit in one
buffer and navigate in the other buffer.
updated on 2016-01-13 based on correction by xezzy