#!/bin/bash

FILE=${1:-untitled.txt}
LINE=${2:-1}
COL=${3:-0}

CODE="\
(progn \
  (find-file \"$FILE\") \
  (goto-line $LINE) \
  (back-to-indentation) \
  (forward-char $COL) \
  (recenter) \
  \"\") \
)"

echo "$FILE"
emacsclient --eval "$CODE" --alternate-editor  "emacs --eval '$CODE'"
