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.

See also Emacs-Server (GNU Emacs Manual) and Emacs Client (emacswiki).

94 questions
2
votes
1 answer

emacsclient: could not get terminal name

ssh -X root@localhost "emacsclient -c" Warning: untrusted X11 forwarding setup failed: xauth key data not generated Warning: No xauth data; using fake authentication data for X11 forwarding. emacsclient: could not get terminal name I have googled…
louxiu
  • 2,830
  • 3
  • 28
  • 42
2
votes
1 answer

Org protocol capture working for months then stopped suddenly without any proper error message

I have two emacs setups runnning with the help of chemacs2, one with doom config and one with vannila emacs with few configurations in org-mode. This has been running for few months now, and then today I get this following error. Even with (setq…
vanangamudi
  • 673
  • 1
  • 8
  • 21
2
votes
0 answers

Run different color themes of two emacclients under the same server

I run the following commands to establish two clients under the same server emacs --deamon emacsclient -c &> /dev/null & emacsclient -c &> /dev/null & and want the two clients display different themes as: It's very helpful since: One client…
AbstProcDo
  • 19,953
  • 19
  • 81
  • 138
2
votes
1 answer

How to open an EMACS file in OS X by double-clicking on it, using the `emacsclient` command?

I want to open an org-mode file selected in the Finder, by double clicking on it. But since I use Emacs in daemon-mode, I want to use the emacsclient command for that. Thus the primary idea was to wrap the command emacsclient -c posixPathToFile in…
m0ll3art
  • 63
  • 5
2
votes
3 answers

Emacs server file path

I'm using Aquamacs and started the emacs server with M-x server-start. My emacsclient connects just fine. However, when I start another ssh session (on the same pc) it cannot locate my socket-name / server file. It's not in ~/.emacs.d/server/server…
Ward Bekker
  • 6,316
  • 9
  • 38
  • 61
2
votes
1 answer

OS X: how to make command-line script appear as helper application to handle mailto?

I'm trying to configure Emacs as my preferred application when the user clicks on a mailto: link. Emacs has facilities for this: emacs 23 on OS X: mailto links & calling compose-mail? http://www.emacswiki.org/emacs/MailtoHandler and I'll do it by…
jowens
  • 355
  • 3
  • 10
2
votes
1 answer

The emacsclient documentation has an example with %d and %s arguments - what are they

In the emacsclient documentation, an example EDITOR setting is: EDITOR="emacsclient --alternate-editor emacs +%d %s" How can the %d and %s be used? I understand that + starts at the specified line and the %s is the file name to edit, but what…
DNN
  • 41
  • 3
2
votes
3 answers

Emacsclient keep buffers after closing

In emacsclient, is there a way to open a file from the command line such that its buffer will remain open on the server after I close the client? Alternatively, is there a command I can run from in a client to tell it to effectively detach from a…
zstewart
  • 2,093
  • 12
  • 24
2
votes
1 answer

Is there any way to apply .emacs changes to all emacs clients without restarting emacs daemon?

I started emacs server through 'emacs --daemon'. Then I opened several clients. I'd like to apply the changes of .emacs configuration to all the clients without restarting emacs daemon. Is that possible?
cloudrain21
  • 649
  • 5
  • 17
2
votes
1 answer

Opening an already-open file with GNU Emacs

Suppose that the file A.txt is already opened with GNU-emacs, but I don't notice it, so I try opening it (again) with emacs A.txt Instead of just showing the already-open window it opens a second one! (This is of course annoying, since I will end…
2
votes
1 answer

Define alternate editor with arguments, for emacsclient

I am trying to run emacsclient with alternate-editor of emacs --eval "(setq server-name '\"server1\")". I am not having any luck. This is what I have tried: lispExp="(setq server-name '\"server1\")" emacsclient -c --alternate-editor="emacs --eval…
ctrl-alt-delor
  • 7,506
  • 5
  • 40
  • 52
2
votes
2 answers

How start two windows/frames of emacs with emacsclient?

I would like to create multiple frames/windows of emacs. Emacs is started by emacs --daemon and I am invoking emacs by emacsclient. I specify I want a other window/frame by -c option : emacsclient -c. But even with -c option, I can't start another…
ppr
  • 685
  • 7
  • 24
2
votes
6 answers

Silently call defun from emacsclient

During the compilation of sources, I would like GNU Make to call an emacs defun. For this I have 2 options: Start a new emacs instance, and load the desired function and call it. Call the defun from the emacsclient like: emacsclient --eval…
To1ne
  • 1,108
  • 2
  • 12
  • 22
1
vote
2 answers

emacsclient always runs as console application

When emacs is not already running, emacsclient always starts as a console application, but I'd like it to start as a gui application. This is the command I use: emacsclient -a "" file The -a "" is there to start an emacs instance, if none is…
daniel kullmann
  • 13,653
  • 8
  • 51
  • 67
1
vote
1 answer

Initialization Issue Starting Emacs 27.1 in Daemon Mode on Windows 10

After following instructions from https://www.emacswiki.org/emacs/EmacsMsWindowsIntegration on starting emacs 27.1 as daemon in windows 10 where path\to\emacs is "c:\emacs-27.1\bin\runemacs.exe --daemon , see here: You can also open Explorer, type…
F. Certainly.
  • 181
  • 14