From: Philipp Haselwarter <philipp.haselwarter@gmx.de>
To: emacs-devel@gnu.org
Subject: Re: screen & emacs
Date: Thu, 03 Feb 2011 21:31:58 +0100 [thread overview]
Message-ID: <87wrlghnb5.fsf@nzebook.haselwarter.org> (raw)
In-Reply-To: 20110203181348.GA15004@andres.andreas
Andreas Marschke <xxtjaxx@googlemail.com> writes:
> Hi!
>
---8<---[snipped 20 lines]---8<---
>
> Here is a more elaborate example from both my `.screenrc' and my
> `.bashrc':
> --------: .bashrc
> function emacs()
> {
> if [ -x /tmp/emacs$UID/server ];then
> emacsclient -nw $@
> else
> screen emacs -nw -f server-start $@
> fi
> }
>
---8<---[snipped 91 lines]---8<---
This shouldn't be necessary anymore, I used to use a similar construct,
but there's simpler.
If you run emacsclient with `-a=""' or `--alternate-editor=""', it tries
to connect to the server first, and if it fails to connect, starts
it. This way, you never end up trying to start several daemons at once
etc:
.bashrc:
--8<---------------cut here---------------start------------->8---
alias emacs='emacsclient -a="" -nw'
--8<---------------cut here---------------end--------------->8---
and similarly in your .screenrc:
--8<---------------cut here---------------start------------->8---
screen -t EMACS 4 emacsclient -a="" -nw
--8<---------------cut here---------------end--------------->8---
--
Philipp Haselwarter
next prev parent reply other threads:[~2011-02-03 20:31 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-03 4:44 screen & emacs Sam Steingold
2011-02-03 4:58 ` Justin Lilly
2011-02-03 17:28 ` Sam Steingold
2011-02-03 18:00 ` Eli Zaretskii
2011-02-03 19:14 ` Sam Steingold
2011-02-03 19:25 ` Chad Brown
2011-02-03 19:54 ` Sam Steingold
2011-02-11 7:10 ` Kevin Rodgers
2011-02-03 18:13 ` Andreas Marschke
2011-02-03 20:31 ` Philipp Haselwarter [this message]
2011-02-03 20:54 ` Andreas Marschke
2011-02-04 17:01 ` Dan Nicolaescu
2011-02-03 17:24 ` Andreas Schwab
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87wrlghnb5.fsf@nzebook.haselwarter.org \
--to=philipp.haselwarter@gmx.de \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
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).