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.

64 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
3
votes
2answers
374 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
86 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 (...
3
votes
0answers
297 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
1k 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
1answer
89 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
0answers
324 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 ...
2
votes
0answers
64 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
52 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
71 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
71 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
72 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
1k 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
57 views

How can I set WM_CLASS for Emacs 27?

I use scratchpads in XMonad (my WM) extensively for quickly capturing (notes, TODOs etc) from anyhwere. I have an instance of Emacs running permanently in a workspace, and launch emacsclient as my ...
1
vote
0answers
520 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 ...
1
vote
0answers
38 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 ...
1
vote
0answers
42 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: ...
1
vote
0answers
34 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
0answers
138 views

emacs.service will delay 2 mins before `reboot/shutdown` my computer

I use emacs a lot and restart it since I change my init.el from time to time, so I started to use emacs.service about one year ago using command like systemctl --user enable emacs.service systemctl -...
1
vote
0answers
19 views

Switching Emacs server's socket without leaving existing emacs gui

I would like to switch between emacs socket without leaving the GUI. I am able to start two emacs daemon session by doing the following: In xterm1: emacs --daemon="one" In xterm2: emacs --daemon="...
1
vote
0answers
233 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
352 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
0answers
50 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
160 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 ...
1
vote
0answers
154 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
73 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
278 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
48 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
328 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
74 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
97 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
81 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 (((...
1
vote
1answer
66 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 ...
0
votes
0answers
21 views

How do I make Emacs not complain about not being able to start a new server?

I use the mac port version of emacs for handling org-protocol URLs, because I need a graphical instance when I use org-protocol from Chrome. The problem is that emacs will try to start an emacs server ...
0
votes
0answers
41 views

emacsclient crashes on start

I use doom emacs. Starting emacs normally works just fine. Having an emacs daemon and trying to use emacsclient -c causes the following error: *ERROR*: Symbol’s function definition is void: persp-mode-...
0
votes
0answers
21 views

org capture: Store new file name or use an existing file name as a variable

I'm looking for a way to use a fuzzy finder menu to store a new file name or select an existing file name as ${title} or %ˆ{Name} string variable. I use the zettelkasten system and my workflow ...
0
votes
0answers
22 views

Server-edit Automatically When Buffer is Killed

I'm considering using emacs as a server (using (server-start)) but I do not want to use C-x # to kill buffers. I've heard of the -n option for emacsclient, but I'm concerned that it may cause unwanted ...
0
votes
0answers
23 views

emacs org capture mode not creating link with “%a”?

my org capture template is (setq org-capture-templates '( ("i" "Idea" entry (file+datetree "~/Dropbox/org_mode/ideas.org") "* %?\n Idea: %U\n ...
0
votes
0answers
77 views

emacsclient: connect: Connection refused

I am trying to run emacs-daemon on a remote machine (connected via ssh), which was working fine. After I try to setup ports for mosh between 60000:61000 emacs-daemon started not to open :-( The way I ...
0
votes
0answers
23 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
65 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") ...
0
votes
1answer
50 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
0answers
26 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)?
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
0answers
22 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 (...
0
votes
0answers
19 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 ...
0
votes
1answer
59 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 ...
0
votes
0answers
93 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-...
0
votes
0answers
72 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 ...
0
votes
0answers
39 views

Why can't OSX handle Emacs client frames

By using the latest Emacs version from 1, it seems that when running in daemon-mode and when opening a new client frame from the terminal or from a custom OSX app I wrote which opens a new frame when ...