diff options
| author | Paul Eggert | 2018-12-01 23:06:06 -0800 |
|---|---|---|
| committer | Paul Eggert | 2018-12-01 23:08:48 -0800 |
| commit | 92282cb50248117185774cf8076d1ff83d501be7 (patch) | |
| tree | 0e03dbd31e82b3f962b54c88ce0be1290b23d7ff /admin | |
| parent | 070ef95c1007cb3d54e04bc337d9fb5463912cc1 (diff) | |
| download | emacs-92282cb50248117185774cf8076d1ff83d501be7.tar.gz emacs-92282cb50248117185774cf8076d1ff83d501be7.zip | |
emacsclient: prefer XDG_RUNTIME_DIR (Bug#33367)
* lib-src/emacsclient.c: Disable -Wformat-truncation=2,
to avoid false alarms about the new snprintf calls.
(local_sockname): New function.
(set_local_socket): Use it. Prefer XDG_RUNTIME_DIR (if set)
for location of socket directory. Avoid unnecessary memory
allocation by using snprintf to destination.
* lisp/server.el (server-socket-dir): Prefer XDG_RUNTIME_DIR if set.
Diffstat (limited to 'admin')
| -rw-r--r-- | admin/notes/multi-tty | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/admin/notes/multi-tty b/admin/notes/multi-tty index 5b34bb598ef..619af8e7fab 100644 --- a/admin/notes/multi-tty +++ b/admin/notes/multi-tty | |||
| @@ -171,7 +171,11 @@ preload-emacs "$name" wait | |||
| 171 | name="$1" | 171 | name="$1" |
| 172 | waitp="$2" | 172 | waitp="$2" |
| 173 | screendir="/var/run/screen/S-$USER" | 173 | screendir="/var/run/screen/S-$USER" |
| 174 | serverdir="/tmp/emacs$UID" | 174 | if [ "${XDG_RUNTIME_DIR+set}" ]; then |
| 175 | serverdir="$XDG_RUNTIME_DIR/emacs" | ||
| 176 | else | ||
| 177 | serverdir="${TMPDIR-/tmp}/emacs$UID" | ||
| 178 | fi | ||
| 175 | emacs=/usr/bin/emacs-multi-tty # Or wherever you installed your multi-tty Emacs | 179 | emacs=/usr/bin/emacs-multi-tty # Or wherever you installed your multi-tty Emacs |
| 176 | 180 | ||
| 177 | if [ -z "$name" ]; then | 181 | if [ -z "$name" ]; then |