I'm about to finish Glyn Moody's book "Rebel Code" that documents in fine detail the origins and the development of the free software or the open source movement (free software and open source are not necessarily the same thing as Richard Stallman has pointed out). This book is very well written as it gives a human dimension to the motivations, frustrations, challenges, triumphs and successes of the people behind open source. Programmers are usually not glamorous, but this book brings alive the world of software in a way that makes it general-interest reading.
I will write more about some of the specifics in the book and what I liked and didn't like about it. Right now let me just state that this book is quite a comprehensive account of the origins of the movement with Richard Stallman's work at MIT and why he felt that it was important for software to be free and the source code to be open. The book documents the creation of the major pieces of open source software like emacs, gcc, GNU/Linux, Apache, Perl, Tex, and GNOME and the role of the internet in the collaboration between people from across the world.
If you're interested in the software industry you can't miss this book. I highly recommend it to others too just to get a feel for the world of software programmers. Maybe you'll get the bug for open source software like I'm getting and switch to open source.
Showing posts with label emacs. Show all posts
Showing posts with label emacs. Show all posts
Monday, June 14, 2010
Rebel code
Labels:
apache,
emacs,
free software,
gcc,
glyn moody,
gnome,
open source,
perl,
richard stallman,
tex
Friday, June 11, 2010
First emacs customization
Bob Glickstein's book Writing GNU Emacs Extensions appears to be written to get you going right away on customizing emacs. I was able to successfully implement my first customization within a half-hour of starting the book. One of the annoyances of emacs is the number of CTRL-key combos you have to press to get stuff done. For example, to save the current buffer (roughly speaking every window in emacs is an emacs buffer) one has to press CTRL-x CTRL-s. I was able to assign an additional sequence of keys to save a buffer:
1. Check if the sequence of keys you want to use is assigned (or "bound" in emacs terminology) to a function. To do that: M-x describe-bindings [return] will bring up a buffer that contains all the current bindings. Search through this to find the key sequence you are interested in. I want to bind M-s to the function that saves the buffer. Currently, I'm not using that key for anything.
2. Edit your personal .emacs file which will be in your home directory and insert the following code in it -- for clarity on a line by itself:
(global-set-key "\M-s" 'save-buffer)
The above line of code has three tokens in it. The first token, global-set-key, is an emacs function that sets key bindings globally, i.e., in all modes. The second token, "\M-s", is an argument to the global-set-key function that says "I want to bind this key sequence" -- in this case it's the Meta-s key. Note how the argument is enclosed in quotation marks and the M is preceded by a backslash. The third token is the second argument to the global-set-key function that tells the function what it is that should be invoked with that key sequence. In this case it's the emacs function save-buffer that saves the current buffer (I was able to identify this function by searching for C-x C-s in the buffer that contained the current binding descriptions). Note how this function is preceded by a single quote....this is required because we don't want to evaluate this function now, instead we want to pass it as an argument to the global-set-key function.
3. Save the .emacs file, quit and reinvoke emacs to have the key sequence implemented.
1. Check if the sequence of keys you want to use is assigned (or "bound" in emacs terminology) to a function. To do that: M-x describe-bindings [return] will bring up a buffer that contains all the current bindings. Search through this to find the key sequence you are interested in. I want to bind M-s to the function that saves the buffer. Currently, I'm not using that key for anything.
2. Edit your personal .emacs file which will be in your home directory and insert the following code in it -- for clarity on a line by itself:
(global-set-key "\M-s" 'save-buffer)
The above line of code has three tokens in it. The first token, global-set-key, is an emacs function that sets key bindings globally, i.e., in all modes. The second token, "\M-s", is an argument to the global-set-key function that says "I want to bind this key sequence" -- in this case it's the Meta-s key. Note how the argument is enclosed in quotation marks and the M is preceded by a backslash. The third token is the second argument to the global-set-key function that tells the function what it is that should be invoked with that key sequence. In this case it's the emacs function save-buffer that saves the current buffer (I was able to identify this function by searching for C-x C-s in the buffer that contained the current binding descriptions). Note how this function is preceded by a single quote....this is required because we don't want to evaluate this function now, instead we want to pass it as an argument to the global-set-key function.
3. Save the .emacs file, quit and reinvoke emacs to have the key sequence implemented.
Subscribe to:
Posts (Atom)