* emacs daemon.. but quietly
@ 2010-03-05 13:24 Gary .
2010-03-22 13:09 ` Gary .
2010-03-22 18:29 ` tomas
0 siblings, 2 replies; 10+ messages in thread
From: Gary . @ 2010-03-05 13:24 UTC (permalink / raw)
To: help-gnu-emacs
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
("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.
Any ideas, anyone?
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: emacs daemon.. but quietly
2010-03-05 13:24 emacs daemon.. but quietly Gary .
@ 2010-03-22 13:09 ` Gary .
2010-03-22 18:29 ` tomas
1 sibling, 0 replies; 10+ messages in thread
From: Gary . @ 2010-03-22 13:09 UTC (permalink / raw)
To: help-gnu-emacs
On 3/5/10, I 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
> ("emacs" "--quiet")
> Loading charset...
> Loading charset...done
> (etc.) which is ugly
Really? Nobody? :(
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: emacs daemon.. but quietly
2010-03-05 13:24 emacs daemon.. but quietly Gary .
2010-03-22 13:09 ` Gary .
@ 2010-03-22 18:29 ` tomas
2010-03-22 19:02 ` Richard Riley
` (2 more replies)
1 sibling, 3 replies; 10+ messages in thread
From: tomas @ 2010-03-22 18:29 UTC (permalink / raw)
To: Gary .; +Cc: help-gnu-emacs
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
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
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
iD8DBQFLp7caBcgs9XrR2kYRAlwMAJ4sTtAZtUB5stmqKFTdOukbeArPuwCfQ00L
Ro1KfoynRG84RsyVvE0nFPQ=
=NNry
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: emacs daemon.. but quietly
2010-03-22 18:29 ` tomas
@ 2010-03-22 19:02 ` Richard Riley
2010-03-23 15:28 ` Gary .
2010-03-23 15:25 ` Gary .
2010-03-23 18:30 ` Gary .
2 siblings, 1 reply; 10+ messages in thread
From: Richard Riley @ 2010-03-22 19:02 UTC (permalink / raw)
To: help-gnu-emacs
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 / \
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: emacs daemon.. but quietly
2010-03-22 19:02 ` Richard Riley
@ 2010-03-23 15:28 ` Gary .
2010-03-26 14:44 ` Richard Riley
0 siblings, 1 reply; 10+ messages in thread
From: Gary . @ 2010-03-23 15:28 UTC (permalink / raw)
To: help-gnu-emacs
On 3/22/10, Richard Riley wrote:
> emacsclient --alternate-editor="" -c "$@"
> Its in the man page for emacsclient and the wiki.
Oops.
Oops, oops, oops.
I completely missed that. How embarrassing.
Thanks for the "hint". In my defence, who would want a different editor :-D
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: emacs daemon.. but quietly
2010-03-23 15:28 ` Gary .
@ 2010-03-26 14:44 ` Richard Riley
0 siblings, 0 replies; 10+ messages in thread
From: Richard Riley @ 2010-03-26 14:44 UTC (permalink / raw)
To: help-gnu-emacs
"Gary ." <emacs@garydjones.name> writes:
> On 3/22/10, Richard Riley wrote:
>
>> emacsclient --alternate-editor="" -c "$@"
>
>> Its in the man page for emacsclient and the wiki.
>
> Oops.
>
> Oops, oops, oops.
>
> I completely missed that. How embarrassing.
>
> Thanks for the "hint". In my defence, who would want a different editor :-D
>
Heh, it's easily missed but very handy to know!
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: emacs daemon.. but quietly
2010-03-22 18:29 ` tomas
2010-03-22 19:02 ` Richard Riley
@ 2010-03-23 15:25 ` Gary .
2010-03-23 18:30 ` Gary .
2 siblings, 0 replies; 10+ messages in thread
From: Gary . @ 2010-03-23 15:25 UTC (permalink / raw)
To: tomas; +Cc: help-gnu-emacs
On 3/22/10, tomas wrote:
> 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?)
No, you understand perfectly. I'm pretty sure I tried that already,
but will try again. Thanks.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: emacs daemon.. but quietly
2010-03-22 18:29 ` tomas
2010-03-22 19:02 ` Richard Riley
2010-03-23 15:25 ` Gary .
@ 2010-03-23 18:30 ` Gary .
2 siblings, 0 replies; 10+ messages in thread
From: Gary . @ 2010-03-23 18:30 UTC (permalink / raw)
To: help-gnu-emacs
> You might just redirect that to /dev/null like so:
>
> emacs --daemon > /dev/null 2>&1
I was right, I had tried this, or something like it, and it didn't work,
at least not perfectly. It might be that I forgot to do the "2>&1", I'm
not sure, but anyway your way works just fine. It doesn't work if I try
it with the emacsclient --alternate-editor "trick", I just get dumped
back to the command line instead of it starting any kind of emacs. I
guess I will have to decide between the two methods. I'm leaning towards
mine (yours and mine), because it means there is never a delay when
starting emacs, which is somehow gratifying (I find a delay when
starting the first bash session of the day acceptable, although in fact
I might even try
emacs --daemon > /dev/null 2>&1 &
meaning I might not even see that)
^ permalink raw reply [flat|nested] 10+ messages in thread
[parent not found: <mailman.2328.1267795489.14305.help-gnu-emacs@gnu.org>]
* Re: emacs daemon.. but quietly
[not found] <mailman.2328.1267795489.14305.help-gnu-emacs@gnu.org>
@ 2010-03-05 14:09 ` Andre Ramaciotti
2010-03-06 13:24 ` Stefan Monnier
1 sibling, 0 replies; 10+ messages in thread
From: Andre Ramaciotti @ 2010-03-05 14:09 UTC (permalink / raw)
To: help-gnu-emacs
"Gary ." <emacs@garydjones.name> writes:
> 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
> ("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.
>
> Any ideas, anyone?
You could redirect the output of the command to /dev/null (if you're
using Linux or similar).
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: emacs daemon.. but quietly
[not found] <mailman.2328.1267795489.14305.help-gnu-emacs@gnu.org>
2010-03-05 14:09 ` Andre Ramaciotti
@ 2010-03-06 13:24 ` Stefan Monnier
1 sibling, 0 replies; 10+ messages in thread
From: Stefan Monnier @ 2010-03-06 13:24 UTC (permalink / raw)
To: help-gnu-emacs
> 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
> ("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.
> Any ideas, anyone?
Why is the output a problem? How do you "login"?
Stefan
PS: You could avoid starting this daemon eagerly and do it lazily using
the "-a ''" parameter. BTW your `serverExists' could instead do
"emacsclient --eval 1".
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2010-03-26 14:44 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-05 13:24 emacs daemon.. but quietly Gary .
2010-03-22 13:09 ` Gary .
2010-03-22 18:29 ` tomas
2010-03-22 19:02 ` Richard Riley
2010-03-23 15:28 ` Gary .
2010-03-26 14:44 ` Richard Riley
2010-03-23 15:25 ` Gary .
2010-03-23 18:30 ` Gary .
[not found] <mailman.2328.1267795489.14305.help-gnu-emacs@gnu.org>
2010-03-05 14:09 ` Andre Ramaciotti
2010-03-06 13:24 ` Stefan Monnier
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).