#!/bin/bash TEXT_FLAGS='-a "" -t' GUI_FLAGS='-n -a "" -c' if [ -z "$DISPLAY" ]; then emacsclient $TEXT_FLAGS "$@" else emacsclient $GUI_FLAGS "$@" fi