aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Müller <ulm@gentoo.org>2009-10-04 22:55:33 +0000
committerUlrich Müller <ulm@gentoo.org>2009-10-04 22:55:33 +0000
commit1960a949382f669362fa3e4aed0c1009c035aa06 (patch)
treed36303fb5f2a96796a054ae6ae741a79b8a51269
parentVersion 0.16 released. (diff)
downloademacs-tools-1960a949382f669362fa3e4aed0c1009c035aa06.tar.gz
emacs-tools-1960a949382f669362fa3e4aed0c1009c035aa06.tar.bz2
emacs-tools-1960a949382f669362fa3e4aed0c1009c035aa06.zip
Always display the saved output if the EMACS_DEBUG variable is set.
svn path=/emacs-daemon/; revision=1430
-rw-r--r--ChangeLog7
-rw-r--r--emacs-wrapper.sh2
-rw-r--r--emacs.conf3
-rw-r--r--emacs.rc2
4 files changed, 12 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index ed1efc1..be50893 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2009-10-05 Ulrich Mueller <ulm@gentoo.org>
+
+ * emacs-wrapper.sh: Always display the saved output if the
+ EMACS_DEBUG variable is set.
+ * emacs.rc (start): Export EMACS_DEBUG.
+ * emacs.conf (EMACS_DEBUG): Document variable.
+
2009-09-19 Ulrich Mueller <ulm@gentoo.org>
* Version 0.16 released.
diff --git a/emacs-wrapper.sh b/emacs-wrapper.sh
index a3983ba..7a05967 100644
--- a/emacs-wrapper.sh
+++ b/emacs-wrapper.sh
@@ -17,7 +17,7 @@ for (( t=${EMACS_TIMEOUT:-30}; t > 0; t-- )); do
if ! kill -0 ${pid} 2>/dev/null; then
wait ${pid} # get exit status
status=$?
- [[ ${status} -ne 0 ]] && cat "${logfile}"
+ [[ ${status} -ne 0 || -n ${EMACS_DEBUG} ]] && cat "${logfile}"
exit ${status}
fi
done
diff --git a/emacs.conf b/emacs.conf
index 2225a30..8e6961b 100644
--- a/emacs.conf
+++ b/emacs.conf
@@ -25,3 +25,6 @@
# this as the user's login shell. If (explicitely set to) empty, then
# the shell field from the passwd file is used.
#EMACS_SHELL="/bin/bash"
+
+# Enable additional output for debugging.
+#EMACS_DEBUG=""
diff --git a/emacs.rc b/emacs.rc
index b359d8c..de277dc 100644
--- a/emacs.rc
+++ b/emacs.rc
@@ -50,7 +50,7 @@ start() {
SHELL=${EMACS_SHELL:-$(awk -F: "\$1 == \"${USER}\" { print \$7 }" \
/etc/passwd)}
- export SHELL EMACS EMACS_TIMEOUT
+ export SHELL EMACS EMACS_TIMEOUT EMACS_DEBUG
ebegin "Starting Emacs daemon for user ${USER}"
if [ -z "${RC_SVCNAME}" ]; then