GNU bug report logs - #37564
[PATCH] don't export LINES and COLUMNS env vars in term to fix ncurses applications

Previous Next

Package: emacs;

Reported by: Matthew Leach <matthew <at> mattleach.net>

Date: Mon, 30 Sep 2019 20:00:02 UTC

Severity: normal

Tags: fixed, patch

Merged with 11432

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Matthew Leach <matthew <at> mattleach.net>
Cc: 37564 <at> debbugs.gnu.org
Subject: bug#37564: [PATCH] don't export LINES and COLUMNS env vars in term to fix ncurses applications
Date: Wed, 02 Oct 2019 05:28:15 +0300
> From: Matthew Leach <matthew <at> mattleach.net>
> Cc: 37564 <at> debbugs.gnu.org
> Date: Tue, 01 Oct 2019 20:24:14 +0100
> 
> > I simply tried "env | fgrep LINES" and I do see the variable, although
> > it wasn't there before I launched Emacs.
> 
> I would expect the variable to be there when inside Emacs as it has
> exported it.  You should find that it won't exist if ran outside Emacs,
> for example in xterm.

Sorry, I'm confused.  Are we talking about running "M-x term" inside
Emacs, or are we talking about something else?  The subject of the bug
report says "term", so I assumed you mean term-mode.

> Ah, indeed if I try and resize and print the variable it has updated:
> 
> matthew <at> hopton ~ $ env | grep -i lines
> LINES=30
> matthew <at> hopton ~ $ env | grep -i lines
> LINES=12
> 
> I think the issue is that the environment can't be while a process is
> running; the environment variables are fixed when the program has
> started. For a ncurses application this presents a problem as LINES and
> COLUMNS can't be updated when the window size is changed and the program
> handles a SIGWINCH. You can see that on the output above.

While the process is running, Emacs sends ioctl commands to
communicate the window size changes.




This bug report was last modified 4 years and 269 days ago.

Previous Next


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