Eli Zaretskii writes: >> From: Matthew Leach >> Date: Mon, 30 Sep 2019 20:59:04 +0100 >> >> The attached patch removes the exporting of the LINES and COLUMNS >> environment variables in term-mode. Exporting these variables causes >> issues for ncurses applications. For example, when running: >> >> emacs -Q >> M-x term >> (to select /bin/bash) >> htop (to run htop) >> >> and resizing the window (especially making it smaller) can make the >> program impossible to read. > > Thanks, but I don't think we can make this change unconditionally, > because not all applications that heed LINES and COLUMNS use ncurses. I'm curious as to which programs you are referring? AFAIK, if a program tries to read the LINES and COLUMNS environment variables, using `getenv()', they don't exist. Running 'echo $LINES' on a bash terminal seems to actually do an ioctl to obtain the value of LINES. Nevertheless, if a program does read the LINES and COLUMNS variables, these values will be wrong if the window has been resized (try and compile the attached C snippet and run in term mode while resizing the window). Should that be considered as a separate bug? > I wonder if we can do better than just providing a defcustom. I could make this a defcustom if that would get the patch in? Thanks, -- Matt