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 <gentoo-user+bounces-138236-garchives=archives.gentoo.org@lists.gentoo.org>) id 1STLEy-0003cH-Sd for garchives@archives.gentoo.org; Sat, 12 May 2012 22:56:45 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 48857E0B69; Sat, 12 May 2012 22:56:31 +0000 (UTC) Received: from smtpout.karoo.kcom.com (smtpout.karoo.kcom.com [212.50.160.34]) by pigeon.gentoo.org (Postfix) with ESMTP id 0463EE06FE for <gentoo-user@lists.gentoo.org>; Sat, 12 May 2012 22:55:16 +0000 (UTC) X-IronPort-AV: E=Sophos;i="4.75,577,1330905600"; d="scan'208";a="620777175" Received: from 213-152-39-89.dsl.eclipse.net.uk (HELO compaq.stroller.uk.eu.org) ([213.152.39.89]) by smtpout.karoo.kcom.com with ESMTP; 12 May 2012 23:55:16 +0100 Received: from [192.168.1.100] (unknown [192.168.1.100]) by compaq.stroller.uk.eu.org (Postfix) with ESMTP id 1832512696 for <gentoo-user@lists.gentoo.org>; Sat, 12 May 2012 23:54:03 +0100 (BST) Content-Type: text/plain; charset=windows-1252 Precedence: bulk List-Post: <mailto:gentoo-user@lists.gentoo.org> List-Help: <mailto:gentoo-user+help@lists.gentoo.org> List-Unsubscribe: <mailto:gentoo-user+unsubscribe@lists.gentoo.org> List-Subscribe: <mailto:gentoo-user+subscribe@lists.gentoo.org> List-Id: Gentoo Linux mail <gentoo-user.gentoo.org> X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org Mime-Version: 1.0 (Apple Message framework v1257) Subject: Re: [gentoo-user] less file.html From: Stroller <stroller@stellar.eclipse.co.uk> In-Reply-To: <20120512234944.49a96c8f@weird.wonkology.org> Date: Sat, 12 May 2012 23:55:09 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <23D495F0-B671-4A20-B06F-AEC4F0BE4A5D@stellar.eclipse.co.uk> References: <F6244FCC-F3E3-4801-AD08-3BAC44EA62E4@stellar.eclipse.co.uk> <20120512234944.49a96c8f@weird.wonkology.org> To: gentoo-user@lists.gentoo.org X-Mailer: Apple Mail (2.1257) X-Archives-Salt: 2fc16994-2b0f-415c-b1bb-66cd5f9bef9f X-Archives-Hash: 47a0868e82e9e8c6d47ed84ef4095f6e On 12 May 2012, at 22:49, Alex Schuster wrote: > =85=20 >> I want to view the html source of a webpage. >>=20 >> When I run `less file.html` the rendered webpage is shown, not the >> source. It is as if lynx had been invoked, rather than less.=20 >> ... >> How do I disable less from parsing html source, please? >=20 > You can set LESSIGNORE=3D'*.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? $ LESSOPEN=3D"" less file.html # works fine $ LESSIGNORE=3D'*.htm*' less file.html #does not I've also tried `export LESSIGNORE=3D'*.htm*'` (for what difference that = makes?) and tried running the `less` command on a separate line. What version of less are you using, please? I have =3Dsys-apps/less-444 = installed here. As per my previous reply to Canek's suggestion, I now have a working = solution. LESSOPEN is the keyword that works for me, here. So I only = make this reply to you now for completeness, as part of the eternal = quest for deeper understanding and for the benefit of those searching in = the future. LESSIGNORE seems even more poorly documented than LESSOPEN - = I'm afraid I never think to use `info`, only `man` in the first = instance. Stroller.