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
1answer
25 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
19 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 ...
0
votes
1answer
47 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
35 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
90 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
1answer
47 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 ...
2
votes
1answer
111 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-...
1
vote
1answer
60 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
66 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
41 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. ...
0
votes
1answer
29 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
0answers
226 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 ...
3
votes
2answers
294 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
97 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 ...
48
votes
4answers
23k 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
22 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
170 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
16 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
35 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
14 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
35 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 ...
16
votes
3answers
4k 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 ...
8
votes
3answers
567 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
2answers
361 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 ...
1
vote
1answer
311 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 ...
2
votes
1answer
69 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 ...
2
votes
1answer
49 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 ...
1
vote
2answers
329 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 ...
17
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 ...
0
votes
1answer
16 views

Alt-Shift-Left and -Right (M-S-<left>/<right>) do not work in emacs on Raspberry Pi (org-shiftmetaleft / org-shiftmetaright)

I am on a Raspberry Pi with Raspbian and any shortcut with Alt-Shift-arrow has no effect in emacs org-mode. I discovered it while trying to use org-shiftmetaleft and org-shiftmetaright. This is my ...
1
vote
0answers
36 views

Accidentally started emacs --daemon, and couldn't kill it!

I was testing emacs --daemon functionality, and called two daemons alive. I wanted to kill them, with $ pgrep emacs 275760 275857 $ pkill emacs $ pgrep emacs 276788 276847 # It's alive again! # Lemme ...
2
votes
1answer
64 views

Using multiple tty emacsclient with “C-x 5” other frame commands

I'm using emacs in daemon mode on a server and connecting over ssh in a terminal console (tty) window (i.e. no GUI support). I'm invoking emacsclient using in the tty window (window here refers to OS ...
0
votes
1answer
62 views

How to change current-directory with emacsclient?

I am trying to change the default directory using emacsclient, but it isn't working as I had hoped. $ cd $ emacsclient -e '(emacs-version)' "GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ ...
3
votes
2answers
534 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 ...
3
votes
1answer
819 views

emacs --daemon frozen when started with emacsclient file

This is somewhat of a follow up to Prevent emacsclient from blocking other instances. I am using emacsclient -a '' -nw --socket-name=$TTY where TTY=$(basename tty). I use emacs in the terminal and ...
2
votes
3answers
179 views

Can emacsclient focus an existing frame?

When emacsclient is invoked with the option -c it creates a new frame. In both Windows and Linux, this frame is a window at the top of the Z-stack and has input focus. With option -n (non-blocking) ...
1
vote
1answer
33 views

Invoke emacsclient with a smaller font

For a certain application, I would like to start up emacsclient, but with a slightly smaller font. I can do it for a running emacs by eval'ing: (set-face-attribute 'default nil :height 90) But how ...
3
votes
3answers
1k views

Emacs as server (daemon) struggles

I am trying to setup emacs as server so that emacs (same instance) can be invoked from a file browser like nautilus Results not satisfactory Attempt 1 I have the foll. in ~/.local/share/...
2
votes
1answer
62 views

Set mark when jumping from emacsclient

I use AucTeX to edit LaTeX files and a PDF viewer that supports inverse search using SyncTeX. When I click on a location in the PDF, it simply calls emacsclient with the corresponding file and line. ...
0
votes
0answers
77 views

Unsure on how to set Evil keybinds

In order to install evil and evil-collections I added this to my config: (use-package evil :ensure t :init (setq evil-want-keybinding nil) :config (evil-mode 1)) (use-package evil-...
17
votes
3answers
666 views

How to collapse undo history?

I'm working on an Emacs mode that lets you control Emacs with speech recognition. One of the problems I've ran into is that the way Emacs handles undo doesn't match how you would expect it to work ...
1
vote
0answers
31 views

Differing behaviours with EDITOR=emacsclient between git and sudoedit

In my .profile I've export EDITOR="emacsclient -qa \"emacs --no-window-system --no-desktop\"" Doing sudo -e /somefile doesn't work even when Emacs server is running. I get emacsclient: ...
0
votes
1answer
172 views

Bring Emacs frame to front when running emacsclient on WSL

Currently using Emacs on Windows Subsystem for Linux (WSL). I have this alias for emacsclient executable: alias e='emacsclient -n' Which I run very often when I am on the terminal (I use ConEmu or ...
11
votes
2answers
1k 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
0answers
61 views

Emacsclient starts but no GUI shown

I'm using Emacs installed from the emacs-plus package from homebrew on Mac OS X 10.14.6. I uninstall/reinstall the package today and suddenly it stops working properly. The version of emacs-plus ...
2
votes
1answer
165 views

How to set up emacsclient as default editor on Debian?

What am I trying to achieve I want to use emacsclient (not emacs) as my default text editor on Debian Buster. What have I tried so far Alternatives: > sudo update-alternatives --config editor` ...
1
vote
1answer
55 views

emacsclientw does not use font specified in init.el (Windows)

Emacs version: GNU Emacs 25.3.1 (x86_64-w64-mingw32) I have set up a shell-script which runs Emacs server at Windows startup as mentioned in Emacs Wiki. I have set up a shortcut on my desktop which I ...
0
votes
1answer
114 views

set-frame-size does not work on emacsclient

I have set up Emacs daemon on Windows 10. My Emacs version is GNU Emacs 25.3.1 I have some code in my init.el which resizes the frame size automatically when Emacs starts up. The code is ;; Select a ...
1
vote
0answers
32 views

Is it possible to see the cursor of other emacsclients?

I'm trying to run Emacs server in order to collaborate on org files in our office. emacsclient makes it quite easy to have everyone connect to the same instance of a file and we can see real time ...
1
vote
1answer
97 views

How to always show buffer in the new created frame?

My workflow is: I initialize emacs with a shortcut (in my ~/.i3/config I have a line like this bindcode $mod+49 exec emacsclient -c -n -q -a=''. I use i3wm.org) By default it goes to temp.org, in ....

1
2 3 4 5 6