Cygwin Emacs >> broken key mappings

The Emacs C-c, C-h and C-SPC keys are broken:

C-c maps to C-g
C-SPC maps to SPC
C-h maps to DEL

To verify this just enter

M-x global-key-binding 'broken_key´

and Emacs prompts you to set ‘key´ to a command. ‘key´ in the broken cases
is simply wrong, as I listed above.

Under these conditions Emacs turns out to be a real adventure. You want help
and you end up deleting things. Want to quit? No way, unless you do it the
hard way:

save-buffers-kill-emacs

- Troy Holly

Solution: Create a CYGWIN environment variable with the value tty.

zcat in Emacs

Is there a way to zcat a file if you are working in directory-edit mode in Emacs and you want to open a file and look inside without exiting Emacs?

You can run the shell command (Esc-!) in the Emacs command line and then type zcat filename.gz. The output will open in a second window.
Alternatively, mark the file when in dir-ed mode and then just type !. Then, on the command line, just type zcat. This way you don't have to type or cut-and-paste the file name.

Thunderbird Extension: External Editor

I downloaded an extension that will allow me to use Emacs as an editor when using Thunderbird (which I just started using a few days ago as an additional option to Pine): http://globs.org/download.php?lng=en
Here’s a link that better explains how to set up the External Editor extension: http://bria.nwood.org/?q=node/48
You know what this means, don’t you? I need to find a similar extension for Movable Type!

replace-string in multiple files in a single directory

Is there a way I can write a script to open more than one file in a directory and then do a replace-string? Eg. zcat replaced with opt/local/bin/zcat?

Yes, run a macro. You run dir-ed in Emacs (probably on *.sas files) and then the macro includes moving to the next file, opening it and making the change. You can then even run on all the files in a directory--it just won't change any that don't have it.