Home
The Toolkit for Online Communities
12611 Community Members, 0 members online
Log In Register

OpenACS BlogArchive

OpenACS Home : OpenACS Blog : Archive : 2005 : June : 06

Emac Tricks -- auto-logging your shell buffer

I make silly mistakes when coding that I don't notice right away, and then a few days later I'll notice that something's not working as expected and it could take hours for me to figure out what's wrong. So...how do I save me from myself? Good question," says daveb, "Keep logs of what you do" (As in, backed up postgres. fixed bug 22. Installed photo-albem, and so on.) Even better, those who run a command-line through the emacs editor, can auto-log their shell buffers to file. After you enter shell-mode with "M-x shell" or "C-x C-m" or "C-x RET" or whatever (To see what the keyboard short-cut is on any of the command names, "M-x where-is"), the buffer is called "*shell*" and it has no file associated with it. All you have to do is write that buffer into a file that you pick and you'll have a complete log of what you did -- I usually save the file as ~/log/20050605_shell or something. Optionally, you can then rename the buffer back to "*shell*" (because writing to a file will automatically rename the buffer name to the file name.) To write a file, "M-x write-file" which is usually bound to "C-x C-w". To rename the buffer, "M-x rename-buffer". You need to make sure that your file is in auto-save-mode and that you have selected an appropriate value of auto-save-interval which is, I think, the number of key strokes between auto saves. I use 100.

09:28 AM, 06 Jun 2005 by Eric Wolfram Permalink | Comments (0)

XML

Archive

June 2005
S M T W T F S
      4 
6  7  8  10  11 
12  13  14  15  16  17  18 
19  20  21  22  23  24  25 
26  27  28  29  30     
April 2007
March 2007
October 2006
March 2006
February 2006
January 2006
December 2005
November 2005
August 2005
July 2005
June 2005
May 2005

Notifications

You may request notification for OpenACS Blog.

Syndication Feed

XML

Recent Comments

  1. Silvio Ernesto: hola
  2. Martin v. Löwis: Cannot run pg_ctl from launchd
  3. Joan Miller: Something Interesting
  4. Hubert Erlmoser: trustpharma.com
  5. Hubert Erlmoser: TRUSTPHARMA
  6. Ben Koot: Selva
  7. LARRY SCOVEL: TRUST PHARMA
  8. Nick Carroll: Theme Selva
  9. Ben Koot: More enhancements
  10. Jane Perez: Trustpharma.com