Emacsclient Error Accessing Server File
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the emacs error accessing server file company Business Learn more about hiring developers or posting ads with us Stack Overflow
Emacsclient Does Not Start
Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Emacsclient server name not recognized up vote 1 down vote favorite 1 I would like to have emacsclient connect to a given Emacs server from command line. Reading the manual Using Emacs as a Server I thought I could do something like: emacs --eval '(server-start)' --eval "(set-variable 'server-name \"foo\")" --no-splash fileA & and then later: emacsclient -s "foo" -n fileB But this gives error: emacsclient: can't find socket; have you started the server? To start the server in Emacs, type "M-x server-start". emacsclient: error accessing socket "foo" However, I can do: emacsclient -e '(prin1 server-name)' which gives "foo" emacs elisp emacsclient share|improve this question asked Aug 13 '14 at 13:24 Hakon Hægland 8,57352262 add a comment| 1 Answer 1 active oldest votes up vote 2 down vote accepted You must set the name before you start the server: emacs --eval '(setq server-name "foo")' --eval '(server-start)' --no-splash fileA & share|improve this answer answered Aug 13 '14 at 13:48 Stefan 19.7k12049 Thanks! This works :) –Hakon Hægland Aug 13 '14 at 13:55 add a comment| Your Answer draft saved draft discarded Sign up or log in Sign up using Google Sign up using Facebook Sign up using Email and Password Post as a guest Name Email Post as a guest Name Email discard By posting your answer, you agree to the privacy policy and terms of service. Not the answer you're looking for? Browse other questions tagged emacs elisp emacsclient or ask your own question. asked 2 years ago viewed 161 times active 2 years ago Related 3how to run certain elisp code after starting a new emacsclient frame?1Desktop.el under emacsclient1emacsclient not evaluating color-theme?3How to set emacsclient background as Emacs background?7Emacs: Get new-frame and emacsclient -c to use set frame size?4Evaluate emacs lisp expession on command line41Using Emacs server and emacsclient on other machines as other users1Ho
How to create a server file? Date: Sun, 17 Mar 2013 23:02:08 +0000 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux) Hi Stefan, Stefan Husmann
writes: > Hello, > > when I try to open a file with emacsclient, I get > > emacsclient -f ~/.emacs.d/se .emacs > emacsclient: error accessing server file "/home/haawda/.emacs.d/se" > > If I do not specify the server file with -f, I get a similar message, but > wit ~/tmp/server. The server files do not exist. How can they be created? > And why is ~/tmp the default? > > I am on http://stackoverflow.com/questions/25287475/emacsclient-server-name-not-recognized Arch Linux. My emacs is a selfcompiled version from the xwidget > branch, but the behaviour also happens with an emacs from trunk with lucid > gui. Is the server already running? If not, one good technique is to run emacsclient -a "" or have ALTERNATE_EDITOR="" in your environment. Either way, this will cause emacsclient to start an emacs --daemon in the background and https://lists.gnu.org/archive/html/help-gnu-emacs/2013-03/msg00264.html then connect to it, rather than just exiting with an error that it can't find the server. I am not sure why ~/tmp/server is the default server file for you. Perhaps it has to do with the prefix you used when configuring? -- Regards, WGG reply via email to [Prev in Thread] Current Thread [Next in Thread] emacsclient does not start: How to create a server file?, Stefan Husmann, 2013/03/17 Re: emacsclient does not start: How to create a server file?, William Gardella<= Re: emacsclient does not start: How to create a server file?, Stefan Husmann, 2013/03/17 Re: emacsclient does not start: How to create a server file?, William Gardella, 2013/03/17 Re: emacsclient does not start: How to create a server file?, Stefan Husmann, 2013/03/17 Re: emacsclient does not start: How to create a server file?, Stefan Husmann, 2013/03/18 Prev by Date: About `current-kill' Next by Date: Re: emacsclient does not start: How to create a server file? Previous by thread: emacsclient does not start: How to create a server file? Next by thread: Re: emacsclient does not start: How to create a server file? Index(es): Date Threadcygwin distro does not work with Cygwin emacs From: https://cygwin.com/ml/cygwin/2012-03/msg00380.html Markus Hoenicka
emacsclient -s /tmp/emacs501/server tmp.txt ってやれば動く。「/tmp/emacs501/server」の部分の名前がなんかで書き換わってしまったのかなぁ。 $ export EMACS_SERVER_FILE=/tmp/emacs501/server $ emacsclient tmp.txt emacsclient: error accessing server file "/tmp/emacs501/server" ぐへー。 あー、これは $ emacsclient -f /tmp/emacs501/server tmp.txt emacsclient: error accessing server file "/tmp/emacs501/server" この挙動で、やるべきなのは-sか。 あー、しかもそれで動かしてもファイル名が -dirになってたり、C-x #してもemacsclientが終了しなかったり、ずたずただ。どうしたらいいんだこれ。 あーあーわかった /Applications/Emacs.app/Contents/MacOS/bin/emacsclient tmp.txt これなら今まで通り動く。 $ which emacsclient /opt/local/bin/emacsclient $ emacsclient --version emacsclient 23.2 $ /Applications/Emacs.app/Contents/MacOS/bin/emacsclient --version emacsclient 22.2.50 ということらしい。 ツイートする Permalink | コメント(0) | トラックバック(0) | 00:05 コメントを書く 投稿したコメントは管理者が承認するまで公開されません。 スパム対策のためのダミーです。もし見えても何も入力しないでください 画像認証 トラックバック - http://d.hatena.ne.jp/nishiohirokazu/20100715/1279206313 リンク元 38 https://www.google.co.jp/ 20 http://reader.livedoor.com/reader/ 13 http://www.google.co.jp/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&ved=0CPgBEBYwAA&url=http://d.hatena.ne.jp/nishiohirokazu/20100715/1279206313&ei=c1fyT6_5NoLgmAXB49jpDQ&usg=AFQjCNGDxkjMw0fk1V2-JajkjBsRVFFjuQ&sig2=Sy06lMVCHN9fHFyObFcp6g 11 https://www.google.co.jp 6 http://a.hatena.ne.jp/qoo-icpc/ 6 http://www.google.co.jp/url?sa=t&rct=j&q=&esrc=s&source=web&cd=2&ved=0CF0QFjAB&url=http://d.hatena.ne.jp/nishiohirokazu/20100715/1279201976&ei=_xvGT9DRF4SDmQXy7N29BQ&usg=AFQjCNGYYHcZR9n7utjC4V-3XfPQ9PfekA 4 http://www.google.co.jp/reader/view/ 4 http://www.google.co.jp/reader/view/?hl=ja&tab=wy 4 http://www.google.com/reader/view/ 4 https://www.google.com/