diff options
| author | Karoly Lorentey | 2004-08-13 14:48:29 +0000 |
|---|---|---|
| committer | Karoly Lorentey | 2004-08-13 14:48:29 +0000 |
| commit | 422f68e04e254e9ec704fffb7a0fbbda5897c41e (patch) | |
| tree | b4fda66be62915e341a75cc7bed56ecdc2a122fc | |
| parent | be0f41236b6a07370695748ca0d827b6a95fa0ba (diff) | |
| download | emacs-422f68e04e254e9ec704fffb7a0fbbda5897c41e.tar.gz emacs-422f68e04e254e9ec704fffb7a0fbbda5897c41e.zip | |
README updates, including a new Tips & Tricks section
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-231
| -rw-r--r-- | README.multi-tty | 212 |
1 files changed, 156 insertions, 56 deletions
diff --git a/README.multi-tty b/README.multi-tty index 863696796a4..f637f7a464a 100644 --- a/README.multi-tty +++ b/README.multi-tty | |||
| @@ -25,7 +25,53 @@ WHO IS DOING IT | |||
| 25 | 25 | ||
| 26 | I'm Károly Lőrentey. My address: lorentey@elte.hu. | 26 | I'm Károly Lőrentey. My address: lorentey@elte.hu. |
| 27 | 27 | ||
| 28 | Comments, bug reports, suggestions and patches are welcome! | 28 | Comments, bug reports, suggestions and patches are welcome; send them |
| 29 | to multi-tty@lists.fnord.hu. | ||
| 30 | |||
| 31 | MAILING LISTS | ||
| 32 | ------------- | ||
| 33 | |||
| 34 | The multi-tty mailing list (discussion & bug reports): | ||
| 35 | |||
| 36 | Address: multi-tty@lists.fnord.hu | ||
| 37 | Signup: http://lists.fnord.hu/mailman/listinfo/multi-tty | ||
| 38 | Archive: http://news.gmane.org/gmane.emacs.multi-tty/ | ||
| 39 | |||
| 40 | Commit notifications (read-only): | ||
| 41 | |||
| 42 | Address: multi-tty-commits@lists.fnord.hu | ||
| 43 | Signup: http://lists.fnord.hu/mailman/listinfo/multi-tty-commits | ||
| 44 | |||
| 45 | |||
| 46 | STATUS | ||
| 47 | ------ | ||
| 48 | |||
| 49 | The branch is now very stable and almost full-featured. All of the | ||
| 50 | major problems have been fixed, only a few minor issues remain. (It | ||
| 51 | still needs to be ported to Windows/Mac/DOS, though.) Both multiple | ||
| 52 | tty device support and simultaneous X and tty frame support works | ||
| 53 | fine. Emacsclient has been extended to support opening new tty and X | ||
| 54 | frames. It has been changed open new Emacs frames by default. | ||
| 55 | |||
| 56 | The multi-tty branch has been scheduled for inclusion in the next | ||
| 57 | major release of Emacs (version 22). I expect the merge into the | ||
| 58 | development trunk to occur sometime during next year (2005), after the | ||
| 59 | merge of the Unicode branch. | ||
| 60 | |||
| 61 | Please let me know if you find any bugs in this branch. | ||
| 62 | |||
| 63 | Known problems: | ||
| 64 | |||
| 65 | * Mac, Windows and DOS support is broken, probably doesn't | ||
| 66 | even compile -- this will be solved later. | ||
| 67 | |||
| 68 | * Only tested on my GNU/Linux box, Solaris 8 and FreeBSD. | ||
| 69 | |||
| 70 | |||
| 71 | HOW TO GET THE BRANCH | ||
| 72 | --------------------- | ||
| 73 | |||
| 74 | The branch uses GNU Arch (http://www.gnuarch.org) for version control. | ||
| 29 | 75 | ||
| 30 | Retrieving the latest version of the branch: | 76 | Retrieving the latest version of the branch: |
| 31 | 77 | ||
| @@ -39,52 +85,25 @@ probably want to you use the Arch supermirror instead: | |||
| 39 | tla register-archive lorentey@elte.hu--2004 http://mirrors.gnuarch.org/lorentey@elte.hu--2004/ | 85 | tla register-archive lorentey@elte.hu--2004 http://mirrors.gnuarch.org/lorentey@elte.hu--2004/ |
| 40 | tla get lorentey@elte.hu--2004/emacs--multi-tty <directory> | 86 | tla get lorentey@elte.hu--2004/emacs--multi-tty <directory> |
| 41 | 87 | ||
| 42 | (I use a recent arch development snapshot, but any of the released | 88 | (I use a recent tla development snapshot, but any of the released |
| 43 | versions of arch will do fine, I think.) | 89 | versions of arch will do fine, I think.) My GPG key id is 0FB27A3F; |
| 90 | it is available from hkp://wwwkeys.eu.pgp.net/, or my homepage at | ||
| 91 | http://lorentey.hu/rolam/gpg.html) | ||
| 44 | 92 | ||
| 45 | To update your source tree to the latest revision after the first | 93 | To update your source tree to the latest revision after the first |
| 46 | checkout, simply use the following command: | 94 | checkout, simply use the following command: |
| 47 | 95 | ||
| 48 | tla replay lorentey@elte.hu--2004/emacs--multi-tty--0 | 96 | tla replay lorentey@elte.hu--2004/emacs--multi-tty--0 |
| 49 | 97 | ||
| 50 | If you are interested, you can find more detailed information about | 98 | If you are interested, you can find more information about Arch on |
| 51 | Arch on http://wiki.gnuarch.org/. It's a wonderful source control | 99 | http://wiki.gnuarch.org/. It's a wonderful source control system, I |
| 52 | system, I highly recommend it. | 100 | highly recommend it. |
| 53 | 101 | ||
| 54 | If you don't have arch, the branch has a homepage from which you can | 102 | If you don't have tla, the branch has a homepage from which you can |
| 55 | download conventional patches against Emacs CVS HEAD: | 103 | download conventional patches against Emacs CVS HEAD: |
| 56 | 104 | ||
| 57 | http://lorentey.hu/project/emacs.html | 105 | http://lorentey.hu/project/emacs.html |
| 58 | 106 | ||
| 59 | If you want to be notified of new revisions, sign up to the | ||
| 60 | multi-tty@listbox.elte.hu mailing list by visiting the | ||
| 61 | below homepage and following its instructions. | ||
| 62 | |||
| 63 | https://listbox.elte.hu/mailman/listinfo/multi-tty | ||
| 64 | |||
| 65 | Please note that the multi-tty mailing list is read-only, and is | ||
| 66 | reserved for automatic commit messages. Discussion about the branch | ||
| 67 | and bug reports should be sent directly to me (lorentey@elte.hu), or | ||
| 68 | to the emacs-devel@gnu.org mailing list. (I hope to merge my branch | ||
| 69 | into CVS HEAD reasonably soon, so I don't want to set up an elaborate | ||
| 70 | development infrastructure for the multi-tty branch.) | ||
| 71 | |||
| 72 | STATUS | ||
| 73 | ------ | ||
| 74 | |||
| 75 | The branch is now very stable and almost full-featured. All of the | ||
| 76 | major problems have been fixed, only a few minor issues remain. (It | ||
| 77 | still needs to be ported to Windows/Mac/DOS, though.) Both multiple | ||
| 78 | tty device support and simultaneous X and tty frame support works | ||
| 79 | fine. Emacsclient has been extended to support opening new tty and X | ||
| 80 | frames. It has been changed open new Emacs frames by default. | ||
| 81 | |||
| 82 | The multi-tty branch has been scheduled for inclusion in the next | ||
| 83 | major release of Emacs (version 22). I expect the merge into the | ||
| 84 | development trunk to occur sometime during next year (2005), after the | ||
| 85 | merge of the Unicode branch. | ||
| 86 | |||
| 87 | Please let me know if you find any bugs in this branch. | ||
| 88 | 107 | ||
| 89 | HOW TO COMPILE | 108 | HOW TO COMPILE |
| 90 | -------------- | 109 | -------------- |
| @@ -124,26 +143,101 @@ This is work in progress, and probably full of bugs. You should | |||
| 124 | always run emacs from gdb, so that you'll have a live instance to | 143 | always run emacs from gdb, so that you'll have a live instance to |
| 125 | debug if something goes wrong. Please send me your bug reports. | 144 | debug if something goes wrong. Please send me your bug reports. |
| 126 | 145 | ||
| 146 | TIPS & TRICKS | ||
| 147 | ------------- | ||
| 148 | |||
| 127 | I think the best way to use the new Emacs is to have it running inside | 149 | I think the best way to use the new Emacs is to have it running inside |
| 128 | a disconnected GNU screen session, and always use emacsclient for | 150 | a disconnected GNU screen session, and always use emacsclient for |
| 129 | normal work. This way not a single keystroke of your work will be | 151 | normal work. One advantage of this is that not a single keystroke of |
| 130 | lost if the display device that you are using crashes, or the network | 152 | your work will be lost if the display device that you are using |
| 131 | connection times out, or whatever. As long as the server that runs | 153 | crashes, or the network connection times out, or whatever. (I had an |
| 132 | your Emacs remains up, all your buffers remain exactly as they were | 154 | extremely unstable X server for some time while I was developing these |
| 133 | before the crash, and you can continue working as if nothing had | 155 | patches, and running Emacs this way has saved me a number of M-x |
| 134 | happened. (I had an extremely unstable X server for some time while I | 156 | recover-session invocations.) |
| 135 | was developing these patches, and running Emacs this way has saved me | 157 | |
| 136 | a number of M-x recover-session invocations.) | 158 | I use the following two bash functions to handle my Emacs sessions: |
| 137 | 159 | ||
| 138 | (I am thinking about introducing a --daemon option to get rid of the | 160 | ,----[ ~/.bash_profile |
| 139 | above screen dependency.) | 161 | | # Usage: preload-emacs <name> [<waitp>] |
| 162 | | # | ||
| 163 | | # Preloads the Emacs instance called NAME in a detached screen | ||
| 164 | | # session. Does nothing if the instance is already running. If WAITP | ||
| 165 | | # is non-empty, the function waits until the server starts up and | ||
| 166 | | # creates its socket; otherwise it returns immediately. | ||
| 167 | | function preload-emacs { | ||
| 168 | | local name="$1" | ||
| 169 | | local waitp="$2" | ||
| 170 | | local screendir="/var/run/screen/S-$USER" | ||
| 171 | | local serverdir="/tmp/emacs$UID" | ||
| 172 | | local emacs=emacs # Or wherever you installed your multi-tty Emacs | ||
| 173 | | | ||
| 174 | | if [ -z "$name" ]; then | ||
| 175 | | echo "Usage: preload-emacs <name> [<waitp>]" >&2 | ||
| 176 | | return 1 | ||
| 177 | | fi | ||
| 178 | | | ||
| 179 | | if [ ! -e "$screendir"/*."$name" ]; then | ||
| 180 | | if [ -e "$serverdir/$name" ]; then | ||
| 181 | | # Delete leftover socket (for preload-emacs-wait) | ||
| 182 | | rm "$serverdir/$name" | ||
| 183 | | fi | ||
| 184 | | screen -dmS "$name" "$emacs" -nw --eval "(setq server-name \"$name\")" -f server-start | ||
| 185 | | fi | ||
| 186 | | if [ ! -z "$waitp" ]; then | ||
| 187 | | while [ ! -e "$serverdir/$name" ]; do sleep 0.1; done | ||
| 188 | | fi | ||
| 189 | | return 0 | ||
| 190 | | } | ||
| 191 | | | ||
| 192 | | # Usage: connect-emacs <name> <args>... | ||
| 193 | | # | ||
| 194 | | # Connects to the Emacs instance called NAME. Starts up the instance | ||
| 195 | | # if it is not already running. The rest of the arguments are passed | ||
| 196 | | # to emacsclient. | ||
| 197 | | function connect-emacs { | ||
| 198 | | local name="$1" | ||
| 199 | | shift | ||
| 200 | | | ||
| 201 | | if [ -z "$name" ]; then | ||
| 202 | | echo "Usage: connect-emacs <name> <args>..." >&2 | ||
| 203 | | fi | ||
| 204 | | preload-emacs "$name" wait | ||
| 205 | | emacsclient -s "$name" "$@" | ||
| 206 | | } | ||
| 207 | | | ||
| 208 | | export -f preload-emacs connect-emacs | ||
| 209 | | | ||
| 210 | | # Preload editor and gnus sessions for speedy initial connects. | ||
| 211 | | preload-emacs editor | ||
| 212 | | preload-emacs gnus | ||
| 213 | `---- | ||
| 214 | |||
| 215 | ,----[ ~/.bashrc | ||
| 216 | | alias gnus="connect-emacs gnus" | ||
| 217 | | alias edit="connect-emacs editor" | ||
| 218 | | alias et="connect-emacs editor -t" | ||
| 219 | | alias e=edit | ||
| 220 | `---- | ||
| 221 | |||
| 222 | The following settings prevent me from accidentally killing the Emacs | ||
| 223 | session. (Maybe this should be the default binding of C-x C-c.) | ||
| 224 | |||
| 225 | ,----[ ~/.emacs | ||
| 226 | | (defun lk-exit-emacs-or-delete-frame (&optional arg) | ||
| 227 | | "If the current frame has a client, kill it; otherwise kill Emacs itself. | ||
| 228 | | Offer to save each buffer before the murder. With prefix arg, | ||
| 229 | | ignore client status and kill Emacs." | ||
| 230 | | (interactive "P") | ||
| 231 | | (let ((proc (frame-parameter (selected-frame) 'client))) | ||
| 232 | | (if (and (not arg) proc) | ||
| 233 | | (progn | ||
| 234 | | (save-some-buffers nil t) | ||
| 235 | | (server-delete-client proc)) | ||
| 236 | | (save-buffers-kill-emacs)))) | ||
| 237 | | | ||
| 238 | | (global-set-key (kbd "C-x C-c") 'lk-exit-emacs-or-delete-frame) | ||
| 239 | `---- | ||
| 140 | 240 | ||
| 141 | Problems: | ||
| 142 | |||
| 143 | * Mac, Windows and DOS support is broken, probably doesn't | ||
| 144 | even compile -- this will be solved later. | ||
| 145 | |||
| 146 | * Only tested on my GNU/Linux box, Solaris 8 and FreeBSD. | ||
| 147 | 241 | ||
| 148 | NEWS | 242 | NEWS |
| 149 | ---- | 243 | ---- |
| @@ -188,7 +282,8 @@ THANKS | |||
| 188 | ------ | 282 | ------ |
| 189 | 283 | ||
| 190 | The following is an (incomplete) list of people who have contributed | 284 | The following is an (incomplete) list of people who have contributed |
| 191 | to the project by testing, bug reports, and suggestions. Thanks! | 285 | to the project by testing, submitting patches, bug reports, and |
| 286 | suggestions. Thanks! | ||
| 192 | 287 | ||
| 193 | ARISAWA Akihiro <ari at mbf dot ocn dot ne dot jp> | 288 | ARISAWA Akihiro <ari at mbf dot ocn dot ne dot jp> |
| 194 | Robert J. Chassell <bob at rattlesnake dot com> | 289 | Robert J. Chassell <bob at rattlesnake dot com> |
| @@ -247,7 +342,10 @@ THINGS TO DO | |||
| 247 | At least a beep or a message would be important, if the single-mode | 342 | At least a beep or a message would be important, if the single-mode |
| 248 | is still required to prevent interference. (Reported by Dan | 343 | is still required to prevent interference. (Reported by Dan |
| 249 | Nicolaescu.) (Update: selecting a region with the mouse enables | 344 | Nicolaescu.) (Update: selecting a region with the mouse enables |
| 250 | single_kboard under X. This is very confusing.) | 345 | single_kboard under X. This is very confusing.) Update: |
| 346 | After discussions with Richard, this will be resolved by having | ||
| 347 | locked displays warn the user to wait, and introducing a complex | ||
| 348 | protocol to remotely bail out of single-kboard mode by pressing C-g. | ||
| 251 | 349 | ||
| 252 | ** The terminal customization files in term/*.el tend to change global | 350 | ** The terminal customization files in term/*.el tend to change global |
| 253 | parameters, which may confuse Emacs with multiple displays. Change | 351 | parameters, which may confuse Emacs with multiple displays. Change |
| @@ -268,7 +366,9 @@ THINGS TO DO | |||
| 268 | opened for editing. I think I agree with him. | 366 | opened for editing. I think I agree with him. |
| 269 | 367 | ||
| 270 | ** Miles Bader suggests that C-x C-c on an emacsclient frame should | 368 | ** Miles Bader suggests that C-x C-c on an emacsclient frame should |
| 271 | only close the frame, not exit the entire Emacs session. | 369 | only close the frame, not exit the entire Emacs session. Update: |
| 370 | see above for a function that does this. Maybe this should be the | ||
| 371 | new default? | ||
| 272 | 372 | ||
| 273 | ** Very strange bug: visible-bell does not work on secondary | 373 | ** Very strange bug: visible-bell does not work on secondary |
| 274 | terminals in xterm and konsole. The screen does flicker a bit, | 374 | terminals in xterm and konsole. The screen does flicker a bit, |