changeset 98772:7b3f18677181

(Man-getpage-in-background): Force recent `man's to output escape sequences even when stdout is not a tty. (Bug#1142)
author Glenn Morris <rgm@gnu.org>
date Thu, 16 Oct 2008 07:17:48 +0000
parents 9f8c6cd4b37c
children e58997be1ff1
files lisp/man.el
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/man.el	Thu Oct 16 04:09:13 2008 +0000
+++ b/lisp/man.el	Thu Oct 16 07:17:48 2008 +0000
@@ -829,6 +829,10 @@
 			      (Man-width (frame-width))
 			      ((window-width))))))
 	(setenv "GROFF_NO_SGR" "1")
+	;; Since man-db 2.4.3-1, man writes plain text with no escape
+	;; sequences when stdout is not a tty.	In 2.5.0, the following
+	;; env-var was added to allow control of this (see Debian Bug#340673).
+	(setenv "MAN_KEEP_FORMATTING" "1")
 	(if (fboundp 'start-process)
 	    (set-process-sentinel
 	     (start-process manual-program buffer