Questions tagged [emacsclient]

emacsclient is a program which allows the user to connect to the Emacs Server. This is useful when using Emacs as the default editor on Unix-like systems, as it allows Emacs to be invoked without creating a new process, allowing the reuse of shared buffers and command history.

Filter by
Sorted by
Tagged with
17
votes
5answers
6k views

Setting up emacsclient on MS windows

I am trying to set up the emacs server daemon and use emacsclient on MS Windows so that files can be opened quickly without the delay and overhead associated with starting additional instances of ...
0
votes
1answer
20 views

Can't start an emacsclient process with xbindkeys

I'm trying to launch the Emacs calculator with the XF86Calc key. I have "emacsclient -c -e '(calc nil t)'" XF86Calc in ~/.xbindkeysrc I can launch it from "Run Action" in xbindkeys-config. But ...
1
vote
1answer
125 views

How to suppress `When done with a buffer, type C-x #` warning message?

When I open a buffer I keep seeing following message: When done with a buffer, type C-x # in the minibuffer. => Is it possible completely to suppress this message? I am using emacsclient -t -q to ...
0
votes
0answers
33 views

emacsclient freezes: Waiting for Emacs

Once in a while emacsclient freezes and unable to open the file. This never happens in linux but happens in macOS. Is there any way to understand the main reason for it? my setup: $ ❯ emacs --version ...
0
votes
0answers
50 views

What' s going on with this program?

I have been using emacs for many years, but from version 26 ... there is a mess with server as I have to type emacsclient in place of simply emacs. Going worse with 27. From 26 I haven't found a way ...
3
votes
2answers
404 views

Calling emacsclient from ansi-term makes emacsclient hang, how do I get around this?

Sometimes I use ansi-term in emacsclient instead of directly using my shell. When I do this, it is not an infrequent occurrence that I forget where I am and call emacsclient someFile, which freezes ...
0
votes
0answers
11 views

How can I get Emacs to release a locking folder handle?

After using Emacs to open a file in a folder on MS Windows using emacsclientw -n, killing the buffer does not release a handle Emacs has to the folder, so the folder can't be deleted. GNU Emacs 27.1 (...
2
votes
1answer
128 views

Is it possible to use emacsclient remotely?

I'd like to use emacsclient on my laptop to connect to an emacs server on my desktop. I think I know that the emacs server process listens to a unix socket in "/tmp/emacs${UID}". So I need to make a ...
0
votes
1answer
147 views

Font and frame configuration in daemon mode

In my .emacs I have (set-frame-font "Source Code Pro") (set-face-attribute 'default nil :font "Source Code Pro" :height 140) (set-face-font 'default "Source Code Pro") ...
1
vote
1answer
79 views

How to prevent a file show up for a second when emacsclient starts?

I am using emacs-daemon. When every I re-start my daemon and do C-x C-b my Buffer List seems always full. Later, when I start my emacsclient for a seconds(like a fast flash) it shows a file that ...
1
vote
1answer
49 views

How does emacsclient determine what XDG_RUNTIME_DIRS is supposed to be?

When I run emacsclient I get this error: $ emacsclient . emacsclient: Should XDG_RUNTIME_DIR='/run/user/10030' be in the environment? emacsclient: (Be careful: XDG_RUNTIME_DIR is security-related.) ...
1
vote
2answers
410 views

Remove emacsclient startup message

How do I go about removing the message "When done with this frame, type C-x 5 0" when launching emacsclient? I know it's possible to controll the startup message of emacs when not launched as a ...
0
votes
0answers
20 views

Emacsclient works in terminal but not in gui mode

Prerequisites GNU Emacs 28.0.50 built from sources. Emacs daemon started via systemd with .config/systemd/user/emacs.service: [Unit] Description=Emacs text editor Documentation=info:emacs man:emacs(...
2
votes
1answer
858 views

Emacs as Editor under Win10 WSL 2

From Windows 10, how can I call an Emacs instance residing on a Windows 10 WSL 2 Linux install, passing it a given file to visit? So far, I've done this: On my WSL 2 Linux, I've created a script ...
0
votes
2answers
41 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 `...
0
votes
0answers
47 views

emacsclient single executions are expensive?

I have server-mode enabled so that I can use emacsclient to execute functions from other parts of my system. My main example is that I have a polybar module that calls emacsclient for some details ...
0
votes
1answer
60 views

make emacsclient connect to running emacs

In my .emacs I have (server-start). In my .bashrc I have: export ALTERNATE_EDITOR="emacs-snapshot" export VISUAL="emacsclient-snapshot -c" When I run emacsclient -c EXISTING-FILE ...
0
votes
1answer
46 views

Re-fill compilation-mode buffer from shell script

This might require more tricks than just Emacs-fu, but since Emacs is at the heart of it I hope to get some ideas on how to approach my need here. I use Emacs/Make/gcc as my development environment. ...
5
votes
2answers
542 views

emacsclient opens a file and does eval simultaneously

I know that emacs can open a file while evaluating an expression: emacs file --eval "(toggle-frame-maximized)" However I failed to replicate this with emacsclient: 1.emacsclient can open a file: ...
2
votes
0answers
103 views

emasc daemon does not load my init.el completely but emacs do

When I run emacs, everything is Ok, my init.el is read. However, after starting a daemon (emacs --daemon), an emacsclient GUI frame (emacsclient -c) is not configured for the following setting: font ...
0
votes
0answers
30 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 ...
0
votes
0answers
67 views

emacsclient crashes on start

I use doom emacs. Starting emacs normally works just fine. Having an emacs daemon and trying to use emacsclient -c causes the following error: *ERROR*: Symbol’s function definition is void: persp-mode-...
0
votes
0answers
39 views

org capture: Store new file name or use an existing file name as a variable

I'm looking for a way to use a fuzzy finder menu to store a new file name or select an existing file name as ${title} or %ˆ{Name} string variable. I use the zettelkasten system and my workflow ...
0
votes
0answers
26 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 ...
8
votes
4answers
695 views

Emacs can't save history of recent visited files opened in current session before shutdown

I have a problem with emacs started as daemon using Systemd. Every shutdown/reboot if I don't stop emacs daemon service manually, the history of recent opened files in current session is lost. I ...
3
votes
1answer
63 views

How are a daemon and a server different in Emacs?

After running (server-start) in Emacs, I evaluated (daemonp) and (server-running-p) The first one returns nil, whereas the second one returns t. So, how are a daemon and a server different in Emacs? ...
2
votes
2answers
293 views

When returning from emacsclient to iterm2, terminal not getting focus

I'm using iterm2 v3.0.2 with fishs hell and tmux in osx. When I'm opening file via emacsclient and closing buffer - I'm successfully returning to terminal, BUT iterm2 window has no focus, so I have to ...
0
votes
0answers
25 views

emacs org capture mode not creating link with “%a”?

my org capture template is (setq org-capture-templates '( ("i" "Idea" entry (file+datetree "~/Dropbox/org_mode/ideas.org") "* %?\n Idea: %U\n ...
2
votes
1answer
31 views

Using `emacsclient` for `$VISUAL` raises `End of file during parsing`

I want to use emacs as VISUAL with server-mode. As a test, I write the following in a terminal: emacsclient -F "((left . 0) (top . 0))" -c -n file This behaves exactly as expected; it ...
1
vote
1answer
370 views

emacs --daemon crashes when parent ssh session dies

I'm using emacs 26.1 (although I don't think this is a new issue with this verison). Note - this is not the GTK bug which results in the daemon crashing if X Connectivity is lost. I am aware of that ...
0
votes
0answers
137 views

emacsclient: connect: Connection refused

I am trying to run emacs-daemon on a remote machine (connected via ssh), which was working fine. After I try to setup ports for mosh between 60000:61000 emacs-daemon started not to open :-( The way I ...
1
vote
0answers
105 views

How can I set WM_CLASS for Emacs 27?

I use scratchpads in XMonad (my WM) extensively for quickly capturing (notes, TODOs etc) from anyhwere. I have an instance of Emacs running permanently in a workspace, and launch emacsclient as my ...
1
vote
1answer
163 views

Emacsclient not loading init file changes

Context: I just updated Emacs via homebrew; I don't remember the steps I followed to get Emacs to run via daemon originally, but since the update it doesn't seem to be using it anymore (i.e. quitting ...
0
votes
0answers
24 views

execute a function when emacsclient opens a frame

I am using emacs-evil and when I open a new frame on X11 I can normally use ESC key switch between writing and command mode. But in terminal it won't work, and it just trigers meta. I have been able ...
1
vote
1answer
230 views

emacsclient unable to connect to daemon under snap installation of Emacs

I am facing with a well know problem, when I try to start emacs --daemon on a remote machine, I am getting following error emacsclient: connect: Connection refused: $ ps aux | grep -E "[e]macs&...
3
votes
1answer
200 views

Can't get rid of scratch buffer at startup for Emacs 26.3

I am using GNU Emacs 26.3 (build 1, x86_64-w64-mingw32) of 2019-08-29. In my .emacs I specifically asked not to show the startup screen or buffer *scratch*: (custom-set-variables '(inhibit-startup-...
2
votes
1answer
87 views

How emacsclient automatically startup with the most recent file?

With the help of recentf I am able to open recently open files from its buffer list. As an example when I execute icicle-buffer, I can see the buffer list. I was wondering can I do this operation ...
1
vote
1answer
125 views

How to exit emacs with `q` when man inside emacs is opened

Default behavior of man <command> (opens inside less) when q is pressed it is closed. I am using following to open MANPAGER with emacs: emacsclient -nw -e "(let ((Man-notify-method 'bully))...
0
votes
1answer
55 views

Prevent dired-find-alternate-file from killing emacsclient

When visiting a folder with emacsclient, for example through emacsclient ., using dired, opening a folder using a will cause emacsclient to terminate. I believe this is because a, bound to dired-find-...
3
votes
2answers
339 views

Why is exec-path different in emacsclient / emacsserver than in emacs?

I am trying to run an identical emacsserver setup as the emacs I normally use. I am having issues because the emacsserver has a different exec-path variable when it starts than when normal emacs ...
0
votes
1answer
273 views

Working Around the OS X Catalina Conflict with Emacs 26.3

I'm struggling to workaround the problem discussed in this post. I'm working through the accepted solution (which also references this post, and getting what I think is close, but not quite there. The ...
49
votes
4answers
25k views

How do I use emacsclient to connect to a remote emacs instance?

I'd like to be able to run emacs on one computer: server $ emacs --daemon And then connect to it from another: local $ emacsclient -c server Is this possible? If so, how?
0
votes
0answers
41 views

Run command in an emacsclient instance from the terminal

How can one run a command (e.g. to open a file) in an existing emacsclient instance, from the terminal (i.e. not from Emacs itself)?
1
vote
1answer
219 views

Unable to use emacsclient with emacs server when running mac port of emacs

I am running the mac port version of emacs that I installed via homebrew (see here). I'm also trying to run the Emacs server to avoid long startup times. To do this, I first run the server: /...
0
votes
0answers
49 views

Few settings doesn't work in -no-window mode

I newbee in Emacs, and trying to set up emacs. Well, I've written a init.el file and except few things always work properly. But in -nw mode cursor doesn't work (blink not working), tabs doesn't work (...
1
vote
1answer
48 views

Get server name from a client

I have a few Emacs servers running on my computer, and a few clients are attached to these servers. Is there a way to get which server a client is attached to from the window?
0
votes
0answers
23 views

Icons breaking when using emacs as a daemon

I'm trying to use emacsclient and systemd as a way to have speedier access to an emacs session, instead of spinning a new one up every time I need it. However, I've run in to a small problem: The ...
0
votes
0answers
40 views

emacsclient spending a lot of time resetting faces

When I launch emacsclient or make a new frame it spends ~2s in: - make-frame 312 42% - frame-creation-function ...
2
votes
1answer
58 views

emacsclient's “--script” option alternatives

To run an elisp file hello.el with emacs in cli, do simply $ emacs --script hello.el However, a naive try for emacsclient fails, as --script is not an option of emacsclient. $ emacsclient --script ...
19
votes
1answer
1k views

How can I debug random Emacs server crashes?

I generally have a long-running instance of emacs --daemon, which I connect to with various emacsclients. Recently I have started experiencing random crashes. I say "random" because I haven't been ...

1
2 3 4 5 6