Mastering Emacs
masteringemacs.org
masteringemacs.org
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].
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:
I get my emacs from here http://emacsformacosx.com
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
HOWEVER. Railwaycat does still maintain the Homebrew tap and formula for installing Emacs Mac Port
Here: 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.
I have a GUI emacs-server running that I can open buffers from via emacsclient for "serious editing", but I often end up using vim for quick edits rather than bother with emacs[client] and context-switching.
I imagine it might be different if I could get used to running my shells from inside emacs with eshell or ansi-term, but have never had any success getting them to work right and be usable.
Actually, one reason for preferring the GUI does stand out - quite a bit more freedom in key-bindings, especiallly with ns-cmd-modifier and friends, and some C- bindings that are otherwise impractical in console mode (at least to my knowledge)
Really great.
There's nothing wrong with Vim, and nothing implicitly wrong with using Vim shortcuts in Emacs so long as one is aware of its Fortran in any language style limitations.
C-f, C-b are English-centric, and would be totally nonsensical to a user of a different language.
Intuitive is hard.
What I like most about emacs though is that I rarely have to do repetitive tasks because I can write a bit of lisp code to do them instead.
Here is an exemple : https://github.com/vdemeester/emacs-config
Also about the book someone on #emacs said it's mostly tips for beginners and about 14 more for intermediate users. I'll suggest you to read the website first and see if you like the author style/pov
I also use god-mode, and one of the tips is to swap ESC with CAPS-LOCK (ESC is used to toggle god-mode).
Nonetheless, I guess most of us can agree that CAPS-LOCK is in a too convenient position compared to its normal utility. :p
[1] I use my left hand to hold down CTRL when it's more comfortable to press the next key with my right hand (like in C-u), and vice versa.
You can then use Ctrl+m instead of Enter at the command line, as well. Save both pinkies from the extra effort.
I've been using the MicroSoft Natural Ergonomic 4000 for several years and it has improved my touch for M and C. Recently, I've been applying that on my ThinkPad [chosen because of the symmetric layout] and am removing some additional bad habits related to left-C right-C.
I'm happy for some people to find these things important and type differently, but what is the evidence that it is actively wrong to bind caps-lock as ctrl?
Edit: There are a lot of good points in these pages and I appreciate that the author has made many customisations in pursuit of an ideal layout, and the principle of sharing load between hands equally is a good one. It's just that I'm quite unconvinced that having capslock act as ctrl is a terrible thing, especially compared to many other changes that can be made even on a normal keyboard layout.
All this press-ctrl-with-your-palms fad is a problem solved in the wrong place.
And I have to say I dislike the tone of that page, too:
> Swapped but never had a problem [...] > Because you don't actually type that much.
Right.
It feels fine to me on my flat keyboard with low-profile keys.
I used to use my pinky to press ctrl. Then I briefly remapped to caps-lock, but that felt awkward to use together with the shift key (but I didn't use it enough to get truly used to it). Then I switched to using my palm, and then finally to using god-mode which means that I don't have to use modifier keys as much anymore (though I still use it sometimes, and I still press ctrl just as much in non-emacs applications like terminals and Firefox).
Total agreement from me, I consign this piece of advice to the same trash pile as !!NEVER USE ARROW KEYS!! ... cargo-culting nonsense.
Remapping capslock to ctrl on all my machines turned out to be one of the best things I have ever done. It helps me with far more than emacs.
A decent subset of emacs keybindings work in anything that uses gnu readline or similar library (ctrl+a|b|f... etc).
http://shop.fsf.org/category/books/
As a bonus, you'd be supporting the Free Software Foundation with your purchase.
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.
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.
I can also expand them and highlight multiple chunks to stage just those chunks.
The are only two major things I don't know how to do with the current stable version of Magit (1.4). One is starting an interactive rebase. It can take you through the commits and let you edit the buffer, but I haven't figured out if it's possible to start an interactive rebase without using the "!" command line.
The other thing is checking out files in order to revert them, I'm sure there's a way but using "!" and pasting the file names in still seems fastest.
I've also been wondering if it's possible to write a command to manage the `--skip-worktree` status of files, showing which are currently skipped in magit-status-mode. That would be a useful thing for me to have.
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.
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.
Interactive rebase/squash is tough to find... so here it is.
in Magit status, do l l (log, short-log)
Select the sha1/commit you want to begin squash/pick rebasing...
press E
off you go.
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.
Worth considering (or modeling) how I'd write an emacs-client type of application though.
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."
ps: emacs should have 'didntknowthat...' as subtitle.
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,...).
ps thanks for the downvote HN - classy :-)
Anyway, consider the downvotes editorial feedback and perhaps taking advantage of the opportunity to improve or remove what you have written.
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.
https://www.gnu.org/software/emacs/manual/html_node/emacs/in...
I agree that Emacs documentation is very good, and once I recently got in the habit of C-h'ing for answers rather than Google'ing I became more productive and can work more productively with the WiFi on my laptop off [not having the temptation of HN among the productivity enhancements]. But this doesn't change the fact that better explanations are possible and that a teacher is often better than a specification. Experts can contextualize a problem, and that has added value.
'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.
That might not be saying much, but how many people make money writing poetry or genre fiction?
http://www.reddit.com/r/emacs/comments/36zcny/im_pleased_to_...
I'm embarrassed to say how long I used Emacs knowing about C-h f -- but not noticing and using C-h i to read the full documentation from inside Emacs. I wish I'd appreciated that from the start.
At this point I've read the full Info doc at least once through, some sections multiple times. It's impressively good, especially for getting a crisper understanding of topics you only sort of understand. It's one of Emacs best features.
But I can totally see the value of a good introduction book, and wish I'd had one when I was starting out. So although I don't know how good this book is, I don't think a book is pointless.