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
112 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 ...
7
votes
2answers
385 views

Unable to connect using emacsclient

I am starting the emacs server using systemctl --now --user enable emacs That server is running, if I run systemctl --user status emacs I got $ systemctl --user status emacs ● emacs.service - ...
1
vote
1answer
172 views

Can I exit the second client without closing the first client's buffers that were opened in the second client?

First I ran emacs --daemon. Then in one shell, I ran emacsclient -nw and open several files in the buffer. Then in another shell, I did the same thing. At the same time I found that the file buffers ...
0
votes
0answers
37 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
1answer
79 views

emacsclient “unknown command” when opening file

Whenever I try to open a file with emacsclient (and emacs is running, and the server is running, and the socket is there), I get this error message: Marcins-MBP:docker-influxdb-grafana marcin$ ...
1
vote
1answer
161 views

How do I focus Emacs from elisp in macOS?

I want to focus emacs by running some elisp. I have tried using do-applescript and the following snippet to focus Emacs: if application "Emacs" is running then tell application "System Events" to ...
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
1answer
191 views

tool-bar in emacsclient

I have the following for ridding of the toolbar on startup in graphical mode in my init configuration: (if window-system (tool-bar-mode -1) ) the issue: it works fine (albeit slow...see this ...
2
votes
0answers
46 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 --...
1
vote
0answers
129 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
1answer
85 views

How to open a file using eval that works with '--alternative-editor'

The following command works to open a file in an existing emacs instance: emacsclient --eval \ "(progn (find-file \\"/a/b.txt\\") (goto-line 1) (forward-char 2) (recenter))" \ --no-wait \ --alternate-...
0
votes
1answer
137 views

How do I exit a serial terminal buffer using keyboard?

I am using emacs for Windows. I start a new terminal using serial-term. Once in that buffer, I cannot open a minibuffer or use meta keys to escape this shell. The only way I can navigate out is ...
1
vote
4answers
680 views

How to make homebrew emacsclient open files in Emacs.app frame from terminal?

When I run emacsclient -nc filename.txt in my terminal, emacs opens in my terminal. I would prefer it to open in the main Emacs.app frame. Similar to how the terminal shortcuts work for Atom.
0
votes
2answers
82 views

How do I do this autumagically in emacs

How do I get emacs to automatically format a large text file like section a to section b. I have tried using notepad++ and a macro, but it just froze my computer section a words wordss wordsss ...
4
votes
1answer
76 views

Access contents of buffers from outside

I want to access contents of emacs buffers from outside like in acme editor. Acme is in part a file server that exports device-like files that may be manipulated to access and control the contents ...
0
votes
1answer
96 views

Running some functions from emacsclient doesn't work

This works: emacsclient -s emacs -e "(call-interactively 'find-file)" But this one doesn't: emacsclient -s emacs -e "(call-interactively 'newline)" In fact, none of the functions I tried to ...
1
vote
0answers
55 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 ...
2
votes
0answers
59 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 ...
1
vote
1answer
200 views

Running emacs client: how do you know if the init files had errors loading

I use emacs 25, in nw mode, with "alias emacs='emacsclient -nw'" When I add something to my personal.el, I do brew services restart emacs My issue is, if I make a big blunder inside my personal.el ...
0
votes
2answers
448 views

How to check if my emacsclient is running in a GUI window?

Emacs version: 25.3.50.2 I'm using Fira Code font whose ligatures are now supported by Emacs. To solve this, I used this solution (I think it's not important, just to inform you), say, replacing the ...
0
votes
1answer
124 views

Kill buffer when closing emacs with emacsclient

I am using emacs for writing email with mutt. Email are stored in /tmp even after I sent them (until /tmp is cleared). Since I start emacs with emacs--daemon, I have all the emails I have written ...
1
vote
0answers
259 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/...
0
votes
1answer
115 views

Can emacsclient eval /run a file

Just a quick question, Can emacsclient evaluate/run Elisp code from a given file, or even better, from stdin?
1
vote
1answer
213 views

Use emacsclient as $EDITOR for zsh edit-command-line

I have emacsclient set as my $EDITOR. Yet, when I invoke the zsh function edit-command-line (C-x C-e) from Terminal I briefly see the Emacs frame open but then it closes immediately. How can I use ...
1
vote
1answer
160 views

How to open a a file:line:col that works with tabs?

Currently I'm using: emacsclient +12:34 some_file.txt This works for the line but not for the column, since tabs are expanded when calculating the offset. Is there a way to open a file at the ...
0
votes
2answers
147 views

Preserving Layout Using emacsclient

If I spawn Emacs in --daemon mode, I can then use emacsclient to connect to the daemon from within a terminal window. If this then dies, I can reconnect my terminal and my Emacs session is still ...
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
2answers
294 views

Dump list of current keybindings to standard out?

I like emacs, I like keybindings. I also like the command line and have a lot of keybindings. Is it possible to dump emacs keybindings to standard out so that I can search them with things like grep? ...
1
vote
1answer
697 views

How to exit emacsclient when C-x C-c doesn't work

I've been using emacsclient for a good while now, and in the past I've always used C-x C-c out of habit. This has never been a problem when using emacsclient -t as my terminal EDITOR for entering git ...
4
votes
1answer
311 views

How to detect the term color support inside of a emacsclient session?

I run a emacs daemon on boot as a OpenRC service without info about terminals. When I plug a different terminal on emacsclient so, I don't have env variables instead that was generated inside of emacs ...
0
votes
1answer
366 views

Unable to commit: There was a problem with the editor 'emacsclient -t' (dumb terminal)

I get the following error when trying to amend a commit (same if I try to make a new commit): 1 git … commit --amend *ERROR*: Terminal type "dumb" is not powerful enough to run Emacs error: There ...
3
votes
2answers
386 views

If emacsclient already open, new emacsclient should “inherit” its buffer list

My workflow involves splitting frames a lot because I use i3wm. If I use the emacs native make-frame-command, the new frame will be visiting the buffer I invoked the command in. If I call emacsclient ...
2
votes
1answer
734 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 ...
4
votes
2answers
77 views

Closing emacsclient after quitting calc?

I'd like to run calc in an emacsclient in my terminal, and then have that particular emacsclient session close completely and return me to my shell when calc quits. I've got the first part of that ...
4
votes
2answers
169 views

How can I get emacsclient --eval not to print things in an emacs buffer, but only on the command line?

So I have a hack to get my emacs org-clock to display in polybar (a system panel utility). It involves a script that looks like this: CLOCKSTRING=`emacsclient --eval "(if (org-clocking-p)(print (org-...
7
votes
5answers
2k views

Emacs client can't find server in terminal

So, I'm trying to set up emacs as a server but I'm having trouble getting it to work from the terminal. If I run emacs --daemon on some terminal I can connect to it if I run the emacsclient from that ...
0
votes
1answer
65 views

Emacsclient choosing the wrong emacs

I have Emacs running in deamon mode at /usr/bin/emacs --daemon I have been told to start emacs as client I can type emacsclient -c -a "" $* However, that command starts up a new version of the GUI ...
8
votes
2answers
2k views

Setting up emacsclient on MS windows

I am trying to set up the emacs server daemon and use emacsclient on MS Windows so that files can be opened quickly without the delay and overhead associated with starting additional instances of ...
1
vote
2answers
115 views

emacs: saving org headline visibility

I have an org file at ~/foo.org it looks like this (see bottom of this question) I reboot my pc every day, and the first thing I do is open this file. Then I do the mundane task of pressing tab to ...
4
votes
2answers
2k views

less psql, more emacs

I was listening to this song today - https://www.youtube.com/watch?v=ajy71xw351E Don't Wanna Leave You Now 🎵 🎶 and I realized how much I don't want to leave emacs. I often do this after ...
2
votes
1answer
195 views

How do you grep from within emacs ( git grep 'foo' | grep baa )

I do this often after shelling out to bash $ git grep 'banner-image' | grep mb3 Can I do it without leaving emacs?
2
votes
1answer
334 views

How to run emacsclient from applescript?

I am using https://github.com/sprig/org-capture-extension which is a cool Chrome extension to capture links while browsing. The setup on OS X requires defining an Applescript application which is ...
1
vote
1answer
2k views

Setting up emacsclient (OSX)

I am trying to set up emacs to run as a server to avoid the time required to open individual sessions for each file. This is on OS X El Capitan. Using the instructions provided here, I have the first ...
8
votes
1answer
858 views

start emacsclient with focus from command line

When I start emacsclient from command line as below: emacsclient -a '' -c "$@" It always starts in the background (terminal window on top of emacsclient window), so I have to use mouse to click the ...
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 ...
3
votes
1answer
749 views

Attempt to delete minibuffer or sole ordinary window

I have a daemonized emacs, and I'm able to close any emacs frame, even the last one, using the window manager or old good C-x C-c, just to be able to retrieve all my buffers when i ask the daemon for ...
2
votes
0answers
156 views

reopening emacsclient -t with desktop-save-mode doesn't save buffers/frames in place [duplicate]

I added (desktop-save-mode 1) to my custom.el towards the end to save buffers and frames. But I primarily use emacs --daemon and start an emacsclient -t. For some reason, if I use just Emacs the ...
0
votes
1answer
48 views

Linking Multiple Implementation Files in C on Emacs

I need help with linking multiple c source code files on emacs. Could anyone show me the way on how to work this out? Thanks!
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
211 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 ...