具体说说怎么做的,谢谢。
emacs很适合我,可是启动太慢,看了些文档还是不知道怎么让他自动启动server。
[问题]有谁配置好了emacs 23的server client模式?
- zhuqin_83
- 帖子: 10606
- 注册时间: 2006-05-13 4:02
- 联系:
[问题]有谁配置好了emacs 23的server client模式?
HP Pavilion DV6-2064CA: AMD Turion II Ultra Dual-Core Mobile M640, HD4650, 2GBx2 DDR2-800, Seagate 500GB 7200RPM SATA, BD-ROM
DELL UltraSharp 2209WA
Arch64, Testing repo
DELL UltraSharp 2209WA
Arch64, Testing repo
-
- 帖子: 768
- 注册时间: 2006-09-20 19:56
- zhuqin_83
- 帖子: 10606
- 注册时间: 2006-05-13 4:02
- 联系:
这个我自然知道,我想问如何启动机器时就执行,并且和screen集成。
http://www.emacswiki.org/cgi-bin/wiki/EmacsClient
这个看了比较头大,不知道怎么弄。
http://www.emacswiki.org/cgi-bin/wiki/EmacsClient
这个看了比较头大,不知道怎么弄。
HP Pavilion DV6-2064CA: AMD Turion II Ultra Dual-Core Mobile M640, HD4650, 2GBx2 DDR2-800, Seagate 500GB 7200RPM SATA, BD-ROM
DELL UltraSharp 2209WA
Arch64, Testing repo
DELL UltraSharp 2209WA
Arch64, Testing repo
-
- 帖子: 768
- 注册时间: 2006-09-20 19:56
读一下multi-tty的readme啊。
以下都是从那儿摘过来的:
以下都是从那儿摘过来的:
TIPS & TRICKS
-------------
I think the best way to use the new Emacs is to have it running inside
a disconnected GNU screen session, and always use emacsclient for
normal work. One advantage of this is that not a single keystroke of
your work will be lost if the display device that you are using
crashes, or the network connection times out, or whatever. (I had an
extremely unstable X server for some time while I was developing these
patches, and running Emacs this way has saved me a number of M-x
recover-session invocations.)
I use the following two bash scripts to handle my Emacs sessions:
-------------------------------------------------------connect-emacs--
#!/bin/bash
# Usage: connect-emacs <name> <args>...
#
# Connects to the Emacs instance called NAME. Starts up the instance
# if it is not already running. The rest of the arguments are passed
# to emacsclient.
name="$1"
shift
if [ -z "$name" ]; then
echo "Usage: connect_emacs <name> <args>..." >&2
exit 1
fi
preload-emacs "$name" wait
/usr/bin/emacsclient.emacs-multi-tty -s "$name" "$@"
----------------------------------------------------------------------
-------------------------------------------------------preload-emacs--
#!/bin/bash
# Usage: preload-emacs <name> [<waitp>]
#
# Preloads the Emacs instance called NAME in a detached screen
# session. Does nothing if the instance is already running. If WAITP
# is non-empty, the function waits until the server starts up and
# creates its socket; otherwise it returns immediately.
name="$1"
waitp="$2"
screendir="/var/run/screen/S-$USER"
serverdir="/tmp/emacs$UID"
emacs=/usr/bin/emacs-multi-tty # Or wherever you installed your multi-tty Emacs
if [ -z "$name" ]; then
echo "Usage: preload_emacs <name> [<waitp>]" >&2
exit 1
fi
if [ ! -e "$screendir"/*."$name" ]; then
if [ -e "$serverdir/$name" ]; then
# Delete leftover socket (for the wait option)
rm "$serverdir/$name"
fi
screen -dmS "$name" "$emacs" -nw --eval "(setq server-name \"$name\")" -f server-start
fi
if [ ! -z "$waitp" ]; then
while [ ! -e "$serverdir/$name" ]; do sleep 0.1; done
fi
----------------------------------------------------------------------
I have the following in my profile to have two instances automatically
preloaded for editing and email:
preload-emacs editor
preload-emacs gnus
It is useful to set up short aliases for connect-emacs. I use the
following:
alias edit="connect-emacs editor"
alias e=edit
alias et="connect-emacs editor -t"
alias gnus="connect-emacs gnus"
- zhuqin_83
- 帖子: 10606
- 注册时间: 2006-05-13 4:02
- 联系:
-
- 帖子: 768
- 注册时间: 2006-09-20 19:56