From unknown Sat Aug 09 13:16:32 2025 X-Loop: help-debbugs@gnu.org Subject: bug#11432: Application that sets LINES/COLUMNS env vars behaves weird in term and ansi-term Resent-From: Nikos Chantziaras Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 08 May 2012 16:20:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 11432 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 11432@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.133649396810047 (code B ref -1); Tue, 08 May 2012 16:20:01 +0000 Received: (at submit) by debbugs.gnu.org; 8 May 2012 16:19:28 +0000 Received: from localhost ([127.0.0.1]:41346 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SRn8J-0002by-Ky for submit@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 ) id 1SRl0N-0007xX-Dz for submit@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 ) id 1SRkyD-0001ok-Bl for submit@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 ) id 1SRkyD-0001oZ-8D for submit@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 ) id 1SRkxu-0004OR-MM for bug-gnu-emacs@gnu.org; Tue, 08 May 2012 10:00:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SRkxZ-0001aM-4p for bug-gnu-emacs@gnu.org; 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 ) id 1SRkxY-0001Ze-T7 for bug-gnu-emacs@gnu.org; Tue, 08 May 2012 10:00:13 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1SRkxU-00038e-T7 for bug-gnu-emacs@gnu.org; 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 ; 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 ; Tue, 08 May 2012 16:00:08 +0200 X-Injected-Via-Gmane: http://gmane.org/ From: Nikos Chantziaras Date: Tue, 08 May 2012 16:56:03 +0300 Organization: Lucas Barks Lines: 26 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@dough.gmane.org 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-Mailman-Approved-At: Tue, 08 May 2012 12:19:26 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@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.) From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 20 20:36:24 2020 Received: (at control) by debbugs.gnu.org; 21 Aug 2020 00:36:24 +0000 Received: from localhost ([127.0.0.1]:44491 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k8v2e-0000ln-3R for submit@debbugs.gnu.org; Thu, 20 Aug 2020 20:36:24 -0400 Received: from mail-yb1-f169.google.com ([209.85.219.169]:36351) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k8v2a-0000lW-FO for control@debbugs.gnu.org; Thu, 20 Aug 2020 20:36:22 -0400 Received: by mail-yb1-f169.google.com with SMTP id g3so148899ybc.3 for ; Thu, 20 Aug 2020 17:36:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:mime-version:date:message-id:subject:to; bh=zy5wT+FUSXjNtxanUnm13GKTAf3hfrDk1oAvzyL0LPg=; b=J0A2UkRFDNEywwmigWqJ09EPbj4DdlswTZsb+KyCoC3B55lIoMSm2F0tC9cvcGohxT l8nVz8oA0LnP39FvObH+BaHcc17cQ5eNAhp90MCZuzbA3xa7m5sOo0HPKoU8J7y4VdQM 7V3zYSH+GJ62mKWa40kGcuTT+7R9yN1W7PTbIcXfJszjXwByL2vYPXX48AEA2oxQkDgv 1XGPZbLiZvNT4FE6YsLi/JPmRsunBQOmbT5ocyVpFnFDwMCsO8HTQyUOKo58OQMfvIGa o7kFBjXEgAWYnce3sD7Nim53LveVQlzDG7Edq6ni+QN/UQcuU/O2bB8I0SN1aNlrTz9m no9A== X-Gm-Message-State: AOAM532zjKFPKTNC6mG7xSLK27oZt1n1NO1BjGWVxdNnsrugopWeUHYU mO5PbaHi2j/OxV9CSFCnEoiYPJod3A6RmhtL0ZBXBC3Xc14= X-Google-Smtp-Source: ABdhPJxflLQf7qIw/aUyjdMpOCblmZT2NnBR7IT1SjLuNEezm0mMiaxTOPJPP6x/8MiiKQHxC5MMyn+ciPDQuUMXxjM= X-Received: by 2002:a25:880e:: with SMTP id c14mr467480ybl.181.1597970174819; Thu, 20 Aug 2020 17:36:14 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Thu, 20 Aug 2020 17:36:14 -0700 From: Stefan Kangas MIME-Version: 1.0 Date: Thu, 20 Aug 2020 17:36:14 -0700 Message-ID: Subject: To: control@debbugs.gnu.org Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 2.5 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: forcemerge 37564 11432 thanks Content analysis details: (2.5 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (stefankangas[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.219.169 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.219.169 listed in wl.mailspike.net] 2.0 BLANK_SUBJECT Subject is present but empty 0.2 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different 0.0 UNPARSEABLE_RELAY Informational: message has unparseable relay lines X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.5 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: forcemerge 37564 11432 thanks Content analysis details: (1.5 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.219.169 listed in wl.mailspike.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.219.169 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (stefankangas[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 2.0 BLANK_SUBJECT Subject is present but empty -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager 0.2 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different 0.0 UNPARSEABLE_RELAY Informational: message has unparseable relay lines forcemerge 37564 11432 thanks