From: Glenn Morris Date: Thu, 16 Oct 2008 07:18:04 +0000 (+0000) Subject: (Man-getpage-in-background): Force recent `man's to output X-Git-Tag: emacs-pretest-23.0.90~2446 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=3d56260a0bee73719dca5a39aa562cebadfa4331;p=emacs.git (Man-getpage-in-background): Force recent `man's to output escape sequences even when stdout is not a tty. (Bug#1142) --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d07e5becd85..3ac0b618b6d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2008-10-16 Glenn Morris + + * man.el (Man-getpage-in-background): Force recent `man's to output + escape sequences even when stdout is not a tty. (Bug#1142) + 2008-10-15 Teodor Zlatanov * international/mule-conf.el: Add `utf8' and `UTF8' as diff --git a/lisp/man.el b/lisp/man.el index 353a9032992..5b77b0b12d6 100644 --- a/lisp/man.el +++ b/lisp/man.el @@ -829,6 +829,10 @@ all sections related to a subject, put something appropriate into the (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