Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Linux Links | Bling | About BLU

BLU Discuss list archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

sed'ing out newlines



Dan Barrett writes:

> I want to 
> be able to switch the value of CLASSPATH on the fly when moving from project 
> to project,

If you use X?Emacs, you might find the following script to be useful.

I wrote this because:

  1:  I use emacs

  2:  My emacs sessions tend to last for months.  Restarting emacs all
      the time is out of the question.

  3:  I wanted to be able to compile Java code from XEmacs.

  4:  I wanted to be able to muck around with my CLASSPATH variable a lot.


So, with the attached script, I could mess around with my CLASSPATH
from a shell and then easily get my XEmacs process to inherit the
changes.

Hope you find this to be useful,

--kevin
-- 
Kevin D. Clark / Cetacean Networks / Portsmouth, N.H. (USA)
cetaceannetworks.com!kclark (GnuPG ID: B280F24E)
alumni.unh.edu!kdc



#!/usr/bin/perl

# takes a local environment and prints it out in a format suitable for copying,
# pasting, and then evaling into emacs

# this beats restarting emacs hands down.

# Hint:  eval-expression is bound to M-:

print "(setq process-environment (list ";

for $var (keys(%ENV)) {
  print "\"", $var, "=", $ENV{$var}, "\" ";
}

print "))\n";





BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org