1

I have a single emacs server that I use for all of my work. It is located on a machine that I ssh into from every location.

My 'browse-url is set to run a bash script that ssh's into the machine I am running emacsclient on and opens Chrome. However, this only works if I use emacs from one machine.

I need a method for my emacs server to change its behavior based on the emacs client (whether it is an environmental variable, a variable that gives the hostname of the client, or anything else). I can't seem to find anything right now.

1 Answer 1

2

You'll want to look at the environment frame parameter, which the server.el code sets up whenever a frame is created for a particular client:

(frame-parameter nil 'environment)

This should then hold a list of strings, where some of those strings will be like "SSH_CLIENT=IP PORT1 PORT2".

1
  • This is exactly what I was looking for. Thank you so much.
    – jhleath
    Commented Mar 11, 2016 at 1:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.