From 3ef49c53697b30c29e01e3ea045daf26f1191cef Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Thu, 3 Sep 2009 15:21:47 +0000 Subject: [PATCH] * tramp.texi (Frequently Asked Questions): New item for emacsclient (extended). --- doc/misc/tramp.texi | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi index 5ac95d9ea73..2021a6ecd0d 100644 --- a/doc/misc/tramp.texi +++ b/doc/misc/tramp.texi @@ -3242,6 +3242,21 @@ emacsclient @trampfn{ssh, user, host, /file/to/edit} @end example @code{user} and @code{host} shall be related to your local host. + +If you want to use Emacs Client also as editor for other programs, you +could write a script @file{emacsclient.sh}: + +@example +#!/bin/sh +emacsclient @trampfn{ssh, `whoami`, `hostname --fqdn`, $1} +@end example + +Then you must set the environment variable @code{EDITOR} pointing to +that script: + +@example +export EDITOR=/path/to/emacsclient.sh +@end example @end ifset -- 2.39.2