GNU bug report logs - #26862
Quit Gnus prompts about unsent messages, but messages can't be saved as drafts

Previous Next

Packages: gnus, emacs;

Reported by: Eric Abrahamsen <eric <at> ericabrahamsen.net>

Date: Wed, 10 May 2017 04:01:01 UTC

Severity: normal

Found in version 5.13

Done: Katsumi Yamaoka <yamaoka <at> jpl.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 26862 in the body.
You can then email your comments to 26862 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, bugs <at> gnus.org:
bug#26862; Package emacs,gnus. (Wed, 10 May 2017 04:01:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Eric Abrahamsen <eric <at> ericabrahamsen.net>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org, bugs <at> gnus.org. (Wed, 10 May 2017 04:01:02 GMT) Full text and rfc822 format available.

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

From: Eric Abrahamsen <eric <at> ericabrahamsen.net>
To: submit <at> debbugs.gnu.org (The Gnus Bugfixing Girls + Boys)
Subject: Quit Gnus prompts about unsent messages,
 but messages can't be saved as drafts
Date: Wed, 10 May 2017 11:59:44 +0800
What I mean is:

1. With unfinished/unsent messages open, you quit Gnus.
2. Gnus says you have unsent messages, quit anyway?
3. You say no.
4. You go to the unsaved message, and run "C-c C-d" to save as draft.
5. Gnus says "selecting deleted buffer"
6. You can't save the draft.

I'll probably get around to figuring this out, but I'm hanging it up
here in the meantime.

Gnus v5.13
GNU Emacs 26.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.12)
 of 2017-05-09
200 news.gmane.org InterNetNews NNRP server INN 2.5.4 ready (posting ok)
100 Legal commands
  ARTICLE [message-ID|number]
  AUTHINFO USER name|PASS password|SASL mechanism [initial-response]|GENERIC program [argument ...]
  BODY [message-ID|number]
  CAPABILITIES [keyword]
  DATE
  GROUP newsgroup
  HDR header [message-ID|range]
  HEAD [message-ID|number]
  HELP
  IHAVE message-ID
  LAST
  LIST [ACTIVE [wildmat]|ACTIVE.TIMES [wildmat]|COUNTS [wildmat]|DISTRIB.PATS|DISTRIBUTIONS|HEADERS [MSGID|RANGE]|MODERATORS|MOTD|NEWSGROUPS [wildmat]|OVERVIEW.FMT|SUBSCRIPTIONS [wildmat]]
  LISTGROUP [newsgroup [range]]
  MODE READER
  NEWGROUPS [yy]yymmdd hhmmss [GMT]
  NEWNEWS wildmat [yy]yymmdd hhmmss [GMT]
  NEXT
  OVER [range]
  POST
  QUIT
  STARTTLS
  STAT [message-ID|number]
  XGTITLE [wildmat]
  XHDR header [message-ID|range]
  XOVER [range]
  XPAT header message-ID|range pattern [pattern ...]
Report problems to <usenet <at> blaine.gmane.org>.
.
382 Begin TLS negotiation now
100 Legal commands
  ARTICLE [message-ID|number]
  AUTHINFO USER name|PASS password|SASL mechanism [initial-response]|GENERIC program [argument ...]
  BODY [message-ID|number]
  CAPABILITIES [keyword]
  DATE
  GROUP newsgroup
  HDR header [message-ID|range]
  HEAD [message-ID|number]
  HELP
  IHAVE message-ID
  LAST
  LIST [ACTIVE [wildmat]|ACTIVE.TIMES [wildmat]|COUNTS [wildmat]|DISTRIB.PATS|DISTRIBUTIONS|HEADERS [MSGID|RANGE]|MODERATORS|MOTD|NEWSGROUPS [wildmat]|OVERVIEW.FMT|SUBSCRIPTIONS [wildmat]]
  LISTGROUP [newsgroup [range]]
  MODE READER
  NEWGROUPS [yy]yymmdd hhmmss [GMT]
  NEWNEWS wildmat [yy]yymmdd hhmmss [GMT]
  NEXT
  OVER [range]
  POST
  QUIT
  STARTTLS
  STAT [message-ID|number]
  XGTITLE [wildmat]
  XHDR header [message-ID|range]
  XOVER [range]
  XPAT header message-ID|range pattern [pattern ...]
Report problems to <usenet <at> blaine.gmane.org>.
.




Information forwarded to bug-gnu-emacs <at> gnu.org, bugs <at> gnus.org:
bug#26862; Package emacs,gnus. (Wed, 10 May 2017 09:30:02 GMT) Full text and rfc822 format available.

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

From: Stephen Berman <stephen.berman <at> gmx.net>
To: Eric Abrahamsen <eric <at> ericabrahamsen.net>
Cc: 26862 <at> debbugs.gnu.org
Subject: Re: bug#26862: Quit Gnus prompts about unsent messages,
 but messages can't be saved as drafts
Date: Wed, 10 May 2017 11:27:05 +0200
On Wed, 10 May 2017 11:59:44 +0800 Eric Abrahamsen <eric <at> ericabrahamsen.net> wrote:

> What I mean is:
>
> 1. With unfinished/unsent messages open, you quit Gnus.
> 2. Gnus says you have unsent messages, quit anyway?
> 3. You say no.
> 4. You go to the unsaved message, and run "C-c C-d" to save as draft.
> 5. Gnus says "selecting deleted buffer"

This happens here too.

> 6. You can't save the draft.

However, when I restart Gnus, I see that that unsent message is in the
Drafts group, i.e., Gnus in fact saved it.  So it's a UI bug but doesn't
lose data.

Steve Berman




Information forwarded to bug-gnu-emacs <at> gnu.org, bugs <at> gnus.org:
bug#26862; Package emacs,gnus. (Wed, 10 May 2017 09:43:02 GMT) Full text and rfc822 format available.

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

From: Katsumi Yamaoka <yamaoka <at> jpl.org>
To: Eric Abrahamsen <eric <at> ericabrahamsen.net>
Cc: 26862 <at> debbugs.gnu.org
Subject: Re: bug#26862: Quit Gnus prompts about unsent messages,
 but messages can't be saved as drafts
Date: Wed, 10 May 2017 18:42:33 +0900
On Wed, 10 May 2017 11:59:44 +0800, Eric Abrahamsen wrote:
> What I mean is:

> 1. With unfinished/unsent messages open, you quit Gnus.
> 2. Gnus says you have unsent messages, quit anyway?
> 3. You say no.
> 4. You go to the unsaved message, and run "C-c C-d" to save as draft.
> 5. Gnus says "selecting deleted buffer"
> 6. You can't save the draft.

> I'll probably get around to figuring this out, but I'm hanging it up
> here in the meantime.

It seems hard to make `C-c C-d' work in such a case.  Instead,
how about killing those modified message buffers unconditionally?

--- gnus-start.el~	2017-04-02 22:09:06.371709200 +0000
+++ gnus-start.el	2017-05-10 09:37:13.366771900 +0000
@@ -732,6 +732,9 @@
   (gnus-kill-buffer nntp-server-buffer)
   ;; Kill Gnus buffers.
   (dolist (buffer (gnus-buffers))
+    (when (gnus-buffer-exists-p buffer)
+      (with-current-buffer buffer
+	(set-buffer-modified-p nil)))
     (gnus-kill-buffer buffer))
   ;; Remove Gnus frames.
   (gnus-kill-gnus-frames))




Information forwarded to bug-gnu-emacs <at> gnu.org, bugs <at> gnus.org:
bug#26862; Package emacs,gnus. (Thu, 11 May 2017 06:02:02 GMT) Full text and rfc822 format available.

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

From: Katsumi Yamaoka <yamaoka <at> jpl.org>
To: Stephen Berman <stephen.berman <at> gmx.net>
Cc: Eric Abrahamsen <eric <at> ericabrahamsen.net>, 26862 <at> debbugs.gnu.org
Subject: Re: bug#26862: Quit Gnus prompts about unsent messages,
 but messages can't be saved as drafts
Date: Thu, 11 May 2017 15:01:29 +0900
On Wed, 10 May 2017 11:27:05 +0200, Stephen Berman wrote:
> However, when I restart Gnus, I see that that unsent message is in the
> Drafts group, i.e., Gnus in fact saved it.  So it's a UI bug but doesn't
> lose data.

Good point.  Yes, nndraft runs the auto-save on a modified draft
with a certain period.  Prompting a user for a modified draft is
a normal operation of `kill-buffer', not Gnus' intention.  So we
may kill those buffers safely and silently.

On Wed, 10 May 2017 18:42:33 +0900, Katsumi Yamaoka wrote:
> It seems hard to make `C-c C-d' work in such a case.  Instead,
> how about killing those modified message buffers unconditionally?

Thanks Eric for suggestions and verifying a revised patch.  I've
committed it in master:
<http://lists.gnu.org/archive/html/emacs-diffs/2017-05/msg00237.html>

Where `do-auto-save' makes sure that latest drafts are saved.
(set-buffer-modified-p nil) is necessary to kill modified buffers
silently.
(setq kill-buffer-hook nil) assumes that a user might set it for
a certain purpose (I do it ;-), that might issue a useless prompt.

Regards,




bug closed, send any further explanations to 26862 <at> debbugs.gnu.org and Eric Abrahamsen <eric <at> ericabrahamsen.net> Request was from Katsumi Yamaoka <yamaoka <at> jpl.org> to control <at> debbugs.gnu.org. (Thu, 11 May 2017 22:55:02 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. (Fri, 09 Jun 2017 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 8 years and 11 days ago.

Previous Next


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