Skip to main content

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
0 votes
0 answers
23 views

Evaluating emacsclient code (emacs-everywhere) on Mac OS X

I'm on Mac OS X (Sonoma). When I try running (from iTerm2): emacsclient -e -c '(+ 3 2)' I get the appropriate result (5). But when I run emacsclient -e -c '(emacs-everywhere)' I get ERROR: Searching ...
guibor's user avatar
  • 133
1 vote
2 answers
50 views

How to use emacsclient with emacs -nw, all from the same shell?

Just the other day I did $ emacs -nw file1 Then later on I did ^Z to suspend it, and was back in the shell. And then I wanted to do $ emacsclient -n file2 and have file2 there, ready in emacs when I ...
Dan Jacobson's user avatar
0 votes
1 answer
65 views

`--init-directory` is only working with runemacs.exe but not with emacsclientw.exe on Windows

A symbolic link on windows for emacsclientw.exe with the following flags: C:\Users\XXX\bin\emacs-29.3\bin\emacsclientw.exe --init-directory "~/Dotfiles/emacs/.emacs.d/" -n -c -a "" ...
jonas's user avatar
  • 88
0 votes
1 answer
99 views

Emacs server crashes every 1-2 minutes

Update: The problem is that systemd fails to start emacs.service, and kills it after a timeout period of 90s. Why systemd fails to start emacs.service, I don't know. I have a problem which was raised ...
Patrick Nicodemus's user avatar
0 votes
1 answer
53 views

emacsclient cannot open web links with org-open-at-point or browse-url

emacsclient cannot open web links using neither org-open-at-point or browse-url. It does work, however, from a standalone Emacs session. I get no relevant messages in the Messages buffer, nor from ...
najjt's user avatar
  • 43
3 votes
1 answer
86 views

How can I list all connected emacsclients?

If I have two emacsclients connected to an Emacs server, is there any way to list them? The variable server-clients displays this when an emacsclient is connected. server-clients is a variable defined ...
Jason Hunter's user avatar
0 votes
1 answer
40 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
0 answers
33 views

Why does M-x and C-x b get stuck?

Recently, I experience that M-x and C-x b gets stuck, meaning I can't move up or down in the list; only the middle item is highlighted This is both M-x (counsel-M-x) and C-x b (ivy-switch-buffer) This ...
Jason Hunter's user avatar
0 votes
0 answers
24 views

How to modify an emacs window frame title from the command line to manage multiple servers and clients?

I am trying to setup a few different emacs servers on my system for different activities like emails, org, programming. I found the --set-frame-parameters should take care of it, but I have not been ...
lyndhurst's user avatar
  • 123
0 votes
0 answers
17 views

Calling a function from one emacsclient can't start Edebug from another emacsclient. Terminal is locked error

I use GNU Emacs 27.1 on Ubuntu 22.04.4, where I use i3 with several emacsclients opened in different terminals, while emacsdaemon is running in background. After setting Edebug instrumentations into ...
Mitu Gabriel's user avatar
0 votes
0 answers
29 views

Imitating `emacs /path/to/folder/` behavior with emacs client for project configuration file recognition

To save some time and flashing white screen at startup, I use the emacs daemon and launch a emacs client. However, I have the following project-based workflow that seems to require that I use the non-...
João Diogo Duarte's user avatar
1 vote
1 answer
55 views

How to switch to a buffer from terminal with a unique partial name

I have a buffer with the name very-long-name-xyz-etc. This buffer is the only buffer whose name contains xyz. From terminal I can switch to that buffer using the following emacsclientw -cna runemacs --...
Name's user avatar
  • 8,037
0 votes
0 answers
35 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
Ben's user avatar
  • 1
0 votes
0 answers
40 views

In what ways can Emacsclient freeze the server?

Often I find my Emacs server frozen and I end up resolving it by exiting Emacsclient. Can Emacsclient somehow freeze the Emacs server? EDIT: ok, I've found one way to freeze the Emacs server. If I ...
Jason Hunter's user avatar
1 vote
0 answers
56 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 ...
user129393192's user avatar
1 vote
0 answers
18 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 ...
Dan Jacobson's user avatar
0 votes
0 answers
37 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 ...
ceving's user avatar
  • 1,388
0 votes
1 answer
210 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
82 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 ....
user52366's user avatar
  • 141
1 vote
1 answer
44 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: \...
punchcard's user avatar
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?
shynur's user avatar
  • 5,890
2 votes
2 answers
226 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 ...
Lee Crabtree's user avatar
0 votes
1 answer
35 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?
J-Kappes's user avatar
0 votes
1 answer
360 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 ...
Virgil's user avatar
  • 3
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
1 answer
143 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 ...
evilsetg's user avatar
2 votes
1 answer
376 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
108 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 ...
a_subscriber's user avatar
  • 4,224
1 vote
0 answers
197 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
0 votes
1 answer
74 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 ...
uesugierii's user avatar
0 votes
0 answers
70 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 ...
Jason Hunter's user avatar
0 votes
1 answer
126 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, ...
vonaka's user avatar
  • 171
1 vote
1 answer
811 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 ...
Kit Carson's user avatar
-1 votes
1 answer
46 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-...
rogerl's user avatar
  • 205
0 votes
1 answer
209 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 ...
Herman's user avatar
  • 57
1 vote
0 answers
19 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 ...
stsquad's user avatar
  • 4,681
4 votes
1 answer
349 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
0 votes
0 answers
222 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 ...
vtrincado.h's user avatar
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?
zcaudate's user avatar
  • 687
0 votes
1 answer
89 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 ...
xeruf's user avatar
  • 354
0 votes
0 answers
101 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 ...
Lēctia Landau's user avatar
1 vote
1 answer
142 views

emacsclient starts a new instance instead of contacting the server started by systemd

Log into Gnome emacs-server is started by systemd, using the default configuration of my distribution (Fedora 36): [Unit] Description=Emacs text editor Documentation=info:emacs man:emacs(1) https://...
dmvianna's user avatar
  • 392
0 votes
2 answers
501 views

How to always work from a daemon and always reuse an existing frame? (bonus: do it with chemacs2)

I'm new to emacs. I'm a spacemacs implant, really love ORG mode and evil mode. Been using for the past year or so. I've read some of the emacs documentation, which is fantastically written. But I'm ...
Lockszmith's user avatar
0 votes
1 answer
145 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 ...
NickR's user avatar
  • 101
0 votes
0 answers
118 views

Is there a way to create a emacs shotcut that runs a specific terminal command before opening emacs?

a friend of mine recomended that I use a program called obsidian to make notes,and I quite liked the idea, but i didn't like the program. I have been searching and it seeams to me that org-roam in ...
user38135's user avatar
1 vote
0 answers
63 views

Z-Order of Emacs Client Not Layered Top-Most

System & related settings: Fedora 35 (using Cinnamon Desktop) Emacs 27.2 focus mode: "sloppy" with "raise-on-click" disabled Contrary to all other applications, including the ...
Phoenix's user avatar
  • 361
1 vote
0 answers
168 views

Custom org-capture find headerline function error, wrong number of arguments

So, I managed to get my headline retrieval function fixed, so now the function searches and finds my header lines, but when I select the one I want to use.. it oddly throws back this apply: Wrong ...
Nova Leary's user avatar
2 votes
2 answers
948 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 ...
Nova Leary's user avatar
1 vote
1 answer
171 views

Running a program from elisp that runs `emacsclient` set on `$EDITOR`

I'm automating some work tasks, and many of them consist of calling kubectl edit on different objects. kubectl edit basically opens your $EDITOR which I have configured to be emacsclient. My question ...
licorna's user avatar
  • 237
3 votes
0 answers
154 views

What are the differences between multiple ways to "close" an emacsclient?

As a standalone instance (without daemon mode) I close my emacs via C-x C-c (save-buffers-kill-terminal). This works also with emacsclient and I see no problem about that. But the manpage of ...
buhtz's user avatar
  • 749

1
2 3 4 5
7