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
0answers
17 views

emacsclient freezes: Waiting for Emacs

Once in a while emacsclient freezes and unable to open the file. This never happens in linux but happens in macOS. Is there any way to understand the main reason for it? my setup: $ ❯ emacs --version ...
0
votes
0answers
45 views

What' s going on with this program?

I have been using emacs for many years, but from version 26 ... there is a mess with server as I have to type emacsclient in place of simply emacs. Going worse with 27. From 26 I haven't found a way ...
0
votes
0answers
10 views

How can I get Emacs to release a locking folder handle?

After using Emacs to open a file in a folder on MS Windows using emacsclientw -n, killing the buffer does not release a handle Emacs has to the folder, so the folder can't be deleted. GNU Emacs 27.1 (...
0
votes
0answers
19 views

Emacsclient works in terminal but not in gui mode

Prerequisites GNU Emacs 28.0.50 built from sources. Emacs daemon started via systemd with .config/systemd/user/emacs.service: [Unit] Description=Emacs text editor Documentation=info:emacs man:emacs(...
0
votes
0answers
47 views

emacsclient single executions are expensive?

I have server-mode enabled so that I can use emacsclient to execute functions from other parts of my system. My main example is that I have a polybar module that calls emacsclient for some details ...
1
vote
1answer
40 views

How does emacsclient determine what XDG_RUNTIME_DIRS is supposed to be?

When I run emacsclient I get this error: $ emacsclient . emacsclient: Should XDG_RUNTIME_DIR='/run/user/10030' be in the environment? emacsclient: (Be careful: XDG_RUNTIME_DIR is security-related.) ...
1
vote
0answers
85 views

emasc daemon does not load my init.el completely but emacs do

When I run emacs, everything is Ok, my init.el is read. However, after starting a daemon (emacs --daemon), an emacsclient GUI frame (emacsclient -c) is not configured for the following setting: font ...
0
votes
2answers
41 views

Face setting doesn't work for client sessions

I wanted to change the colours of Anzu's counter, taking the foreground from the Isearch match background and the background from the fringes, like this So I evaluated (face-spec-set 'anzu-mode-line `...
0
votes
0answers
25 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
58 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
27 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
26 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 ...
3
votes
1answer
61 views

How are a daemon and a server different in Emacs?

After running (server-start) in Emacs, I evaluated (daemonp) and (server-running-p) The first one returns nil, whereas the second one returns t. So, how are a daemon and a server different in Emacs? ...
0
votes
0answers
24 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 ...
2
votes
1answer
30 views

Using `emacsclient` for `$VISUAL` raises `End of file during parsing`

I want to use emacs as VISUAL with server-mode. As a test, I write the following in a terminal: emacsclient -F "((left . 0) (top . 0))" -c -n file This behaves exactly as expected; it ...
0
votes
0answers
117 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 ...
1
vote
0answers
88 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
1answer
134 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
24 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
123 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") ...
3
votes
1answer
190 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
81 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
200 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&...
1
vote
1answer
112 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
44 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
1answer
59 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 ...
2
votes
1answer
776 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 ...
0
votes
0answers
36 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
45 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
37 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
44 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
23 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
39 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
248 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 ...
2
votes
1answer
58 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 ...
0
votes
1answer
29 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
1answer
77 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
117 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 ...
1
vote
0answers
39 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
103 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
82 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+ ...
1
vote
1answer
38 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 ...
1
vote
0answers
48 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: ...
2
votes
3answers
291 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) ...
2
votes
1answer
301 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
0answers
35 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 ...
0
votes
1answer
174 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
1answer
64 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 ...
1
vote
0answers
162 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 -...
0
votes
3answers
270 views

When `emacs` is started, use `emacsclient` instead if there is a server

Most modern editors don't have a separate <editor>client binary. Instead, the main binary acts as a client to open a new window/the file given as an argument when possible. Is there a way to ...

1
2 3 4 5 6