GNU bug report logs - #11432
Application that sets LINES/COLUMNS env vars behaves weird in term and ansi-term

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Nikos Chantziaras <realnc@HIDDEN>; dated Tue, 8 May 2012 16:20:01 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 8 May 2012 16:19:28 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue May 08 12:19:28 2012
Received: from localhost ([127.0.0.1]:41346 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1SRn8J-0002by-Ky
	for submit <at> debbugs.gnu.org; Tue, 08 May 2012 12:19:28 -0400
Received: from eggs.gnu.org ([208.118.235.92]:46890)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <geb-bug-gnu-emacs@HIDDEN>) id 1SRl0N-0007xX-Dz
	for submit <at> debbugs.gnu.org; Tue, 08 May 2012 10:03:08 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <geb-bug-gnu-emacs@HIDDEN>) id 1SRkyD-0001ok-Bl
	for submit <at> debbugs.gnu.org; Tue, 08 May 2012 10:00:55 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,
	RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.2
Received: from lists.gnu.org ([208.118.235.17]:35990)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <geb-bug-gnu-emacs@HIDDEN>) id 1SRkyD-0001oZ-8D
	for submit <at> debbugs.gnu.org; Tue, 08 May 2012 10:00:53 -0400
Received: from eggs.gnu.org ([208.118.235.92]:53578)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <geb-bug-gnu-emacs@HIDDEN>) id 1SRkxu-0004OR-MM
	for bug-gnu-emacs@HIDDEN; Tue, 08 May 2012 10:00:52 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <geb-bug-gnu-emacs@HIDDEN>) id 1SRkxZ-0001aM-4p
	for bug-gnu-emacs@HIDDEN; Tue, 08 May 2012 10:00:33 -0400
Received: from plane.gmane.org ([80.91.229.3]:55868)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <geb-bug-gnu-emacs@HIDDEN>) id 1SRkxY-0001Ze-T7
	for bug-gnu-emacs@HIDDEN; Tue, 08 May 2012 10:00:13 -0400
Received: from list by plane.gmane.org with local (Exim 4.69)
	(envelope-from <geb-bug-gnu-emacs@HIDDEN>) id 1SRkxU-00038e-T7
	for bug-gnu-emacs@HIDDEN; Tue, 08 May 2012 16:00:08 +0200
Received: from athedsl-343925.home.otenet.gr ([85.72.199.19])
	by main.gmane.org with esmtp (Gmexim 0.1 (Debian))
	id 1AlnuQ-0007hv-00
	for <bug-gnu-emacs@HIDDEN>; Tue, 08 May 2012 16:00:08 +0200
Received: from realnc by athedsl-343925.home.otenet.gr with local (Gmexim 0.1
	(Debian)) id 1AlnuQ-0007hv-00
	for <bug-gnu-emacs@HIDDEN>; Tue, 08 May 2012 16:00:08 +0200
X-Injected-Via-Gmane: http://gmane.org/
To: bug-gnu-emacs@HIDDEN
From: Nikos Chantziaras <realnc@HIDDEN>
Subject: Application that sets LINES/COLUMNS env vars behaves weird in term
	and ansi-term
Date: Tue, 08 May 2012 16:56:03 +0300
Organization: Lucas Barks
Lines: 26
Message-ID: <job8md$qgh$1@HIDDEN>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: usenet@HIDDEN
X-Gmane-NNTP-Posting-Host: athedsl-343925.home.otenet.gr
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:12.0) Gecko/20120430 Thunderbird/12.0.1
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 208.118.235.17
X-Spam-Score: -6.9 (------)
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Tue, 08 May 2012 12:19:26 -0400
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -6.9 (------)

I have a curses application (written in C++) that during start-up does:

   static char linesEnv[32];
   static char columnsEnv[32];
   /* Init the above vars */
   putenv(linesEnv);
   putenv(columnsEnv);

linesEnv and columnsEnv contain "LINES=N" and "COLUMNS=N" respectively, 
with N being the current terminal dimensions.

Now this sounds like a totally useless thing to do; why would you set 
these env vars if they're already set.  This is done in order to work 
around a bug in an old Solaris version.  But on other systems, this 
should have no effect.

But with emacs it does have an effect; the application's output is all 
messed up.  Characters appear in wrong places or entirely missing and 
everything is pretty much messed up.  I modified the program to not 
export the env vars when TERM=eterm (or eterm-color).  But in case this 
is a bug in Emacs, I'm reporting it here.

I'm using GNU Emacs 23.4.2 built without X support, with Ncurses 5.9 on 
Gentoo AMD64.  The problem also appears in Emacs 23.1 with X support on 
Ubuntu 10.04 (which is the system of the user who reported the problem 
to me.)





Acknowledgement sent to Nikos Chantziaras <realnc@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#11432; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Fri, 31 Oct 2014 17:00:04 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.