Questions tagged [server]

The Emacs server, which allows opening files and running commands in an existing Emacs instance

0
votes
0answers
11 views

emacs-omnisharp unable to use unity project files

I'm using emacs-omnisharp to try to complete a project with Unity, but the omnisharp server doesn't seem to be able to open or use the project data. I know that the server works because I get ...
1
vote
1answer
22 views

emacsclient -c stopped working, server running, emacs works

I am encountering a very strange problem. I worked with emacsclient for a while but suddenly, after starting an emacsclient frame the frame disappears shortly after start when interacting with it. It ...
0
votes
0answers
26 views

Emacsclient uses new instance, weird font

When I open Emacs normally (using runemacs.exe), everything appears fine, including the font. However, when I try opening a file in Emacs using the client, while getting the client to start the server ...
0
votes
1answer
59 views

On emacs26, is it possible to halt initializing and attach to running emacs-server with init.el?

I'm using emacs26 on macOS and using server-client for the fast initialization. However, it's a bit annoying that a new emacs instance is always spawning when I run "Emacs.app" with SpotLight instead ...
2
votes
2answers
94 views

Opening file with emacsclientw, file name contains non-latin characters

My first post here about Emacs. I've spent days trying to figure out answer before posting here. I'm running Emacs 26.1 on Windows 10. The setup that I'd like to have is running a single instance of ...
1
vote
0answers
54 views

is it possible for two people, using different emacs and keybindings to edit the same file synchronously?

I want to pair program with a couple of people but my keybindings in emacs are not the same as theirs. Is there a way to edit the same file but keep the keybindings different?
4
votes
1answer
335 views

Why does using emacsclient from a remote host connect to the right socket, but I see nothing in my local Emacs?

I'm running a TCP server locally, and I'm trying to open a file from a remote host on my local Emacs through emacsclient. The reason for this is that I have emacspeak running locally which gives me ...
0
votes
0answers
51 views

highlight indentation with emacs client

I realized that neither highlight-indentation nor highlight-indent-guides works with emacs in server/client mode. I'm launching emacs server/client like this : $ /usr/bin/emacs --daemon $ ...
0
votes
0answers
80 views

Emacs client doesn't connect to running server on Windows

I have fresh new installation of emacs altogether with spacemacs. I set env vars for alternate editor and server file. My server file after starting emacs looks like: 127.0.0.1:64518 11948 'M.P$#NT[...
3
votes
1answer
94 views

Emacs 26.1 crash on server-start with stale auth files when server-use-tcp enabled

I've been experiencing a crash since upgrading to Emacs 26.1 and MacOS 10.13.4. It happens when running server-start (which is in my .emacs file), and a stale server auth file exists from a previous ...
0
votes
1answer
70 views

emacsclient “unknown command” when opening file

Whenever I try to open a file with emacsclient (and emacs is running, and the server is running, and the socket is there), I get this error message: Marcins-MBP:docker-influxdb-grafana marcin$ ...
4
votes
1answer
173 views

How to control emacs externally?

I'm developing an app in python which sends commands to a running emacs instance. Currently, I start an emacs server and send the commands through the command line, like this: subprocess.call(['...
1
vote
0answers
49 views

How to RPC from External Process to Emacs

How can I RPC from an external application into Emacs then have a function in Emacs handle the RPC? For example, I would like to make a D3.js webpage with a dependency graph of a codebase, view and ...
0
votes
0answers
46 views

evaluate code in other emacsclient?

I wish I could run code from one emacsclient session inside other. I'm working in terminal via ssh, terminal has two panes connected to machine with emacs via ssh, each pane has its own emacsclient ...
2
votes
1answer
692 views

Changing the location of the emacs server socket

When I run emacs --daemon it creates a socket at /tmp/emacs1000/server How can I tell it to use a different location?
1
vote
1answer
2k views

Setting up emacsclient (OSX)

I am trying to set up emacs to run as a server to avoid the time required to open individual sessions for each file. This is on OS X El Capitan. Using the instructions provided here, I have the first ...
3
votes
2answers
185 views

server-start with dynamic server-name

I'm using (server-start) in my init.el, but I'd like to be able to launch multiple server instances, every time I launch emacs. Today, server-start complains if the server is already launched. It ...
1
vote
2answers
106 views

Cannot start emacs server

I'm running Debian Jessie. I have installed emacs24-lucid package. I tried running emacs --daemon and got this: Loading 00debian-vars... Loading 00debian-vars...done Loading /etc/emacs/site-start.d/...
2
votes
1answer
38 views

How do I prevent emacsclient --tty FILE from flashing the other frame's buffer before loading FILE

With emacs -Q if you M-x server-start, then open a buffer, then back in the terminal emacsclient --tty SOMEOTHERFILE a new frame will be created, but it will initially show the buffer shown in the ...
4
votes
1answer
551 views

after-make-frame-functions does nothing for an otherwise working function

I am using workgroups and I have the following code in my init.el: (defun my-start-emacs (_) (interactive) (message "HI") (sleep-for 1) (if (daemonp) (progn (if (not (...
7
votes
1answer
190 views

How to test (programmatically) whether the current Emacs session (among several) is running the Emacs server?

The server-running-p predicate will evaluate to t if the Emacs server is running, irrespective of which Emacs session currently "owns" the server process. Therefore, when there are two or more ...
0
votes
2answers
208 views

How can I start a server in the background from a source code block without freezing emacs?

I am creating several org-mode documents to track code example and would like to be able to view the results of tangling or executing these code blocks in a browser. In the example below, I've created ...
3
votes
3answers
692 views

connect to remote emacs session via ssh

Unfortunately, I forgot to start the emacs-server at work, running on Linux. Is there now any option to connect to my remote graphical X11 emacs session via ssh?
3
votes
1answer
172 views

What are the actual usage of the command `server-edit`?

According to the documentation of the command server-edit: Switch to next server editing buffer; say "Done" for current buffer. If a server buffer is current, it is marked "done" and optionally ...
0
votes
0answers
160 views

Start emacs as tcp server

I'm using GNU Emacs 26.0.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.22.5) of 2016-12-20, with arch linux (antergos), I want to start with the option tcp server, so I added and assigment to the ...
4
votes
3answers
3k views

Emacs 24.5.1 on Windows: How to use server mode?

I used to have Emacs 25.xx on my windows pc and was very happy with the daemon/server mode of emacs. Emacs started via batch-script on startup and everything worked fine -- on every subsequent call ...
2
votes
1answer
391 views

Run elisp from command line in running emacs

How can I execute elisp in the currently running emacs from the command line? The following command echoes 'hi' but doesn't set 'abc in the emacs instance. emacsclient --no-wait --eval '(message "hi"...
2
votes
1answer
216 views

`server-start` hook?

Is there a hook to execute stuff after I've run emacs --daemon? I'd like to keep load stuff only when running emacs --daemon and not when running emacs. I know it sounds like using square wheels, but ...
1
vote
0answers
62 views

workgroups, server mode, and emacsclient

I'm trying to use emacsclient in conjuction with the workgroups package for emacs. However, I have one major annoyance; whenever I invoke emacsclient -c from the command line and open a file, the file ...
2
votes
1answer
274 views

X11 GUI low quality display when using server

Why is Emacs X11's display such bad quality, and how do I fix it? When I use Emacs Cocoa locally, I get a good visuals. But when I use the X11 forwarding on my department's server, the quality is ...
1
vote
2answers
2k views

bashrc script to automatically create emacs server session on startup?

I want to have .bashrc check to see if an emacs server is currently running, and if not, start one. I know how to start the server but I am not sure how to check whether it is already running - should ...
3
votes
3answers
1k views

Emacs as server (daemon) struggles

I am trying to setup emacs as server so that emacs (same instance) can be invoked from a file browser like nautilus Results not satisfactory Attempt 1 I have the foll. in ~/.local/share/...
0
votes
0answers
24 views

Odd filename parsing error when scripting emacsclient on OSX

I get the same error as this Stack Overflow asker when trying to use a wrapper script to tell OSX where the emacs server socket is: I don't think it's a bash issue, as the Emacs PID is correctly ...
0
votes
1answer
744 views

Emacs daemon not working properly, Emacs server runs fine

Version GNU Emacs 25.1.50.2 (x86_64-pc-linux-gnu, GTK+ Version 3.18.9) of 2016-04-25 Xubuntu 16.04, Linux kernel 4.4 In my .emacs I have the following settings (require 'server) (unless (server-...
2
votes
1answer
603 views

How can I use Emacs in a SSH sever that I logged in through emacs terminal?

I really like the emacs terminal but each time I use it to log into my server. I don't know how to use emacs to edit files on the server. Or it is not possible to do it? I can only edit files on ...
1
vote
0answers
84 views

Running emacs server via systemd prevents inverse search and nice view

Background: I am using systemd to run my emacs server and my usual workflow always involves invoking emacsclient. Both server and client are on the same computer running Debian Jessie. The method is ...
2
votes
1answer
72 views

Separate Environments for each emacsclient

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 ...
2
votes
1answer
620 views

Forwarding emacs server TCP connection works, but cannot create local frame

I'm trying to connect to a remote Emacs server. I created the server with server-use-tcp set to t so a connection file was created. I inspected the connection file and found out that it contains the ...
4
votes
1answer
595 views

From an external script, open file and run some simple expression whether emacs already running or not

Context / initial need (works fine) I wrote and use a script that generates a file and uses emacsclient to edit it in an existing or new instance of emacs, in a new window. Similar to Set up Emacs ...
2
votes
1answer
648 views

server-edit vs kill-buffer to kill an emacsclient buffer

I use emacsclient to open files from my webrowser (pdfs, text files etc). When I'm done with the file, I know I need to close it with C-x # (server-edit); if I use C-x k (kill-buffer) I get a warning ...
1
vote
2answers
573 views

access remote emacs server via ssh crashed

I run an emacs server on a remote server. emacs --daemon and I access this server with ssh user@server -Y 'emacsclient -c &' everything works fine until I close the client. SSH session doesn'...
1
vote
0answers
240 views

Emacs reads the server file, before executing the command

I use Emacs as server instance. When I start EMacs Client, he will check if the file .emacs.d/server/server exists. If not so, then he will initiating a Emacs server instance, and my Emacs ...
0
votes
2answers
194 views

Emacs server exit when losing connection to Xserver

I run Emacs on development host under X Window as: $ emacs24 with ~/.emacs: (require 'server) (server-start) Next when I connect to Emacs as: $ ssh -Y localhost ssh$ emacsclient -c C-x C-c ssh$ ...
2
votes
2answers
475 views

How to get the server-name?

When starting a server it's possible to set a name for the server (http://www.gnu.org/software/emacs/manual/html_node/emacs/Emacs-Server.html). These names are to be useful for connecting emacsclients ...
0
votes
1answer
120 views

Helm command in `emacsclient -c` does nothing

I am trying to bind a keyboard key for a new emacsclient frame running a specific helm command helm-locate like that: emacsclient -c --eval '(helm-locate)' It does not seem to work (no new frame ...
2
votes
2answers
366 views

Is it possible to figure out which package/script takes most of the startup time?

I used to run Emacs on Linux using Emacsclient, it is really easy and great experience: emacs --daemon emacsclient When I work on a Windows machine, Emacs starts very slow. It seems there's no ...
5
votes
1answer
119 views

How to have C-g *not* cancel emacsclient eval commands?

I'm sending some commands to my emacs using emacsclient --eval on a timer. The only problem with this is if at the time I happen to be using emacs and press C-g to cancel something, instead of ...
1
vote
1answer
511 views

Emacs client starts in no windows mode

I have the following in .bashrc. export ALTERNATE_EDITOR="" export EDITOR="emacsclient -t" When I run, for example emacsclient something.tex & when running X, in a Konsole terminal (Konsole is ...
10
votes
1answer
513 views

How to know if emacs is running as a daemon?

I want to know if emacs is running as a daemon, so I can load some parts of my configuration according, I want to know this from within emacs.
8
votes
2answers
3k views

Equivalent to --no-wait for emacs

The emacsclient program allows a flag --no-wait (abbreviated as -n) which will cause the emacs server to visit the specified file, and return immediately. emacsclient -n ~/.bashrc If I provide an ...