Skip to main content
Share Your Experience: Take the 2024 Developer Survey

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
3 votes
2 answers
2k 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-...
0 votes
0 answers
10 views

emacsclient vs. Chromebook: must manually switch to window

On Linux normally I can do $ emacsclient --no-wait file.txt and voila, there I am sitting in emacs editing file.txt before you know it. But not on ChromeOS Linux. There I need to manually switch to ...
0 votes
0 answers
13 views

Error when using emacs in background process: [1] + suspended (tty output) emacs

I get this error when I try to open any file in the background using emacs: [1] + suspended (tty output) emacs file
6 votes
1 answer
919 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 ...
13 votes
3 answers
3k views

start emacsclient with focus from command line

When I start emacsclient from command line as below: emacsclient -a '' -c "$@" It always starts in the background (terminal window on top of emacsclient window), so I have to use mouse to click the ...
0 votes
0 answers
17 views

In what way can emacsclient freeze the main server?

Often I find my Emacs frozen and I end up resolving it by exiting emacsclient. Can emacsclient somehow block the main Emacs from input?
0 votes
1 answer
97 views

org-protocol URLs with UTF-8 (URL-encoded) characters aren't properly captured

When using org-protocol capture URLs on Windows, pages with non-ASCII titles or captured text results in a capture with incorrect values applied in the template. Despite such characters being properly ...
0 votes
1 answer
95 views

How to open file from windows explorer in a new frame with emacsclient

How do I achieve that files opened from Explorer with emacs are always opened in a new frame? I tried making a link that has the target <path/to/emacs/bin>/emacsclientw.exe --create-frame. When ...
1 vote
0 answers
53 views

how to get emacsclient to behave like emacs?

I don't like that emacsclient keeps buffers open. Is there a way so when I C-x C-c out of a session, it behaves like a regular emacs instance and kills all associated buffers? It'd also be nice if ...
4 votes
2 answers
543 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
1 answer
36 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 ...
1 vote
1 answer
336 views

mwheel-scroll bindings between GUI and terminal?

Using an Emacs daemon (28, pgtk branch) switching between GUI and terminal, I can't get mouse scrolling to work on both. They work on each individually, but the issue is with the mouse-wheel-{up,down}-...
11 votes
2 answers
3k views

Emacs not responding to keyboard input

Sometimes Emacs stops responding to keyboard input. It responds to mouse input though. If I do killall -s SIGUSR2 emacs, the debugger shows this (but remains unresponsive to keyboard): Debugger ...
1 vote
1 answer
208 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
1 answer
1k 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&...
0 votes
0 answers
21 views

How to use emacsclient to ask for a password

When I run vs-push (C-x v P) the program ssh-askpass gets execute to ask for the password of the SSH key. There are several different implementations. I am wondering if I can use emacsclient to ...
9 votes
3 answers
6k views

Multiple Emacs instances each with their own server?

In my setup, I have several (GNU) Emacs instances running simultaneously on my local machine, one for each project or task that I'm currently working on. I would like to be able to open buffers in an ...
0 votes
1 answer
66 views

Preventing emacsclient eval from messing up my terminal

I use emacs as info viewer from the terminal, but if the info page does not exist (or there is any other error) the terminal (regardless of Kitty or Konsole) becomes hardly usable, not properly ...
1 vote
1 answer
38 views

Emacsclient.exe -- How Load elisp from Command Line Argument --"-l" Option Not Recognized

Windows 7 emacs 28.2 Is there a way to load an elisp program from the command line when running the emacsclient? emacsclient.exe doesn't recognize the "-l" command line option. This works: \...
0 votes
0 answers
28 views

start emacsclient with specific window geometry

I am trying to convert my existing emacs setup to a client/daemon configuration. A lot works as intended, but I do not manage to set the frame geometry to a fixed size. I do have the following in my ....
0 votes
0 answers
239 views

How do I type … in the TUI?

When I call describe-key and enter … (Alt Gr + .), it says M-b runs the command backward-word […] and async-shell-command (bound to M-&) is called. I'm on Linux with Xorg, the terminal emulator is ...
3 votes
3 answers
2k 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
1 answer
26 views

client always pops up a msgbox before connecting

My Emacs server uses a non-localhost IP address to listen for potential TCP connections. Each time I run emacsclientw.exe, the message box will pop up. Is there any way to avoid it?
6 votes
3 answers
1k views

Prevent emacsclient from blocking other instances

I use emacs in the terminal, typically with many emacs instances running at once in different tabs. This is a perfect use case for emacsclient, but it has always had various glitches that have stopped ...
1 vote
2 answers
113 views

Why is emacsclient not reusing the existing frame?

I have emacs running as a daemon (using launchctl), and I can use emacsclient --socket-name=socket -n -r -a '' and open a frame just fine. But if I run it again (say, to open some file), it opens ...
0 votes
1 answer
232 views

Emacsclient cannot connect to running emacs daemon

I have a problem connecting to my emacs daemon. Here is the situation : I am on nixos I have an emacs-29.1 daemon running with "emacs-29.1 --daemon" as a user service. Here is the output of ...
0 votes
1 answer
33 views

Custom `command-line-1` for `emacsclient`

I've put a custom definition of command-line-1 in my early-init.el which works for for calling emacs but not for calling an emacsclient. How can I make it work in the latter case?
0 votes
1 answer
19 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 ...
2 votes
1 answer
295 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, ...
2 votes
2 answers
736 views

How do I make org capture prompt for specific header target?

I need help writing a function that makes Org Capture prompt me of what it should place the capture to a specified header in my tasks org file (basically I need it to search through the specified org ...
16 votes
4 answers
3k views

Run a Function Only Once, Though a Hook Many Times

The context I'm using the after-make-frame-functions hook to load properly the themes in an emacs client/server configuration. Specifically this is the code snippet that I use to make that (based in ...
0 votes
1 answer
88 views

Do you know good SOAP (wsdl) client for Emacs?

Do you know good SOAP (wsdl) client for Emacs? I try C-x C-e but get error: (soap-load-wsdl-from-url "http://www.dneonline.com/calculator.asmx?WSDL") progn: Symbol’s function definition is ...
1 vote
0 answers
136 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 ...
0 votes
1 answer
44 views

emacsclient: error accessing server file "~/.emacs.d/server/server"

wsl Ubuntu cannot connect when using emacsclient to connect to emacs server. My emacs init.el file settings are (setq server-socket-dir "~/.emacs.d/server") and I see the following when ...
0 votes
0 answers
63 views

emacsclient and EAF, at the same time

EAF (Emacs Application Framework) is not compatible with emacsclient, it says on the web page. , but I don't understand why;) I can't find a reasonable explanation why these two can't be enabled at ...
4 votes
0 answers
2k views

Emacs daemon does not load my init.el completely but plain emacs does

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 ...
3 votes
1 answer
781 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 ...
0 votes
1 answer
72 views

Backspace triggers C-h in emacsclient

When I run a client in a terminal with emacsclient -nw, for some reason Backspace triggers C-h. This doesn't happen with emacs -nw or with the client running in a window. In both cases, as expected, ...
0 votes
1 answer
125 views

Emacs Daemon Multiple user on Mac best practices

I'm new to Emacs, so apologies if this is covered elsewhere. I'm running latest macOS 12.4; and downloaded emacs.app from emacsformacosx.com so I'm on Emacs 28.1-4 . I have an admin user, which I ...
1 vote
1 answer
434 views

how to run emacsclient on windows in the terminal

i cannot use emacsclient on windows 10. Starting it with the gui client works well but trying to start it in command line mode from a terminal, for example running emacsclient -nw -c is there a ...
2 votes
2 answers
230 views

local-function-key-map gets overwritten by emacsclient

The following .emacs file works as expected, so long as I invoke emacs the "normal" way (ie by launching the emacs executable directly). (global-unset-key (kbd "C-]")) (global-set-key (kbd "H-C-]") '...
-1 votes
1 answer
40 views

Emacs application doesn't play well with emacs daemon

Using the zsh function emacs () { visible_frames () { emacsclient -a "" -e '(length (visible-frame-list))' } change_focus () { emacsclient -n -e "(select-frame-set-input-...
0 votes
1 answer
177 views

How can I load properly full configuration with GUI elements and desktop parameters with `emacs --daemon` and `emacsclient -c`

Everything works fine when using regular Emacs. Now when I try to use the same init.el file with emacs --daemon and emacsclient -c I get an error. I have thought about using different configuration ...
1 vote
0 answers
18 views

How can I handle an emacs org-babel snippet triggering emacsclient

I want to call an external tool which will eventually invoke $EDITOR to do its thing. However from inside an org-babel code block this fails because while executing the code block the emacs I'm ...
4 votes
1 answer
281 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 ...
1 vote
1 answer
259 views

org-link-open fails with Wrong number of arguments: (1 . 1), 0

I recently added a config entry to my ./doom.d/config.el to enable Firefox as a default browser for opening links. Below is the entry I added based on this post. ;; Set specific browser to open links ...
0 votes
0 answers
195 views

Magit cannot commit. emacsclient on PATH. Pop! OS

magit-status sees the repo just fine, and I can even push to Github, or make a branch. I can also commit through the git cli no problem. However, before I can even write my commit message on magit I ...
0 votes
0 answers
15 views

setting up a remote emacs pairing session without access to the filesystem [duplicate]

I'm just wondering if it's possible to setup an emacs pairing session over ssh where in one session, I have access to the filesystem but the other person I'm pairing with doesn't?
0 votes
2 answers
212 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-...
0 votes
0 answers
87 views

`C-x C-;` freezes emacs

This hasn't been happening every time, though once it starts it's consistent while emacs is running at least. It claims to be bound to comment-line as usual, but I can't actually run it through C-h k ...

1
2 3 4 5
7