Archive of RubyForge sup-talk mailing list
 help / color / mirror / Atom feed
* [sup-talk] save somewhere else than temp?
@ 2008-02-18 12:04 marko.myllymaki at iki.fi
  2008-02-18 14:34 ` William Morgan
  0 siblings, 1 reply; 6+ messages in thread
From: marko.myllymaki at iki.fi @ 2008-02-18 12:04 UTC (permalink / raw)


Is it possible to change where sup saves the messages under editing? Sup
just crashed and I lost quite a long message editing in /tmp/ ;)

I'd like the edited messages be saved to .sup/editing/*







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

* [sup-talk] save somewhere else than temp?
  2008-02-18 12:04 [sup-talk] save somewhere else than temp? marko.myllymaki at iki.fi
@ 2008-02-18 14:34 ` William Morgan
  2008-02-18 15:57   ` marko.myllymaki at iki.fi
  2008-02-18 22:47   ` Nicolas Pouillard
  0 siblings, 2 replies; 6+ messages in thread
From: William Morgan @ 2008-02-18 14:34 UTC (permalink / raw)


Reformatted excerpts from Marko Myllym?ki's message of 2008-02-18:
> Is it possible to change where sup saves the messages under editing?
> Sup just crashed and I lost quite a long message editing in /tmp/ ;)
> 
> I'd like the edited messages be saved to .sup/editing/*

Just because it's in /tmp doesn't mean it's automatically deleted, does
it? (Except maybe at system startup.)

-- 
William <wmorgan-sup at masanjin.net>


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

* [sup-talk] save somewhere else than temp?
  2008-02-18 14:34 ` William Morgan
@ 2008-02-18 15:57   ` marko.myllymaki at iki.fi
  2008-02-18 22:47   ` Nicolas Pouillard
  1 sibling, 0 replies; 6+ messages in thread
From: marko.myllymaki at iki.fi @ 2008-02-18 15:57 UTC (permalink / raw)


Excerpts from William Morgan's message of Mon Feb 18 16:34:42 +0200 2008:
> Just because it's in /tmp doesn't mean it's automatically deleted, does
> it? (Except maybe at system startup.)

Yes, it's weird. At what stage does Sup actually delete the edited
messages (after sending I guess)? I was not able to see any edited
messages in /tmp after the crashes. Sup crashed after exiting the emacs
editor. No files in drafts or sent.mbox either...

However I was able to see file 12554-0-sup.compose-mode when I
intentionally killed Sup, trying to simulate the situation... 

Here is the exception log after one crash if it helps in any way:
--- Interrupt from thread: main

/var/lib/gems/1.8/gems/sup-0.4/lib/sup/buffer.rb:31:in `select'
/var/lib/gems/1.8/gems/sup-0.4/lib/sup/buffer.rb:31:in
`nonblocking_getch'
/var/lib/gems/1.8/gems/sup-0.4/bin/sup:213
/usr/bin/sup:19:in `load'
/usr/bin/sup:19




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

* [sup-talk] save somewhere else than temp?
  2008-02-18 14:34 ` William Morgan
  2008-02-18 15:57   ` marko.myllymaki at iki.fi
@ 2008-02-18 22:47   ` Nicolas Pouillard
  2008-02-19 17:38     ` William Morgan
  1 sibling, 1 reply; 6+ messages in thread
From: Nicolas Pouillard @ 2008-02-18 22:47 UTC (permalink / raw)


Excerpts from William Morgan's message of Mon Feb 18 15:34:42 +0100 2008:
> Reformatted excerpts from Marko Myllym?ki's message of 2008-02-18:
> > Is it possible to change where sup saves the messages under editing?
> > Sup just crashed and I lost quite a long message editing in /tmp/ ;)
> > 
> > I'd like the edited messages be saved to .sup/editing/*
> 
> Just because it's in /tmp doesn't mean it's automatically deleted, does
> it? (Except maybe at system startup.)

If  you're  using  Tempfile  then closing the file, delete it. And closing the
process can force it to close it's files.

I've  locally  workaround this problem by defining a custom script that keep a
copy in ~/tmp as the sup editor.

Regards,

-- 
Nicolas Pouillard aka Ertai
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 194 bytes
Desc: not available
Url : http://rubyforge.org/pipermail/sup-talk/attachments/20080218/39a69292/attachment.bin 


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

* [sup-talk] save somewhere else than temp?
  2008-02-18 22:47   ` Nicolas Pouillard
@ 2008-02-19 17:38     ` William Morgan
  2008-02-20 10:54       ` Nicolas Pouillard
  0 siblings, 1 reply; 6+ messages in thread
From: William Morgan @ 2008-02-19 17:38 UTC (permalink / raw)


Reformatted excerpts from nicolas.pouillard's message of 2008-02-18:
> If  you're  using  Tempfile  then closing the file, delete it. And
> closing the process can force it to close it's files.

I am using Tempfile, which has a non-deterministic behavior (at least, I
can't figure out a pattern) upon crashing: sometimes it deletes the
files, sometimes it leaves them.

I guess the answer is to manage my own temporary files, deleting them
only upon successful shutdown.

-- 
William <wmorgan-sup at masanjin.net>


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

* [sup-talk] save somewhere else than temp?
  2008-02-19 17:38     ` William Morgan
@ 2008-02-20 10:54       ` Nicolas Pouillard
  0 siblings, 0 replies; 6+ messages in thread
From: Nicolas Pouillard @ 2008-02-20 10:54 UTC (permalink / raw)


Excerpts from William Morgan's message of Tue Feb 19 18:38:11 +0100 2008:
> Reformatted excerpts from nicolas.pouillard's message of 2008-02-18:
> > If  you're  using  Tempfile  then closing the file, delete it. And
> > closing the process can force it to close it's files.
> 
> I am using Tempfile, which has a non-deterministic behavior (at least, I
> can't figure out a pattern) upon crashing: sometimes it deletes the
> files, sometimes it leaves them.
> 
> I guess the answer is to manage my own temporary files, deleting them
> only upon successful shutdown.

Long  time  ago  (when I did more ruby stuffs), I wrote this module (attached)
that  makes  part of a package called core_ex. I found it far more useful than
the default module. Feel free to import it.

-- 
Nicolas Pouillard aka Ertai
-------------- next part --------------
A non-text attachment was scrubbed...
Name: temp_path.rb
Type: application/octet-stream
Size: 5318 bytes
Desc: not available
Url : http://rubyforge.org/pipermail/sup-talk/attachments/20080220/41dbda11/attachment.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 194 bytes
Desc: not available
Url : http://rubyforge.org/pipermail/sup-talk/attachments/20080220/41dbda11/attachment.bin 


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

end of thread, other threads:[~2008-02-20 10:54 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-18 12:04 [sup-talk] save somewhere else than temp? marko.myllymaki at iki.fi
2008-02-18 14:34 ` William Morgan
2008-02-18 15:57   ` marko.myllymaki at iki.fi
2008-02-18 22:47   ` Nicolas Pouillard
2008-02-19 17:38     ` William Morgan
2008-02-20 10:54       ` Nicolas Pouillard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox