12 ms·
Mastering Emacs
- unknownzero 11y agoI'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.
- yenda 11y agoIf you want to start heavy customization you can start by looking at configurations in literate programming style, you will learn a lot of documented customs. Here is an exemple : https://github.com/vdemeester/emacs-config 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
- unknownzero 11y agoThanks for the info :) I did enjoy the posts I read on the site, but was hoping for more advanced material in the book, good to know. Browsing through that repository right now, awesome stuff, I'll have to look for more like this.
- phaer 11y agoI've just bought and skimmed it. In my opinion it looks like a good introduction to emacs and its included packages for new users but it does not really discuss customization in detail. I really like the chapter "Theory of Movement" which discusses editing commands.
- unknownzero 11y agoThanks for the heads up. I really liked the blog posts I just read through but I think I'll avoid making a purchase in that case.
- damontal 11y agoSwap your CTRL and caps lock keys. It will make it a lot easier to use.
- htns 11y agoNo, swap your alt-gr and ctrl.
- renke1 11y agoPut Ctrl on left Alt. And left Alt und right Alt (Alt-Gr). Then you are free to finally map Caps Lock to Escape. After that map left Ctrl such that left Ctrl+E/S/D/F is Up, Left, Down and Right.
- htns 11y agoI map esc to the key between left shift and Z. It doesn't exist on US keyboards, though. And I put backspace on caps-lock. What I don't understand is putting any kind of simultaneous combo key on caps-lock, since caps-lock + a is not really easy to press. It doesn't help that many keyboards have a bit of a gap between a and caps-lock (to help position the left hand and prevent accidental caps-locking?).
- Dewie3 11y agoI guess this is if you use your pinky to hold down CTRL? I try to mostly use the knuckle below my pinky fingers[1] to hold down CTRL. This can be harder on certain keyboards, and I guess especially laptop keyboards. I think I learnt this from some kind of ErgoEmacs article/webpage. 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.
- molteanu 11y agoYes, that was from ErgoEmacs. Very nice info in there.
- brudgers 11y agoIf Mastering Emacs isn't the right book for your situation, you might consider purchasing a hardcopy of the Emacs Manual: http://shop.fsf.org/category/books/ http://shop.fsf.org/category/books/ As a bonus, you'd be supporting the Free Software Foundation with your purchase.
- branchless 11y agoI really like this blog, it's great. Very engaging. Would recommend subscribing to it! ps thanks for the downvote HN - classy :-)
- brudgers 11y agoI 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 11y agoMy 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 11y agoAnd 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 11y agoIt'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.
- vladharbuz 11y agoI 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.
- banachtarski 11y agoEvil user concurring.
- methehack 11y agospacemacs (includes evil) plug: https://github.com/syl20bnr/spacemacs https://github.com/syl20bnr/spacemacs Really great.
- vladharbuz 11y agoYep, that's what I use as well!
- 001spartan 11y agoI switched to using Spacemacs from vim a couple months ago. I find it's a huge boost to my productivity; letting me use vim modes/hotkeys that I'm used to, and adding the handy features that emacs and plugins can provide.
- _asummers 11y agoHN 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
- SmirkingRevenge 11y agoSpacemacs is absolutely amazing. I've done the rounds with emacs - trying it vanilla and rolling my own config, or using the various pre-made configuration packages (prelude, emacs-live, starter-kit, etc), sometimes with evil, sometimes without, and nothing has ever come close to what they've pulled off with spacemacs.
- 11y ago
- molteanu 11y agoI 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/index.html https://www.gnu.org/software/emacs/manual/html_node/emacs/in...
- brudgers 11y agoWhile RTFM is technically a correct answer to any Emacs question, the reason for purchasing a secondary resource is that the author has presumably curated the documentation for a particular audience. 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.
- lolo_ 11y agoWow, 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.
- 11y ago
- pcx 11y agoI 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 11y agoNew 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
- 616c 11y agoI went throught the hassle of not doing what you recommended, unaware, and it is funny how often you look for stuff to simplify Emacs usage and you find bbatsov.
- emhs 11y agoI 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 11y agoOne 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.
- drjeats 11y agoIn magit-status-mode I'm able to stage files based on the region. 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.
- justinhj 11y agoI wrote this gist that adds the ability to add multiple files from dired to git https://gist.github.com/justinhj/5945047 https://gist.github.com/justinhj/5945047
- john2x 11y ago> 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.
- agumonkey 11y agoAn older but still interesting book, just in case: http://www.amazon.com/Writing-GNU-Emacs-Extensions-Glickstein/dp/1565922611 http://www.amazon.com/Writing-GNU-Emacs-Extensions-Glickstei...
- bobochan 11y agoI 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 11y agoAnything 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 11y agopps: 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,...).
- Kjeldahl 11y agoIf 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 11y agoThat git repo claims to be retired. I get my emacs from here http://emacsformacosx.com http://emacsformacosx.com
- emacsfodder 11y agoYou 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.
- zyxley 11y agoIs it weird that I wish somebody would make a terminal-ized version of newer editors like Atom/ST/Brackets?
- bch 11y agoHow else can you screen/tmux your work? Terminals ftw.
- db48x 11y agoIf you're using emacs you can use M-x eshell to open a shell. Combined with tramp (which lets you open remote files via ssh: C-x C-f /ssh:you@otherhost:path/to/file) you can actually avoid using tmux/screen at all. Instead of managing screens in tmux and simultaneously buffers in emacs, you just need the emacs buffers.
- bch 11y agoWhat I was imagining is launching Emacs in a tmux session, doing your editing (at work, for example), detaching that session (but not closing it), going home and logging back into your work machine and reattaching that same editing session.
- mhd 11y agoThere 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 11y agoThat'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.
- grosskur 11y agoI'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.