GNU bug report logs - #33363
26.1; display problem with mode-line turned off on terminal

Previous Next

Package: emacs;

Reported by: Nick Helm <nick <at> tenpoint.co.nz>

Date: Tue, 13 Nov 2018 03:42:02 UTC

Severity: normal

Found in version 26.1

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 33363 in the body.
You can then email your comments to 33363 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#33363; Package emacs. (Tue, 13 Nov 2018 03:42:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Nick Helm <nick <at> tenpoint.co.nz>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 13 Nov 2018 03:42:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Nick Helm <nick <at> tenpoint.co.nz>
To: bug-gnu-emacs <at> gnu.org
Subject: 26.1; display problem with mode-line turned off on terminal
Date: Tue, 13 Nov 2018 16:40:23 +1300
Running Emacs in a terminal and setting mode-line-format to nil can 
cause incorrect display of buffer contents.

emacs -Q -nw
M-: (setq mode-line-format nil)
C-x C-f lisp/org/org.el.gz ;for example
RET RET RET... DEL DEL DEL... ;add and delete white-space

Note the second-to-last row in the window, which formerly held the
mode-line, does not display the buffer contents correctly and any buffer
line that moves through the last row (when back-spacing) appears blank
further up the window.

I mainly observe this in emacs-lisp-mode and org-mode. The problem 
doesn't seem to occur when:

+ in fundamental-mode, c-mode or text-mode, or
+ visual-line-mode is active, or
+ the frame contains more than one window (v or h split), or
+ avoiding display of each line (e.g. C-u 10 RET C-u 10 DEL).


In GNU Emacs 26.1 (build 1, x86_64-apple-darwin14.5.0, NS appkit-1348.17 Version 10.10.5 (Build 14F2511))
 of 2018-05-31 built on builder10-10.porkrind.org
Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.

Configured using:
 'configure --with-ns '--enable-locallisppath=/Library/Application
 Support/Emacs/${version}/site-lisp:/Library/Application
 Support/Emacs/site-lisp' --with-modules'

Configured features:
NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS MODULES THREADS

Important settings:
  value of $LANG: en_NZ.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message rmc puny seq byte-opt gv
bytecomp byte-compile cconv cl-loaddefs cl-lib dired dired-loaddefs
format-spec rfc822 mml easymenu mml-sec password-cache epa derived epg
epg-config gnus-util rmail rmail-loaddefs mm-decode mm-bodies mm-encode
mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047
rfc2045 ietf-drums mm-util mail-prsvr mail-utils term/xterm xterm
time-date elec-pair tooltip eldoc electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel term/ns-win ns-win ucs-normalize mule-util
term/common-win tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode elisp-mode lisp-mode
prog-mode register page menu-bar rfn-eshadow isearch timer select
scroll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932
hebrew greek romanian slovak czech european ethiopic indian cyrillic
chinese composite charscript charprop case-table epa-hook jka-cmpr-hook
help simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs
button faces cus-face macroexp files text-properties overlay sha1 md5
base64 format env code-pages mule custom widget hashtable-print-readable
backquote kqueue cocoa ns multi-tty make-network-process emacs)

Memory information:
((conses 16 208462 9630)
 (symbols 48 20166 1)
 (miscs 40 34 154)
 (strings 32 29167 1089)
 (string-bytes 1 765466)
 (vectors 16 32985)
 (vector-slots 8 673123 13352)
 (floats 8 52 452)
 (intervals 56 197 0)
 (buffers 992 12))





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#33363; Package emacs. (Sat, 17 Nov 2018 12:45:02 GMT) Full text and rfc822 format available.

Message #8 received at 33363 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Nick Helm <nick <at> tenpoint.co.nz>
Cc: 33363 <at> debbugs.gnu.org
Subject: Re: bug#33363: 26.1;
 display problem with mode-line turned off on terminal
Date: Sat, 17 Nov 2018 14:44:26 +0200
> From: Nick Helm <nick <at> tenpoint.co.nz>
> Date: Tue, 13 Nov 2018 16:40:23 +1300
> 
> Running Emacs in a terminal and setting mode-line-format to nil can 
> cause incorrect display of buffer contents.

Right.  And it's a very old bug.

> emacs -Q -nw
> M-: (setq mode-line-format nil)
> C-x C-f lisp/org/org.el.gz ;for example
> RET RET RET... DEL DEL DEL... ;add and delete white-space
> 
> Note the second-to-last row in the window, which formerly held the
> mode-line, does not display the buffer contents correctly and any buffer
> line that moves through the last row (when back-spacing) appears blank
> further up the window.

The immediate cause of this is that we miscalculate the number of
lines in the window in this case, and then instruct the terminal to
delete the wrong line.  I'm debating how best to fix this; stay tuned.

> I mainly observe this in emacs-lisp-mode and org-mode. The problem 
> doesn't seem to occur when:
> 
> + in fundamental-mode, c-mode or text-mode, or
> + visual-line-mode is active, or
> + the frame contains more than one window (v or h split), or
> + avoiding display of each line (e.g. C-u 10 RET C-u 10 DEL).

The offending code is a redisplay optimization, and is used only under
very specific conditions.  That's why it doesn't rear its ugly head in
many situations.

Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#33363; Package emacs. (Mon, 19 Nov 2018 18:17:01 GMT) Full text and rfc822 format available.

Message #11 received at 33363 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: nick <at> tenpoint.co.nz
Cc: 33363 <at> debbugs.gnu.org
Subject: Re: bug#33363: 26.1;
 display problem with mode-line turned off on terminal
Date: Mon, 19 Nov 2018 20:16:44 +0200
> Date: Sat, 17 Nov 2018 14:44:26 +0200
> From: Eli Zaretskii <eliz <at> gnu.org>
> Cc: 33363 <at> debbugs.gnu.org
> 
> The immediate cause of this is that we miscalculate the number of
> lines in the window in this case, and then instruct the terminal to
> delete the wrong line.  I'm debating how best to fix this; stay tuned.

Should be fixed now on the emacs-26 branch.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#33363; Package emacs. (Mon, 19 Nov 2018 22:01:02 GMT) Full text and rfc822 format available.

Message #14 received at 33363 <at> debbugs.gnu.org (full text, mbox):

From: Nick Helm <nick <at> tenpoint.co.nz>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 33363 <at> debbugs.gnu.org
Subject: Re: bug#33363: 26.1; display problem with mode-line turned off on
 terminal
Date: Tue, 20 Nov 2018 11:00:35 +1300
On 20/11/2018, at 7:16 AM, Eli Zaretskii <eliz <at> gnu.org> wrote:
> 
>> Date: Sat, 17 Nov 2018 14:44:26 +0200
>> From: Eli Zaretskii <eliz <at> gnu.org>
>> Cc: 33363 <at> debbugs.gnu.org
>> 
>> The immediate cause of this is that we miscalculate the number of
>> lines in the window in this case, and then instruct the terminal to
>> delete the wrong line.  I'm debating how best to fix this; stay tuned.
> 
> Should be fixed now on the emacs-26 branch.

Confirmed, the problem is gone on the emacs-26 branch. 

Many thanks for looking at this Eli.




Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Tue, 20 Nov 2018 03:32:02 GMT) Full text and rfc822 format available.

Notification sent to Nick Helm <nick <at> tenpoint.co.nz>:
bug acknowledged by developer. (Tue, 20 Nov 2018 03:32:02 GMT) Full text and rfc822 format available.

Message #19 received at 33363-done <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Nick Helm <nick <at> tenpoint.co.nz>
Cc: 33363-done <at> debbugs.gnu.org
Subject: Re: bug#33363: 26.1; display problem with mode-line turned off on
 terminal
Date: Tue, 20 Nov 2018 05:31:37 +0200
> From: Nick Helm <nick <at> tenpoint.co.nz>
> Date: Tue, 20 Nov 2018 11:00:35 +1300
> Cc: 33363 <at> debbugs.gnu.org
> 
> On 20/11/2018, at 7:16 AM, Eli Zaretskii <eliz <at> gnu.org> wrote:
> > 
> >> Date: Sat, 17 Nov 2018 14:44:26 +0200
> >> From: Eli Zaretskii <eliz <at> gnu.org>
> >> Cc: 33363 <at> debbugs.gnu.org
> >> 
> >> The immediate cause of this is that we miscalculate the number of
> >> lines in the window in this case, and then instruct the terminal to
> >> delete the wrong line.  I'm debating how best to fix this; stay tuned.
> > 
> > Should be fixed now on the emacs-26 branch.
> 
> Confirmed, the problem is gone on the emacs-26 branch. 
> 
> Many thanks for looking at this Eli.

Thanks for testing, I'm closing the bug.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 18 Dec 2018 12:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 5 years and 128 days ago.

Previous Next


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