News for hackers. Stuff that matters.
Re:“Mastering Emacs” ebook announced by melling on Thursday December 18, 2014 @05:54PM (#8770146)
One feature where Emacs seems to be lacking is 'out of the box' text completion and IntelliSense. I know that there are modes like IDO, auto-complete, and probably others, but editors like Sublime and IntelliJ just work with zero effort. A detailed explanation on how to best configure Emacs would go a long way in making it easier to get started.
Re:“Mastering Emacs” ebook announced by to3m on Thursday December 18, 2014 @07:19PM (#8770479)
For C/C++/etc., there's all the suggestions you can eat on this page: http://tuhdo.github.io/c-ide.html

For code completion, I had decent success with company-mode and its clang backend. This was a good return on time invested as it took all of about 5 minutes to set up and worked immediately on both Linux and Mac OS X (only requirement is clang-3.something, I think - apparently works on Windows too, albeit unsupported). Initially I found it a bit slow, but after switching off the while-you-type completions I became much happier.

More recently I've started using rtags (https://github.com/Andersbakken/rtags) for code browsing. This was a bit tricker to set up, as I had to build my own copy of clang and llvm (rtags needs a more recent copy than company-mode so the one from the Linux package manager wasn't good enough). Luckily this wasn't too hard - the official instructions are perfectly clear - and it was relatively plain sailing from then on.

Compared to Visual Studio or Xcode the results overall are inferior. The browsing or completion fails more often than VS/Xcode, even with system symbols, for reasons I have yet to investigate, and of course it's far from plug-and-play, particularly in terms of automatically getting the right header paths for the current project. But it's proving workable, and is a huge improvement over ctags, particularly for C++.

Re:“Mastering Emacs” ebook announced by tuhdo on Thursday December 18, 2014 @10:07PM (#8770931)
At least for C, with GNU Global I can jump around Linux Kernel effortlessly, while I put it into VS and VS just hanged.

For C++, well hopefully we have some new language to replace it in the future. But at least for jumping to symbol definitions/references, it shouldn't be a problem with GNU Global. For code completion, you can still use `company-gtags` to get completion symbols in your project. It's really simple. I know it's not really intelligent (i.e. only show completion candidates in current namespace), but instead throw you everything, but it's practical enough.

Re:“Mastering Emacs” ebook announced by to3m on Friday December 19, 2014 @09:11AM (#8772254)
Context sensitivity is really important for C++, I've found, both for navigation and completion. C++ code uses struct/class members a lot, both functions and variables, and it's common for member functions to share names. That's how the virtual mechanism works, of course, and it's also commonly used to make classes useful as template parameters.

(For a long time, this kept me using Visual Studio+Visual Assist - which is OK - and Xcode - which is... mostly bearable - in preference to emacs. Everybody's different, but personally I get more value from good quality code completion and navigation than I do from emacs-quality text editing. Particularly true when I can load files into emacs if I need to do anything particularly advanced (mainly keyboard macro stuff or fancy elisp search/replace). Fortunately rtags + company mode have shuffled the tradeoffs around a bit, so I'm pretty comfortable with using emacs all the time now.)

Probably easier to get away without this stuff in C code, though personally I'd probably still get annoyed by the lack of intelligence in completing names of struct members.

Re:“Mastering Emacs” ebook announced by tuhdo on Saturday December 20, 2014 @12:07AM (#8775919)
You can have decent smart completion in C++ like this: http://tuhdo.github.io/static/c-ide/semantic-boost-demo.gif

Semantic is the equivalent to Intellisense in Visual Studio, though it's less smart on C++ code since C++ moves fast wiht its standard.

> Probably easier to get away without this stuff in C code, though personally I'd probably still get annoyed by the lack of intelligence in completing names of struct members.

Semantic or company-clang can give you code completion of struct members, and even nested struct.

Re:“Mastering Emacs” ebook announced by SloopJon on Thursday December 18, 2014 @06:53PM (#8770389)
I use M-/ for this purpose, which I think is bound by default. It expands based on whatever buffers are already open. Not syntax aware or anything, but useful nonetheless.
Re:“Mastering Emacs” ebook announced by melling on Thursday December 18, 2014 @07:16PM (#8770463)
Yeah, I've actually used Emacs off and on for almost 30 years. For the past 10, I've used IntelliJ a lot more.

C-M-x / is cool too. It will show all possible results in another window.

My point is that modern tools work better out of the box. Emacs packages have evolved but that don't ship standard and that creates resistance for new users. There are actually a few solutions so that requires research and experimentation (i.e. more time). ido, auto-complete, cedet ? Helm looks like it might be the new power user tool?

http://www.emacswiki.org/emacs/Helm

Re:“Mastering Emacs” ebook announced by abroncs on Thursday December 18, 2014 @06:07PM (#8770213)
Check out Spacemacs. It tries to be just this: Emacs with a lot of plugins out of the box, sane keyboard shortcuts and Evil integration if you want it.
Re:“Mastering Emacs” ebook announced by melling on Thursday December 18, 2014 @07:09PM (#8770437)
Cool, I like the "Batteries Included" attitude.

https://github.com/syl20bnr/spacemacs

Re:“Mastering Emacs” ebook announced by frou_dh on Thursday December 18, 2014 @06:29PM (#8770300)
Sublime has completion of tokens but doesn't come with any IntelliSense to speak of. How well its symbol-indexing works is also heavily dependant on the robustness of the regex-y grammar in the particular language package that's active.

Still, as far as non-IDEs go, it is pretty capable and I do enjoy using it.

Re:“Mastering Emacs” ebook announced by brudgers on Thursday December 18, 2014 @06:35PM (#8770325)
Does intelluJ support J or SMLNJ? Of course not because it's an IDE, not a text editor. Emacs selling point is its great power. The price of that power a learning curve.
Re:“Mastering Emacs” ebook announced by melling on Thursday December 18, 2014 @06:49PM (#8770381)
IntelliJ is extensible. It certainly has the ability support any language you want.

http://plugins.jetbrains.com/?dbe

Someone wrote those modes for Emacs, which is great.

Anyway, that's not the point, and your classic attitude dissuade new users. My comment was made because someone is writing a book about mastering Emacs. It's a great topic, and in a competitive world with limited time, developers want to get started quickly.

Re:“Mastering Emacs” ebook announced by brudgers on Thursday December 18, 2014 @07:40PM (#8770556)
Emacs is not optimized for new users. That is not uncommon when it comes to tools in general -- e.g. a Gibson Les Paul, an Osprey tilt-rotar, or the C Programming Language. Each anticipates a humanware investment. That's not my attitude, just my observation.

Emacs isn't the right tool for everyone or every job. Neither is anything else, but Emacs facilitates building the tools to make it work for diverse tasks.

People wrote those extensions because Emacs was designed to be reconfigurable and extensible 30 odd years ago. Unlike IntelliJ, it was a core function not a feature.

Re:“Mastering Emacs” ebook announced by melling on Thursday December 18, 2014 @07:54PM (#8770609)
Yeah, like I mentioned on this page, I've been using Emacs for almost 30 years. In that time, I've heard the "right tool for the right job" expression so much that it almost makes me ill. It offers little value. The silly metaphors add no value either.

Now, back to my point, if you're writing a book about mastering Emacs, like we are discussing, one of its main weaknesses is out of the box code-completion. Many new users would be well served by covering this topic. I've shown Emacs to many people over the years that's one of the biggest complaints. Hippie expansion wasn't going to cut it.

Btw, it seems many other people share my attitude and there are "Batteries Includes" versions of Emacs.

https://github.com/syl20bnr/spacemacs/blob/master/doc/DOCUME...

Re:“Mastering Emacs” ebook announced by brudgers on Thursday December 18, 2014 @08:35PM (#8770748)
The great thing about everything included Emacs packages is there are so many to choose from.

Optimizing for new User onboarding reduces the time to learn Emacs from 523 weeks to 520. It's still 10 years..

Re:“Mastering Emacs” ebook announced by melling on Thursday December 18, 2014 @09:06PM (#8770812)
You can be up and running within 30 minutes with Emacs. You're fine with the basics (use cursor keys, etc). Some people are happy with regular Notepad, after all. If you ever get the urge, you can learn more and become a power user. The problem is that out of the box, Textmate, Sublime, Notepad++, offer a quicker ramp up, so people take the quicker route. And once they've invested a few months, most don't want to learn a new editor.
Re:“Mastering Emacs” ebook announced by melling on Thursday December 18, 2014 @09:08PM (#8770816)
By the way, what's so hard to understand? I'm not breaking new ground here.

http://www.reddit.com/r/emacs/comments/1mt8a5/nearly_everyon...

Re:“Mastering Emacs” ebook announced by jimbokun on Thursday December 18, 2014 @07:24PM (#8770494)
True, it's possible to write modes for other languages in IDEs, but I get the sense it's much more work than it is with Emacs, so Emacs has modes for more languages than the heavy IDEs like IntelliJ.