From 528a281e307572c6d80ece237f1646f367e40919 Mon Sep 17 00:00:00 2001 From: Jephte Clain Date: Wed, 18 Oct 2017 06:55:51 +0400 Subject: [PATCH] =?UTF-8?q?em:=20supprimer=20la=20sortie=20d'erreur=20par?= =?UTF-8?q?=20d=C3=A9faut.=20rendre=20configurable=20la=20g=C3=A9om=C3=A9t?= =?UTF-8?q?rie?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- em | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/em b/em index f1e40e4..027106d 100755 --- a/em +++ b/em @@ -1,13 +1,19 @@ #!/bin/bash # -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8 -EMACS_GEOMETRY=150x50+0+67 +: "${EM_GEOMETRY:=150x50+0+67}" "${EM_STDERR:=}" # Essayer avec emacs emacs="$(which emacs 2>/dev/null)" if [ -x "$emacs" ]; then if [ -n "$DISPLAY" ]; then - exec "$emacs" -g "$EMACS_GEOMETRY" "$@" & + if [ -n "$EM_STDERR" ]; then + # ne pas supprimer la sortie erreur + exec "$emacs" -g "$EM_GEOMETRY" "$@" & + else + # supprimer la sortie d'erreur. les warnings de GTK sont horripilants + exec "$emacs" -g "$EM_GEOMETRY" "$@" 2>/dev/null & + fi exit 0 else exec "$emacs" -nw "$@"