tag:blogger.com,1999:blog-3992530807750384868.post4482371347593312575..comments2022-03-28T08:42:20.497+03:00Comments on emacs-fu: emacs --daemonUnknownnoreply@blogger.comBlogger28125tag:blogger.com,1999:blog-3992530807750384868.post-71150946566213622842011-01-19T19:44:40.275+02:002011-01-19T19:44:40.275+02:00@Anonymous
Check:
(set-face-font 'default '...@Anonymous<br />Check:<br />(set-face-font 'default '"font name")<br />Font name:<br />M-x describe-fontAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-3992530807750384868.post-66707264325462694432011-01-18T09:14:16.842+02:002011-01-18T09:14:16.842+02:00Thanks for the nice tutorial. But my emacsclient h...Thanks for the nice tutorial. But my emacsclient has the -s option which allows me to define a different socket to connect to.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-3992530807750384868.post-81306073747180564102011-01-01T14:45:40.750+02:002011-01-01T14:45:40.750+02:00Since emacs --daemon doesn't create any frame ...Since emacs --daemon doesn't create any frame my frame-related configuration of .emacs is ignored when I lauch emacsclient -c (for example my set-default-font is ignored loading defaults)<br /><br />I mean no override configuration loaded on the emacsclient but it works well with just "emacs", do you have that problem?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-3992530807750384868.post-62346671924139615922010-12-18T00:18:05.815+02:002010-12-18T00:18:05.815+02:00I used update-alternatives to create an entry for ...I used update-alternatives to create an entry for emacsclient as an alternative for editor. I then set emacsclient as the default editor and set EDITOR="editor" in my .bashrc in order to get git on board with the change.<br />I also have emacsclient -c -a '' bound to the global shortcut Super-C. Since emacs makes a better terminal and screen than all the other "consoles" and terminals.freegnuhttps://www.blogger.com/profile/13789503355246876159noreply@blogger.comtag:blogger.com,1999:blog-3992530807750384868.post-35259319783020742912009-10-29T22:31:28.043+02:002009-10-29T22:31:28.043+02:00@Jérémie: had the same problem under ubuntu 9.10 w...@Jérémie: had the same problem under ubuntu 9.10 with the packaged emacs23 it all started working perfectly once i left out the "-c" option. this is fine for me since i have no need to differentiate between terminal and gui use.<br /><br />my editor command is: "emacsclient -n -a emacs %s"Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-3992530807750384868.post-77271586565089255062009-10-24T11:40:14.292+03:002009-10-24T11:40:14.292+03:00@Jérémie: first, I'd verify if that seem line ...@Jérémie: first, I'd verify if that seem line works on the command line. Also<br />note that e.g. Ubuntu come with menu entries for emacsclient already, which<br />you can drag to your desktop or wherever.djcbhttps://www.blogger.com/profile/15938154009846040711noreply@blogger.comtag:blogger.com,1999:blog-3992530807750384868.post-83011540882706757382009-10-24T05:01:45.091+03:002009-10-24T05:01:45.091+03:00I also have a problem: I want emacs as a shortcut ...I also have a problem: I want emacs as a shortcut in Gnome, but putting "/usr/bin/emacsclient -c" doesn't seem to cut it, as nothing happens... Ideas?Jérémiehttps://www.blogger.com/profile/01396853281777536809noreply@blogger.comtag:blogger.com,1999:blog-3992530807750384868.post-16604255436363475672009-08-22T05:53:48.598+03:002009-08-22T05:53:48.598+03:00I have a problem. After I start the emacs daemon ...I have a problem. After I start the emacs daemon using the --daemon option, when I start emacsclient with -c option, an emacs frame just flickers and goes away in a fraction of a second and emacsclient exits. The only output is "Waiting for Emacs..." Does anyone have any idea how to solve this? the -t option works without a problem!Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-3992530807750384868.post-69760305037224346162009-08-20T15:56:22.698+03:002009-08-20T15:56:22.698+03:00Anyone having a problem when trying to start emacs...Anyone having a problem when trying to start emacsclient -c, the menu shows up in a straight line vertically instead of normally horizontally? I am using Cygwin, Emacs 23.1, and Xming as my X server.Unknownhttps://www.blogger.com/profile/04257556049532106931noreply@blogger.comtag:blogger.com,1999:blog-3992530807750384868.post-87418857897035527222009-07-03T00:46:55.642+03:002009-07-03T00:46:55.642+03:00Hmm. Doesn't seem to be using my color theme (...Hmm. Doesn't seem to be using my color theme (like SETH said) even though I'm using 'color-theme'. Any other suggestions? Also, have you found a way to start multiple daemons yet?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-3992530807750384868.post-26674425534932582712009-06-15T03:29:51.698+03:002009-06-15T03:29:51.698+03:00mg[1] is ideal for those "vi tasks" for ...mg[1] is ideal for those "vi tasks" for which emacs is too big<br /><br />[1] http://www.han.dds.nl/software/mg/Elias Pippingnoreply@blogger.comtag:blogger.com,1999:blog-3992530807750384868.post-75426219843187517992009-06-02T15:08:09.441+03:002009-06-02T15:08:09.441+03:00I don't start Emacs daemon automatically with my d...I don't start Emacs daemon automatically with my desktop. I have just configured everywhere that my emacsclient starts with one of these:<br /><br />emacsclient -c -a ""<br />emacsclient -c -n -a ""<br />emacsclient -t -a ""<br /><br />It depends on the application etc. which one of those I use. Then Emacs daemon is started the first time I need it.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-3992530807750384868.post-6719781218442168202009-05-22T12:06:18.556+03:002009-05-22T12:06:18.556+03:00Is it possible to have every emacsclient instance ...Is it possible to have every emacsclient instance more independent from the others? Mainly I would like the emacsclient instances to have their own buffer list.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-3992530807750384868.post-30594863860243850482009-05-05T15:03:00.000+03:002009-05-05T15:03:00.000+03:00@Zed: try this:
emacsclient -a ""
This will aut...@Zed: try this: <br /><br />emacsclient -a ""<br /><br />This will automatically start the server, if it's not running... <br /><br />M.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-3992530807750384868.post-83731928505320821302009-03-28T13:11:00.000+02:002009-03-28T13:11:00.000+02:00@David Biesack: the emacsclient for Emacs 22 and 2...@David Biesack: the emacsclient for Emacs 22 and 23 should work. For not-waiting, use '-n', for evaluating elisp, use '-e'.djcbhttps://www.blogger.com/profile/15938154009846040711noreply@blogger.comtag:blogger.com,1999:blog-3992530807750384868.post-46583480929230572622009-03-27T22:21:00.000+02:002009-03-27T22:21:00.000+02:00I've used variations of emacsclient - gnuserv, gnu...I've used variations of emacsclient - gnuserv, gnuclient, gnudoit - for years. I especially like gnudoit because you can pass a lisp expression on the command line for Emacs to evaluate. I also have a modified version of gnuclient that does not wait for you to close the buffer. Is there a -daemon version that supports gnudoit and/or gnuclient like operations ?David Biesackhttps://www.blogger.com/profile/11044630579836470416noreply@blogger.comtag:blogger.com,1999:blog-3992530807750384868.post-2010961446549128182009-02-25T06:45:00.000+02:002009-02-25T06:45:00.000+02:00@djcb: Thanks, that seems to have done the trick. ...@djcb: Thanks, that seems to have done the trick. Very frustrating problem.<BR/><BR/>Please keep up the great posts.SETHhttps://www.blogger.com/profile/08712482647301390517noreply@blogger.comtag:blogger.com,1999:blog-3992530807750384868.post-60763339628234288622009-02-24T21:49:00.000+02:002009-02-24T21:49:00.000+02:00@SETH: hmmm... i've seen that problem - the easies...@SETH: hmmm... i've seen that problem - the easiest way to solve it might be to use 'color-theme'; it works correctly in the other frames.djcbhttps://www.blogger.com/profile/15938154009846040711noreply@blogger.comtag:blogger.com,1999:blog-3992530807750384868.post-17386523871606960942009-02-23T23:10:00.000+02:002009-02-23T23:10:00.000+02:00Hrrm, since upgrading, any frame I create using em...Hrrm, since upgrading, any frame I create using emasclicent doesn't have the correct background. And I get errors in about unspecified-bg in the messages buffer.<BR/><BR/>Any ideas?SETHhttps://www.blogger.com/profile/08712482647301390517noreply@blogger.comtag:blogger.com,1999:blog-3992530807750384868.post-11364552030770031712009-02-13T00:41:00.000+02:002009-02-13T00:41:00.000+02:00the DISPLAY check is not necessary; -c will fallba...<I>the DISPLAY check is not necessary; -c will fallback to terminal if there's no DISPLAY.</I><BR/><BR/>Ah, thanks.<BR/><BR/><I>I think the ALTERNATE_EDITOR solution as mentioned by Anonymous solves this.</I><BR/><BR/>Nope. Tried it. It's calling execvp on ALTERNATE_EDITOR. But maybe some bash -c phrase would work and I just didn't get all the relevant shell-escaping working.<BR/><BR/>But with this as /usr/local/bin/editor2:<BR/>#!/bin/bash<BR/>emacs --daemon<BR/>sleep 2<BR/>emacsclient -c "$*"<BR/><BR/>then /usr/local/bin/editor can be just:<BR/>#!/bin/bash<BR/>emacsclient -c -a /usr/local/bin/editor2 "$*"<BR/><BR/>This has an advantage over my original that emacs --daemon will only be run if emacsclient specifically has a failed to connect error.Unknownhttps://www.blogger.com/profile/04503217878514864906noreply@blogger.comtag:blogger.com,1999:blog-3992530807750384868.post-9522511752382275772009-02-12T23:24:00.000+02:002009-02-12T23:24:00.000+02:00@Jared: emacs --daemon creates a unix socket (some...@Jared: emacs --daemon creates a unix socket (something like /tmp/emacs$uid/server), and the client connects to that.<BR/><BR/>emacsclient has the --socket-name option to connect to any socket.<BR/><BR/>So, if you could start *another* emacs --daemon, and have the emacsclients connect to that...<BR/><BR/>Unfortunately, that does not seem possible at this time. There seems to be no (documented) way to have emacs --daemon use another socket. *sigh*<BR/><BR/>@Zed Lopez: the DISPLAY check is not necessary; -c will fallback to terminal if there's no DISPLAY. <BR/><BR/>Also, I think the ALTERNATE_EDITOR solution as mentioned by Anonymous solves this.djcbhttps://www.blogger.com/profile/15938154009846040711noreply@blogger.comtag:blogger.com,1999:blog-3992530807750384868.post-2370285947216790432009-02-12T20:32:00.000+02:002009-02-12T20:32:00.000+02:00Within emacsclient, C-x C-c is mapped to save-buff...Within emacsclient, C-x C-c is mapped to save-buffers-kill-terminal. You can still M-x kill-emacs or M-x save-buffers-kill-emacs.<BR/><BR/>I have this script as /usr/local/bin/editor:<BR/><BR/>#!/bin/bash<BR/>if [ -z $DISPLAY ] ; then<BR/> OPT="-t"<BR/>else<BR/> OPT="-c"<BR/>fi<BR/><BR/>emacsclient $OPT "$*" 2>/dev/null || (<BR/> (emacs --daemon)<BR/> sleep 2<BR/> emacsclient $OPT "$*")<BR/><BR/>Sadly, even on a modern, not overloaded machine, I needed sleep 2 -- sleep 1 could be too short.Unknownhttps://www.blogger.com/profile/04503217878514864906noreply@blogger.comtag:blogger.com,1999:blog-3992530807750384868.post-1260623860768362782009-02-12T08:46:00.000+02:002009-02-12T08:46:00.000+02:00That sounds like a nice addition although I don't ...That sounds like a nice addition although I don't think it will help with my (perhaps unusual) requirement to have multiple emacs instances with a different environment. I propose a different solution: launching a cutdown emacs<BR/><A HREF="http://curiousprogrammer.wordpress.com/2009/01/29/what-is-your-dollar-editor/" REL="nofollow">here</A> that allows me to avoid using vi.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-3992530807750384868.post-81516756014640724862009-02-12T02:10:00.000+02:002009-02-12T02:10:00.000+02:00Dude! I didn't know about the -c and -t options. ...Dude! I didn't know about the -c and -t options. Thanks!Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-3992530807750384868.post-70440533351955322682009-02-12T01:03:00.000+02:002009-02-12T01:03:00.000+02:00Don't forget the ALTERNATE_EDITOR environment vari...Don't forget the ALTERNATE_EDITOR environment variable. I haven't yet tried 23, but perhaps one could try<BR/><BR/>ALTERNATE_EDITOR='emacs --daemon; emacsclient -c'<BR/><BR/>?Anonymousnoreply@blogger.com