From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1STLfn-0001IX-TB for garchives@archives.gentoo.org; Sat, 12 May 2012 23:24:28 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 34A79E0920; Sat, 12 May 2012 23:24:13 +0000 (UTC) Received: from mx.virtyou.com (mx.virtyou.com [178.33.32.244]) by pigeon.gentoo.org (Postfix) with ESMTP id 23899E07AB for ; Sat, 12 May 2012 23:22:47 +0000 (UTC) Received: from weird.wonkology.org (xdsl-78-35-159-185.netcologne.de [78.35.159.185]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (Client did not present a certificate) by mx.virtyou.com (Postfix) with ESMTPSA id 54885DC041 for ; Sun, 13 May 2012 01:22:46 +0200 (CEST) Date: Sun, 13 May 2012 01:22:45 +0200 From: Alex Schuster To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] less file.html Message-ID: <20120513012245.7d5ee035@weird.wonkology.org> In-Reply-To: <23D495F0-B671-4A20-B06F-AEC4F0BE4A5D@stellar.eclipse.co.uk> References: <20120512234944.49a96c8f@weird.wonkology.org> <23D495F0-B671-4A20-B06F-AEC4F0BE4A5D@stellar.eclipse.co.uk> X-Mailer: Claws Mail 3.8.0 (GTK+ 2.24.10; x86_64-pc-linux-gnu) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Archives-Salt: 7ce80e45-0fb1-4d0d-8e28-bb8cdbc4886c X-Archives-Hash: 05795ee668b1ae929a0f21916560d3f2 Stroller writes: > On 12 May 2012, at 22:49, Alex Schuster wrote: [...] > >> How do I disable less from parsing html source, please? > > > > You can set LESSIGNORE='*.htm*'. This environment variable is used by > > the lesspipe command, which is invoked by less and filters the input > > file before giving it to less itself. > > Contrary to my previous email, sent in error, that does NOT work. > > Did you check this yourself? Yes. I did not know about this mechanism before, but 'env|grep -i less' showed the LESS and LESSOPEN environment variable, so I learnt about the lesspipe command. lesspipe -h gives a little info, LESSIGNORE is shown there. > $ LESSOPEN="" less file.html # works fine It should, for any type of file. > $ LESSIGNORE='*.htm*' less file.html #does not Working fine here. > I've also tried `export LESSIGNORE='*.htm*'` (for what difference that > makes?) and tried running the `less` command on a separate line. There is no difference, but it's more convenient to export the variable as you do not have to set it every time then. > What version of less are you using, please? I have =sys-apps/less-444 > installed here. 445-r1, but I just downgraded to 444, and it behaves the same. I have the pcre and unicode USE flags set, but don't assume they make any difference. Weird, no idea why it it not working for you. Wonko