Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

0
votes
1answer
39 views

Emacs: Error message when sending a region to a sql connection buffer: Wrong type argument: processp, nil

Based on the article here: https://emacsredux.com/blog/2013/06/13/using-emacs-as-a-database-client/ I wish to have a .sql buffer to edit my queries and once prepared send it by (C-c C-r) to an already ...
0
votes
0answers
32 views

Setting up emacs systemd unit with pyenv

I'm running Emacs daemon as a systemd service for fast opening of editor windows using emacsclient. Now if I start an emacsclient, it does not detect the python version set by pyenv via the ...
1
vote
1answer
27 views

output emacs buffer to another terminal window

I'm wondering if it's possible to have a terminal windows running emacs talk to each other (running in a server environment) For example: Open an instance of emacs in one terminal window. Open up a ...
1
vote
1answer
73 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
1answer
67 views

How to use emacsclient in terminal to switch git branches?

I'm trying to make a setup that will use emacs as a command line tool to switch git branches. The idea is to run some command in terminal, something like emacsclient -t -e "(magit-checkout)". This ...
4
votes
1answer
135 views

Why does using emacsclient from a remote host connect to the right socket, but I see nothing in my local Emacs?

I'm running a TCP server locally, and I'm trying to open a file from a remote host on my local Emacs through emacsclient. The reason for this is that I have emacspeak running locally which gives me ...
0
votes
0answers
41 views

Using Emacs as a daemon (emacsclient) exhibiting weird behavior

Whenever I use Emacs as a daemon it seems like my init file isn't being fully loaded. My keybindings in particular are acting very odd. I use some unorthodox keybinds; for example: Ctrl+u = ...
0
votes
1answer
70 views

emacs --daemon crashes when parent ssh session dies

I'm using emacs 26.1 (although I don't think this is a new issue with this verison). Note - this is not the GTK bug which results in the daemon crashing if X Connectivity is lost. I am aware of that ...
1
vote
0answers
27 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
votes
1answer
32 views

Eshell - ./hello command not found(gcc)

emacs was installed by Msys32 on Win7 32bit! gcc can't run hello.c on eshell but on minibuffer, Why?
0
votes
1answer
18 views

Empty buffer shows when using emacsclient on windows

I am using GNU Emacs for Windows alongside of cygwin, and I want to set my EDITOR shell variable to be emacsclient -a=. My problem is that when certain programs try to use EDITOR to launch an editor ...
0
votes
0answers
23 views

How to open file in emacsclient in current tmux pane?

I cant get tmux to run command to open file in emacsclient. I have that in tmux config: bind -n M-F run "emacsclient -c /home/sandric/.tmux_history" Executing shortcut gives me error "emacsclient ...
0
votes
0answers
48 views

Emacs client doesn't connect to running server on Windows

I have fresh new installation of emacs altogether with spacemacs. I set env vars for alternate editor and server file. My server file after starting emacs looks like: 127.0.0.1:64518 11948 'M.P$#NT[...
0
votes
0answers
62 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
238 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
42 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
19 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
0answers
32 views

mutt in emacsclient: how to get the focus back to mutt?

I want to have the focus back to mutt after writing an email in emacsclient. I saw few options on the web, incuding this one (see below) But I am not sure how to implement it. Where should I paste ...
0
votes
1answer
44 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
87 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
39 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
85 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
35 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
59 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
34 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
78 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
3answers
309 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
76 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 ...
0
votes
0answers
17 views

del indent of different tab spaces throughout file

ie this is what I have breeze tezztr alsdkfjalsk asldkfjlsadkjfa sa;ldjflsakdjf;lsa asdlfkjdsa; aslkdjflsakjf;ls a;slkdjf;lsakjf where I want it all to be breeze tezztr alsdkfjalsk ...
0
votes
2answers
216 views

Emacsclient freezes on terminal

I run Emacs 25.3 on Mac OS X. I installed it with brew cask. I launch frames with the following set of scripts taken from here I open GUI frames with emacsclient like below #!/bin/bash # Number of ...
4
votes
1answer
61 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
46 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
36 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 ...
3
votes
0answers
35 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
148 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
226 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
73 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
207 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
75 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
117 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
66 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
1answer
64 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
42 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
158 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
406 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
190 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
0answers
124 views

Error in emacs org-mode table: “Match data clobbered by buffer modification hooks”

When I try enter a value within a cell in an org mode table I get the following error: "Match data clobbered by buffer modification hooks" It was suggested that the issue is: It is probably ...
0
votes
1answer
168 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
202 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
461 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 ...