GNU bug report logs - #54331
27.2; Closing frames loaded from desktop-read

Previous Next

Package: emacs;

Reported by: Rehan Deen <rehan.deen <at> gmail.com>

Date: Thu, 10 Mar 2022 19:36:02 UTC

Severity: normal

Tags: moreinfo

Found in version 27.2

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 54331 in the body.
You can then email your comments to 54331 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#54331; Package emacs. (Thu, 10 Mar 2022 19:36:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Rehan Deen <rehan.deen <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 10 Mar 2022 19:36:02 GMT) Full text and rfc822 format available.

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

From: Rehan Deen <rehan.deen <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 27.2; Closing frames loaded from desktop-read 
Date: Fri, 11 Mar 2022 00:13:23 +0530
A very annoying issue with `desktop-save` and `desktop-read` that I'm encountering at the moment:

- I'm starting Emacs in `daemon-mode`, and then open a client frame via
  my WM shortcut for `emacsclient -c`. I do `desktop-read` and my saved desktop opens with the 10 or so frames I had saved.

- When I go to one of the frames with a buffer I'm no longer interested in, and do `C-x C-c`, I end up not just closing that particular frame, but **all 10 or so of the frames that were open**.

- The Emacs daemon is still running, and opening another client frame shows that the buffers haven't been killed, so nothing has been lost per se - it's just that the arrangement of all the frames I had is just ruined.

Any idea how to stop this behaviour (i.e. being able to just kill one frame from the saved configuration)? 


I have also played around with these settings

```
  (setq desktop-restore-frames t)
  (setq desktop-restore-in-current-display nil)
  (setq desktop-restore-forces-onscreen nil)

```

but the issue persists.





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#54331; Package emacs. (Thu, 10 Mar 2022 20:10:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Rehan Deen <rehan.deen <at> gmail.com>
Cc: 54331 <at> debbugs.gnu.org
Subject: Re: bug#54331: 27.2; Closing frames loaded from desktop-read
Date: Thu, 10 Mar 2022 22:09:40 +0200
> From: Rehan Deen <rehan.deen <at> gmail.com>
> Date: Fri, 11 Mar 2022 00:13:23 +0530
> 
> A very annoying issue with `desktop-save` and `desktop-read` that I'm encountering at the moment:
> 
> - I'm starting Emacs in `daemon-mode`, and then open a client frame via
>   my WM shortcut for `emacsclient -c`. I do `desktop-read` and my saved desktop opens with the 10 or so frames I had saved.
> 
> - When I go to one of the frames with a buffer I'm no longer interested in, and do `C-x C-c`, I end up not just closing that particular frame, but **all 10 or so of the frames that were open**.
> 
> - The Emacs daemon is still running, and opening another client frame shows that the buffers haven't been killed, so nothing has been lost per se - it's just that the arrangement of all the frames I had is just ruined.
> 
> Any idea how to stop this behaviour (i.e. being able to just kill one frame from the saved configuration)? 

Is this really related to desktop-read?  AFAIK, "C-x C-c" deletes all
the frames displayed on the terminal, and I see the same behavior if I
start a daemon, invoke emacsclient to open a frame, and then make
several other frames from the same session.  "C-x C-c" then closes all
the frames I made.

I think this is the expected behavior.  What am I missing?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#54331; Package emacs. (Fri, 11 Mar 2022 06:54:01 GMT) Full text and rfc822 format available.

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

From: Rehan Deen <rehan.deen <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 54331 <at> debbugs.gnu.org
Subject: Re: bug#54331: 27.2; Closing frames loaded from desktop-read
Date: Fri, 11 Mar 2022 12:23:29 +0530
Huh, I have actually gotten used to `C-x C-c` simply closing the current
frame that I am viewing while in client-server/daemon mode. I am
prompted by the minibuffer on whether to save modified buffers --
including those not currently displayed in the frame I am closing -- but
after hitting `y` the single frame closes.

The help for `C-x C-c` says:
> C-x C-c runs the command save-buffers-kill-terminal ...
>
> Offer to save each buffer, then kill the current connection.
> If the current frame has no client, kill Emacs itself using
> ‘save-buffers-kill-emacs’.
> ...
> If emacsclient was started with a list of filenames to edit, then
> only these files will be asked to be saved.

In "standalone" mode `C-x C-c` of course kills everything (after asking
to save changes in modified buffers).

Perhaps my daemon mode behavior is not standard. I am running this in
i3wm on Manjaro Linux if that helps. How does one "usually" close a
client frame? `C-x 5 0`, mapped to some shortcut?

Eli Zaretskii writes:

>> From: Rehan Deen <rehan.deen <at> gmail.com>
>> Date: Fri, 11 Mar 2022 00:13:23 +0530
>> 
>> A very annoying issue with `desktop-save` and `desktop-read` that I'm encountering at the moment:
>> 
>> - I'm starting Emacs in `daemon-mode`, and then open a client frame via
>>   my WM shortcut for `emacsclient -c`. I do `desktop-read` and my saved desktop opens with the 10 or so frames I had saved.
>> 
>> - When I go to one of the frames with a buffer I'm no longer interested in, and do `C-x C-c`, I end up not just closing that particular frame, but **all 10 or so of the frames that were open**.
>> 
>> - The Emacs daemon is still running, and opening another client frame shows that the buffers haven't been killed, so nothing has been lost per se - it's just that the arrangement of all the frames I had is just ruined.
>> 
>> Any idea how to stop this behaviour (i.e. being able to just kill one frame from the saved configuration)? 
>
> Is this really related to desktop-read?  AFAIK, "C-x C-c" deletes all
> the frames displayed on the terminal, and I see the same behavior if I
> start a daemon, invoke emacsclient to open a frame, and then make
> several other frames from the same session.  "C-x C-c" then closes all
> the frames I made.
>
> I think this is the expected behavior.  What am I missing?





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#54331; Package emacs. (Fri, 11 Mar 2022 11:40:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Rehan Deen <rehan.deen <at> gmail.com>
Cc: 54331 <at> debbugs.gnu.org
Subject: Re: bug#54331: 27.2; Closing frames loaded from desktop-read
Date: Fri, 11 Mar 2022 13:39:13 +0200
> From: Rehan Deen <rehan.deen <at> gmail.com>
> Cc: 54331 <at> debbugs.gnu.org
> Date: Fri, 11 Mar 2022 12:23:29 +0530
> 
> Perhaps my daemon mode behavior is not standard. I am running this in
> i3wm on Manjaro Linux if that helps. How does one "usually" close a
> client frame? `C-x 5 0`, mapped to some shortcut?

Yes, "C-x 5 0" is the way to delete just the current frame.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#54331; Package emacs. (Sat, 12 Mar 2022 18:02:01 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Rehan Deen <rehan.deen <at> gmail.com>, 54331 <at> debbugs.gnu.org
Subject: Re: bug#54331: 27.2; Closing frames loaded from desktop-read 
Date: Sat, 12 Mar 2022 19:00:52 +0100
Eli Zaretskii <eliz <at> gnu.org> writes:

>> Perhaps my daemon mode behavior is not standard. I am running this in
>> i3wm on Manjaro Linux if that helps. How does one "usually" close a
>> client frame? `C-x 5 0`, mapped to some shortcut?
>
> Yes, "C-x 5 0" is the way to delete just the current frame.

So I guess there's nothing to fix here?

-- 
(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. (Sat, 12 Mar 2022 18:02:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#54331; Package emacs. (Sat, 12 Mar 2022 18:16:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: rehan.deen <at> gmail.com, 54331 <at> debbugs.gnu.org
Subject: Re: bug#54331: 27.2; Closing frames loaded from desktop-read
Date: Sat, 12 Mar 2022 20:15:35 +0200
> From: Lars Ingebrigtsen <larsi <at> gnus.org>
> Cc: Rehan Deen <rehan.deen <at> gmail.com>,  54331 <at> debbugs.gnu.org
> Date: Sat, 12 Mar 2022 19:00:52 +0100
> 
> Eli Zaretskii <eliz <at> gnu.org> writes:
> 
> >> Perhaps my daemon mode behavior is not standard. I am running this in
> >> i3wm on Manjaro Linux if that helps. How does one "usually" close a
> >> client frame? `C-x 5 0`, mapped to some shortcut?
> >
> > Yes, "C-x 5 0" is the way to delete just the current frame.
> 
> So I guess there's nothing to fix here?

That's my impression, but I think we should wait for Rehan to respond.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#54331; Package emacs. (Sun, 13 Mar 2022 05:56:02 GMT) Full text and rfc822 format available.

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

From: Rehan Deen <rehan.deen <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 54331 <at> debbugs.gnu.org, Lars Ingebrigtsen <larsi <at> gnus.org>
Subject: Re: bug#54331: 27.2; Closing frames loaded from desktop-read
Date: Sun, 13 Mar 2022 11:25:40 +0530
Hi, sorry, was hoping that someone else would add their input regarding
the closing frame behavior but I am happy to close this.

If anyone else comes across this issue, I guess I would suggest
remapping `C-x 5 0` to a more convenient keybinding.

Thank you for your responses to this.

Best,

Rehan

Eli Zaretskii writes:

>> From: Lars Ingebrigtsen <larsi <at> gnus.org>
>> Cc: Rehan Deen <rehan.deen <at> gmail.com>,  54331 <at> debbugs.gnu.org
>> Date: Sat, 12 Mar 2022 19:00:52 +0100
>> 
>> Eli Zaretskii <eliz <at> gnu.org> writes:
>> 
>> >> Perhaps my daemon mode behavior is not standard. I am running this in
>> >> i3wm on Manjaro Linux if that helps. How does one "usually" close a
>> >> client frame? `C-x 5 0`, mapped to some shortcut?
>> >
>> > Yes, "C-x 5 0" is the way to delete just the current frame.
>> 
>> So I guess there's nothing to fix here?
>
> That's my impression, but I think we should wait for Rehan to respond.





Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Sun, 13 Mar 2022 06:08:02 GMT) Full text and rfc822 format available.

Notification sent to Rehan Deen <rehan.deen <at> gmail.com>:
bug acknowledged by developer. (Sun, 13 Mar 2022 06:08:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Rehan Deen <rehan.deen <at> gmail.com>
Cc: larsi <at> gnus.org, 54331-done <at> debbugs.gnu.org
Subject: Re: bug#54331: 27.2; Closing frames loaded from desktop-read
Date: Sun, 13 Mar 2022 08:06:44 +0200
> From: Rehan Deen <rehan.deen <at> gmail.com>
> Cc: Lars Ingebrigtsen <larsi <at> gnus.org>, 54331 <at> debbugs.gnu.org
> Date: Sun, 13 Mar 2022 11:25:40 +0530
> 
> Hi, sorry, was hoping that someone else would add their input regarding
> the closing frame behavior but I am happy to close this.
> 
> If anyone else comes across this issue, I guess I would suggest
> remapping `C-x 5 0` to a more convenient keybinding.

Thanks, I'm therefore closing this bug.




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

This bug report was last modified 3 years and 154 days ago.

Previous Next


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