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
7
votes
2 answers

How can I secure an emacs-server?

I'd like to ensure that only I can connect to an emacs server that I initialised. I frequently use machines that other people could be SSH'd into, and I don't see what's to stop them opening emacsclient and running M-x kill-emacs which would screw…
Squidly
  • 2,707
  • 19
  • 43
7
votes
1 answer

When emacs starts in daemon mode how can I automatically load the correct init settings when connecting via X11 or terminal?

I recently began running emacs in daemon mode on startup. Connecting via GUI client (Emacs.app) appears to load customizations correctly. However, connecting via emacsclient in Terminal does not. The first symptom appeared after trying to M-x…
d3vin
  • 379
  • 3
  • 12
7
votes
1 answer

Emacs: Get new-frame and emacsclient -c to use set frame size?

I am new to StackOverflow and I have a question about an issue that has been virtually the only thing to irk me in my quest to master Emacs. I configured my .emacs file to set the default frame size for Emacs to 70 rows and 80 columns like…
7
votes
1 answer

Non-Latin input in emacsclient

When run in foreground mode, Emacs inserts non-Latin input correctly. It's when I run it as emacs --damon + emacsclient, begins the madness. Each keystroke, which should insert a character, results in an action, like selecting words, jumping around…
katspaugh
  • 17,449
  • 11
  • 66
  • 103
6
votes
1 answer

even when emacsclient is started in a terminal, window-system is non-nil

I want to call some functions when I run emacsclient in a terminal emulator. The code I have works when Emacs is started in a text-only terminal. When I start Emacs in graphical mode and run emacsclient -t in a terminal, the functions do not run so…
hekevintran
  • 22,822
  • 32
  • 111
  • 180
6
votes
1 answer

emacs-daemon startup freezes if file has auto-save data

I set up desktop.el so that emacs automatically reopens all files on startup that were left open last time I killed emacs. Now when I start emacs as a daemon and one of the reopened files has auto-save-data, the daemon displays the usual…
Zarza
  • 538
  • 4
  • 6
6
votes
3 answers

How to make emacsclient open each file in a separate 'window' within the same 'frame'

I am trying to open two files, say 'hello.txt' and 'world.txt' in emacsclient from a terminal and I want them to be opened in two different windows(as in the emacs sense of the word) but in the same frame. I invoke emacsclient like this: emacsclient…
Ajoy
  • 525
  • 1
  • 9
  • 20
5
votes
1 answer

Emacsclient does not respond to mouse clicks

When I run emacsclient it does not respond to mouse clicks. My main Emacs process runs in a terminal and responds to mouse clicks correctly because I have the following code in my Emacs config file: (xterm-mouse-mode 1) Why does emacsclient not…
hekevintran
  • 22,822
  • 32
  • 111
  • 180
5
votes
0 answers

"emacsclientw -c " runs very slow as an outlook macro, while super fast if runs in Window Powershell

Here is a simple command to launch an emacsclient frame in Windows 10, which I've added to outlook as a macro assigned to a new button. Shell ("c:/Users/user_name/emacs-25.3-x86_64/bin/emacsclientw.exe -c ") But every time it is launched through…
5
votes
1 answer

Aligning .Xauthority between GDM and SSH

I've run into a problem in that if I start Emacs in daemon mode on my remote system, then in my local system I run ssh remotehost emacsclient -c, it fails with X11 connection rejected because of wrong authentication. However, things like ssh…
MadScientist
  • 92,819
  • 9
  • 109
  • 136
5
votes
3 answers

Run command on new frame with daemon/client in Emacs

This is perhaps quite simple, but I haven't found anything useful when googling. So here it goes :) I use Emacs in daemon mode (emacs --daemon) and it's really handy. I also use dvorak and have found that remapping C-j to C-c (and vice versa) is…
monotux
  • 3,657
  • 28
  • 30
5
votes
1 answer

Opening emacsclient in terminal works but won't work with Automator

So I'm getting some pretty strange behaviour when I try to use an Automator service to open new emacs (GNU Version 25.2 with spacemacs) buffers. In my terminal, the command emacsclient -a '' -c works as expected, opening a new buffer through…
Mason
  • 2,981
  • 9
  • 29
5
votes
1 answer

Magit cannot connect to emacsclient inside docker?

I am running emacs24.5.1 inside docker (base image is Ubuntu). I installed emacs through apt-get. Furthermore I installed magit through melpa (magit version magit-20170702.858) and it's great. However when I try to commit something then magit…
Pushpendre
  • 795
  • 7
  • 19
5
votes
3 answers

How can I launch emacsclient maximized from the commandline

I am wonder how to start emacsclient in a new maximized frame. emacsclient -c starts a new frame but the man page indicated no way to maximize this frame. There are no such options as --maximized. Warning : this is no a duplicate from the post :…
ppr
  • 685
  • 7
  • 24
5
votes
2 answers

how to run certain elisp code after starting a new emacsclient frame?

For how to automatically evaluate certain lisp code every time starting an emacsclient, click here. My problem is different. I want to write a script that opens a new emacs frame (with focus on it) (one way to do this is to run emacsclient -c) and…
Yoo
  • 17,526
  • 6
  • 41
  • 47