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/*
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>
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
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
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>
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