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

How to prevent the "Emacs (Client)" launcher from creating a new "Emacs" instance on the dock?

When I click on the "Emacs (Client)" icon it creates a new client window under the "Emacs" label. This creates two different icons on the dock. How can I merge them together? I ...
  • 26
0 votes
0 answers
14 views

setting up a remote emacs pairing session without access to the filesystem [duplicate]

I'm just wondering if it's possible to setup an emacs pairing session over ssh where in one session, I have access to the filesystem but the other person I'm pairing with doesn't?
  • 577
0 votes
0 answers
18 views

Preventing emacsclient eval from messing up my terminal

I use emacs as info viewer from the terminal, but if the info page does not exist (or there is any other error) the terminal (regardless of Kitty or Konsole) becomes hardly usable, not properly ...
  • 266
0 votes
0 answers
27 views

`C-x C-;` freezes emacs

This hasn't been happening every time, though once it starts it's consistent while emacs is running at least. It claims to be bound to comment-line as usual, but I can't actually run it through C-h k ...
1 vote
1 answer
36 views

emacsclient starts a new instance instead of contacting the server started by systemd

Log into Gnome emacs-server is started by systemd, using the default configuration of my distribution (Fedora 36): [Unit] Description=Emacs text editor Documentation=info:emacs man:emacs(1) https://...
  • 360
0 votes
2 answers
67 views

How to always work from a daemon and always reuse an existing frame? (bonus: do it with chemacs2)

I'm new to emacs. I'm a spacemacs implant, really love ORG mode and evil mode. Been using for the past year or so. I've read some of the emacs documentation, which is fantastically written. But I'm ...
0 votes
1 answer
33 views

Emacs Daemon Multiple user on Mac best practices

I'm new to Emacs, so apologies if this is covered elsewhere. I'm running latest macOS 12.4; and downloaded emacs.app from emacsformacosx.com so I'm on Emacs 28.1-4 . I have an admin user, which I ...
  • 101
0 votes
0 answers
41 views

Is there a way to create a emacs shotcut that runs a specific terminal command before opening emacs?

a friend of mine recomended that I use a program called obsidian to make notes,and I quite liked the idea, but i didn't like the program. I have been searching and it seeams to me that org-roam in ...
0 votes
0 answers
24 views

Z-Order of Emacs Client Not Layered Top-Most

System & related settings: Fedora 35 (using Cinnamon Desktop) Emacs 27.2 focus mode: "sloppy" with "raise-on-click" disabled Contrary to all other applications, including the ...
  • 307
1 vote
0 answers
57 views

Custom org-capture find headerline function error, wrong number of arguments

So, I managed to get my headline retrieval function fixed, so now the function searches and finds my header lines, but when I select the one I want to use.. it oddly throws back this apply: Wrong ...
1 vote
1 answer
114 views

How do I make org capture prompt for specific header target?

I need help writing a function that makes Org Capture prompt me of what it should place the capture to a specified header in my tasks org file (basically I need it to search through the specified org ...
1 vote
1 answer
101 views

Running a program from elisp that runs `emacsclient` set on `$EDITOR`

I'm automating some work tasks, and many of them consist of calling kubectl edit on different objects. kubectl edit basically opens your $EDITOR which I have configured to be emacsclient. My question ...
  • 207
3 votes
0 answers
59 views

What are the differences between multiple ways to "close" an emacsclient?

As a standalone instance (without daemon mode) I close my emacs via C-x C-c (save-buffers-kill-terminal). This works also with emacsclient and I see no problem about that. But the manpage of ...
  • 599
1 vote
0 answers
21 views

How to trigger debugger on emacsclient error

I asked in a prior question about what might be causing my emacsclient widows to shutdown immediately with the following output on stderr: "ERROR: Beginning of buffer". I have tried to use ...
0 votes
0 answers
64 views

emacsclient closes immediately on "*ERROR*: Beginning of buffer"

I have an app where I call emacsclient to do some editing on an org file. When it calls it, the frame flashes for an instant, then closes immediately. On stderr, I get the following message: *ERROR*:...
0 votes
0 answers
28 views

How to use emacs client/server on sysVinit?

I'm on sysVinit init system on devuan. Anybody please help me on how can i enable client server on booting as like in systemd .
1 vote
1 answer
52 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 ...
  • 123
0 votes
1 answer
94 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 ...
2 votes
0 answers
379 views

how to update emacs packages from the command line

I want to be able to update Emacs packages from the command line and then quit. I have written this function (defun updateandquit () (configuration-layer/update-packages t) (spacemacs/...
0 votes
2 answers
326 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
1 answer
78 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
2 answers
105 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
0 answers
33 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: ...
  • 183
0 votes
1 answer
58 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
0 answers
87 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
0 answers
2k 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
0 answers
75 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)))) ;; ....
  • 375
0 votes
1 answer
148 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
1 answer
31 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 ...
  • 123
1 vote
1 answer
140 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}-...
  • 11
1 vote
1 answer
114 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. ...
1 vote
1 answer
50 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 ...
  • 1,072
6 votes
1 answer
2k 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, (...
  • 1,414
0 votes
0 answers
118 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 ...
  • 105
1 vote
1 answer
41 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) (...
3 votes
1 answer
237 views

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

When I open a buffer I keep seeing following message in the minibuffer: When done with a buffer, type C-x # . Is it possible completely to suppress this message? I'm using emacsclient -t -q to open ...
  • 1,072
0 votes
1 answer
170 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 ...
  • 141
2 votes
0 answers
51 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 (...
  • 121
0 votes
0 answers
53 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 ...
2 votes
1 answer
254 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
1 answer
799 views

Emacs daemon does not load my init.el completely but plain emacs does

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 ...
  • 63
0 votes
2 answers
90 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 `...
  • 1,414
0 votes
0 answers
68 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 ...
  • 630
0 votes
0 answers
196 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
0 answers
188 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
0 answers
55 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
1 answer
194 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? ...
  • 163
0 votes
0 answers
38 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 ...
  • 111
2 votes
1 answer
62 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 ...
  • 145
0 votes
0 answers
414 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,072

1
2 3 4 5
7