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
3
votes
1answer
982 views

Debugging - emacsclient: error accessing server file “server”

I got the not terribly helpful error message recently trying to connect emacsclient to a emacs daemon using tcp sockets. emacsclient: error accessing server file "server" Looking at the source, its ...
2
votes
1answer
48 views

Set mark when jumping from emacsclient

I use AucTeX to edit LaTeX files and a PDF viewer that supports inverse search using SyncTeX. When I click on a location in the PDF, it simply calls emacsclient with the corresponding file and line. ...
5
votes
1answer
123 views

How to have C-g *not* cancel emacsclient eval commands?

I'm sending some commands to my emacs using emacsclient --eval on a timer. The only problem with this is if at the time I happen to be using emacs and press C-g to cancel something, instead of ...
2
votes
1answer
410 views

How to transfer special characters like äöü in the command line to emacsclient?

I try to create an interaction between Emacs and other applications, e. g. Microsoft Office. For example I have defined a VBA Macro in MS Outlook which starts a search in Emacs: strEmacsclientPath = ...
1
vote
1answer
529 views

Emacs client starts in no windows mode

I have the following in .bashrc. export ALTERNATE_EDITOR="" export EDITOR="emacsclient -t" When I run, for example emacsclient something.tex & when running X, in a Konsole terminal (Konsole is ...
2
votes
3answers
953 views

Open a frame for the first time (using `emacsclient -c`) showing other buffer than *scratch*

I have emacs configured to start org-agenda automatically and show it instead of *scratch*. Like this: (add-hook (quote after-init-hook) (lambda () ;; ... (...
3
votes
1answer
660 views

emacs --daemon frozen when started with emacsclient file

This is somewhat of a follow up to Prevent emacsclient from blocking other instances. I am using emacsclient -a '' -nw --socket-name=$TTY where TTY=$(basename tty). I use emacs in the terminal and ...
13
votes
3answers
1k views

Is there any way to run a hook function only once?

The context I'm using the after-make-frame-functions hook to load properly the themes in an emacs client/server configuration. Specifically this is the code snippet that I use to make that (based in ...
6
votes
1answer
693 views

Make emacsclient open multiple files in separate windows

When I open multiple files at once with emacs, like emacs file1 file2, it opens the two files side-by-side (in different windows in the same frame). But when I do the same with emacsclient, it only ...
3
votes
1answer
405 views

Prevent emacsclient from blocking other instances

I use emacs in the terminal, typically with many emacs instances running at once in different tabs. This is a perfect use case for emacsclient, but it has always had various glitches that have stopped ...
3
votes
1answer
281 views

function calls from command line, using emacsclient

I used to read my emails from command line with emacs -f gnus. To read my emails using emacsclient, I'm doing emacsclient -c --eval '(gnus)'. Just want to know, is there a simpler alternative to that? ...
6
votes
2answers
174 views

Open edit-server files from emacsclient in a specific frame

Is there a way to designate a specific frame in which files opened with emacsclient will appear? I have one monitor that is dedicated to a fullscreen Emacs frame. I do most of my editing in that ...
8
votes
2answers
3k views

Equivalent to --no-wait for emacs

The emacsclient program allows a flag --no-wait (abbreviated as -n) which will cause the emacs server to visit the specified file, and return immediately. emacsclient -n ~/.bashrc If I provide an ...
3
votes
3answers
200 views

Inserting org-style links from external program

I have written this function to insert an org-style link to a file: (defun jay/insert-file-link (fname) "Insert link to file (called by Midnight Commander)." (interactive "s") (insert "[[") (...
7
votes
2answers
4k views

Multiple Emacs instances each with their own server?

In my setup, I have several (GNU) Emacs instances running simultaneously on my local machine, one for each project or task that I'm currently working on. I would like to be able to open buffers in an ...
8
votes
1answer
1k views

How to prevent emacsclient starting a new frame every time?

I have Ubuntu 12.04 running with Emacs 24.3. On computer startup, emacs --daemon is executed, and I have modified the emacs24.desktop to take emacsclient -c -a "" as exec parameter. However, whenever ...
44
votes
4answers
18k views

How do I use emacsclient to connect to a remote emacs instance?

I'd like to be able to run emacs on one computer: server $ emacs --daemon And then connect to it from another: local $ emacsclient -c server Is this possible? If so, how?
25
votes
5answers
7k views

Emacsdaemon and Emacsclient on Mac

OS: OS X 10.9.5, Mavericks GNU Emacs 24.3.1 (x86_64-apple-darwin13.1.0, Carbon Version 1.6.0 AppKit 1265.19) of 2014-04-03 on Rainers-MacBook-Pro-3.local I installed emacs via homebrew from ...
44
votes
7answers
3k views

How can I use my local Emacs client as the $EDITOR for remote machines I access over TRAMP?

I often use TRAMP to manage several remote servers, both for editing files and running remote shells in shell-mode. However, this does not work when a command uses the EDITOR variable to edit a file, ...
13
votes
2answers
3k views

Using daemon mode in Gnome 3

I've gotten the Emacs daemon to work through the command line using the EmacsWiki page, but I'm stuck on how to get the client to run through the Gnome 3 launcher. How can I set up a Gnome desktop ...