From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#37564: [PATCH] don't export LINES and COLUMNS env vars in term to fix ncurses applications Date: Tue, 21 Jan 2020 19:11:26 +0200 Message-ID: <83y2u0vio1.fsf@gnu.org> References: <87y2y5lfnb.fsf@1e0.co.uk> <83eezxatsv.fsf@gnu.org> <87tv8slb6w.fsf@mattleach.net> <83a7aka1q5.fsf@gnu.org> <87sgocfh8c.fsf@mattleach.net> <83y2y48f8u.fsf@gnu.org> <87o8z0few1.fsf@mattleach.net> <83sgob98zk.fsf@gnu.org> <9ipnjdemzv.fsf@fencepost.gnu.org> <878sq0jqi6.fsf@mattleach.net> <87o8uyrlja.fsf@marxist.se> <83pnfevsbv.fsf@gnu.org> <7nd0bd8w1e.fsf@fencepost.gnu.org> Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="72619"; mail-complaints-to="usenet@ciao.gmane.io" Cc: matthew@mattleach.net, 37564@debbugs.gnu.org, stefan@marxist.se To: Glenn Morris Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jan 21 18:12:13 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1itx4X-000IiA-Cq for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 21 Jan 2020 18:12:13 +0100 Original-Received: from localhost ([::1]:58698 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1itx4W-0004tg-7u for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 21 Jan 2020 12:12:12 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44675) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1itx4N-0004tN-Hu for bug-gnu-emacs@gnu.org; Tue, 21 Jan 2020 12:12:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1itx4M-0005hq-KT for bug-gnu-emacs@gnu.org; Tue, 21 Jan 2020 12:12:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:42404) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1itx4M-0005hi-GV for bug-gnu-emacs@gnu.org; Tue, 21 Jan 2020 12:12:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1itx4M-0007G0-CK for bug-gnu-emacs@gnu.org; Tue, 21 Jan 2020 12:12:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 21 Jan 2020 17:12:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37564 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 37564-submit@debbugs.gnu.org id=B37564.157962669127849 (code B ref 37564); Tue, 21 Jan 2020 17:12:02 +0000 Original-Received: (at 37564) by debbugs.gnu.org; 21 Jan 2020 17:11:31 +0000 Original-Received: from localhost ([127.0.0.1]:48377 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1itx3o-0007F4-2G for submit@debbugs.gnu.org; Tue, 21 Jan 2020 12:11:31 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:35397) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1itx3j-0007Ej-MP for 37564@debbugs.gnu.org; Tue, 21 Jan 2020 12:11:27 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:49758) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1itx3d-0005EM-LD; Tue, 21 Jan 2020 12:11:17 -0500 Original-Received: from [176.228.60.248] (port=3629 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1itx3c-0003lI-E3; Tue, 21 Jan 2020 12:11:16 -0500 In-reply-to: <7nd0bd8w1e.fsf@fencepost.gnu.org> (message from Glenn Morris on Mon, 20 Jan 2020 19:58:53 -0500) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:175015 Archived-At: > From: Glenn Morris > Cc: Stefan Kangas , matthew@mattleach.net, 37564@debbugs.gnu.org > Date: Mon, 20 Jan 2020 19:58:53 -0500 > > > No other terminal emulator exports LINES and COLUMNS as environment variables. Maybe so, but that in itself doesn't yet mean Emacs cannot do that, if we decide it's useful. > Applications use ioctl to get the size. > -> Therefore setting LINES and COLUMNS is pointless. > If LINES/COLUMNS are set, they override ioctl. Is the last bit a generally accepted paradigm? I could easily justify the contrary preference. And then there might be applications that don't use ioctl. > You can't update the environment of an already running process. > Therefore the presence of LINES/COLUMNS in the initial environment > of a process spawned from Emacs means it will fail to react to resizing. > Therefore exporting LINES and COLUMNS is harmful. Only if the application uses the variables in preference to ioctl. > So don't export LINES and COLUMNS. I agreed at the very beginning of the discussion to make the export optional. I don't think we can safely remove that unconditionally, not yet.