emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ruijie Yu via "General discussions about Org-mode." <emacs-orgmode@gnu.org>
To: Greg Minshall <minshall@umich.edu>
Cc: Ihor Radchenko <yantar92@posteo.net>,
	"Fraga, Eric" <e.fraga@ucl.ac.uk>,
	emacs-orgmode@gnu.org
Subject: Re: org-persist files in /tmp
Date: Thu, 22 Dec 2022 06:34:21 -0600	[thread overview]
Message-ID: <sdva63f4mxf.fsf@fw.net.yu> (raw)
In-Reply-To: <287345.1671683459@archlinux>


Greg Minshall <minshall@umich.edu> writes:

> hi, Ihor,
>
>> Do we need to care about cleaning up /tmp?
>
> my two cents is that maybe one should not care so much about cleaning up
> /tmp, but i think it's worthwhile trying not to clutter it up too much.
>
> cheers, Greg

One possible approach to this is to have all org-persist related
temporary directories into an overall "$TMPDIR/org-persist" directory.
That is, assuming that the parent directory exists, we create
org-persist temporary directories as "$TMPDIR/org-persist/XXXXXX" and
everything else would remain the same.

The downside for this approach is that, since `make-tempfile' only makes
a mkdir() call in its underlying function try_dir() assuming the
existence of its parents [1, 2], we would probably have to create the
parent via `(mkdir DIR t)' before every `make-tempfile' call within
org-persist.

[1] emacs/src/fileio.c
[2] emacs/lib/tempname.c

Best,


RY


  reply	other threads:[~2022-12-22 12:57 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-21 13:18 org-persist files in /tmp Fraga, Eric
2022-12-21 15:06 ` Ihor Radchenko
2022-12-21 15:59   ` Fraga, Eric
2022-12-21 16:07     ` Ihor Radchenko
2022-12-21 17:18       ` William Denton
2022-12-21 18:45         ` Ihor Radchenko
2022-12-22  4:30   ` Greg Minshall
2022-12-22 12:34     ` Ruijie Yu via General discussions about Org-mode. [this message]
2022-12-22 14:41       ` Max Nikulin
2022-12-22 15:45         ` Tim Cross
2022-12-22 16:07           ` Max Nikulin
2022-12-23  6:35             ` tomas
2022-12-23 14:12               ` Max Nikulin
2022-12-23 15:19                 ` tomas
2022-12-25  9:32                 ` Ihor Radchenko
2022-12-25  9:30               ` Ihor Radchenko
2022-12-25 11:37                 ` tomas
2022-12-25  9:28         ` Ihor Radchenko
2022-12-25  9:25     ` Ihor Radchenko
2022-12-22  4:35   ` Tim Cross

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=sdva63f4mxf.fsf@fw.net.yu \
    --to=emacs-orgmode@gnu.org \
    --cc=e.fraga@ucl.ac.uk \
    --cc=minshall@umich.edu \
    --cc=ruijie@netyu.xyz \
    --cc=yantar92@posteo.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).