[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: screen & emacs
From: |
Philipp Haselwarter |
Subject: |
Re: screen & emacs |
Date: |
Thu, 03 Feb 2011 21:31:58 +0100 |
User-agent: |
Gnus/5.110011 (No Gnus v0.11) Emacs/24.0.50 (gnu/linux) |
Andreas Marschke <address@hidden> 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
- screen & emacs, Sam Steingold, 2011/02/02
- Re: screen & emacs, Justin Lilly, 2011/02/02
- Re: screen & emacs, Eli Zaretskii, 2011/02/03
- Re: screen & emacs, Sam Steingold, 2011/02/03
- Re: screen & emacs, Chad Brown, 2011/02/03
- Re: screen & emacs, Sam Steingold, 2011/02/03
- Re: screen & emacs, Kevin Rodgers, 2011/02/11
- Re: screen & emacs, Dan Nicolaescu, 2011/02/04
Re: screen & emacs, Andreas Schwab, 2011/02/03