#!/bin/sh [ -t 2 ] && mode=t || mode=c exec emacsclient -s ec -$mode