Live data from Hacker News

GNU Emacs 23.2 released

permalink.gmane.org

31–40 of 90 posts

Re: GNU Emacs 23.2 released

#31
post #28

Nice to see that CEDET is now included.

I can't seem to get it to work, though. The information on the CEDET website for setting things up doesn't seem to be valid anymore.

Specifically:

  (global-ede-mode 1)                 ; Enable the Project management system
  (semantic-load-enable-code-helpers) ; Enable prototype help and smart completion 
  (global-srecode-minor-mode 1)       ; Enable template insertion menu
Throwing in (require 'cedet) doesn't seem to work either.

Re: GNU Emacs 23.2 released

#32
post #16
post #13

Earlier quoted context omitted.

Can you give me a situation where you would need more space ?

Having once managed to delete a file with hours of edits just before committing to version control, I opened my 60 GB partition in vim, found the text of the file and copied it out. While this is "stupid" — there will be better ways to do it — searching and recovering with vim worked immediately and easily. Edit: it's possible I used "less", I can't remember.

Can you explain in just a bit more detail how you did this? This sounds really neat. I faced a problem like this a while ago, but luckily the file was still open in emacs (and in an emacs buffer), so I just re-wrote it back to disk.

Re: GNU Emacs 23.2 released

#33
post #11

The maximum size of buffers (and the largest fixnum) is doubled. On typical 32bit systems, buffers can now be up to 512MB. This limited buffer space has long been a criticism of mine and an often-used point I make when I choose to play the Holy War game between vim and emacs. 512MB is still a weak and arbitrary limitation (vim just uses up your memory), but this is much better than it was.

It's not arbitrary. It's simply the largest int pointer your emacs can represent. It's also a non-problem on 64-bit machines. Run the following code in your emacs buffer:

(let ((i 1024)) (while (> i 0) (setq i (* i 2))) (1- i))

The number it returns is your max file size. Mine is 1152921504606846975 bytes.

Re: GNU Emacs 23.2 released

#34
post #21

Can someone very briefly explain the popularity of emacs and vim among programmer types? I'm aware that they're unix based text-editors with some degree of reprogrammability... but what's the big deal?

A previous post from HN summarizes some of this:

http://news.ycombinator.com/item?id=403967

Re: GNU Emacs 23.2 released

#35
post #30
post #21

Can someone very briefly explain the popularity of emacs and vim among programmer types? I'm aware that they're unix based text-editors with some degree of reprogrammability... but what's the big deal?

It's a fair question. Emacs is one of few editors left that makes it possible to work on multiple files at once without taking your hands off the keyboard. No fumbling with the mouse. Watch someone who has mastered Emacs edit some code and you'll understand its appeal.

Going a little further, Emacs is itself (at least a lot of it, including js-mode, for instance) written in Emacs Lisp. This makes most of it modifiable by its user. It's not impossibly hard either - I have made a minor mode for Pyccuracy tests in a couple hours. Learned some in the process.

Even the "configuration files" are, really, Lisp code, not bags of values and options.

Re: GNU Emacs 23.2 released

#36
post #32
post #16

Earlier quoted context omitted.

Having once managed to delete a file with hours of edits just before committing to version control, I opened my 60 GB partition in vim, found the text of the file and copied it out. While this is "stupid" — there will be better ways to do it — searching and recovering with vim worked immediately and easily. Edit: it's possible I used "less", I can't remember.

Can you explain in just a bit more detail how you did this? This sounds really neat. I faced a problem like this a while ago, but luckily the file was still open in emacs (and in an emacs buffer), so I just re-wrote it back to disk.

This was a linux laptop. I immediately powered off and booted with a live CD. To be honest I'm not sure exactly what I did next. I might have just done "less -f /dev/sda5". I think what I actually did was make an image of the partition using dd to an external drive so I would be able to recover the file at leisure. Trying now, it seems that vim won't open a /dev block device directly, but an image is just a regular file.

Re: GNU Emacs 23.2 released

#37
post #28

Nice to see that CEDET is now included.

I can't seem to get it to work, though. The information on the CEDET website for setting things up doesn't seem to be valid anymore. Specifically: (global-ede-mode 1) ; Enable the Project management system (semantic-load-enable-code-helpers) ; Enable prototype help and smart completion (global-srecode-minor-mode 1) ; Enable template insertion menu Throwing in (require 'cedet) doesn't seem to work either.

I'm having the same problem. I searched the code for "semantic-load-enable-code-helpers" and it isn't in any of the .el files in any of the directories under "lisp". Would be nice to try this out, but I'm too busy to get this going today (I'd love it if someone else solves this tho :-)

Re: GNU Emacs 23.2 released

#38
post #21

Can someone very briefly explain the popularity of emacs and vim among programmer types? I'm aware that they're unix based text-editors with some degree of reprogrammability... but what's the big deal?

So, Emacs can be any or all of 4 things depending on your point of view.

1) lisp interpreter

2) text editor library written in lisp

3) a very flexible text editor

4) whatever you want to make it

Because it's a general purpose programming language you can write anything you want in Emacs lisp. That's why you find tetris, web browsers, and e-mail clients written for Emacs. There's a great culture of sharing your work too[1], so Emacs can be a powerful toolkit that supersedes traditional shells in some ways.

You have unlimited access to customize your editing experience. Everything the editor does can be changed because you have the same access to the interpreter & libs as the editor itself. Every key can be bound to a function, and the normal alphanum chars and such are bound to insert themselves by default, but you can change that. So if you want { to insert the closing } automatically, you can do that without much trouble. You can write it, evaluate the code, and then use it instantly without restarting your editor.

Personally I just use it for coding, but for me coding includes running zsh and a host of other REPLs. (ruby, python, javascript, ...) Some of the packages I have used approach or exceed IDE levels of integration with the project being worked on[2][3].

You can compile a C program or run grep and then step through errors/warnings or search results visiting each line and doing what you need to do. This is one way that Emacs one-ups the shell which prints static text as output. Emacs wraps that in an interactive interface, which is great in a lot of situations.

[1] http://www.emacswiki.org/

[2] http://rubyforge.org/projects/emacs-rails/

[3] http://github.com/samsonjs/mojo.el

edit: One really cool thing I forgot to mention: js2-mode. Steve Yegge wrote a JavaScript parser in Emacs lisp which means that when editing JavaScript - which I do a lot of these days - the syntax highlighter has an immense amount of information to work with. Global vars are coloured differently from local vars (very important in JS as undeclared vars are implicitly global, ugh). Syntax errors get underlined in red instantly. If you've experienced this in other IDEs you appreciate how awesome this is. You never run your code only to find that you made a stupid syntax error that needs fixing. Someone could use js2-mode to write advanced IDE-like functionality for JS, such as renaming & refactoring.

Anyone could implement something similar for any other language, if they have the time & will.

Re: GNU Emacs 23.2 released

#39
post #30
post #21

Can someone very briefly explain the popularity of emacs and vim among programmer types? I'm aware that they're unix based text-editors with some degree of reprogrammability... but what's the big deal?

It's a fair question. Emacs is one of few editors left that makes it possible to work on multiple files at once without taking your hands off the keyboard. No fumbling with the mouse. Watch someone who has mastered Emacs edit some code and you'll understand its appeal.

I'm too tired to think of just the right witty comment, but no one ever truly masters emacs; there's simply too much to learn. Which is what makes it so fun - it's a continuous learning process, where there's always something new and cool to be dug up.

Re: GNU Emacs 23.2 released

#40
post #30
post #21

Can someone very briefly explain the popularity of emacs and vim among programmer types? I'm aware that they're unix based text-editors with some degree of reprogrammability... but what's the big deal?

It's a fair question. Emacs is one of few editors left that makes it possible to work on multiple files at once without taking your hands off the keyboard. No fumbling with the mouse. Watch someone who has mastered Emacs edit some code and you'll understand its appeal.

Hmm, I'm still not quite sure I 'get it.' For instance, your comment, 'no fumbling with the mouse' confuses me. I've always viewed the mouse as something that saves time, a shortcut to where you want to go or what you want to do. Especially on a Mac with non-maximized windows and Exposé mapped to a mouse button, I've never felt like I was 'fumbling.' I guess I'll ask an Emacs user to demonstrate next time I meet one.
Post reply on HN