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.

46 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
17
votes
0answers
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 ...
3
votes
2answers
274 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 ...
3
votes
0answers
247 views

emacsclient doesn't start when visiting a file that is already open

I start emacsclient with emacsclient -a 'emacs-server-start' -nw --socket-name=$TTY, where emacs-server-start is a script that runs emacs --daemon="$TTY" (I use $TTY to get a different client for each ...
3
votes
0answers
956 views

When using emacsclient, how can I open the file in the active buffer?

When I open a file with emacsclient without invoking -c, Emacs visits the file in a new buffer in the background while leaving my current window configuration in place. I'd like to change this, e.g. ...
2
votes
0answers
47 views

Launching GUI emacslient destroys terminal frame resizing capabilities

Whenever I launch a GUI session as $ emacsclient -c all the emacsclient sessions I've created with $ emacsclient -nw -c lose several settings. The problem only occurs right after launching a GUI ...
2
votes
0answers
42 views

How to wait while evaluating an expression with emacsclient?

I use emacsclient regularly to open files. In order to open files owned by root, it is necessary to use tramp. As far as I know this requires the use of the eval option of emacsclient. emacsclient --...
2
votes
0answers
57 views

Showing different project-trees in different instances of emacs daemon

At this point I usually hook up into my emacs-daemon using emacsclient -a "" -c "$@". When I also want to display my project using Neotree, this works well for only one instance but if I open a file ...
2
votes
0answers
55 views

make-frame-on-display & emacsclient fail w/ exported display while other apps are fine

I am connecting to my office GNU/Linux box from a windows laptop through a putty ssh tunnel. I have also on the laptop the java WeirdX X11 server, that is declared in putty to use the localhost:2 (...
2
votes
0answers
65 views

emacsclient -c new frame cannot have an individual new sr-speedbar

Since emacsclient depends on emacs server, when I first start emacs server and then try: emacsclient -c -n -a emacs --eval "(sr-speedbar-open)" It reports that sr-speedbar is arlready opened. Is it ...
2
votes
0answers
63 views

Hide emacs icon when client is off

I am running emacs as daemon, in MacOSX, it works flawlessly but when I kill the client the icon remains in the dock as running. I searched around for a way to hide it when no client is running but I ...
2
votes
1answer
697 views

How to gracefully kill clientless daemon from commandline?

summary What to utter from commandline to cause a running clientless Emacs daemon/server process to gracefully shutdown--i.e., clean up after itself, then exit--without creating additional Emacs ...
1
vote
0answers
52 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
0answers
28 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
vote
0answers
77 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: /...
1
vote
0answers
169 views

Global display line numbers mode not working

I can run (display-line-numbers-mode) and get line numbers but it doesn't work if I run (global-display-line-numbers-mode) (nothing happens). I have traced this to this function: (defun display-line-...
1
vote
2answers
167 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 ...
1
vote
1answer
160 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 ...
1
vote
0answers
44 views

emacsclent -nw hangs

As I use emacsclient -nw -c in a terminal e.g. xterm -e emacsclient -nw -c, emacs hangs when I resize horizontally (to the minimum allowed by the wm). I can't no longer launch any emacsclient window, ...
1
vote
0answers
125 views

Possible to pass arguments to emacsclient alternate-editor?

Currently this works: emacsclient ..args.. --alternate-editor=some_editor However this does not: emacsclient ..args.. --alternate-editor="some_editor --args" Is there a way to call the alternate-...
1
vote
0answers
54 views

How to RPC from External Process to Emacs

How can I RPC from an external application into Emacs then have a function in Emacs handle the RPC? For example, I would like to make a D3.js webpage with a dependency graph of a codebase, view and ...
1
vote
0answers
256 views

Problem opening spacemacs on mac OS Sierra when clicking spacemacs icon.

trying to install spacemacs using the Alternate installation instructions, but when I load the app using the app icon on the Applications folder I get the following. TL;DR: How to link env HOME=$HOME/...
1
vote
0answers
40 views

Running emacsclient causes some flashing effect to happen on other frames

I picked up this code from: Is there any way to run a hook function only once? (setq myGraphicModeHash (make-hash-table :test 'equal :size 2)) (puthash "gui" t myGraphicModeHash) (puthash "term" t ...
1
vote
0answers
205 views

emacs ssh client on windows

I have emacs installed on linux machine, and for most times, I need to connect to the machine on my windows laptop, previous I use putty, but I found it has issue with emacs keybindings, some key ...
1
vote
0answers
68 views

Preventing emacsclient -c from bringing both Emacs frames to the front

Environment Cygwin, emacs-w32 variant. Use case Setting up my editor for git commits from the terminal. Problem When I do a git commit from a terminal, I have it setup to do emacsclient -c I get a ...
1
vote
0answers
86 views

Running emacs server via systemd prevents inverse search and nice view

Background: I am using systemd to run my emacs server and my usual workflow always involves invoking emacsclient. Both server and client are on the same computer running Debian Jessie. The method is ...
1
vote
0answers
63 views

Add commands after custom LaTeX split window view

I use (setq TeX-view-program-list (quote (("Emacs" "emacsclient -e '(split-window-horizontally 88) 'emacsclient -e '(other-window 1)'; emacsclient %o;")))) (setq TeX-view-program-selection (quote (((...
0
votes
0answers
24 views

List commands / keywords in a directory sorted by frequency of use

I want to do some refactoring. For that purpose I want to list all keywords grouped and sorted by their frequency of appearance. That could help me get ideas, which repetitive code I could start ...
0
votes
0answers
22 views

help: bash error in emacs rust/cargo

i get this error in emacs when runing a rust file (have rust and cargo): cargo run /bin/bash: cargo: command not found Compilation exited abnormally with code 127 at Thu Aug 8 20:28:50 yet i ...
0
votes
1answer
28 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 ...
0
votes
0answers
21 views

How can I open WoMan's pages from bash?

I first tried emacsclient -t -e '(woman "sox")', but it opens the WoMan's buffer as a popup: Then I tried emacsclient -t -e '(woman "sox") (spacemacs/toggle-maximize-buffer) (sleep-for 3) (delete-...
0
votes
0answers
21 views

formatting dates in Emacs when run as a daemon

I run Emacs on a Linux (actually Xubuntu 19.04) machine and my localization settings call for an Italian locale. When generating timestamp, however, I'd like to have English months and weekday names....
0
votes
0answers
20 views

Running emacsclient does not load my display settings

I'm trying out emacs daemon and emacsclient in Linux. There's one thing I haven't been able to figure out: whenever I run emacsclient, my display settings (e.g. font) don't load, as opposed to what ...
0
votes
0answers
26 views

Emacsclient uses new instance, weird font

When I open Emacs normally (using runemacs.exe), everything appears fine, including the font. However, when I try opening a file in Emacs using the client, while getting the client to start the server ...
0
votes
0answers
30 views

Reconnect to the restarted daemon

I have started emacs (v26.1) server: $ emacs --daemon I connected using $ emacsclient -t From within emacs, well spacemacs, I restarted the daemon SPC q r, which executed dotspacemacs/resume-...
0
votes
0answers
29 views

Cannot use toggle-input-mode in emacsclient

Recently, I 'm using gnu-apl and I need to change the input mode. When I use it in emacs it works well, but inside and emacsclient it doesn't work I cannot select any different input: With emacs: ...
0
votes
0answers
40 views

emacsclient exits unexpectedly without any error

I've built GNU Emacs 27.0.50 from source in Ubuntu 18.10. Then started the daemon as a systemd unit: [Unit] Description=Emacs text editor Documentation=info:emacs man:emacs(1) https://gnu.org/...
0
votes
0answers
70 views

Using Emacs as a daemon (emacsclient) exhibiting weird behavior

Whenever I use Emacs as a daemon it seems like my init file isn't being fully loaded. My keybindings in particular are acting very odd. I use some unorthodox keybinds; for example: Ctrl+u = ...
0
votes
0answers
96 views

Emacs client doesn't connect to running server on Windows

I have fresh new installation of emacs altogether with spacemacs. I set env vars for alternate editor and server file. My server file after starting emacs looks like: 127.0.0.1:64518 11948 'M.P$#NT[...
0
votes
0answers
106 views

Running Emacs as a client does not load my settings

I'm using the new systemd daemon option with Emacs 26. I have a problem, though. If I open a client instance (emacsclient -c) no config files (my .emacs) are loaded. So I don't see the usefulness in ...
0
votes
0answers
34 views

Decryption and emacs client

I started using (server-start) recently and only using emacs client (with -c -a emacs option). The expected behavior when opening a .gpg file is that epa automatically tries to decrypt the file but ...
0
votes
0answers
50 views

evaluate code in other emacsclient?

I wish I could run code from one emacsclient session inside other. I'm working in terminal via ssh, terminal has two panes connected to machine with emacs via ssh, each pane has its own emacsclient ...
0
votes
0answers
30 views

emacs: leaving buffer in terminal emacs

After opening a file with emacsclient -nw foo.txt I see When done with a buffer, type C-x # in the minibuffer. I however habitually do C-x C-c instead of C-x # Is there a practical difference ...
0
votes
0answers
48 views

recentf cleanup upon mode enabled: not saved in the actual recentf-save-file

When Emacs starts, it reports a non-existent file is removed from recentf. However, that removal was never saved to the recentf-save-file: the next time Emacs starts, the same removal is reported ...
0
votes
0answers
49 views

Correct commandline options (by pure elisp) for emacsclient to create a new frame only if the file is not already open otherwise switchs to it

If I invoke emacsclient with emacsclient -na runemacs file1 emacsclients switch to the frame containing file1. But if later I invoke emacs with emacsclient -na runemacs file2 emacsclient opens file2 ...
0
votes
0answers
121 views

Is it possible to keep window set up when connecting via emacsclient?

I love using Emacsserver and Emacsclient, as it saves all of my buffers so that if I log in via ssh and then log out, all of my buffers are saved. However, when I log into Emacsserver after quitting ...
0
votes
0answers
24 views

Odd filename parsing error when scripting emacsclient on OSX

I get the same error as this Stack Overflow asker when trying to use a wrapper script to tell OSX where the emacs server socket is: I don't think it's a bash issue, as the Emacs PID is correctly ...