aboutsummaryrefslogtreecommitdiffstats
path: root/admin
diff options
context:
space:
mode:
authorPaul Eggert2018-12-01 23:06:06 -0800
committerPaul Eggert2018-12-01 23:08:48 -0800
commit92282cb50248117185774cf8076d1ff83d501be7 (patch)
tree0e03dbd31e82b3f962b54c88ce0be1290b23d7ff /admin
parent070ef95c1007cb3d54e04bc337d9fb5463912cc1 (diff)
downloademacs-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-tty6
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
171name="$1" 171name="$1"
172waitp="$2" 172waitp="$2"
173screendir="/var/run/screen/S-$USER" 173screendir="/var/run/screen/S-$USER"
174serverdir="/tmp/emacs$UID" 174if [ "${XDG_RUNTIME_DIR+set}" ]; then
175 serverdir="$XDG_RUNTIME_DIR/emacs"
176else
177 serverdir="${TMPDIR-/tmp}/emacs$UID"
178fi
175emacs=/usr/bin/emacs-multi-tty # Or wherever you installed your multi-tty Emacs 179emacs=/usr/bin/emacs-multi-tty # Or wherever you installed your multi-tty Emacs
176 180
177if [ -z "$name" ]; then 181if [ -z "$name" ]; then