GNU bug report logs - #41420
26.3; Terminal to 9 columns if other buffer killed (emacs daemon)

Previous Next

Package: emacs;

Reported by: "K. Jansma" <k_jansma <at> yahoo.com>

Date: Wed, 20 May 2020 15:04:02 UTC

Severity: normal

Tags: moreinfo

Found in version 26.3

Done: Lars Ingebrigtsen <larsi <at> gnus.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 41420 in the body.
You can then email your comments to 41420 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#41420; Package emacs. (Wed, 20 May 2020 15:04:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to "K. Jansma" <k_jansma <at> yahoo.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 20 May 2020 15:04:02 GMT) Full text and rfc822 format available.

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

From: "K. Jansma" <k_jansma <at> yahoo.com>
To: "bug-gnu-emacs <at> gnu.org" <bug-gnu-emacs <at> gnu.org>
Subject: 26.3; Terminal to 9 columns if other buffer killed (emacs daemon)
Date: Wed, 20 May 2020 14:53:33 +0000 (UTC)
When using Emacs with e.g. EXWM, it may happen that a terminal buffer resets the number of columns to 9 if another buffer is killed.
This is not an issue with EXWM, as the following reproduction scenarios shows:

1.    Go to an unused tty and run "emacs --fg-daemon -Q"

2.    go to another tty and run "emacsclient -c"

3.    Make sure the current frame has only one window C-x 0

4.    open terminal buffer M-x ansi-term

5.    switch to *scratch* C-x b *scratch* (since there is only one window, the terminal will now be hidden)

6.    kill the scratch buffer C-x k *scratch*

7.    You will see the terminal buffer again, but it wrapped all lines to 9 columns max, despite the buffer covering the whole frame (there are no other windows) and there is no user-friendly (AFAIK) way to reset it to use the full buffer width

When not running Emacs as daemon, this does not happen.

Note that some users suggest never killing *scratch*, but AFAIK this is the only reliable way I'm currently aware of, to reproduce this issue. Under normal usage circumstances, it is not limited to killing *scratch*...


Another user who helped out in reproducing this issue [1] writes:

"When you run Emacs as a daemon it creates a hidden frame, and by default that frame will be 'displaying' the *scratch* buffer. (In a non-default invocation, it might be displaying something else.) When you kill the buffer which was displayed by the hidden frame, it means the hidden frame is now displaying something else. If that something else is your terminal buffer (probably the case if that was the most recent other buffer used) then you run headlong into the problem I described earlier.

Please M-x report-emacs-bug and include all the details I've mentioned here. I think the hidden frame created by the daemon should be displaying a special-purpose hidden buffer, so that you can't (easily) accidentally cause that frame to display anything else. Or perhaps killing any buffer displayed in the hidden frame could cause Emacs to immediately create a new hidden buffer to display in its place. Or if it's workable, a way to have that frame displaying no buffers at all might be cleaner.

term.el can probably work around this, but I think the source of the issue is so obscure that it makes all kinds of sense to address it generally, so that similar issues aren't caused for other libraries."


References:
[1] https://www.reddit.com/r/emacs/comments/gm1d8y/please_help_me_fix_this_bug_with_terminal_buffers/




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#41420; Package emacs. (Mon, 06 Jun 2022 13:53:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: "K. Jansma" <k_jansma <at> yahoo.com>
Cc: 41420 <at> debbugs.gnu.org
Subject: Re: bug#41420: 26.3; Terminal to 9 columns if other buffer killed
 (emacs daemon)
Date: Mon, 06 Jun 2022 15:52:09 +0200
"K. Jansma" <k_jansma <at> yahoo.com> writes:

> When using Emacs with e.g. EXWM, it may happen that a terminal buffer
> resets the number of columns to 9 if another buffer is killed.

(I'm going through old bug reports that unfortunately weren't resolved
at the time.)

Are you still seeing this issue with recent Emacs versions?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Added tag(s) moreinfo. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Mon, 06 Jun 2022 13:53:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#41420; Package emacs. (Tue, 05 Jul 2022 11:46:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: "K. Jansma" <k_jansma <at> yahoo.com>
Cc: 41420 <at> debbugs.gnu.org
Subject: Re: bug#41420: 26.3; Terminal to 9 columns if other buffer killed
 (emacs daemon)
Date: Tue, 05 Jul 2022 13:45:35 +0200
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> Are you still seeing this issue with recent Emacs versions?

More information was requested, but no response was given within a
month, so I'm closing this bug report.  If the problem still exists,
please respond to this email and we'll reopen the bug report.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




bug closed, send any further explanations to 41420 <at> debbugs.gnu.org and "K. Jansma" <k_jansma <at> yahoo.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Tue, 05 Jul 2022 11:46:03 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 03 Aug 2022 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 265 days ago.

Previous Next


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