Skip to main content

Questions tagged [server]

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

Filter by
Sorted by
Tagged with
1 vote
1 answer
51 views

Why this command line argument does not work when an emacs server is not running?

If an emacs server is already running, the following command opens an emacs frame and switches to *scratch* buffer. "emacsclientw" -na "runemacs" -e "(switch-to-buffer \"*...
Name's user avatar
  • 7,967
0 votes
0 answers
30 views

`async-shell-command: Wrong type argument: sequencep, #<buffer *scratch*>`

This is not a question about switching to the scratch buffer but to understand why the error is produced and to correct the function. By running the following command from command line, I can switch ...
Name's user avatar
  • 7,967
0 votes
1 answer
25 views

emacsclient says "No connection could be made.." [duplicate]

(I'm not sure if this is a windows-only problem, may other OSs just don't crash as often) I used to start one emacs window and my .emacs has a line (server-start) which starts the server. Then I open ...
user829755's user avatar
0 votes
1 answer
125 views

Is it possible to use Microsoft dev tunnels to connect to an emacs server running on Azure?

I'm in an environment where Tramp/ssh is not possible as a means of remote editing. However, developers using VSCode are able to connect their local versions of vscode to the remote vscode server ...
Charles Lowell's user avatar
0 votes
0 answers
51 views

How to add response headers in Simple-httpd

I ran Simple-httpd emacs webserver that was described on https://github.com/skeeto/emacs-web-server site. I used the code (use-package simple-httpd :ensure t :config (setq httpd-root &...
trzczy's user avatar
  • 101
0 votes
0 answers
40 views

What to do with lisp code of web server to run it?

Before I was using Apache web server and Node Express but then I started to learn Emacs for the web purpose. After I found the web server code I could not start it or maybe I started it but but did ...
trzczy's user avatar
  • 101
1 vote
0 answers
84 views

How to keep buffers when closing only Emacs client?

I use Emacs 29.1. When I open Emacsclient, I do it with the following command: emacsclient -a -c --create-frame --no-wait This is bounded to a key combination to start the Emacsclient. To kill a ...
ReneFroger's user avatar
  • 3,920
0 votes
1 answer
21 views

Emacs Keeps Data Even After I Close It + Doesn't Reload `.emacs`

Even after I close emacs with C-x C-c, it seems that it keeps some state saved: When I open it again, I can, for example, still see the old content of the *Messages* buffer. Also, it doesn't seem to ...
mimo31's user avatar
  • 111
0 votes
0 answers
52 views

using desktop.el in --daemon mode

I eventually figured out that the answer to this question https://groups.google.com/g/gnu.emacs.help/c/WZoW0LlqX6c/m/08Sa6alHp1oJ was to choose --bg-daemon rather than --fg-daemon when starting the ...
StackExchanger's user avatar
2 votes
1 answer
343 views

custom-set-faces not working for client

I have a custom (custom-set-faces ...) section in my ~/.emacs file. When I run emacs this section seems to get completely ignored since the custom colours don't get set. But if I go to ~/.emacs, ...
Jan Stolarek's user avatar
0 votes
1 answer
61 views

async/await in emacs?

I'm trying to run a hook that should start after buffers are loaded - it hooks into ein package that starts an "ipython server" that takes some time to start and it seems that the subsequent ...
Daniel Krajnik's user avatar
1 vote
0 answers
174 views

Some Icons Don't Show Up When Running in Server/Client Mode

I am writing my own config from scratch in emacs. It's not a very complicated config so far. I have installed all-the-icons font. It works just fine when I launch emacs directly and start working in ...
Vipul Rajan's user avatar
4 votes
2 answers
533 views

How to make Emacs run from a single Gnome desktop icon?

I often use Emacs with Linux Manjaro and Gnome. I need straightforward access to Emacs from desktop. Therefore, I have pinned the Emacs icon to dash so I can launch Emacs by clicking the Emacs icon. ...
Pierre ALBARÈDE's user avatar
4 votes
1 answer
324 views

How to debug emacsclient?

Sometimes emacsclient fails with an error like: $ emacsclient .gitlab-ci.yml Waiting for Emacs... *ERROR*: Args out of range: 63695, 1, 1173 How can I debug this? emacsclient has no debug option, no ...
charmoniumQ's user avatar
3 votes
1 answer
593 views

Open file at startup from init file

I like that at start emacs visits a file with my todo list. For long time, this has been accomplished by adding (find-file "~/my-file.org") at the end of my configuration file (.emacs). ...
Massimo2013's user avatar
0 votes
2 answers
112 views

How to enable markdown-mode every time I invoke Emacs Anywhere?

I am using a cool software called Emacs Anywhere. Usually, I invoke this software to write on Stack Overflow and on GitHub. Both websites use markdown. Hence, almost every time I invoke Emacs Anywhere,...
Pedro Delfino's user avatar
1 vote
0 answers
81 views

How to start tide server in Emacs For Mac OS X?

In the .spacemacs file, typescript configuration layer is dotspacemacs-configuration-layers '( ┆(typescript :variables ┆ ┆ ┆ ┆javascript-backend 'tide ┆ ┆ ┆ ┆typescript-fmt-tool '...
Alpin Cleopatra's user avatar
2 votes
1 answer
561 views

Cannot start Emacs daemon server after forced reboot

I was running Emacs in daemon server mode when my computer was force rebooted. After reboot was complete, I could not start the Emacs server again, receiving the error message: Starting Emacs daemon. ...
holocronweaver's user avatar
0 votes
0 answers
73 views

Org Mode bullets indentation display differently between normal and server mode

Does anybody has any clue why the same configuration yield different appearances between normal vs server-mode ? Here's the normal mode (the correct one) And here's when run Emacs in server-mode (...
Sake's user avatar
  • 335
1 vote
1 answer
103 views

How can I use some package after other some other packages loaded?

I am trying to start dap-mode in my golang project. I already have lsp-mode config set. for example: (use-package lsp-mode :hook ((go-mode . lsp-deferred) (rust-mode . lsp-deferred) ) ) What ...
ccQpein's user avatar
  • 123
0 votes
1 answer
65 views

terraform tfls server always asks if restart when edit a .tf file in spacemacs

When I use terraform layer with spacemacs, after operate a .tf file, at the status bar it always notices the message below: Server tfls:3869 exited with status exit(check corresponding stderr buffer ...
Miantian's user avatar
  • 105
1 vote
1 answer
37 views

org files are not refreshed in emacsclient

My org files are stored on the cloud so I can edit them from multiple machines. Whenever I make a change to an org file (from a different machine), emacsclient does not reflect these changes, but a ...
marc.soda's user avatar
  • 133
1 vote
1 answer
223 views

Emacs client doesn't recognize non-ascii input

The problem: When I type a non-ascii character, the character is not wrote and instead a weird key combination is performed, depending on which character I have typed, as if it didn't support utf-8. ...
jthulhu's user avatar
  • 225
0 votes
1 answer
259 views

How to open multiple files from desktop in the same emacs session?

I use Pop OS 20.04 on my desktop. When I start Emacs on login, I run the command (server-start). So when I open a file using the command emacsclient <filename> it opens it in the currently ...
Harsh Vardhan's user avatar
1 vote
0 answers
71 views

Why does server-eval-at seem to change the behavior of read-string?

I am trying to create a script that, when run with emacs, will read commands from stdin a line at a time, execute them in another emacs process (with server-eval-at) and print the result. The process ...
Chris Hunt's user avatar
0 votes
2 answers
194 views

Face setting doesn't work for client sessions

I wanted to change the colours of Anzu's counter, taking the foreground from the Isearch match background and the background from the fringes, like this So I evaluated (face-spec-set 'anzu-mode-line `...
Arch Stanton's user avatar
  • 1,727
0 votes
0 answers
117 views

How do I make Emacs not complain about not being able to start a new server?

I use the mac port version of emacs for handling org-protocol URLs, because I need a graphical instance when I use org-protocol from Chrome. The problem is that emacs will try to start an emacs server ...
HappyFace's user avatar
  • 900
0 votes
0 answers
88 views

Server-edit Automatically When Buffer is Killed

I'm considering using emacs as a server (using (server-start)) but I do not want to use C-x # to kill buffers. I've heard of the -n option for emacsclient, but I'm concerned that it may cause unwanted ...
Aronurr64's user avatar
0 votes
0 answers
99 views

How to make a graphical frame when no other graphical frames are present?

One way would be to somehow guess a display and do (make-frame-on-display display). However, (getenv "DISPLAY") does not give a sensible answer (e.g ":" or nil). I tried to ...
Artem Yu's user avatar
  • 185
0 votes
0 answers
177 views

How do I reload config in other instances of emacs?

Say, I changed ~/.emacs, but I have another instances of emacs running. I believe unless I do something, they might change the config (because they have a stale notion of its contents), which in turn ...
x-yuri's user avatar
  • 291
1 vote
0 answers
68 views

Is it possible to see the cursor of other emacsclients?

I'm trying to run Emacs server in order to collaborate on org files in our office. emacsclient makes it quite easy to have everyone connect to the same instance of a file and we can see real time ...
alecvn's user avatar
  • 419
1 vote
1 answer
284 views

emacsclientw does not use font specified in init.el (Windows)

Emacs version: GNU Emacs 25.3.1 (x86_64-w64-mingw32) I have set up a shell-script which runs Emacs server at Windows startup as mentioned in Emacs Wiki. I have set up a shortcut on my desktop which I ...
aks's user avatar
  • 145
1 vote
3 answers
923 views

When `emacs` is started, use `emacsclient` instead if there is a server

Most modern editors don't have a separate <editor>client binary. Instead, the main binary acts as a client to open a new window/the file given as an argument when possible. Is there a way to ...
Nova's user avatar
  • 1,119
0 votes
1 answer
88 views

On one specific machine, after some time, new emacsclients can no longer connect to running daemon/server

A strange problem. I run Emacs across a number of machines, with more-or-less a shared configuration. However, on one specific machine, after some time I am no longer able to launch new emacsclient ...
emacsomancer's user avatar
  • 1,041
1 vote
1 answer
985 views

Running Emacs server from snap installation

I've installed Emacs 26.2 using snap on Lubuntu 18.04. I'm trying to figure out how to get the server/client/daemon going. I've done as instructed on EmacsWiki: "Emacs Client" by putting (server-...
granti128's user avatar
0 votes
0 answers
76 views

How to have list of program on `dired-do-shell-command` with Emacs server started by systemd

I'm using Emacs as a server started by the systemd user unit. And on any dired buffer when i try to do dired-do-shell-command or dired-do-async-shell-command I cannot autocomplete any program and ...
sribaroud's user avatar
2 votes
1 answer
629 views

emacs in --deamon mode dies when X display socket closes. How to prevent this?

My initial quest is Can emacs on Mac using native window system connect to an emacs server on a Linux system but I got off on a tangent that might work ok but I hit a speed bump. As described in the ...
pedz's user avatar
  • 375
1 vote
0 answers
330 views

Can emacs on Mac using native window system connect to an emacs server on a Linux system

At this point I believe I am using the emacs version on my Mac that is built by Homebrew and the "stock" emacs on Ubuntu 18.04. I set up emacs server on the Ubuntu host as it is described in Starting ...
pedz's user avatar
  • 375
1 vote
1 answer
154 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 ...
AltruisticDelay's user avatar
0 votes
1 answer
176 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 ...
Henry Jeon's user avatar
4 votes
2 answers
478 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 ...
Lauris's user avatar
  • 111
1 vote
0 answers
141 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?
zcaudate's user avatar
  • 667
5 votes
1 answer
1k 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 ...
Parham Doustdar's user avatar
0 votes
0 answers
304 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 $ ...
skizo's user avatar
  • 285
0 votes
0 answers
545 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[...
Georgy Grigoryev's user avatar
3 votes
1 answer
169 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 ...
Tim Harper's user avatar
0 votes
1 answer
230 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$ ...
Marcin's user avatar
  • 191
11 votes
1 answer
847 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(['...
Jesse's user avatar
  • 2,014
1 vote
0 answers
108 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 ...
tboyce12's user avatar
  • 332
0 votes
0 answers
66 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 ...
sandric's user avatar
  • 1,291