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
4
votes
2answers
2k views

How to paste from clipboard litterally into emacsclient within an ssh session?

This is a long-standing problem that I haven't found a solution for months. I sometimes copy text or snippet from somewhere relse and paste into my emacsclient in the Terminal by Ctrl + Shift + V (...
1
vote
2answers
1k views

Please help me get emacsclient working

OS X 10.11 Emacs 24.5: /Applications/Emacs.app emacsclient: /Applications/Emacs.app/Contents/MacOS/bin-x86_64-10_9/emacsclient (server-start) in my .emacs file % emacsclient some-file Result is: /...
2
votes
1answer
285 views

Emacsclient not focusing if called with --eval argument from terminal

I wish to call man function in emacsclient when I typing "man smth" in terminal. When I open files from iterm via emacsclient - emacs gaining focus and when I kill buffer - terminal gaining focus back....
3
votes
1answer
305 views

emacsclient, c-x #, c-x c-f and other confusion

I have used emacs for several years now and wanted to make the leap to daemon mode and using emacsclient. What has prevented me so far is getting ride(closing) of buffers opend via emacsclient. Note ...
2
votes
1answer
939 views

How do I configure home-brew-provisioned emacs to run a GUI-based emacsclient properly?

Configuration MacOSX 10.11.5 emacs version 24.5.1 brew 0.9.9 I want to have the following behavior in my emacs setup: At login, automatically start an emacs server process. Running the /Application/...
11
votes
2answers
3k views

emacsclient to access remote emacs server

I'm trying to open an emacsclient session from a remote host. I walked through the following steps on the tramp website How can I use TRAMP to connect to a remote Emacs session?. I'll walk you ...
2
votes
1answer
299 views

`server-start` hook?

Is there a hook to execute stuff after I've run emacs --daemon? I'd like to keep load stuff only when running emacs --daemon and not when running emacs. I know it sounds like using square wheels, but ...
2
votes
1answer
1k views

Emacsclient not working

I have been using OS X forever. I have been using Emacs forever. I currently use the MacPorts Emacs.app and do (server-start) in my .emacs file. I can't get emacsclient going: > which emacsclient /...
0
votes
2answers
516 views

emacsclient - discard unsaved changes on exit

I run emacs --daemon and emacsclient. When I C-x C-c from emacsclient, it will show the prompt Save file /dir/filename.txt? (y, n, !, ., q, C-r, d or C-h) for each file that has changes that haven'...
6
votes
1answer
1k views

Determine graphical display on startup for emacs server/client

I am trying to have specific settings when I start a new emacs frame in X as opposed to in the terminal while using emacs-server. My initial attempt was using this solution, but it appears it isn't ...
4
votes
1answer
403 views

Get emacsclient to reuse exising X-window, iff any [duplicate]

I'm trying to set my desktop environment to use emacsclient to open text files. I would like only one emacs x-window to be opened. Yet I don't know which command can be used to have an x-window ...
4
votes
1answer
307 views

emacsclient directly start eshell command command line

Both of the following work to call a graphical/terminal eshell: emacs -f eshell emacs -nw -f eshell Furthermore, this 2-step process also works: `emacsclient -t -a '' /some/real/file/name Metax ...
0
votes
1answer
261 views

Can't find autocomplete on MELPA

So I'm following this guide and when I go to M-x package-list-packages there is no auto-complete in the directory. ; start pacakage.el with emacs (require 'package) ; add Melpa to repository list (...
2
votes
3answers
246 views

Why is Emacsclient inserting quotes around output strings?

I would like to have output from Emacsclient without quotes, but $ emacsclient -s my-server -e '(princ "hello")' gives output: "hello" Expected output would be: hello
0
votes
1answer
249 views

Python server with Elisp Emacs client

Trying to make a small example on how to do IPC with Elisp using Python for the server. My source of information is this Here is the code I have right now. my-process.el (let ((process-connection-...
0
votes
0answers
25 views

Odd filename parsing error when scripting emacsclient on OSX

I get the same error as this Stack Overflow asker when trying to use a wrapper script to tell OSX where the emacs server socket is: I don't think it's a bash issue, as the Emacs PID is correctly ...
1
vote
1answer
465 views

I am using emacs on window OS, possible to use multiple monitor?

I got 2 monitors, but emacs can only use one, can I use both of them, so that I could split windows cross both monitors? so If I want to create 2 windows, then each monitor could show me one windows.
5
votes
2answers
242 views

How to load start up screen (*GNU Emacs*) f it hasn't already been created?

When you run Emacs in daemon mode and then connect to it with emacsclient it doesn't show the start screen (*GNU Emacs*) but instead puts you into the *scratch* buffer, which is normally fine. But if ...
0
votes
0answers
31 views

Emacsclients locks up on mini-buffer use [duplicate]

If you start emacs --daemon -q and then connect two emacsclients to it. If you press C-x C-f or anything that activates the minibuffer - no input to the other emacsclients will be accepted until that ...
1
vote
0answers
97 views

Running emacs server via systemd prevents inverse search and nice view

Background: I am using systemd to run my emacs server and my usual workflow always involves invoking emacsclient. Both server and client are on the same computer running Debian Jessie. The method is ...
1
vote
1answer
105 views

Separate Environments for each emacsclient

I have a single emacs server that I use for all of my work. It is located on a machine that I ssh into from every location. My 'browse-url is set to run a bash script that ssh's into the machine I am ...
1
vote
1answer
218 views

Enable smerge-mode for already opened file

smerge-mode doesn't always get enabled for git merge conflicts. I think this happens when I visit a file using emacsclient which is already opened in a buffer. Something (maybe magit?) is causing the ...
3
votes
1answer
2k views

Using emacs in client/server mode

I am trying to use emacs with a background server running and client instances. To do so, I lauch an emacs daemon with emacs --daemon. Then I open a client session with emacsclient -c. Doing like that ...
1
vote
2answers
182 views

Avoid to create a new window in sql mode

I use a monitor and a laptop screen as my multimonitor setup. Unfortunately the monitor and the laptop differs in resolution. So I use 2 frames, one frame on the monitor and one frame on the laptop ...
4
votes
1answer
453 views

emacsclient of 24.4 does not work on Yosemite

I have used emacsclient without any problem on OSX. Usually I just start Emacs server by emacs --daemon in Console, and then emacsclient works. I use emacsclient -nc to create a new frame. However, ...
2
votes
1answer
984 views

Forwarding emacs server TCP connection works, but cannot create local frame

I'm trying to connect to a remote Emacs server. I created the server with server-use-tcp set to t so a connection file was created. I inspected the connection file and found out that it contains the ...
3
votes
2answers
1k views

How can I force Emacs to open files in new frames?

When I open a new file I want it to pop-up in a new frame. I've set pop-up-frames to t, but it still opens files that I double-click in Finder in existing buffers which results in other buffers being ...
1
vote
1answer
260 views

Emacs daemon major mode startup

I load multiple daemons service at startup with systemd. The purpose of this is to have each one for different applications, one for C coding, one for Ocaml, one for Org... I have a configuration ...
4
votes
1answer
438 views

how to tell graphical Emacs to shutdown cleanly from tty1?

problem Lately I run GNU Emacs mostly as GUI on X/tty7 (which I'll call "the desktop" as opposed to emacs-desktop) on one of my Debian laptops. Occasionally the desktop hangs, in which case I usually ...
1
vote
1answer
891 views

Got “fatal: no tag message?” error when set git core.editor to “emacsclient -nc”

When I set the core.editor="emacsclient -nc", after I press "C-c C-c" in the .git/TAG_EDITMSG buffer, I got the error message: fatal: no tag message? But here is the content of .git/TAG_EDITMSG ...
5
votes
1answer
154 views

Is there an Emacs equivalent to Vim's arglist?

I often find myself in the situation of needing to open a bunch of files at the same time and run through them all and do something (search/replace, verify something or other, etc.). In vim, I'd do ...
1
vote
1answer
244 views

Can't disable auto-scrolling

When I scroll up or down, Emacs automatically recenters the current position of point. I tried to disable this behavior by adding the following code to my configuration: (setq scroll-margin 1 ...
3
votes
0answers
303 views

emacsclient doesn't start when visiting a file that is already open

I start emacsclient with emacsclient -a 'emacs-server-start' -nw --socket-name=$TTY, where emacs-server-start is a script that runs emacs --daemon="$TTY" (I use $TTY to get a different client for each ...
0
votes
1answer
106 views

Emacs and fortran 90. In which subroutine am I?

I have a long file.f90 with several subroutines. Sometimes I'm editing some subroutine and I forgot where I'm (I mean the name of the subroutine that I'm editing). I wonder what subroutine I am, I ...
4
votes
1answer
881 views

How to open a file with emacsclient from Thunar?

I want to use emacsclient to open files from Thunar in Linux Mint 17 xfce. I have tried right-click+"open with other application"+"emacsclient -c", but this does nothing. I have also tried writing a ...
4
votes
1answer
172 views

How to 'fix' gnuclient after opening a second instance of emacs?

If I open a second instance of emacs accidentally (which happens more often than I am willing to admit) and then close it, gnuclient starts responding with the following error: gnuclient: Connection ...
4
votes
1answer
1k views

“Error reading from stdin” after reboot

I've started using the emacsclient more along with the daemon, and I'm a huge fan, but it's started giving me trouble when I reboot my computer. After reboot when I open up a new emacsclient, I don't ...
2
votes
1answer
339 views

Crash when starting daemon but not when starting normal

OSX Yosemite 10.10.4, emacs installed via brew install emacs-mac GNU Emacs 24.5.1 (x86_64-apple-darwin14.4.0, Carbon Version 157 AppKit 1348.17) of 2015-07-20 on Rainers-MacBook-Pro.local I want ...
10
votes
1answer
2k views

How do I use emacsclient as EDITOR or VISUAL?

Scenario: I'm in zsh and I want to edit a long shell command in an already open instance of Emacs. I've set $VISUALto emacsclient -n -c. When I run C-x C-e from zsh, a new Emacs frame opens, populated ...
11
votes
3answers
4k views

Reload environment variables

This question has been asked at superuser is-there-a-way-to-reload-environment-variables-in-emacs, but no good solution was given. I am using EmacsClient with often more than 30 buffers open, if I ...
3
votes
0answers
1k views

When using emacsclient, how can I open the file in the active buffer?

When I open a file with emacsclient without invoking -c, Emacs visits the file in a new buffer in the background while leaving my current window configuration in place. I'd like to change this, e.g. ...
1
vote
0answers
83 views

Add commands after custom LaTeX split window view

I use (setq TeX-view-program-list (quote (("Emacs" "emacsclient -e '(split-window-horizontally 88) 'emacsclient -e '(other-window 1)'; emacsclient %o;")))) (setq TeX-view-program-selection (quote (((...
1
vote
1answer
144 views

Translating editing actions to keypresses for ansi-term?

For the speech recognition mode for emacs I'm working on I'd like to have support for working with the shell. I have shell-mode working fine but I'd really like to get ansi-term working since some ...
0
votes
1answer
26 views

Client window hung with no visible cause

I was editing some code in an Emacs client, when all of a sudden it stopped reacting to my input. If I killed the client and connected with a new one, I got a pretty strange behaviour: if I tried to ...
1
vote
1answer
173 views

Having clean-buffer-list skip buffers with server-buffer-clients?

I have Emacs run in daemon mode at system startup, and run emacsclient automatically when I login to X. I also recently started running midnight-mode, which regularly runs clean-buffer-list, which ...
1
vote
1answer
636 views

How can I avoid EmacsClient to wait under MacOSX when it starts the alternate editor?

Note: I had asked this question before under https://apple.stackexchange.com/questions/181007/emacsclient-waits-when-alternate-editor-is-used. I created the following script emc to invoke emacs (if ...
3
votes
2answers
274 views

Modify the modeline to show all emacsclients editing buffer

Is there a way to modify the Emacs modeline so I'll be able to see all the emacsclients or just the number of emacsclients actually editing/displaying the buffer I'm currently working on? I've found ...
1
vote
1answer
93 views

Using tab causes math in between `\[ \]` to move back two spaces instead of being align

Operating system: Ubuntu 14.04 Emacs version: GNU Emacs 25.0.50.1 (x86_64-pc-linux-gnu, GTK+ Version 3.10.8) of 2015-03-12 onlcy01-03 AUCTeX version: AUCTeX-version is a variable defined in `tex-site....
2
votes
1answer
543 views

Opening latex files works on one computer but not the other

On my primary computer, I have the following set up for emacs and everything works like a charm. I use emacs cvs, auctex cvs, and latexmk on a Ubuntu 14.04. However, I just put the same set up on ...
3
votes
1answer
55 views

KBD macros defined in emacsclient disappear when client is closed

I defined a macro in an emacs client, which was attached to my emacs server. I closed the client, and opened the client on a new file, and attempted to run the macro on the new file. In both the new ...