220 points · by codeup · 15y ago · 160 comments
I don't think it's a coïncidence.
Editors are tools for your fingers. There are huge penalties to being good with an editor if you are forced to use a different one. I use emacs for writing things other than code (email, web forms like this very comment) not just because I think it's better than whatever built-in editor is provided for the task, but because it hurts so badly to use something other than emacs.
The converse point is that there are huge benefits available if you give up all your existing editing tools and spend some time (and yeah, it can be months to years) getting really, really good at just one. Really, that one has to be emacs or vim, which are the only editors out there designed to scale to this level of specialization.
It always makes me sad to watch other people work and see how much time they spend fighting with their editor, moving their hand around to the arrows or mouse or function keys, fighting with the presentation logic of their word processor to get the page break on the right spot on the screen, etc... It doesn't have to be that way.
I'm not taking a stand on the argument one way or the other, just pointing out how similar they sound. You said:
"There are huge benefits available if you give up all your existing editing tools and spend some time (and yeah, it can be months to years) getting really, really good at just one. Really, that one has to be emacs or vim, which are the only editors out there designed to scale to this level of specialization."
How does this differ from:
"There are huge benefits available if you give up all your existing languages and spend some time (and yeah, it can be months to years) getting really, really good at just one. Really, that one has to be Lisp, which is the only language out there designed to scale to this level of specialization."
Whether you agree or disagree with the sentiments, haven't you heard people expressing those sentiments in much the same terms?
Uh, no. You're making an editorial point that they both seem equally silly, you just aren't saying that. If your only purpose to posting was a bland linguistic analogy with no bearing on the subject being discussed, then I withdraw my argument on the grounds that your post is unimaginably boring. :)
But to respond: the sentences differ in that one statement is truer than the other. "Hugs are good." and "Suffering is good." use the same language too, but you wouldn't use that as part of a sideways argument that huggers are insane, would you?
Simple text editor = simple + powerful
Emacs = complex + powerful
Lisp = simple + powerful
Blub = complex + powerful
Given this your association doesn't make much sense.I think most people prefer simple + powerful. And this isn't black and white - Blub can often be simpler for X simple task. However the real yard stick is whether as your problem domain gets more complex does Blub suddenly lose its veneer of simplicity?
I always bring up Alan Kay in these kind of threads but his observations are always so damn salient - agglutinative PLs (features) vs style PLs (simple principles).
I've got some other more complex customizations that I don't use very often, for example a set of functions that let me cycle through various background/text color schemes. For awhile I had that mapped to f8. I've also effectively used hotkeys that generate documentation/comment templates. But those tend to come and go, and when I'm not using them they don't interfere at all.
Beyond a few fundamental things, emacs is only as complex as it needs to be. Yes, it's a fairly large base install compared to vi, or a simple text editor, but so far it's never been big enough to get in my way.
Emacs seems quite simple to me, actually. Intimidating at first, sure. Complex to master, but simple to use.
Then again, there's an obvious difference between something that is difficult to learn and something that is difficult to use. In fact most tools require training at first to use them, and Emacs is not any different.
Or perhaps it was just that he didn't bash my favorite editor :)
What about:
- developing software while on a flight?
- recording field data for an experiment?
- using hibernate or sleep to save power?
- connecting to a projector for a presentation?
- ...
The point is that it's important to use the right tool for the job, and that for many tasks a netbook is vastly preferable to a supercomputer. "Working backwards from" use the right tool for the job seems more instructive than your implication (whatever it was).I've been trying to get into clojure which entails installing clojure-mode, swank-clojure, leiningen (which brings the pain of maven) and slime. This is where emacs has always broken down for me. Once I step outside the distro provided packages I find broken tutorials, unspecific versions, and instructions written like:
First install package.el.
Add to your .emacs: (add-to-list 'package-archives '("marmalade" . "http://marmalade-repo.org/packages/"))
C-x C-e to evaluate it, and you're good to go!
http://marmalade-repo.org/Except that didn't work in two of the three emacs installs I have. Any time I need to download an elisp file I dread reading the instructions. Too often the author forgot that he loads some other required package in his 1000 line .emacs/init.el file. Then you end up with half a set of instructions.
I think the only solution to the problem would be package maintainers providing instructions for how to install their package in a specific vanilla version of emacs from scratch with no other changes. But if they have to give up their custom emacs configs they won't be able to write up an explanation.
1. Download lein from https://github.com/technomancy/leiningen/raw/stable/bin/lein
2. Launch lein (self-install) from the command line.
3. Run lein plugin install swank-clojure 1.3.0 on the command line.
4. When you first run swank, it may complain you do not have project.clj or something like that, because it expects to be launched form inside a project directory. You may create a dummy project directory (cd; lein new dummy; cd dummy).
You need to run the above steps once, to install. Run the following at the beginning of a clojure session:
5. Run lein swank on the command line.
6. In emacs, run slime-connect (with the default parameters, most likely).
In case I have garbled the above, I am sure someone will correct me. Although I did it both on Windows and MacOs and it worked. (On Windows, I use bash shell form the MinGW project, but I see no reason for the standard Windows shell not to work.)
Separately, you may want to install clojure-mode from the same repository.
Happy hacking!
Wish I had thought of that a week earlier! Could have saved us a lot of time at the meetup.
(The way you posted still works fine, so if you've already got it set up there's no need to switch.)
A single emacs function to update/start clojure seems a good way to go, however I had it in the past and as soon as the dependencies broke I had to go in and figure out what was going on under the hood and how to fix it. Which is educational but distracting. Will your setup still work in 12 months?
Thanks for all the effort in bringing Clojure to the masses! :-)
P.S. Got an error -- will submit a bug report. EDIT: wrote a blog comment instead.
The clojure-mode available through elpa ( clojure-mode 1.7.x) is not new enough to deal with swank-clojure which needs 1.9.x (specifically I was after M-x clojure-jack-in)
Plus, the elpa instructions don't include emacs23 because it allegedly comes with 23 (even though the elpa website does not say this). But elpa is not included in emacs 23 on Gentoo.
And thus an evening of mine is lost to trying to get the same emacs environment running on my Gentoo desktop and Ubuntu laptop.
Obviously my problems could be from a lack of experience with Emacs, but I hate that using a text editor is so hard.
And another example is the pain of trying to build wanderlust from scratch which requires apel, flim and semi. Some of which were ONLY hosted on abandoned FTP servers. Luckily Dave Abrahams recently moved those scattered and abandoned packages to a single place https://github.com/wanderlust
I'm not claiming to be a genius level programmer here, but I don't think I have to make that claim either. There's something seriously wrong with Emacs when an experienced programmer has serious issues setting up a basic development environment.
For comparison's sake, I hit "comfort-level" with Vim within two weeks, including a fully customized .vimrc, colour files and keyboard navigation. After a month of using Emacs I was somewhat comfortable with the keyboard shortcuts for basic navigation, but didn't know how to do several things that I could do in Vim. I also had no idea how to add syntax highlighting for language X - managing only to get it working for one dialect of Lisp and nothing else. Ah, and installing from ELPA had a nice tendency to show me error messages instead of actuall installing anything.
Bah, sorry for the rant. It just frustrates me when I hear about Emacs and how great it is, and I totally get on-board with it, but then it's just this fustercluck of configuration hell that never ends well.
They seem to have changed the instructions again. The folks developing swank-clojure seem to keep changing their install strategy. Boo on them. Near as I can tell, installing from ELPA, installing swank-clojure through Leiningen, running swank-clojure through Leiningen, and calling 'M-x slime-connect' should still work.
"But elpa is not included in emacs 23 on Gentoo."
Holy crap, I just checked this and you're right. (The Gentoo package maintainers seem to have a problem with letting other package managers compete with their precious portage however, so I'm not surprised.) In this case, I'd suggest that the Gentoo devs should be the ones to warn you.
"Obviously my problems could be from a lack of experience with Emacs, but I hate that using a text editor is so hard."
I don't know what to tell you. The problems you listed aren't your fault and they're Emacs' I'd blame the package maintainers in the Gentoo episode but the Clojure stuff is because the Clojure developers still can't decide how they want their stuff to work. I can't blame them much for that. Experience would help, but I doubt that I have that much more than you. I've had similar episodes installing plugins for Eclipse.
Once that has had a stable release, this will become a lot easier. In the mean time, the link to package.el for Emacs 23 is right at the top of marmalade-repo.org: http://bit.ly/pkg-el23
By the way, take that as intended - I love emacs very much, but as with people so with software - the little things a beloved gets wrong can be unbelievably annoying... :)
On the bright side, look at what we're discussing here: the default regex syntax and pretty colors. Compare that to about five years ago, when we'd be instead discussing how to compile Emacs in a way that had fricking TrueType font support. Emacs has come a long way.
That said, the number of people who hate on Elisp is surprising to me. No, a hacked-up version of Maclisp is not the best Lisp in existence. But, seriously, you're competing against vimscript. Will even the most diehard Vim addict actually argue that vimscript is even comparable to Elisp?
In my experience namespaces only introduce notation to distinguish modules but so does a simple convention.
I just can't do that without any fancy tools as soon as namespaces introduce ambiguity that I can't resolve when I look at a narrow region of a file.
Although this looks like a regular prefix. How does the namespaced elisp propose to refer to entities from other namespaces?
It surprises me that you could come away from org-mode thinking that the developers thought you should stick everything in one file. One of the main strengths of org-mode is the way it frees you to put stuff into separate files, wherever you want, and then use the agenda to consolidate them into a single view.
Having said that, yes, org-mode is freaking awesome.
Besides, to quote Wikipedia:
EMACS: initial release: 1976, 34–35 years ago
Vim: initial release 1991, 19–20 years ago
vi: was written by Bill Joy in 1976 (as extension of `ex' editor)
The debacle's been raging for way longer than 20 years.
----
On the other hand, if you want something more modern: http://man.cat-v.org/plan_9/1/acme
Really GNU emacs is related to ITS emacs in the same way that vim is to BSD vi: it's a cleaner and much more powerful reimagining of the original that shares some interface details but no implementation.
The editor I had been using for years. :)
As you work with emacs and customize it to work with your flow, your hands, and your keyboard, it starts to feel as comfortable as old shoes. Over time, the incremental efficiencies add up, and it becomes clear that a non-customizable editor just isn't as useful.
Contrary to parfe's experience, I've had good experience with Emacs packages, but then again, I don't use very intrusive addons, and keep my emacs pretty up-to-date.
I started using vim, and at first, it was kind of hard to get used to all the commands and remember everything... but after a while (1~2 weeks) it felt so fluid and easy – everything makes kind of sense, it's easy to install new plugins (pathogen ftw!), it's easy to hack those plugins, themes (most of the time) just works.
http://jlongster.com/s/emacs.png
There are things Emacs can do which VIM will never do. And vice-versa. They are separate editors embracing separate philosophies.
Lastly, keep in mind that this is 40 year old software, and considering that it's done a great job keeping up with the times.
M-x <function_name>
Executes any interactive function. Any gui-based editor will ultimately be limited by the knobs and switches that can be crammed into various graphical interface elements. Emacs doesn't have that limitation. That's where the learning curve is steeper-- you have to search for function names rather than poke around menus or toolbars, but once you've learned the function name you can map it to a key, put it in your .emacs, or call it from another function.Much like unix, this is how emacs has managed to stay relevant despite the popularity of the IDE market. It's easy to configure and extend by defining abstractions and composing functions.
Exactly.
What are the two different philosophies?
There was a Salon article about people still using XyWrite[1]. As mentioned in the post, GRRM is one of the people[2] still using WordStar. I know that Steven Brust is using Emacs[3].
[1]: http://www.salon.com/21st/feature/1998/08/25feature.html/
[2]: http://www.sfwriter.com/wordstar.htm
[3]: from the front matter of http://dreamcafe.com/firefly.html
"I use emacs, which might be thought of as a thermonuclear word processor."
- In the Beginning was the Command Line http://www.cryptonomicon.com/beginning.html
We don't know if it still applies.
The differences between vim and emacs are so fundamental that once someone goes down the emacs path it's not uncommon to never turn back.
This reminds me of various people I have worked with in the past who have wondered why I ever bothered with the complexity of searching and replacing with regular expressions, when you can just do a normal search and replace, watch for matches that match the more complicated thing you're actually looking for, then replace them by hand...
P.S. I'm not sure why I'm being downvoted. It's what I do. There's really no debate about whether grep is faster than VS search.
This is true, so why did I go with vim?
Well first, I'm primarily using Ruby not Java, so the magic available in IDEs is somewhat diminished. But more to the point, vim is really well optimized for the widest array of types of editing. It also has the advantage of critical mass open source immortality.
So when I hone my vim/emacs skills, it's an investment for the next 50 years, during which time I'll have no problem using my preferred editor on my preferred platform with whatever languages happen to be striking my fancy.
Which modern IDEs and what features? I have used eclipse for months before deciding I was better off with emacs with eclim-mode anyway to provide the only two features of eclipse I liked: the compiler and the ability to see the members of an object (occasionally).
My projects are usually not large enough that it matters. If they were, I suspect my typical response would be that I would simply install the appropriate mode for emacs and use that.
Use Emacs 23 to create a distraction-free writing environment using org-mode, darkroom-mode & markdown-mode.
In this case, I read it as "A good read if you want to know how/why/whether to use Emacs-23 as a distraction-free writing environment."
The post has other value, of course, and I wouldn't object if someone else were to write something like:
tl;dr: Emacs continues to evolve, e.g. It's now as good a tool for writers as Scrivener or dedicated distraction-free editors.
That would give me another reason to read the post if I wasn't persuaded by the first. Summaries (including the title, natch) provide some value that a simple upvote score does not capture.
I find "Too Long Don't Read" to be a dismissive attitude that I don't want here on HN, so I almost always vote down such comments (yes, including the ancestor here). But I appreciate executive summaries, and frequently vote them up to encourage their creation even if I didn't find the article itself compelling.
I realize that "TL;DR" is "just an abbreviation", but parsimony encourages me to conclude that it still connotes the words that it abbreviates and represents an attitude I do not like. Perhaps I'm reading too much into word choice, but in the end, word choice is really what makes the comments here worth reading.
Yes we do. They serve to save people time.
They serve to save people time.
Or to draw attention to a succinctly formulated essence of an article. They help me in focussing on the articles that may be of interest.For me, tldr is a favor folks more interested than me in some subject do, and I should do the same when I subject I really care turns up.
tldr is an act of love.
;;; Fullscreen
(defun switch-full-screen ()
(interactive)
(shell-command "wmctrl -r :ACTIVE: -btoggle,fullscreen"))
(global-set-key (kbd "<f12>") 'switch-full-screen) ;; Fullscreen
(defun switch-full-screen ()
(interactive)
(x-send-client-message nil 0 nil "_NET_WM_STATE" 32
'(2 "_NET_WM_STATE_FULLSCREEN" 0))) ;;; Full-screen mode
(defun toggle-max-window ()
(interactive)
(set-frame-parameter nil 'fullscreen
(if (frame-parameter nil 'fullscreen)
nil
'fullboth)))
(global-set-key (kbd "<C-M-return>") 'toggle-max-window) sudo apt-get install emacs23-nox
;-)"2010-11-25 Thu: Maybe the times where Org mode could change hard-core vi users into honorable Emacs users are coming to an end? A Vim clone of Org mode is be written by Herbert Sitz, and judging by the videos it looks promising."
Haven't used it, though.
The previous poster complained that none of the Vim plugins that try to mimic or clone org-mode "seem complete". That is definitely the wrong way to look at things. Org-mode is a huge app that's been heavily developed for six or seven years now. In some ways org-mode is probably like Microsoft Word: probably 75% of its users access only about 25% of its features, although many of them access a different 25%.
Why try to develop an org-mode clone in Vim, then? Mostly as a personal project I started for fun. I tried switching to Emacs just so I could use org-mode. Even with Viper and Vimpulse add-ons Emacs felt too clunky to me. I had previously worked on a Vim outliner and I knew that part wouldn't be too hard to replicate in Vim. I decided not to stop there and I've gone on to a lot of other features, although it's a fledgling project. In particular, I need to get some decent documentation done. There are a ton of features in my clone that users have no idea are even there. I think so far most of them (like most org-mode users?) use it mostly for simple outlining.
The Vim clone uses a file format compatible with org-mode and actually calls out to an Emacs server to have org-mode do exports to LaTeX/PDF, HTML, etc. So pure document authoring (as opposed to PIM/task management stuff), is one task that the Vim clone probably can do a decent job of now. Adding footnote support is on the list (there's already a Vim footnote plugin that I plan to modify to work with the org-clone).
I would accept no substitutes at this stage.
Secondly, rewriting Emacs would be a major undertaking and which modern language would it be? My choice would be Common Lisp, for other developers it would be Clojure, Haskell, Python, Ruby, etc. Whatever choice it would be, you'd lose developers who would rather see Emacs rewritten in one of the other languages. Even worse they might spawn forks in their own favourite languages.
Emacs has its warts, but it's your best choice if you want a serious editor.
Bashing an editor because its support for programming languages whose programmers have chosen other platforms, is not fair. Comparing Emacs to Eclipse or Netbeans when it comes to Java development is not fair, just like comparing Eclipse or Netbeans to Emacs when it comes to Common Lisp development is not fair either.
Using a general-purpose editor instead of a specialized tools means that everything you learn will serve you in every other editing task.
If you are not serious about editing text, then you will be
But, truth to be told, Emacs isn't even an editor: it is an Emacs Lisp interpreter which by default runs a program to edit text.
If you are not serious about editing text, then you will be served by many other editors.
* Being needlessly argumentative
* Borderline trolling. You _know_ how these arguments go.
* Fallaciously arguing that tools cannot be compared based on how well they get the job done
(IDEs vs 'editors') rather than their implementation
* Getting pissy about downvotes and posting multiple times instead of editing
You've been here a year. You should know better.