all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Re: [Emacs-diffs] trunk r113773: Gnus: delete temporary files when Gnus exits instead of using timers
       [not found] <E1V7hi3-00028W-75@vcs.savannah.gnu.org>
@ 2013-08-09 14:08 ` Stefan Monnier
  2013-08-09 23:16   ` Katsumi Yamaoka
  0 siblings, 1 reply; 7+ messages in thread
From: Stefan Monnier @ 2013-08-09 14:08 UTC (permalink / raw)
  To: Katsumi Yamaoka; +Cc: emacs-devel

>   Gnus: delete temporary files when Gnus exits instead of using timers

Deleting them when exiting is OK, but doing so only when we exit is not:
- we don't want to keep temporary files around for weeks.
- especially since those files won't be deleted if Emacs crashes during
  this time.


        Stefan



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

* Re: [Emacs-diffs] trunk r113773: Gnus: delete temporary files when Gnus exits instead of using timers
  2013-08-09 14:08 ` [Emacs-diffs] trunk r113773: Gnus: delete temporary files when Gnus exits instead of using timers Stefan Monnier
@ 2013-08-09 23:16   ` Katsumi Yamaoka
  2013-08-10  2:19     ` Stefan Monnier
  0 siblings, 1 reply; 7+ messages in thread
From: Katsumi Yamaoka @ 2013-08-09 23:16 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

>>   Gnus: delete temporary files when Gnus exits instead of using timers
Stefan Monnier <monnier@iro.umontreal.ca> wrote:
> Deleting them when exiting is OK, but doing so only when we exit is not:
> - we don't want to keep temporary files around for weeks.
> - especially since those files won't be deleted if Emacs crashes during
>   this time.

That's quite possible.  But I have no good idea for the solution.
Is there a better way than using a long timer?



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

* Re: [Emacs-diffs] trunk r113773: Gnus: delete temporary files when Gnus exits instead of using timers
  2013-08-09 23:16   ` Katsumi Yamaoka
@ 2013-08-10  2:19     ` Stefan Monnier
  2013-08-11 20:07       ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 7+ messages in thread
From: Stefan Monnier @ 2013-08-10  2:19 UTC (permalink / raw)
  To: Katsumi Yamaoka; +Cc: emacs-devel

> That's quite possible.  But I have no good idea for the solution.
> Is there a better way than using a long timer?

[ I haven't followed the code very much, so I don't know what those
  temp files are or why you can't reliably know when to erase them.  ]

I don't think there "a solution".  You could mix the two previous
solutions: have a timer erase the files after some time, plus have an
exit-hook that also deletes the files.


        Stefan



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

* Re: [Emacs-diffs] trunk r113773: Gnus: delete temporary files when Gnus exits instead of using timers
  2013-08-10  2:19     ` Stefan Monnier
@ 2013-08-11 20:07       ` Lars Magne Ingebrigtsen
  2013-08-12  1:03         ` Katsumi Yamaoka
  0 siblings, 1 reply; 7+ messages in thread
From: Lars Magne Ingebrigtsen @ 2013-08-11 20:07 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Katsumi Yamaoka, emacs-devel

Stefan Monnier <monnier@iro.umontreal.ca> writes:

> I don't think there "a solution".  You could mix the two previous
> solutions: have a timer erase the files after some time, plus have an
> exit-hook that also deletes the files.

Yes.  Having the files in /tmp linger for a "long time" is not what
users expect, I think, and may lead to privacy problems.  So Gnus should
delete the files "as fast as possible", which may not be very fast, but
should be quicker than the Emacs lifetime.

So I think deleting on Emacs exit is good, but there should be a timer
to delete things "fast".  Like, one minute, perhaps?  Surely even the
xgd launcher must have managed to start and read the file by then?

-- 
(domestic pets only, the antidote for overdose, milk.)
  No Gnus T-Shirt for sale: http://ingebrigtsen.no/no.php
  and http://lars.ingebrigtsen.no/2013/08/twenty-years-of-september.html



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

* Re: [Emacs-diffs] trunk r113773: Gnus: delete temporary files when Gnus exits instead of using timers
  2013-08-11 20:07       ` Lars Magne Ingebrigtsen
@ 2013-08-12  1:03         ` Katsumi Yamaoka
  2013-08-12  5:06           ` Achim Gratz
  2013-08-12 13:20           ` Lars Magne Ingebrigtsen
  0 siblings, 2 replies; 7+ messages in thread
From: Katsumi Yamaoka @ 2013-08-12  1:03 UTC (permalink / raw)
  To: Lars Magne Ingebrigtsen; +Cc: Stefan Monnier, emacs-devel

Lars Magne Ingebrigtsen wrote:
> Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> I don't think there "a solution".  You could mix the two previous
>> solutions: have a timer erase the files after some time, plus have an
>> exit-hook that also deletes the files.

> Yes.  Having the files in /tmp linger for a "long time" is not what
> users expect, I think, and may lead to privacy problems.

Yes, we should think much of privacy.  A better way would be to
set $TMPDIR, $TEMP, $TMP, and so forth to someting like "~/tmp".

> So Gnus should delete the files "as fast as possible", which may not
> be very fast, but should be quicker than the Emacs lifetime.

> So I think deleting on Emacs exit is good, but there should be a timer
> to delete things "fast".  Like, one minute, perhaps?  Surely even the
> xgd launcher must have managed to start and read the file by then?

Ok, I've restored a timer that tries to delete a temporary file
and its directory 1 minute after launching a viewer.
(Though the deletion will fail on Windows or Cygwin if a viewer
 is a Windows application, MS Office, AcroRd, etc. for example.)



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

* Re: [Emacs-diffs] trunk r113773: Gnus: delete temporary files when Gnus exits instead of using timers
  2013-08-12  1:03         ` Katsumi Yamaoka
@ 2013-08-12  5:06           ` Achim Gratz
  2013-08-12 13:20           ` Lars Magne Ingebrigtsen
  1 sibling, 0 replies; 7+ messages in thread
From: Achim Gratz @ 2013-08-12  5:06 UTC (permalink / raw)
  To: emacs-devel

Katsumi Yamaoka writes:
>> Yes.  Having the files in /tmp linger for a "long time" is not what
>> users expect, I think, and may lead to privacy problems.
>
> Yes, we should think much of privacy.  A better way would be to
> set $TMPDIR, $TEMP, $TMP, and so forth to someting like "~/tmp".

Not only is this not a better solution, but makes things potentially
much worse.  It is not uncommon to have everything in $HOME subject to
automatic backup and also not uncommon to not have enough space in $HOME
to function reliably as $TMPDIR.  Emacs shouldn't make changes to how
the environment is set up when it cannot know how the system is set up.

These days TMPDIR is often pointing to a private space anyway (as far as
a file on disk can be private).


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

DIY Stuff:
http://Synth.Stromeko.net/DIY.html




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

* Re: [Emacs-diffs] trunk r113773: Gnus: delete temporary files when Gnus exits instead of using timers
  2013-08-12  1:03         ` Katsumi Yamaoka
  2013-08-12  5:06           ` Achim Gratz
@ 2013-08-12 13:20           ` Lars Magne Ingebrigtsen
  1 sibling, 0 replies; 7+ messages in thread
From: Lars Magne Ingebrigtsen @ 2013-08-12 13:20 UTC (permalink / raw)
  To: Katsumi Yamaoka; +Cc: Stefan Monnier, emacs-devel

Katsumi Yamaoka <yamaoka@jpl.org> writes:

>> Yes.  Having the files in /tmp linger for a "long time" is not what
>> users expect, I think, and may lead to privacy problems.
>
> Yes, we should think much of privacy.  A better way would be to
> set $TMPDIR, $TEMP, $TMP, and so forth to someting like "~/tmp".

I think putting things in /tmp (under a subdirectory) is fine in
general.  There isn't much information leakage there -- the
subdirectories are created readable by the user only.

However, if these files linger on for months, then they may be picked up
by backup systems and the like, and that may not be what the user
expects.

-- 
(domestic pets only, the antidote for overdose, milk.)
  No Gnus T-Shirt for sale: http://ingebrigtsen.no/no.php
  and http://lars.ingebrigtsen.no/2013/08/twenty-years-of-september.html



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

end of thread, other threads:[~2013-08-12 13:20 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <E1V7hi3-00028W-75@vcs.savannah.gnu.org>
2013-08-09 14:08 ` [Emacs-diffs] trunk r113773: Gnus: delete temporary files when Gnus exits instead of using timers Stefan Monnier
2013-08-09 23:16   ` Katsumi Yamaoka
2013-08-10  2:19     ` Stefan Monnier
2013-08-11 20:07       ` Lars Magne Ingebrigtsen
2013-08-12  1:03         ` Katsumi Yamaoka
2013-08-12  5:06           ` Achim Gratz
2013-08-12 13:20           ` Lars Magne Ingebrigtsen

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.