On Wed, Dec 12, 2012 at 2:28 PM, Brian van den Broek <
[email protected]> wrote:

> I am sure there must be a way to configure things so
> that when running a shell sitting at the desktop, the editor invoked
> as needed continues to be emacsclient but also so that when ssh'ing
> into the box, the editor invoked as needed is emacs itself (running in
> a new process, rather than as a client of the running server).
>

SSH sets a few environment variables, which you can check in your .profile
(or .bash_profile). For example:

if [ -n "$SSH_CLIENT" ]; then
  export EDITOR=emacs
else
  export EDITOR=emacsclient
fi

Cheers,
Dave
_______________________________________________
mlug mailing list
[email protected]
https://listes.koumbit.net/cgi-bin/mailman/listinfo/mlug-listserv.mlug.ca

Reply via email to