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
1
vote
0answers
10 views

Let emacsclient try to reconnect after running alternate_editor

If I set alternate_editor to an empty string, emacsclient runs "emacs --daemon" and then tries to reconnect. However, I want to run it a specific emacs executable that is not in my path. If ...
0
votes
1answer
29 views

How to open emacsclient with working directory set to $PWD?

In my XTerm, I want to open new Emacs frame as well as buffer, with working directory set to $PWD in XTerm env. I tried emacsclient -t -c --eval "(cd $PWD)", but it doesn't seem to work. Is ...
0
votes
0answers
23 views

how to update emacs packages from the comman line

I want to be able to update emacs packages from the command line and quit. I have written this function (defun updateandquit () (configuration-layer/update-packages t) (spacemacs/kill-emacs)) And ...
0
votes
2answers
93 views

What is emacs : daemon, emacsclient, tcp-server?

I want to know about why they are used? , what are they? what is daemon in emacs, Why Should/shouldnot i use "emacs" instead of "emacsclient --create-frame" ? what is client and ...
0
votes
1answer
24 views

org-link-open fails with Wrong number of arguments: (1 . 1), 0

I recently added a config entry to my ./doom.d/config.el to enable Firefox as a default browser for opening links. Below is the entry I added based on this post. ;; Set specific browser to open links ...
0
votes
2answers
52 views

Org Tangle if file does not exist

I've been trying to work out if it's possible to tangle a file if it's not existent on the system. I came across Can Org Babel conditionally tangle code blocks based on system-type? which gave me a ...
1
vote
0answers
30 views

Open new file in new frame without raising existing frames (Windows)

I run Emacs in a MSWindows environment (via server launched with runemacs), and open new files with emacsclientw.exe -n [filename]. It works very well, except for a detail in the second case below: ...
0
votes
1answer
26 views

org-protocol URLs with UTF-8 (URL-encoded) characters aren't properly captured

When using org-protocol capture URLs on Windows, pages with non-ASCII titles or captured text results in a capture with incorrect values applied in the template. Despite such characters being properly ...
1
vote
0answers
54 views

emacs unable to create frame in tty mode on linux `No applicable method: frame-creation-function`

Recently I'm unable to open emacsclient in tty mode, it always fails with the below error (environment redacted, and added newlines) *ERROR*: No applicable method: frame-creation-function, ( (menu-bar-...
1
vote
0answers
349 views

Doom emacs org-agenda does not show to do items

I am new to doom emacs, I am trying to give a shot to using org mode todos and agenda files. I created a sample org file with a list of to-do items as below. #+TITLE: Sample list * Check ** TODO Item ...
1
vote
0answers
58 views

`org-ellipsis` respected by `emacsclient` but not by `emacs`

In my emacs.d/init.el I have: (use-package org ;; ... :custom (org-ellipsis " ▼") :custom-face (org-ellipsis ((t (:foreground "#665" :underline nil)))) ;; ....
0
votes
1answer
83 views

Emacs daemon. First emacslient frame loads reasonably fast. Subsequent emacsclient frames load almost instantaneously. Why?

Emacs daemon greatly reduces time to load the first frame with emacsclient. However, when visiting a file with emacsclient, subsequent emacsclient frames load much faster than the first. Command Load ...
1
vote
1answer
26 views

org files are not refreshed in emacsclient

My org files are stored on the cloud so I can edit them from multiple machines. Whenever I make a change to an org file (from a different machine), emacsclient does not reflect these changes, but a ...
0
votes
0answers
87 views

Get fancy startup screen on new emacsclient frame

When I run emacsclient -c, How can I get a frame with the fancy-startup-screen similar to when emacs is started by itself. I would like to see what I see with the start screen of the non-server ...
1
vote
1answer
57 views

mwheel-scroll bindings between GUI and terminal?

Using an Emacs daemon (28, pgtk branch) switching between GUI and terminal, I can't get mouse scrolling to work on both. They work on each individually, but the issue is with the mouse-wheel-{up,down}-...
1
vote
1answer
66 views

Emacs client doesn't recognize non-ascii input

The problem: When I type a non-ascii character, the character is not wrote and instead a weird key combination is performed, depending on which character I have typed, as if it didn't support utf-8. ...
0
votes
1answer
32 views

How to suppress emacsclient --eval output

I am opening a file as follows: $ emacsclient -qt -e '(progn (find-file "'filename.py'"))' #<buffer filename.py> which outputs #<buffer filename.py> in the terminal. Is it ...
6
votes
1answer
765 views

How to get the PATH from the SHELL

When launched at system start-up, the Emacs daemon doesn't pick up modifications to the PATH introduced by shell initialization scripts. Emacswiki suggests to use this function to update Emacs' PATH, (...
0
votes
0answers
77 views

How do I type … in the TUI?

When I call describe-key and enter … (Alt Gr + .), it says M-b runs the command backward-word […] and async-shell-command (bound to M-&) is called. I'm on Linux with Xorg, the terminal emulator is ...
1
vote
1answer
20 views

When emacsclient open with eval using use-package it opens waiting M-x

I am trying to create a bash alias to open emacs with a calendar from terminal. To do so I am using calfw with use-package like so: (use-package calfw :ensure ;TODO: :config (require 'calfw) (...
1
vote
1answer
170 views

How to suppress `When done with a buffer, type C-x #` warning message?

When I open a buffer I keep seeing following message: When done with a buffer, type C-x # in the minibuffer. => Is it possible completely to suppress this message? I am using emacsclient -t -q to ...
0
votes
1answer
97 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 ...
2
votes
0answers
24 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
30 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
50 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
130 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.) ...
2
votes
0answers
284 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
60 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
53 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
125 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
123 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
37 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
98 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
33 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
41 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
253 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 ...
2
votes
0answers
203 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
430 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
2answers
494 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
409 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-...
2
votes
1answer
155 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
491 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
212 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
83 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
99 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 ...
3
votes
2answers
1k 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
84 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
116 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
87 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
97 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?

1
2 3 4 5 6