From 07eed931a4a3f932be5dc8a9ebcd258884757ea5 Mon Sep 17 00:00:00 2001 From: Andreas Roehler Date: Mon, 22 Mar 2010 21:43:07 +0100 Subject: [PATCH] emacs daemon.. but quietly --- code/elbb.el | 77 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) diff --git a/code/elbb.el b/code/elbb.el index c9696d8..b1bc8b8 100644 --- a/code/elbb.el +++ b/code/elbb.el @@ -1,3 +1,80 @@ +* emacs daemon.. but quietly + +To: help-gnu-emacs@gnu.org +From: Richard Riley +Date: Mon, 22 Mar 2010 20:02:22 +0100 +Subject: Re: emacs daemon.. but quietly + +tomas@tuxteam.de writes: + +> On Fri, Mar 05, 2010 at 02:24:44PM +0100, Gary . wrote: +>> Is there any way to stop emacs, run with --daemon, printing out +>> details about all of the config files it is loading? At the moment I +>> see +> +> If I understand you correctly, you want to suppress stdout/stderr output +> of emacs --daemon? +> +> You might just redirect that to /dev/null like so: +> +> emacs --daemon > /dev/null 2>&1 +> +> (or did I misunderstand you completely?) +> +>> ("emacs" "--quiet") +>> Loading charset... +>> Loading charset...done +>> (etc.) which is ugly since I want to start the server, when +>> appropriate, when I start my login shell by doing something like +>> +>> function serverExists { +>> TMPDIR=${TMPDIR-/tmp}; +>> TMPFILE="${TMPDIR}/ps-output.$$"; +>> +>> ps > ${TMPFILE} +>> grep -q 'emacs-X11' ${TMPFILE} +>> SERVER_STARTED=$?; +>> rm ${TMPFILE} +>> +>> return $SERVER_STARTED; +>> } +>> +>> if serverExists ; then +>> export EMACS_SERVER="emacs already started" +>> else +>> emacs --daemon --quiet +>> export EMACS_SERVER="emacs started here" +>> fi +>> echo $EMACS_SERVER +>> +>> in my .bashrc. +> +> Hm. I don't quite understand this part. Besides, it seems a roundabout +> way. What are you trying to achieve? +> +> Regards +> -- tomás +> + +As is emacs --daemon IMO. + +In emacs 23 using the alternate editor setting. My "edit" script is:- + +,---- +| #!/bin/bash +| # edit +| export GDK_NATIVE_WINDOWS=1 +| exec emacsclient --alternate-editor="" -c "$@" +`---- + +Its in the man page for emacsclient and the wiki. + +-- +ASCII ribbon campaign ( ) + - against HTML email X + & vCards / \ + + * Reading a sequence of bytes as one integer Date: Sat, 13 Mar 2010 20:49:28 +0200 -- 2.11.4.GIT