🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #262168

Re: (40tude dialog) Save but not close draft?

#262168
From: Bernd Rose
Date: Sun, 25 Jun 2017 20:46
45 lines
3491 bytes
On Sun, 25 Jun 2017 19:56:56 +0000 (UTC), June Bug wrote:

>> But every time, the "Drafts" folder gets the
>> focus, all content from open Message Composition windows is flushed to
>> the Dialog database. 
> 
> That explains the oddity that sometimes I see things in the drafts folder 
> like "()" where I don't understand how they got there - but that wasn't the 
> original question.

Those are drafts for messages with (currently) no subject.

> That's interesting. Very interesting. So what you're saying is that I can 
> click on "Folders" and then on "Drafts" and then I can compose a new 
> message, which, you're saying, will automatically be saved as I compose it?

No. You can compose a message in any state of the main window. While you
do so, the message in question is just stored in memory. Whenever you
activate the "Drafts" folder inside the main Dialog Window, though, 
Dialog performs a status check of all saved drafts /with/ *and* /without/ 
currently open Message Composition window. To acquire the correct status
for currently open Message Composition windows, Dialog flushes its content
from memory buffer to the Dialog database on disk.

The saving to disk is *not* done in /background/, but only when the Drafts
folder gets an active focus in /foreground/.
 
> Still - wouldn't it be easier to just have a keypress to save the current 
> draft?

Once you have set the focus to the "Drafts" folder in the main Dialog 
window, it is a matter of <Alt+Tab> + <Alt+Tab>, aka switching back and
force between Main and Composition window.

When scripting, a timer event would probably the best way to go. But, IMHO,
it isn't worth the effort. Auto-save would only be useful against Dialog
crashes. Despite any auto-saved intermediate state, the Dialog Database
isn't guaranteed to give you a clean pointer to that state for currently
open Composition windows, anyway, after a crash. 

So, if you are really concerned about Dialog crashing while writing a long 
message, better compose it inside an /external/ text editor and copy&paste 
it from there, once you are done with writing.

Bernd
Technical Details
Message-ID: <1mlqj33ahtpza$.dlg@b.rose.tmpbox.news.arcor.de>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.(126883).mbox.7z!not-for-mail
References: <oiosq9$1k9h$1@gioia.aioe.org> <1exybmy3bwz87.dlg@b.rose.tmpbox.news.arcor.de> <oip4i8$1kf$1@gioia.aioe.org>

Show Full Headers
Complete Article Headers
Message-ID: <1mlqj33ahtpza$.dlg@b.rose.tmpbox.news.arcor.de>
Subject: Re: (40tude dialog) Save but not close draft?
Date: Sun, 25 Jun 2017 22:46:09 +0200
From: Bernd Rose <b.rose.tmpbox@arcor.de>
References: <oiosq9$1k9h$1@gioia.aioe.org> <1exybmy3bwz87.dlg@b.rose.tmpbox.news.arcor.de> <oip4i8$1kf$1@gioia.aioe.org>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.(126883).mbox.7z!not-for-mail
Newsgroups: news.software.readers
Organization: albasani.net
Lines: 45
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Trace: news.albasani.net +ZaxDHJDhh0hgcwSP0ChtWBtgrXzph8MHfjSe1Ew+DLfsi2hS762hoTA2oTMuCuppc9LOs/a7qBS4BJAHC6ujr4m1ltTjEiDfOgzkUBIdwH5TT5Hfw0OY1SMJvSNtKao
NNTP-Posting-Date: Sun, 25 Jun 2017 20:46:09 +0000 (UTC)
Injection-Info: news.albasani.net; logging-data="yftHmKcxZoLo8J+j268UkE3epE4LfCWMAjQnf+0IwJe/3FlfLHdfIck+RR85a9WItbUHYI74jBJYTRupcjMgaQjIiM5PCNWVqlD2Ieux8m049idtUDvOu2KrYi81mHG5"; mail-complaints-to="abuse@albasani.net"
User-Agent: 40tude_Dialog/2.0.15.41 (15c997da.199.485)
Cancel-Lock: sha1:jvPibn+Lm7tiD9WhZjOtqKXhiGA=
X-Received-Body-CRC: 44985931
X-Received-Bytes: 3422