
Mastering Emacs - amatheus
https://www.masteringemacs.org/
======
pcx
I followed this blog for a while and loved it! Strongly recommended for Emacs
beginners.

Also, one thing beginners miss is how great it is to use an existing
configuration to learn. I've personally used @bodil's config from here[1],
it's pretty comprehensive and awesome. If you are a beginner though, you
should totally start with @bbatsov's Emacs Prelude[2].

[1] [https://github.com/bodil/emacs.d](https://github.com/bodil/emacs.d)

[2] [https://github.com/bbatsov/prelude](https://github.com/bbatsov/prelude)

~~~
subsection1h
New users who plan to configure and extend Emacs thoroughly might not benefit
from using another person's configuration because they will end up
reconfiguring that configuration, which I think is more difficult than
configuring vanilla Emacs.

During the first weekend that I started using Emacs, I ended up writing
hundreds of lines of Emacs Lisp to optimize Emacs for my usage. I had never
written Lisp before, and I think using another person's configuration would
have hindered my progress.

But I think that _reading_ other people's configurations can be super helpful.

Phil Hagelberg, the creator of Emacs Starter Kit, seems to have arrived at the
same conclusion that I have:

[https://github.com/technomancy/emacs-starter-
kit#history](https://github.com/technomancy/emacs-starter-kit#history)

------
Kjeldahl
If you're on OSX and want a good Emacs, go to
[https://github.com/railwaycat/emacs-mac-
port](https://github.com/railwaycat/emacs-mac-port) and read the installation
instructions under the Homebrew section. It follows the official Emacs repo
pretty closely, but has useful OSX additions (smooth scrolling, gesture
support [font size e.g] and more).

~~~
justinhj
That git repo claims to be retired.

I get my emacs from here
[http://emacsformacosx.com](http://emacsformacosx.com)

~~~
emacsfodder
You misunderstand.

The repo you're referring to is Railwaycat's mirror of Yamamoto Mitsuharu's
codebase. (which previously was only available via ftp and tarballs.)

Yamamoto has recently migrated to git and hosts a repo at Chiba U, the address
is: [http://www.math.s.chiba-u.ac.jp/~mituharu/emacs-
mac.git](http://www.math.s.chiba-u.ac.jp/~mituharu/emacs-mac.git)

HOWEVER. Railwaycat does still maintain the Homebrew tap and formula for
installing Emacs Mac Port

Here: [https://github.com/railwaycat/homebrew-
emacsmacport](https://github.com/railwaycat/homebrew-emacsmacport)

A simple install via:

    
    
       brew tap railwaycat/emacsmacport
       brew update
       brew install emacs-mac
    

And you have a far superior Emacs for OSX than that built by
emacsformacosx.com.

Once built, you can (without any problems) move the Emacs.app into your
/Applications/ folder.

Don't do yourself a disservice, install Emacs Mac Port now.

~~~
JoachimS
So what is the benefit compared to the emacs port 'emacs'?

~~~
redmar
I found a full listing here: [https://github.com/railwaycat/emacs-mac-
port/blob/master/REA...](https://github.com/railwaycat/emacs-mac-
port/blob/master/README-mac)

~~~
JoachimS
Thanks! Most of it was meh, but some sounds really good. The homebrew version
provides hdr gfx but not all of this.

------
vladharbuz
I would personally recommend using vim bindings in emacs, as they are (in my
opinion) easier to make sense of and more intuitive. However, I'm sure this
book is a great resource for all the other stuff and it seems very well put-
together.

~~~
methehack
spacemacs (includes evil) plug:
[https://github.com/syl20bnr/spacemacs](https://github.com/syl20bnr/spacemacs)

Really great.

~~~
_asummers
HN Discussion with a LOT of good comments regarding Spacemacs [0]

[0]
[https://news.ycombinator.com/item?id=9394144](https://news.ycombinator.com/item?id=9394144)

------
unknownzero
I've always been an emacs user but have only recently gotten serious about
customizing it to replace other applications I normally use. If anyone has
bought this and at least skimmed through I'd love to hear your thoughts before
I drop $35.99 to see for myself.

~~~
damontal
Swap your CTRL and caps lock keys. It will make it a lot easier to use.

~~~
m3talridl3y
If emacs expects 3 modifier keys, and emacs is wildly popular with
programmers, then why hasn't someone made a keyboard with the windows key
renamed and remapped to the missing meta key?

~~~
shabble
I feel like if there was a "One True Emacs Keyboard", it would probably be
something like
[http://mykeyboard.co.uk/microswitch/](http://mykeyboard.co.uk/microswitch/)

------
grosskur
I'm really enjoying using Cask to manage my Emacs packages:

[https://cask.readthedocs.org/](https://cask.readthedocs.org/)

You maintain a list of packages in a Cask file and run "cask" to automatically
download and install them from a repository like MELPA. Like Gemfile or
requirements.txt, but for Emacs.

I found this really reduced the number of elisp snippets I've had to write or
grab from around the web. Most popular packages are on MELPA, and there's
usually a more polished way to accomplish things I was hacking together
myself.

------
emhs
I hadn't tried Magit before now, but on the suggestion of this blog I'm giving
it a look through. Looks good so far. I also enjoy the style the blog is
using: anyone know what backend the author is using?

~~~
jwdunne
One thing I hated about magit was that I couldn't stage multiple files with a
region or similar. I'm currently on my phone for the rest of the evening so I
won't have chance to check - if you notice this has arrived in your testing,
do let me know!

I usually use shell emulator + company for dir/file autocomplete. This is the
fastest I've got to staging individuals files or dirs, especially with
projects that have a dir depth bigger than 1.

~~~
john2x
> stage multiple files with a region or similar

This feature has been available for some time, I believe. In magit-status,
just select with region the files and then `s` to stage the highlighted files.

~~~
emacsfodder
It's a little un-intuitive.

Adding git-gutter to the mix will allow staging / reverting at the hunk level.

I should probably note also that in Magit status, the user has to TAB the
unstaged file to be able to do region or hunk level staging.

Ideally it would be possible to do it in the buffer in question as well.

Not even git-gutter has region style staging. Hopefully it will be implemented
soon. I had a crack at it but time got away from me.

~~~
jwdunne
Thank you for this - git-gutter looks awesome. I wasn't aware of staging hunks
too so I've learned about 2 things :)

------
zyxley
Is it weird that I wish somebody would make a terminal-ized version of newer
editors like Atom/ST/Brackets?

~~~
bch
How else can you screen/tmux your work? Terminals ftw.

~~~
mhd
There are other client/server solutions than VT100 terminals. X11 being one of
them. And you can run a remote Emacs server and connect to it via emacsclient
without being constrained by several emulators as middlemen.

Plan 9's sam had a similar client/server switch, mostly because the
programmers didn't really like a) character graphics and b) their host
systems.

~~~
bch
That's a good point. I've never written a client that is "multi-interface re-
entrant" like that (I _have_ used and enjoyed emacs-client). The nice thing
about character cell terminals is that all the terminal handling falls out for
free: I don't need to accommodate for anything (like tmux, or remote access
(like ssh)), it Just Happens.

Worth considering (or modeling) how I'd write an emacs-client type of
application though.

------
agumonkey
An older but still interesting book, just in case:
[http://www.amazon.com/Writing-GNU-Emacs-Extensions-
Glickstei...](http://www.amazon.com/Writing-GNU-Emacs-Extensions-
Glickstein/dp/1565922611)

~~~
bobochan
I bought it when it first came out, and it is still on my bookshelf. A decent
book, as the Amazon reviews indicate, but not outstanding.He does cover a lot
of ground, introducing emacs programming (and Lisp, in general). I did not
find the "Comprehensive Example" chapter implementing a crossword puzzle mode
as particularly helpful.

Everyone feels like other people do better negotiating car prices, and I feel
the same way about "knowing" emacs. I have used it every day for over twenty
years and people are still telling me "there are easier ways to do that in
emacs."

~~~
agumonkey
Anything that large will have blind spot for a user. Even commiters might be
surprised by some kind of idiom in elisp or in a particular mode. That syndrom
can be found in languages. It would be of great value to document this side of
things. Some spectrum of learning, showing how everybody travels through and
that most people go through the same stages. Maybe how to not waste time or
feel frustrated by that process.

ps: emacs should have 'didntknowthat...' as subtitle.

~~~
agumonkey
pps: I wish for an Emacs rewrite. As a scheme/lambdacalc enthusiast, I love
pruning things out to a certain extent, and feel Emacs is too much a bazaar,
and would love for it to fork a smaller core mammalian child. Something even
more self-documenting [1] and with a stronger fp-ish flavour (when it's not
absurd).

The goal, making it easier to learn and understand.

[1] a lot of knowledge about emacs is outside of it both in location (not in
the manual) and form (videos, podcasts, static tutorials). This is influenced
by the trend for interactive documents (B.Victor, Wolfram) and
Notebook/Persistent repls (ipython,...).

------
branchless
I really like this blog, it's great. Very engaging. Would recommend
subscribing to it!

ps thanks for the downvote HN - classy :-)

~~~
brudgers
I didn't downvote your post, but I can see why others might feel that it
doesn't contribute to the conversation because basically the only possible
responses are "Me too" and "You are wrong". Adding the complaint about the
downvote would ordinarily get a downvote from me, but I'd already used my vote
in search of justice.

Anyway, consider the downvotes editorial feedback and perhaps taking advantage
of the opportunity to improve or remove what you have written.

~~~
branchless
My post is about what a great blog it is. I'm fine with my original mark. If
anyone wants to remove computer points from me please fire away.

~~~
brudgers
And what is your last comment about and how does The comment make HN or the
internet better? There are lots of places where typical internet behavior is
typically acceptable and often encouraged. HN, for better or worse, is not one
of them. That means it can't meet everyone's expectations.

~~~
branchless
It's a community where the consensus is wherever the community decides. If you
didn't speak your mind people like me would be the centre, if I didn't speak
mine people like you would be the centre.

I'm not sure what you are trying to achieve. I've said my comment, I've re-
iterated it. You have made two meta comments about HN that I have zero
interest in. Create a new thread on HN meta and write about it.

Again: the author of the book has a great blog and I'd highly recommend
subscribing to it.

Have a very positive, non-supercilious day.

~~~
brudgers
That such comments lead to more comments of dubious value is something about
which we appear to agree and have empirically supported. Hence, the reason
people will down vote such comments,

------
molteanu
I haven't read this, but from the contents it seems like you can learn
everything there is in the book from the official Emacs GNU documentation:

[https://www.gnu.org/software/emacs/manual/html_node/emacs/in...](https://www.gnu.org/software/emacs/manual/html_node/emacs/index.html)

~~~
lolo_
Wow, what a really mean-spirited comment, and it's the top one (at the time of
writing.) -- did you consider what you said here before writing it? Let me
propose a rewrite:-

'If you can't afford to buy this, the official emacs GNU documentation is
great - [link]'

Instead you first admit you haven't read it, then imply, but in somewhat
weasel words, that it doesn't offer anything beyond what the official
documentation offers.

I'm a long-term emacs user and I can tell you that while the official docs
cover a lot, they provide more of a reference than a guide, so a book like
this is really worthwhile.

Keep in mind the author would have dedicated enormous amounts of time and
effort to writing this, and technical book writing is very rarely a profitable
enterprise.

I think we need a bit more kindness towards people's work (as well as
_constructive_ criticism of course) - how do you think the author might feel
reading this on such a prominent tech website? Imagine it was something you
worked on for hundreds of hours, dismissed in the top comment, how would you
feel? We're all humans, and empathy is already lacking enough in our industry,
so think a little before posting next time.

~~~
cplease
Actually, good technical writing is among the most reliably lucrative genre of
writing.

That might not be saying much, but how many people make money writing poetry
or genre fiction?

~~~
lolo_
Ha that's a good point ;) but once you factor in opportunity cost for
developers, especially ones experienced enough to write a book, it's
definitely not a great choice (likely negative.)

