Hi all.

On my main desktop machine, I always have an instance of emacs running
as an emacs server (this is accomplished by having (server-start) in
my ~/.emacs). Whenever I am doing something at the command line that
requires an editor (such as running git commit without a commit
message specified at the command line or when running crontab -e) I
want the running emacs server to be employed. To this end, in my
~/.bashrc I have
export ALTERNATE_EDITOR=emacs EDITOR=emacsclient VISUAL=emacsclient.
(I have nothing relevant in and of ~/.profile, /etc/profile, and
/etc/bash.bashrc.) This works fine.

But, I'm now often wanting to ssh into my desktop box and perform
command line tasks which require the use of an editor. Invoking
emacsclient for this doesn't work (I get the message in the terminal
`Waiting for Emacs' and things just hang; obviously the shell accessed
by ssh is trying to connect to the running emacs and cannot, which is
no shock as the running emacs is running under X11.)

I don't really understand the various roles of ~/.bashrc, ~/.profile,
and the rest. 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).

I'm of the view that this really must be in TFM, but I'm not seeing
how to effect my desired setup. Could someone give me a push?

The desktop is running Debian testing. If it matters (I suspect it
doesn't), the laptop is running crunchbang, a debian derivative.

Thanks and best,

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

Reply via email to