all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#26862: Quit Gnus prompts about unsent messages, but messages can't be saved as drafts
@ 2017-05-10  3:59 Eric Abrahamsen
  2017-05-10  9:27 ` Stephen Berman
  2017-05-10  9:42 ` Katsumi Yamaoka
  0 siblings, 2 replies; 4+ messages in thread
From: Eric Abrahamsen @ 2017-05-10  3:59 UTC (permalink / raw)
  To: 26862

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@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@blaine.gmane.org>.
.





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#26862: Quit Gnus prompts about unsent messages, but messages can't be saved as drafts
  2017-05-10  3:59 bug#26862: Quit Gnus prompts about unsent messages, but messages can't be saved as drafts Eric Abrahamsen
@ 2017-05-10  9:27 ` Stephen Berman
  2017-05-10  9:42 ` Katsumi Yamaoka
  1 sibling, 0 replies; 4+ messages in thread
From: Stephen Berman @ 2017-05-10  9:27 UTC (permalink / raw)
  To: Eric Abrahamsen; +Cc: 26862

On Wed, 10 May 2017 11:59:44 +0800 Eric Abrahamsen <eric@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





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#26862: Quit Gnus prompts about unsent messages, but messages can't be saved as drafts
  2017-05-10  3:59 bug#26862: Quit Gnus prompts about unsent messages, but messages can't be saved as drafts Eric Abrahamsen
  2017-05-10  9:27 ` Stephen Berman
@ 2017-05-10  9:42 ` Katsumi Yamaoka
  2017-05-11  6:01   ` Katsumi Yamaoka
  1 sibling, 1 reply; 4+ messages in thread
From: Katsumi Yamaoka @ 2017-05-10  9:42 UTC (permalink / raw)
  To: Eric Abrahamsen; +Cc: 26862

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))





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#26862: Quit Gnus prompts about unsent messages, but messages can't be saved as drafts
  2017-05-10  9:42 ` Katsumi Yamaoka
@ 2017-05-11  6:01   ` Katsumi Yamaoka
  0 siblings, 0 replies; 4+ messages in thread
From: Katsumi Yamaoka @ 2017-05-11  6:01 UTC (permalink / raw)
  To: Stephen Berman; +Cc: Eric Abrahamsen, 26862

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,





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-05-11  6:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-10  3:59 bug#26862: Quit Gnus prompts about unsent messages, but messages can't be saved as drafts Eric Abrahamsen
2017-05-10  9:27 ` Stephen Berman
2017-05-10  9:42 ` Katsumi Yamaoka
2017-05-11  6:01   ` Katsumi Yamaoka

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.