From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18355 invoked by alias); 10 Aug 2019 22:29:17 -0000 Mailing-List: contact cygwin-apps-help@cygwin.com; run by ezmlm Precedence: bulk Sender: cygwin-apps-owner@cygwin.com List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Mail-Followup-To: cygwin-apps@cygwin.com Received: (qmail 18344 invoked by uid 89); 10 Aug 2019 22:29:17 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy=display, yellow, video, font X-HELO: smtp-out-so.shaw.ca Received: from smtp-out-so.shaw.ca (HELO smtp-out-so.shaw.ca) (64.59.136.137) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 10 Aug 2019 22:29:15 +0000 Received: from [192.168.1.114] ([24.64.172.44]) by shaw.ca with ESMTP id wZrLhtPilIhW9wZrMhg2KV; Sat, 10 Aug 2019 16:29:13 -0600 Reply-To: Brian.Inglis@SystematicSw.ab.ca Subject: Re: [ITP] italic-man To: cygwin-apps@cygwin.com References: <80003dc4-e484-543b-befe-3b3db8d3c1d6@towo.net> <875zn6uq0h.fsf@Rainer.invalid> <7ea1dcb2-70bc-9a74-e5a3-0be55f85d7fa@towo.net> From: Brian Inglis Openpgp: preference=signencrypt Message-ID: Date: Sat, 10 Aug 2019 22:29:00 -0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/mixed; boundary="------------4A5958EE302F197C05E43896" X-IsSubscribed: yes X-SW-Source: 2019-08/txt/msg00031.txt.bz2 This is a multi-part message in MIME format. --------------4A5958EE302F197C05E43896 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Content-length: 3591 On 2019-08-10 03:07, Thomas Wolff wrote: > Am 09.08.2019 um 22:51 schrieb Brian Inglis: >> On 2019-08-09 13:31, Thomas Wolff wrote: >>> Am 09.08.2019 um 20:56 schrieb Achim Gratz: >>>> Jon Turney writes: >>>>> This gets a GTG from me. >>>>> I believe that according to our stated procedures additional approvals >>>>> are required, because this package is unique to cygwin. >>>> I'm not sure I remember correctly from when the discussion went on the >>>> first time, but wasn't there some mumbling about this partly going into >>>> groff?  If that's still the case, remind me what this would entail and >>>> I'll look into it. >>> There are multiple ways of activating the feature (also described in the man >>> page). >>> The previous strategy placed a shell script wrapper "groff" aside groff, so the >>> groff script and groff.exe would coexist in /bin. This was tricky to install and >>> particularly it reportedly did not survive a package update of groff. >>> The new approach does not use this wrapper anymore. Instead it redirects nroff >>> to the package-supplied iroff script by configuration in /etc/man_db.conf. How are updates to man-db, /etc/man_db.conf etc. handled? Is a permanent postinstall script provided to maintain the conf on man-db updates? >> There's also use of the undocumented LESS_TERMCAP_... with GROFF_NO_SGR env vars >> (see attached - must be sourced from profile or rc) to remap bold, underline, >> etc. into italic and/or colour, or whatever else you want to change, in all less >> output. > So (without my package) LESS_TERMCAP_us=$(tput sitm) man ls > should have the same effect? Cannot reproduce. And what does GROFF_NO_SGR do? Those settings affect all *less* output, not just *man*. Some people can't stand any colours (white on black was good enough for my grandfather...) the same as I couldn't wait for decent fonts, graphics, and colour support on something other than plotters, like displays and printers, and then for files. Options are good, to allow users to choose where and what is affected, and how. Sorry, been messing around with colours, fonts, graphics, and SGR sequences so much, that I can't remember what led to what. You need the reset sequences also. Set GROFF_NO_SGR=1 to pass old bold/italic overstrikes thru for less to colourize - looks like if GROFF_NO_SGR just exists it works: $ LESS_TERMCAP_md=$(tput bold)$(tput setaf 4) \ LESS_TERMCAP_me=$(tput sgr0) \ LESS_TERMCAP_us=$(tput sitm)$(tput setaf 4) \ LESS_TERMCAP_ue=$(tput ritm)$(tput sgr0) \ GROFF_NO_SGR= man man bold is also bright blue, underline is shown as italic in blue: the attached now sets these up in the env. Other uses of SGR sequences are in e.g.: $ GREP_COLORS='mt=0;33;44;1;7:ln=34' grep -bnHi color ~/.bash* which on mt matches resets SGR, then sets fg colour yellow, background blue, enables bold, then reverses those colours, to display bold blue on bright yellow, line numbers in green, defaulting file names to magenta, and byte counts in blue; also e.g.: $ \ GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'\ gcc -g -Og -Wall -Wextra -c mintty_config.c as I run black fg text in white bg windows, and bright yellow fg warnings are invisible; just like blue fg messages in black bg windows, most combos of magenta and red, and many of cyan and green: those similar hues should be unmappable pairs in any colour palette! -- Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada This email may be disturbing to some readers as it contains too much technical detail. Reader discretion is advised. --------------4A5958EE302F197C05E43896 Content-Type: text/plain; charset=UTF-8; name=".LESS_TERMCAP" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename=".LESS_TERMCAP" Content-length: 2945 I3wvYmluL3NoCiMgLkxFU1NfVEVSTUNBUCAtIHNldCB0ZXJtY2FwIHByb3Bl cnRpZXMgIGZvciBtYW4gYW5kIG90aGVyIGxlc3MgcGFnaW5nCiMgV2hhdCB0 aGluZ3MgaW4gYSBtYW5wYWdlIHVzZSB3aGljaCBjYXBhYmlsaXRpZXM/CiMg bWFuIGFuZCBsZXNzIHVzZToKIyBib2xkIGZvciBoZWFkaW5ncywgY29tbWFu ZCBzeW5vcHNlcywgYW5kIGNvZGUgZm9udAojIHVuZGVybGluZSBmb3IgcHJv cGVyIG5hbWVzIChmb3IgZXhhbXBsZSwg4oCcdGVybWNhcOKAnSBhbmQg4oCc dGVybWluZm/igJ0gaW4gdGhlCiMgdGVybWNhcCBtYW5wYWdlKSwgdmFyaWFi bGUgbmFtZXMgKOKAnG5hbWXigJ0sIOKAnGJw4oCdLCDigJxpZOKAnSwgZXRj LiksIGFuZCB0eXBlIG5hbWVzCiMgaW4gc29tZSBtYW5wYWdlcyAoc3VjaCBh cyBkaXNwYXRjaF9xdWV1ZV9jcmVhdGUoMykpCiMg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