News for hackers. Stuff that matters.
Re:Why GNU Emacs? by flogic on Sunday February 14, 2016 @04:54PM (#11100166)
Apparently, I'm feeling ranty today...

<rant>I've used Vi and Emacs as my primary editor. Now I've moved on to Sublime Text 3. Despite being powerful tools Vi and Emacs have probably harmed the state of Unix text editing. They've kept antiquated UIs from before keyboards were an text editing UIs were standardized. It's kinda sad that MS Dos, Windows and MacOS have all had a plethora of powerful editors with convenient standard user interface meanwhile the Unix world is anchored to Vi and Emacs. It seems like they've managed to starve out a good chunk of innovation on this front.

Re:Why GNU Emacs? by tptacek on Sunday February 14, 2016 @05:05PM (#11100202)
There's a lot of antiquated stuff in Emacs, but despite the almost total lack of a modern UI toolkit for extensions, there are also interfaces in Emacs that are better than anything available elsewhere --- reasons to launch Emacs even if you don't need its expressive power for editing. Magit is a good example, Helm is another, org-mode another, FlyCheck another.

If Emacs looked as good as Sublime, I'd be marginally happier. But if Emacs lost Helm or Magit, I'd be devastated.

Re:Why GNU Emacs? by benaiah on Sunday February 14, 2016 @05:32PM (#11100312)
Helm may be the most flagrant example of a terrible package that remains inexplicably popular. I haven't uninstalled it yet, because there are a few packages that use helm that don't have ido equivalents yet, but I try to minimize my usage of it as much as possible. Issues include:

- Significant performance issues

- Constant bugs - updates often break the package completely, especially if you're using the melpa version (melpa is another rant for another time - standard melpa is totally brain-dead)

- An atrocious version of "fuzzy matching" (you have to separate terms with spaces, which are then turned into ".asterisk" (can't type a single asterisk in HN comments) and everything's concatenated into a regex to match)

- The default helm-mode (what they recommend using for completing-read, which controls execute-extended-command, i.e. M-x, and such) is unsorted. Not badly sorted - unsorted.

- Doesn't use a lot of the standard layout functions, instead replacing them with its own stuff that can't be customized in a standard way.

- Dictatorial maintainers that only allows options and features that they deem the "right way" to do it. This is fine for some projects, but total control of my editing experience is the primary reason I use Emacs in the first place.

ido with a few simple plugins is vastly better, less buggy, more compatible, faster, has better matching, and is easier to customize. I recommend against using helm for completing-read unequivocally.

Re:Why GNU Emacs? by clocksld on Sunday February 14, 2016 @05:40PM (#11100341)
I can't say that I have experienced all of these issues myself after using helm for about a year.

- There certainly are performance issues with helm, but setting gc-cons-threshold to a higher value helps my setup a lot.

- I update all my installed packages pretty frequently, and I just use regular melpa. I haven't really noticed bugs with Helm.

- As for the fuzzy matching, look into the "helm-flx" package. It gives you real fuzzy matching, much better than the default helm matching.

- I have M-x bound to helm-M-x, which is a better option than the default. Also, helm-mini is a better option for a buffer switcher.

I agree that Helm is lacking in many areas, but this guide made Helm work better for me: https://tuhdo.github.io/helm-intro.html

Re:Why GNU Emacs? by benaiah on Sunday February 14, 2016 @05:52PM (#11100390)
Ah, helm-flx didn't exist when I quit helm, and flx-ido did. Question: does helm-flx sort results, or does it just throw back an unsorted list of matching entries, like normal helm? I consider the sorting an even bigger and more ridiculous drawback than the matching.

I haven't used helm-M-x. That may be better - but it doesn't solve the problem that everything else using completing-read is still on normal helm.

I typically use a small emacs window next to a terminal (or few - I don't run terminals in emacs) and browser in my tiling wm. Helm makes this nearly impossible, since it's very difficult to control where helm windows will go without using popwin (horrifically buggy) or shackle (I never tried this, as I'd already moved to ido by the time it showed up), because of helm's nonstandard way of doing things.

With regards to the bugginess, I can anecdotally say that I've seen more asking about problems with helm on the #emacs IRC channel than any other package - and there are several of equivalent popularity (magit, for instance). I also experienced numerous bugs while I was using helm, including some that broke my emacs config. The only package I've had break my config more than helm is org, but org generally works quite well if you can get it loaded without problems.

Re:Why GNU Emacs? by clocksld on Sunday February 14, 2016 @06:04PM (#11100431)
helm-flx sorts results by the "closest" match to your typed in characters. For me, typing "tetri" has "tetris" listed first, with the next result matching all of those characters in a different command, and each of the following results being less and less accurate matches. There is no alphabetical sorting, though.

Popwin is very annoying for me, too. I'll look into trying out shackle.

There is also a less-popular completion system for emacs called ivy. I don't know how it stacks up to ido or helm, but perhaps that one is also worth checking out.

Re:Why GNU Emacs? by sandisk5 on Sunday February 14, 2016 @07:57PM (#11100869)
> An atrocious version of "fuzzy matching" (you have to separate terms with spaces, which are then turned into ".asterisk" (can't type a single asterisk in HN comments) and everything's concatenated into a regex to match)

That's not true. Helm doesn't just insert .asterisk, which is why it supports out of order matching. If one searches for "file rename" Helm will find rename-file, while typing "filerename" in ido it will not find it. In ido one would have to do "file<C-SPC>rename"

> Dictatorial maintainers that only allows options and features that they deem the "right way" to do it.

Helm is already criticized by many ido fans for having too many features, now it's also criticized by ido fans for not having more (despite it having way more than ido).

> Constant bugs

This is because helm is constantly changing and improving. ido is not changing, and most extensions to it are very hacky.

I prefer ido, but helm is a good tool that's perfectly usable that tons of people like and does a lot more than ido.

Re:Why GNU Emacs? by gleb on Sunday February 14, 2016 @08:09PM (#11100917)
ido would really benefit from being spun-out as a package. People would actually fix bugs and add functionality in a reasonable way rather than hacky extensions (like ido-hacks)
Re:Why GNU Emacs? by benaiah on Sunday February 14, 2016 @08:35PM (#11100999)
> That's not true. Helm doesn't just insert .asterisk, which is why it supports out of order matching. If one searches for "file rename" Helm will find rename-file, while typing "filerename" in ido it will not find it. In ido one would have to do "file<C-SPC>rename"

I did forget it supports out-of-order matching, my apologies. Still, it does use a strange, difficult-to-use form of matching, and does not sort the results by default.

I use flx-ido, which supports out-of-order matching to some degree. This is not a knock on helm, as helm (now) has helm-flx, but nevertheless I consider ido's default much better than helm's, as ido at least sorts the results.

> Helm is already criticized by many ido fans for having too many features, now it's also criticized by ido fans for not having more (despite it having way more than ido).

I may have made this point badly, but it's not about features, it's about letting me use those features the way I want. I don't recall the exact discussion, as this was over a year ago, but I asked for the ability to change a specific default and was told "that's the wrong way to do it" - and I'm not the only one who's recounted something like that happening in the project. That's unacceptable for something I use in Emacs - I want to be able to change anything.

> ido is not changing, and most extensions to it are very hacky.

ido does everything I need it to, and works seamlessly with every package I've tried it with. If its extensions are hacky, I haven't noticed - my ido config has literally never broken, whereas when I used helm I dealt with things breaking constantly, and not because of the introduction of grand new features. I don't mind bugs due to newness; I greatly dislike bugs that are due to doing things in a non-standard, difficult-to-customize manner, combined with a lack of care towards not breaking things, which has been my experience with helm.

Helm has a lot more features. That's certainly true. A lot of those features are ones I wished I could have in ido. But in nearly every other aspect helm is significantly deficient, often pointlessly so. Helm had to have extra work put in in order to use custom non-standard windowing functions - extra work that makes the package significantly worse, IMO.

FWIW, I don't mean to say your response is wrong, and I don't mind that people use helm (I use helm a little, though only when I have to). If you can get helm working, and you like it, that's great. I just don't want new users to get disillusioned with emacs because of how finicky and frustrating helm can be - as I mentioned in another comment, I see more people in the #emacs IRC channel having problems with helm than with any other package. Helm is often proselytized without much warning about the issues I listed - I almost quit Emacs when helm, one of its "star packages" according to most Emacs bloggers, caused me so many problems.

Re:Why GNU Emacs? by gleb on Sunday February 14, 2016 @07:24PM (#11100736)
For M-x I like smex. Like fuzzy ido but without the bugs and purpose built for M-x - it just works. smex persistently remembers how often you use different commands, and uses this to sort the initial list of completions - very handy.

  (require 'smex)
  (smex-initialize)                       ; is this needed?
  (global-set-key [(meta x)] 'smex)
  (global-set-key [(shift meta x)] 'smex-major-mode-commands)
Re:Why GNU Emacs? by gleb on Sunday February 14, 2016 @08:07PM (#11100911)
I think both built-in completing read and helm/ivy have their uses. ido is best for when you know what you want and want to get it to it with minimal number of keystrokes. helm seems better for when you want to review many (but not too many) options before deciding on what you want.

I find ido unusable for find-file, because of how it splits up directory from filename. So I use the builtin completion.

But I rarely open files using find-file anymore. ido-use-virtual-buffers is magical. For commonly opened files it let you use switch-to-buffer whether the file is opened or not.

  (require 'recentf)
  (recentf-mode t)
  (setq recentf-max-saved-items 200)

  (setq ido-use-virtual-buffers t)        ; include recentf files

While, something like this works better with helm:

  (require 'yari)
  (define-key ruby-mode-map [(meta h)] 'yari-helm)
Re:Why GNU Emacs? by benaiah on Sunday February 14, 2016 @08:41PM (#11101018)
I love ido's find-file, but I think that's because I've made it behave much differently than the defaults. The ability to use backspace to go up one full directory, jump to home with ~/ at any point, jump to / with // at any point, and navigate folders quickly with fuzzy matching and RET is really, really nice.

To be fair, most of my file opening is done with projectile, which, when you exclude the right files and use ido, works fantastically well. I can get to nearly anything I've been working on in two commands - projectile-switch-to-project (C-c p p) and projectile-find-file (C-c p f).

I'm not sure what you mean by "how it splits up directory from filename" - could you clarify?

ido-use-virtual-buffers is indeed awesome - I really love it.

Re:Why GNU Emacs? by gleb on Sunday February 14, 2016 @09:23PM (#11101167)
Do find-file. Now I see current directory as the default suggestion. Can C-a, C-b, Backspace, etc. within it.

Do ido-find-file. Now I see current directory as part of the prompt. Cannot C-a, C-b, Backspace, etc. within it.

Re:Why GNU Emacs? by benaiah on Sunday February 14, 2016 @09:53PM (#11101264)
Ah, I see. This is actually one of my favorite features of ido-find-file. I love the fact that I can treat the current path section I'm writing as independent of the path I've already navigated to. To each their own.
Re:Why GNU Emacs? by adamrt on Sunday February 14, 2016 @09:40PM (#11101219)
I can't reply to gleb's comment below, so I will respond here.

After ido-find-file you can do C-f and edit the line like find-file does.

Re:Why GNU Emacs? by blaenk on Monday February 15, 2016 @12:46AM (#11101709)
FWIW, you can do that stuff with helm as well. Except it's C-l to go up a directory by default, IIRC.
Re:Why GNU Emacs? by comice on Sunday February 14, 2016 @07:20PM (#11100724)
make sure you're using the stable melpa repository. The unstable (default) melpa repo is just builds direct from the master branches of the projects. melpa stable is builds from release tags.

since switching from unstable to stable melpa, I've not had anything break.

Re:Why GNU Emacs? by benaiah on Sunday February 14, 2016 @07:37PM (#11100797)
Agreed. Regular melpa is practically a parody of a package repo - sometimes it seems it took the worst option at every possible decision. Building directly from HEAD, using insane version numbering that causes package.el to prioritize it over every other repo (someone more cynical than I might think this was intentional), and yet somehow managing to be by far the most popular way to distribute packages, even more so than melpa-stable (which is actually quite tolerable).
Re:Why GNU Emacs? by gnuvince on Sunday February 14, 2016 @06:18PM (#11100487)
You may be interested in checking out Ivy; it has a similar workflow to Helm but is much more lightweight. As a fan of Ido, Ivy has replaced Ido everywhere for me except for opening files.
Re:Why GNU Emacs? by gkya on Sunday February 14, 2016 @06:34PM (#11100552)
I'm on 24.5, and I don't know how it was in the past, but Emacs' default minibuffer reading functionality is good enough that Ido, Ivy, Helm or whatnot seem superfluous to me. I can type C-x C-f ~/Git/projectx/src/ding/~/.xombrero/runtime//etc/fstab RET

it will do the correct thing, and it will give visual feedback. Also I can type

  M-x rev-bu RET
and it will run revert-buffer, and if I type TAB instead of RET, it will complete to actual command name. It will ignore case in completions if these variables are set:

  ;; Ignore case when completing file names in minibuffer.
  read-file-name-completion-ignore-case t
  read-buffer-completion-ignore-case t
  completion-ignore-case t
Also an indispensable config:

  enable-recursive-minibuffers t
What does them tools provide that can't be easily done by these? And ido fails when entering a TRAMP file name, so one has to hit C-f in minibuf to drop to the original prompt.
Re:Why GNU Emacs? by benaiah on Sunday February 14, 2016 @06:56PM (#11100638)
This works great if you have all the commands memorized. If you don't, fuzzy matching in ido is a fantastic way to find commands and variables that do what you want (Emacs has a great tendency to name user-facing commands very sensibly a lot of the time). Most of the time I can use C-h f and C-h v to figure out how to configure something without having to read the documentation.

In addition, ido and flx-ido provide more efficient and faster (you don't have to manually invoke it) autocompletion than what you can get with prefix-based tab completion.

Also, I haven't had any issue with ido+TRAMP - everything works seamlessly on my end.

Re:Why GNU Emacs? by gkya on Sunday February 14, 2016 @07:05PM (#11100676)
I do not have all the commands memorised. But how emacs completes changes upon where you hit tab. if you type M-x re-bu TAB, it will show revert-buffer, re-builder, etc. If you hit TAB when cursor is at the beginning, like M-x buffer M-b TAB, it will show any command with buffer in it. Then you can C-x o to the Completions buffer and use any search tool on it, e.g. isearch-forward-regexp.
Re:Why GNU Emacs? by benaiah on Sunday February 14, 2016 @07:39PM (#11100801)
More power to you, but I couldn't go back to manually-invoked completion at this point. An environment which gives me as much information as possible as quickly as possible in as few keystrokes as possible is a big priority for me, and I'm willing to have a few extra dependencies in order to get that.
Re:Why GNU Emacs? by gkya on Sunday February 14, 2016 @08:19PM (#11100957)
It's not about dependencies, after all ido is part of emacs. I find the default with some tweaks to simply be better. Though it's a bit personal preference here I think.
Re:Why GNU Emacs? by benaiah on Sunday February 14, 2016 @08:36PM (#11101004)
"dependencies" was a reference to the numerous plugins I use to get ido in a state that I enjoy. I don't particularly like stock ido, though I prefer it to the standard completing-read.
Re:Why GNU Emacs? by benaiah on Sunday February 14, 2016 @06:30PM (#11100535)
I've heard good things about ivy, but haven't got around to revamping my config in some time. I'll check it out next time I do.
Re:Why GNU Emacs? by pmoriarty on Sunday February 14, 2016 @10:10PM (#11101316)
Which plugins would you recommend to replace helm?
Re:Why GNU Emacs? by kstrauser on Sunday February 14, 2016 @05:05PM (#11100201)
I went from Emacs to Sublime and back to Emacs. The UI could be improved, maybe, but there's a lot to be said for knowing that your editor will still exist next year. I'm frankly not confident in ST3, but I'm 100% certain that Emacs will be there.

But beyond that, I find that a lot more stuff Just Works in Emacs. I spend my days working in Python, and both major Python modes for Emacs are miles ahead of ST's equivalents. Things like linters work as expected and there are lot more packages available for niche things. Emacs is subjectively better, even if the UI doesn't feel as platform-native as other editors.

I don't use Emacs because I'm a graybeard afraid to learn something new. I use it because I've tried every new hotness to come along and I've yet to find something as powerful, well-supported, and ubiquitous.

Re:Why GNU Emacs? by oblio on Sunday February 14, 2016 @05:23PM (#11100269)
The thing is, in this day and age most people don't need their editor to last 100 years. Because of https://en.wikipedia.org/wiki/IBM_Common_User_Access & friends, you can just switch to another editor.

Meanwhile, if you're used to Vi's modal editing or Emacs's elisp, you're basically going to hate the other tools forever if for whatever reason. For example if you need IDE features for your project or the Vim/Emacs extensions for language X are no stable/flexible enough.

Re:Why GNU Emacs? by to3m on Sunday February 14, 2016 @06:14PM (#11100467)
Once you're past the basic navigation cluster + cut/copy/paste/undo/save (which tend to be more Windows-style, I'd say, than CUA!) every editor is different.

Ctrl+F for Find is a common standard, for example, but it's hit or miss whether this is Ctrl+F for Find (and that's your lot! Find & Replace is something entirely different), Ctrl+F for Find (and you have a checkbox for Replace), Ctrl+F for Find (and you have a checkbox for Replace... and this is how you search across multiple files as well). And there are multiple standards for all of these additional options. Your muscle memory will be useless no matter what you're used to. You're welcome to describe emacs as unusual... but don't assume everything else is a nirvana of UI consistency. The process of "just" switching can be a bit more inconvenient than you might think ;)

Re:Why GNU Emacs? by criddell on Monday February 15, 2016 @12:33AM (#11101686)
Do you really use one editor for everything?

When I'm working on Python code, I'm in PyCharm. My C++ work on Windows is in Visual Studio. When I ssh into the Linux machine that serves our in-house documentation to make changes, I'm using vim. On OSX, I use BBEDit most of the time. When I'm writing a letter, I'm usually in Word or Google Docs.

I think if I spent all day every day in one environment, I would get bored.

Re:Why GNU Emacs? by gcommer on Monday February 15, 2016 @01:30AM (#11101823)
> Do you really use one editor for everything?

Yes, at least whenever possible.

> I think if I spent all day every day in one environment, I would get bored.

The opposite perspective: It's extremely frustrating constantly switching between significantly different environments with different UIs, different hotkeys, subtly different jargon, etc.

Re:Why GNU Emacs? by criddell on Monday February 15, 2016 @10:13AM (#11103735)
> It's extremely frustrating constantly switching

Maybe that's the difference. I'm not a productive multitasker. When I have some Python to work on, that's all I'm doing for the next day or two. I'm not jumping from Word to PyCharm to Vim all day.

Re:Why GNU Emacs? by merpnderp on Sunday February 14, 2016 @05:34PM (#11100316)
Nearly every IDE of importance has either a full VIM plugin or is working hard on it. Not having to take your hands off the keyboard line to hit the arrows or mouse is a big deal to a lot of devs. Having easy and powerful regex is nearly as important. And having buffers is probably a close number three.
Re:Why GNU Emacs? by jjnoakes on Sunday February 14, 2016 @10:57PM (#11101436)
How do you reach the escape key?
Re:Why GNU Emacs? by rodelrod on Monday February 15, 2016 @04:29AM (#11102376)
http://vim.wikia.com/wiki/Avoid_the_escape_key

Personally, mapping Caps Lock to Ctrl (which I do anyway) and using Ctrl-C works best. I use vim and IntelliJ's vim emulation on an international keyboard where Ctrl-[ won't work.

Re:Why GNU Emacs? by jjnoakes on Monday February 15, 2016 @07:54AM (#11103071)
So the entire argument about not moving one's hands is moot then, since in emacs you get navigation via control-key for free, and in vi you need to remap the most important key to something near home row.

Got it. Thanks.

Re:Why GNU Emacs? by rodelrod on Monday February 15, 2016 @12:29PM (#11104599)
Oh, I'm sorry, I thought you were actually interested in the answer. I won't get into an emacs/vim war, thank you, I got tired of it circa 1999.
Re:Why GNU Emacs? by jjnoakes on Wednesday February 17, 2016 @11:23AM (#11118903)
I'm not interested in a war either. I'm only interested in both sides presenting fair arguments. If one side says "but the other side has to move their hands" and leaves out "oh, my side does too, unless I rebind keys", then that's unfair, and I'll say something.

If you think that places me on the other side of the argument (it doesn't), that's on you. It simply puts me in the middle.

Re:Why GNU Emacs? by losvedir on Sunday February 14, 2016 @05:34PM (#11100318)
> The UI could be improved, maybe, but there's a lot to be said for knowing that your editor will still exist next year. I'm frankly not confident in ST3, but I'm 100% certain that Emacs will be there.

This is misleading. In the era of JetBrains and its perpetual licensing and Steam and whatnot, it's worth pointing out that ST3 is a binary that you download and have complete access to, so of course it will be there next year.

You're probably getting at the fact that development may stop on it next year, and that's true, but the product is still pretty polished and useful now.

I also don't have your confidence that Emacs will always be there. I don't have statistics - but have contributions been increasing or decreasing in the last decade? In any case, I hope that Emacs fades away: text editing is great, but I think there's still plenty of room to advance our craft. Things like Lamdu and Eve (nee Light Table) are interesting explorations.

Re:Why GNU Emacs? by benaiah on Sunday February 14, 2016 @05:37PM (#11100330)
Emacs is actually having a bit of a renaissance - ever since package.el came out and became widely adopted, Emacs adoption seems to have increased significantly, and Emacs development is quite active these days.
Re:Why GNU Emacs? by gkya on Sunday February 14, 2016 @06:40PM (#11100579)
And 25 is near and with xwidget support, i.e. embedding things like a Webkit instance in a buffer. I guess I will be able to "exec emacs --debug-init" in my .xsession soon.
Re:Why GNU Emacs? by rekado on Monday February 15, 2016 @04:38AM (#11102410)
There is EXWM, an X window manager for Emacs: https://github.com/ch11ng/exwm

Here are some screenshots: https://github.com/ch11ng/exwm/wiki/Screenshots

Re:Why GNU Emacs? by snaky on Monday February 15, 2016 @04:39AM (#11102420)
Actually you can - http://www.howardism.org/Technical/Emacs/new-window-manager....

All you need to do is to set up a couple of hotkeys for things that Emacs cannot do (yet), like (start-process "" nil "xdg-open" "http://some.flashy.javascript.website")

Re:Why GNU Emacs? by gpderetta on Monday February 15, 2016 @07:04AM (#11102867)
I'm eagerly waiting for the day I can use emacs as my window manager.
Re:Why GNU Emacs? by gkya on Monday February 15, 2016 @04:35PM (#11106203)
You're waiting for a day in the past: See EXWM, links in a sibling comment. With it, you can use emacs as your window manager already.
Re:Why GNU Emacs? by gpderetta on Tuesday February 16, 2016 @10:00AM (#11110206)
That would be awesome! Is it actually stable and/or usable?
Re:Why GNU Emacs? by gkya on Tuesday February 16, 2016 @04:15PM (#11113178)
I tried it very early and it was unstable, but I'm following its development, and it seems that it'll be stable shortly. I'm using ratpoison nowadays, though I'll switch to it when it's stable enough and emacs gets multithreading.
Re:Why GNU Emacs? by copperx on Sunday February 14, 2016 @06:20PM (#11100493)
> it's worth pointing out that ST3 is a binary that you download and have complete access to, so of course it will be there next year

This is not "being there." Popular architectures change, as do operating systems. Unless you intend to freeze your current computing environment for posterity, a working executable means nothing.

Re:Why GNU Emacs? by bch on Sunday February 14, 2016 @05:06PM (#11100203)
Not trying to be confrontational, but conversational --

I'd say that both vi and Emacs have solid fundamentals and have stuck with a model that works, to their credit. I must admit that I shop around for editors occasionally (I'm a long-time emacs person, who swapped back to vi a few years ago to re-develop his vi-fu), but I haven't seen anything so compelling that I've switched to anything else.

It may well be that I'm looking in the wrong place, or that I don't realize the true awesomeness of something that does cross my desk.

In the spirit of advancing text editing, what would you say is missing from vi or Emacs that you've found in other editors (even if the advancements aren't present in one singular other processor)?

Edit: stray words

Re:Why GNU Emacs? by flogic on Monday February 15, 2016 @02:06AM (#11101909)
My primary issue with Vi and Emacs isn't really about lack. They are quite powerful tools. The primary problem is that they impose a certain amount of mental overhead. Emacs was a bit worse in that regard since many of its key bindings are actually sequences. Sublime Text is rather powerful but in terms of features it's probably the one that is lacking of the 3. The win was in unloading the overhead from my normal work patterns.
Re:Why GNU Emacs? by __david__ on Monday February 15, 2016 @02:52PM (#11105477)
I think that mental overhead is the steep learning curve that everyone talks about. I remember when I first started learning Emacs it was hard. I just had to think in this new way (I was used to cua style keystrokes), but after a month or so my muscle memory developed and I started not having to directly think about what I was doing. Once you get to that point, the overhead is gone and things become very nice.

But I'll grant you it's a hard sell to say "this is great, but you're going to be unproductive for a month". Nonetheless, I think the payout is very much worth it, and if you are interested, make sure you are prepared, and stick with it for a good long time before giving up.

Re:Why GNU Emacs? by ezy on Tuesday February 16, 2016 @01:10AM (#11108193)
This is going to sound a little misguided, but bear with me. If you want to see what you're missing: Take a look at the IDEs of the moment. Try something like eclipse on java code or maybe devstudio in the windows world.

In general, vi/emacs are missing support for editing above the level of text (eg. refactoring) and support for UI above the level of a text terminal. I know add-ons exist for both editors that do some of these things, and of course, you can run both in a graphical terminal with custom fonts, etc -- but if one is being honest, it's not very well integrated in either of the old standbys.

I'm a vim user, but not really an advocate. I'm just used to it, I like the way it works (mostly) out of the box[1], and I think it's text editing facilities match the way I edit better. It's a great generic text editor -- as is emacs (for some others, not me). But all they do is understand text...

I had to do some Java development recently. So I tried eclipse (with a vim keymap plugin). Now, eclipse kind of sucks in many ways, but one thing it definitely has is the ability to refactor code. Something like variable rename over multiple files that would have me concocting a sed-ish script for vi, or doing query-search-replace, next,next,next,skip,next in emacs was literally two keystrokes and bang, done. Forget about actually moving language constructs from one file to another or to another package, etc. And the UI for it was very clear: inplace modification, and popping up a warning about where the refactoring would break, if it would.

And then we have modern UI. Eclipse isn't even very pretty (or modern) by modern standards, but it still highlights properties of code (warnings, unused variables, etc) by actually drawing symbols or boxes on the screen rather than attempting to wrangle indications into the world of VT220 terminals. Among other things...

One could put this all making up for deficiencies in Java, I suppose. Except, again, if one is honest, one realizes that this kind of thing is highly useful no matter what language you're developing in...

Neither Vim or Emacs has very good support for any of this at all. There are examples of add-ons that do it kinda-sorta, but they aren't very good. Emacs is better than vim at this, of course[2], but it's still not very common for language support to get to this level. It's not a standard thing, and it should be. Such is history, and the pragmatics are writing a substantial piece of software inside another piece of software in a crappy language :-). Emacs still crappier (and slower) than eclipse at just highlighting syntax (and barely does the highlighting of semantics).

Emacs & vim have real issues as code editors because they are stuck in the past -- and not the recent past either. Vi was never meant to be anything but a text editor, for good or ill. And Emacs... well emacs lives in it's own little world reminiscent of a half-baked lisp machine crossed with a VT220 terminal. And while the capability is there somewhat to do the above, there is a lot of historical baggage and historical code to overcome.

So, is eclipse my editor of choice now? :-) :-P Well, no (except for java code). :-) It's a shitty editor, it's slow to start, it crashes or gets into a funky state too often, and it's really a Java-editor, not a generic text/code/anything editor (although it tries to be, and fails). But I think eclipse and tools like it show clearly "what is missing" in an old-school editor like vim/emacs, or indeed any new editor which uses either of these as a model.

[1] I also think key-chording, which emacs uses (and others influenced by emacs use) is actively physically harmful.

[2] A better scripting language helps. I'm sure emacs is somewhat passable at refactoring lisp code. :-)

Re:Why GNU Emacs? by sandisk5 on Sunday February 14, 2016 @08:13PM (#11100931)
> It seems like they've managed to starve out a good chunk of innovation on this front.

If you look the way magit dialogs are handled, they're quite innovative and could be useful in many other contexts (like shell commands). Magit itself has many other innovative UI approaches. EMMS/gnus/notmuch/twittering-mode have innovative UIs of their own. Also look at spacemacs and the things its doing with guide-key for more UI innovation.

Being able to search (C-s) or filter (occur) almost any text on the screen (including UI like button names) is very nice, and something I miss when in Atom (like the Settings tab where one can only search things the creator decided to add a search field for).

There is a ton of innovation in vim and emacs these days, mostly in new packages. I'm glad we have them (and Atom and others) exploring different approaches.

There are plenty of gedit-like editors with standard user interfaces.

Re:Why GNU Emacs? by merpnderp on Sunday February 14, 2016 @05:30PM (#11100301)
I won't use an IDE on OSX or windows that doesn't support VIM or Emacs key bindings because I'm not an animal that wants to take his fingers off the line to use the mouse or arrow keys every time needs to move the cursor (or run a regex real fast to mass update code).

Luckily there are VIM bindings for nearly every single IDE of importance out there.

Re:Why GNU Emacs? by alkonaut on Sunday February 14, 2016 @05:42PM (#11100352)
> I won't use an IDE > a regex real fast to mass update code

For things like renaming, an IDE would have a function for that, which isn't text based but symbolic. At the very least, bringing up a replace diaglog with regex functionality doesn't require any more keys to be pressed in an IDE than in emacs. Most IDEs's also support key bindings that are pretty close to Emacs or vim.

unless you use a dynamic language in which case you are shit out of luck.

Re:Why GNU Emacs? by eeperson on Sunday February 14, 2016 @06:06PM (#11100441)
You can do the same thing in Emacs too. For example, this[1] supports that for Scala (and I think Java now as well).

[1] http://ensime.github.io/

Re:Why GNU Emacs? by TeMPOraL on Sunday February 14, 2016 @05:53PM (#11100393)
Symbolic renames are one thing, but sometimes you really want to do textual renames. When you have names like fooFrobnicator, barFrobnicatorFactory and quuxFrobnicatorController, and you want to rename Frobnicator to Twiddler, symbolic rename won't help you.

Also, you can create quite a lot of code indirectly by few well-placed keystrokes that utilize multiple cursors / keyboard macros, regexp-replaces and things like this. Think of it as chiseling out an entire block of code at once. Spend little time mastering those features, and you can do things like this on the fly, without much conscious focus.

Re:Why GNU Emacs? by nextos on Sunday February 14, 2016 @05:13PM (#11100235)
I think they come with quite a lot of baggage, yes. But if you get past the initial steep learning curve, there's a lot of productivity gains waiting for you.

With regards to simpler editors, the problem is that they come and go. Learning an editor is a big investment, so I'd rather stick to something that will still be around next decade.

Re:Why GNU Emacs? by alayne on Sunday February 14, 2016 @05:08PM (#11100211)
Sublime Text is proprietary closed source. That seems counter to modern Unix/Linux goals.
Re:Why GNU Emacs? by sien on Sunday February 14, 2016 @05:51PM (#11100382)
There is Atom these days which is OS and similar to ST.

Mind you, Atom takes longer to start than Visual Studio.

Re:Why GNU Emacs? by dingo_bat on Monday February 15, 2016 @09:13AM (#11103463)
VS Code is open source and starts as fast as notepad.exe. Also, I think it has more features than atom.
Re:Why GNU Emacs? by pjmlp on Sunday February 14, 2016 @05:50PM (#11100380)
Which UNIX isn't proprietary?

Note UNIX, not UNIX like.

Re:Why GNU Emacs? by groovy2shoes on Sunday February 14, 2016 @06:10PM (#11100453)
All of the BSDs.
Re:Why GNU Emacs? by pjmlp on Sunday February 14, 2016 @06:13PM (#11100461)
Which of them is certified as such?
Re:Why GNU Emacs? by curt15 on Sunday February 14, 2016 @07:11PM (#11100703)
Who really cares about whether something is "certified" UNIX? Certification is not some seal of quality. "Unix" is commonly understood to denote "functional" unix systems as well for lack of a more convenient term.
Re:Why GNU Emacs? by pjmlp on Monday February 15, 2016 @12:51AM (#11101728)
That os what the UNIX-like expression is for.
Re:Why GNU Emacs? by mitchty on Sunday February 14, 2016 @07:58PM (#11100873)
OS X would have been the only one certified. Even then I wouldn't call it a BSD per-se.
Re:Why GNU Emacs? by groovy2shoes on Sunday February 14, 2016 @06:20PM (#11100494)
Oh, didn't realize you meant only certified Unices. I'll be on my way...
Re:Why GNU Emacs? by nalck on Sunday February 14, 2016 @06:44PM (#11100595)
Illumos
Re:Why GNU Emacs? by lottin on Sunday February 14, 2016 @05:17PM (#11100250)
What is true is that Vi and Emacs are deeply tied to the Unix tradition. Whether they are 'antiquated' or whether there are 'better' alternatives is a matter of opinion. Personally I haven't seen any other editor that comes close.
Re:Why GNU Emacs? by lispm on Sunday February 14, 2016 @07:02PM (#11100666)
Maybe GNU Emacs, because it was originally written for Unix. Emacs itself came from ITS/Teco. Lisp-based Emacs came from the MIT Lisp Machine (using Lisp Machine Lisp as implementation language) and Multics Emacs (using Maclisp as implementation language).
Re:Why GNU Emacs? by jamespo on Sunday February 14, 2016 @05:10PM (#11100214)
A lot of the reason I used emacs is that it works in a terminal... nothing else with its power does.
Re:Why GNU Emacs? by MarcScott on Sunday February 14, 2016 @05:19PM (#11100255)
While on the other hand, I use it because I can open a shell from within Emacs.

I can also use tramp to ssh onto another machine from within emacs, and so don't have to bother installing my favourite editor on headless servers and Raspberry Pis.

Re:Why GNU Emacs? by sooheon on Sunday February 14, 2016 @10:19PM (#11101341)
Is there a true terminal inside emacs that I don't know about, because all the ones I've tried were buggy chimeras of odd behaviours.
Re:Why GNU Emacs? by Bogdanp on Monday February 15, 2016 @02:36AM (#11101977)
`ansi-term` works well in most cases. The only time it really breaks down for me is when I run commands that combine really long lines and complex escape sequences (like npm's new progress bar which you can thankfully disable).
Re:Why GNU Emacs? by rekado on Monday February 15, 2016 @02:10PM (#11105229)
I'm quite content with shell-mode for most of the things I do (took me a while to get used to some of its quirks, but now I like them). For curses applications (like alsamixer) I use ansi-term.
Re:Why GNU Emacs? by FenugreekAcerb on Sunday February 14, 2016 @05:03PM (#11100197)
Yeah or you should install Atom and be spied by Google Analytics [1]. Let's take the creepiness of the web to the desktop.

[1]: https://atom.io/faq

Re:Why GNU Emacs? by WizardOfTheWest on Sunday February 14, 2016 @05:28PM (#11100294)
Thankfully, for Arch and Arch derivatives, the AUR package removes this before building.

https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=atom-...

Re:Why GNU Emacs? by merpnderp on Sunday February 14, 2016 @05:38PM (#11100334)
I've found VS Code a great alternative to Atom for that level of editor (fast and light). Don't tell me it does something equally as awful?
Re:Why GNU Emacs? by dopu on Sunday February 14, 2016 @07:30PM (#11100760)
You should know better; it's made by Microsoft. However, like with Atom, you can disable telemetry:

https://code.visualstudio.com/Docs/supporting/FAQ#_how-to-di...

Re:Why GNU Emacs? by MarcScott on Sunday February 14, 2016 @05:16PM (#11100245)
Given that all these editors are cross-platform, I don't see how the continued development of Emacs could be starving out innovation in the Unix world.
Re:Why GNU Emacs? by pjmlp on Sunday February 14, 2016 @05:53PM (#11100392)
Many on UNIX seem to keep living as if their quad-core with 16GB is actually a better PDP-11, hence starving innovation.
Re:Why GNU Emacs? by TeMPOraL on Sunday February 14, 2016 @05:57PM (#11100406)
Well, if those quad-cores and 16GB of RAM would actually be put to good use in the "modern"/"hot" IDE world, we could talk. If anything is starving out innovation, it's sticking to CUA, mouse-driven development and rewriting nano in JavaScript...
Re:Why GNU Emacs? by pjmlp on Monday February 15, 2016 @03:09AM (#11102063)
When those IDEs are able to achieve what was possible in Xerox PARC workstations, as demoed occasionally by Bret Victor, then we can talk about moving forward.

PDP-11 command line experience is not even there.

Re:Why GNU Emacs? by __david__ on Monday February 15, 2016 @03:00PM (#11105520)
> PDP-11 command line experience is not even there.

Are you saying the modern unix command line is not as good/better than the "PDP-11 command line experience"?

Also, which PDP-11 command line? RSTS? RT11? Unix? or maybe that awesome front panel where you had to manually input your boot loader in binary every time you started the machine?

Re:Why GNU Emacs? by pjmlp on Monday February 15, 2016 @03:05PM (#11105556)
> Are you saying the modern unix command line is not as good/better than the "PDP-11 command line experience"?

No, I am saying that it isn't even close to the Xerox PARC REPL experience from Interlisp-D, Mesa/Cedar and Smalltalk environments.

> Also, which PDP-11 command line? RSTS? RT11? Unix? or maybe that awesome front panel where you had to manually input your boot loader in binary every time you started the machine?

The VT-100 interface some people seem to keep living on.

Re:Why GNU Emacs? by praqzis on Monday February 15, 2016 @01:19AM (#11101797)
Why have my IDE or developer tools take up all that? Instead, I like to save it to run a 4-node Kubernetes cluster running 8+ Docker containers to have a self contained distributed application locally during development (hey, it works on the airplane too when totally disconnected from a network).
Re:Why GNU Emacs? by mbrock on Monday February 15, 2016 @02:39AM (#11101981)
8 Docker containers isn't really saying much. I'm running 20 on my cheap VPS right now. They're just processes...
Re:Why GNU Emacs? by pjmlp on Monday February 15, 2016 @02:48AM (#11102003)
To be able to enjoy a computing experience as envisioned by Xerox PARC and Olivetti, not AT&T.
Re:Why GNU Emacs? by shiro on Sunday February 14, 2016 @11:19PM (#11101490)
On standard UI: The kind of unity of UI I want is a bit more than common cut/copy/paste/save/open shortcuts---for example, using the same incremental search or mark-and-kill-ring-save keystrokes on items in the long pull-down menu or labels in property-editing dialogs...
Re:Why GNU Emacs? by melted on Monday February 15, 2016 @03:26AM (#11102137)
You simply don't grok vim. Don't know about Emacs, I'm not a Emacs user, but chances are pretty good you don't grok it either. To begin to grok vim, please refer to the following StackOverflow answer: http://stackoverflow.com/questions/1218390/what-is-your-most...
Re:Why GNU Emacs? by jayvanguard on Sunday February 14, 2016 @05:11PM (#11100220)
I quite like Sublime Text 3 as well, but only because it has a vi mode.
Re:Why GNU Emacs? by sklogic on Sunday February 14, 2016 @06:03PM (#11100427)
I'd be interested to hear more about "powerful" text editors from the DOS or Windows world. Likely your definition of "powerful" is quite peculiar.