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
23 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 ...
2
votes
1answer
280 views

How do you hook up git to emerge through emacsclient?

I previously had the following script in a file called .emacs.d/emerge-for-git: #!/bin/sh emacs -Q $* And In my .gitconfig: [merge] tool = emerge [mergetool "emerge"] path = /home/rovanion/....
1
vote
0answers
86 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 ...
2
votes
1answer
75 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
153 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 ...
2
votes
1answer
1k 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
152 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 ...
2
votes
1answer
691 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 ...
4
votes
1answer
643 views

From an external script, open file and run some simple expression whether emacs already running or not

Context / initial need (works fine) I wrote and use a script that generates a file and uses emacsclient to edit it in an existing or new instance of emacs, in a new window. Similar to Set up Emacs ...
2
votes
1answer
684 views

server-edit vs kill-buffer to kill an emacsclient buffer

I use emacsclient to open files from my webrowser (pdfs, text files etc). When I'm done with the file, I know I need to close it with C-x # (server-edit); if I use C-x k (kill-buffer) I get a warning ...
1
vote
1answer
220 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 ...
3
votes
2answers
921 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 ...
4
votes
1answer
380 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
598 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
140 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 ...
0
votes
1answer
81 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 ...
8
votes
2answers
406 views

Emacs can't save history of recent visited files opened in current session before shutdown

I have a problem with emacs started as daemon using Systemd. Every shutdown/reboot if I don't stop emacs daemon service manually, the history of recent opened files in current session is lost. I ...
7
votes
2answers
2k 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 ...
4
votes
1answer
157 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 ...
2
votes
1answer
325 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 ...
3
votes
0answers
247 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 ...
3
votes
1answer
561 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 ...
7
votes
1answer
1k 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 ...
6
votes
4answers
1k views

Emacs cursor color is different in daemon and non-daemon modes

There's some weird stuff I encounter when running Emacs under KDE. Here's how it looks when I run it normally, via the emacs command: If I run it as a daemon, here's what I see: And if I run ...
11
votes
2answers
979 views

Make emacsclient create a frame only if there isn't one already

How can I make emacsclient -a '' -n create a new frame only if there isn't one already? The problem with the -c flag is that it creates a new frame every time. The problem without it is that if there ...
1
vote
1answer
165 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 ...
4
votes
1answer
902 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 ...
3
votes
0answers
958 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
63 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 (((...
17
votes
0answers
1k views

How can I debug random Emacs server crashes?

I generally have a long-running instance of emacs --daemon, which I connect to with various emacsclients. Recently I have started experiencing random crashes. I say "random" because I haven't been ...
1
vote
1answer
154 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
566 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
220 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
73 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....
0
votes
1answer
23 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 ...
2
votes
1answer
427 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 ...
1
vote
1answer
123 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 ...
3
votes
1answer
50 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 ...
2
votes
3answers
191 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
4
votes
2answers
2k views

emacsclient can't open display :0

My problem is very similar to this one from Unix & Linux Exchange. I use systemd to start emacs --daemon as my user account. Recently I have had the following problem when trying to open a new ...
2
votes
1answer
1k views

Running code on emacsclient connect

My emacs installation has over time grown so that the startup has started taking multiple seconds. The only feasible way to run emacs then is in daemon mode and then connecting with emacsclient. In my ...
2
votes
1answer
451 views

Opening frames from emacs-daemon

How do I open a frame at start-up when using emacs --daemon? I don't run emacs --daemon directly. Instead, I use emacsclient -c -a '' which starts an emacs-server if there isn't one running already. ...
4
votes
1answer
438 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, ...
0
votes
1answer
126 views

Helm command in `emacsclient -c` does nothing

I am trying to bind a keyboard key for a new emacsclient frame running a specific helm command helm-locate like that: emacsclient -c --eval '(helm-locate)' It does not seem to work (no new frame ...
3
votes
1answer
603 views

Specify name on emacsclient first frame

I would like an emacsclient frame with a specific name to open when I log into my computer. I tried adding emacsclient -e '(select-frame (make-frame (quote ((name . "scratchemacsframe")))))' to my ...
16
votes
2answers
508 views

Collapsing undo history

I'm working on an Emacs mode that lets you control Emacs with speech recognition. One of the problems I've ran into is that the way Emacs handles undo doesn't match how you would expect it to work ...
8
votes
3answers
3k 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 ...
2
votes
2answers
371 views

Is it possible to figure out which package/script takes most of the startup time?

I used to run Emacs on Linux using Emacsclient, it is really easy and great experience: emacs --daemon emacsclient When I work on a Windows machine, Emacs starts very slow. It seems there's no ...
2
votes
1answer
113 views

Reloading files from disk in frame with emacsclient

This may be user error, but if I open a file with emacsclient -c file.tex then if I try to reload the file using C-x C-v, then I get the usual Find alternate file: but if I press enter on that, I ...
3
votes
3answers
796 views

Open buffer in a specified frame

Do frames in emacs have a handle the way buffers do? In particular, can I specify that a particular file should be opened in a specified frame? I would like to have two frames where I use one for ...