-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
Store temporary directory beneath $XDG_RUNTIME_DIR if present #17093
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The XDG Base Directory Specification [1] suggests to store runtime files below $XDG_RUNTIME_DIR when this environment variable is set. Currently, neovim defaults to using a directory below $TMPDIR or /tmp. Make the XDG_RUNTIME_DIR the preferred place for the temporary directory, but fall back to the other locations when this environment variable is not set. [1]: https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html Ref: neovim#3517
|
One concern I'd have about this is the following part of the spec:
|
|
It might also be a good idea to add support for |
I was also reading this, but it seems nobody else cares about this at all: systemd, gnome, wayland, pulseaudio/pipewire all do not update the atime appropriately nor is the sticky bit set. I also did not find any indication of such a cleanup procedure to be implemented on my system. So I think it is safe to ignore this for now.
I agree, but I think this should be a separate change. |
Problem: Not easy to inspect Nvim-created temp files (for debugging etc). Solution: Try to create /tmp/nvim/ first, then create the random dir in there. Related: neovim#3517 Related: neovim#17093
Problem:
- Sockets are created in ~/.local/… but this is questionable because...
- Not easy to inspect Nvim-created temp files (for debugging etc).
Solution:
- Introduce stdpath('runtime'), and store sockets there.
- Establish "/tmp/nvim.user/" as the root of all Nvim temp dirs.
closes neovim#3517
related neovim#17093
Problem:
- Sockets are created in ~/.local/… but this is questionable because...
- Not easy to inspect Nvim-created temp files (for debugging etc).
Solution:
- Introduce stdpath('runtime'), and store sockets there.
- Establish "/tmp/nvim.user/" as the root of all Nvim temp dirs.
closes neovim#3517
related neovim#17093
Problem:
- Sockets are created in ~/.local/… but this is questionable because...
- Not easy to inspect Nvim-created temp files (for debugging etc).
Solution:
- Introduce stdpath('runtime'), and store sockets there.
- Establish "/tmp/nvim.user/" as the root of all Nvim temp dirs.
closes neovim#3517
related neovim#17093
Problem:
- Sockets are created in ~/.local/… but this is questionable because...
- Not easy to inspect Nvim-created temp files (for debugging etc).
Solution:
- Introduce stdpath('runtime'), and store sockets there.
- Establish "/tmp/nvim.user/" as the root of all Nvim temp dirs.
closes neovim#3517
closes neovim#17093
Problem:
- Sockets are created in ~/.local/… but this is questionable because...
- Not easy to inspect Nvim-created temp files (for debugging etc).
Solution:
- Introduce stdpath('runtime'), and store sockets there.
- Establish "/tmp/nvim.user/" as the root of all Nvim temp dirs.
closes neovim#3517
closes neovim#17093
Problem:
- Sockets are created in ~/.local/… but this is questionable because...
- Not easy to inspect Nvim-created temp files (for debugging etc).
Solution:
- Introduce stdpath('runtime'), and store sockets there.
- Establish "/tmp/nvim.user/" as the root of all Nvim temp dirs.
closes neovim#3517
closes neovim#17093
Problem:
- Sockets are created in ~/.local/… but this is questionable because...
- Not easy to inspect Nvim-created temp files (for debugging etc).
Solution:
- Introduce stdpath('runtime'), and store sockets there.
- Establish "/tmp/nvim.user/" as the root of all Nvim temp dirs.
closes neovim#3517
closes neovim#17093
Problem:
- Sockets are created in ~/.local/… but this is questionable because...
- Not easy to inspect Nvim-created temp files (for debugging etc).
Solution:
- Introduce stdpath('runtime'), and store sockets there.
- Establish "/tmp/nvim.user/" as the root of all Nvim temp dirs.
closes neovim#3517
closes neovim#17093
Problem:
- Sockets are created in ~/.local/… but this is questionable because...
- Not easy to inspect Nvim-created temp files (for debugging etc).
Solution:
- Introduce stdpath('runtime'), and store sockets there.
- Establish "/tmp/nvim.user/" as the root of all Nvim temp dirs.
closes neovim#3517
closes neovim#17093
Problem:
- Sockets are created in ~/.local/… but this is questionable because...
- Not easy to inspect Nvim-created temp files (for debugging etc).
Solution:
- Introduce stdpath('runtime'), and store sockets there.
- Establish "/tmp/nvim.user/" as the root of all Nvim temp dirs.
closes neovim#3517
closes neovim#17093
Problem:
- Sockets are created in ~/.local/… but this is questionable because...
- Not easy to inspect Nvim-created temp files (for debugging etc).
Solution:
- Introduce stdpath('runtime'), and store sockets there.
- Establish "/tmp/nvim.user/" as the root of all Nvim temp dirs.
closes neovim#3517
closes neovim#17093
Problem: - Since c57f6b2 neovim#8519, sockets are created in ~/.local/… but XDG spec says: "XDG_RUNTIME_DIR: Must be on the local filesystem", which implies that XDG_STATE_DIR is potentially non-local. - Not easy to inspect Nvim-created temp files (for debugging etc). Solution: - Introduce stdpath('runtime'), and store sockets there. - Establish "/tmp/nvim.user/" as the root of all Nvim temp dirs. closes neovim#3517 closes neovim#17093
Problem: - Since c57f6b2 neovim#8519, sockets are created in ~/.local/… but XDG spec says: "XDG_RUNTIME_DIR: Must be on the local filesystem", which implies that XDG_STATE_DIR is potentially non-local. - Not easy to inspect Nvim-created temp files (for debugging etc). Solution: - Introduce stdpath('runtime'), and store sockets there. - Establish "/tmp/nvim.user/" as the root of all Nvim temp dirs. - Make ok() actually useful. - Introduce assert_nolog(). closes neovim#3517 closes neovim#17093
Problem: - Since c57f6b2 neovim#8519, sockets are created in ~/.local/… but XDG spec says: "XDG_RUNTIME_DIR: Must be on the local filesystem", which implies that XDG_STATE_DIR is potentially non-local. - Not easy to inspect Nvim-created temp files (for debugging etc). Solution: - Introduce stdpath('runtime'), and store sockets there. - Establish "/tmp/nvim.user/" as the root of all Nvim temp dirs. - Make ok() actually useful. - Introduce assert_nolog(). closes neovim#3517 closes neovim#17093
Problem: - Since c57f6b2 neovim#8519, sockets are created in ~/.local/… but XDG spec says: "XDG_RUNTIME_DIR: Must be on the local filesystem", which implies that XDG_STATE_DIR is potentially non-local. - Not easy to inspect Nvim-created temp files (for debugging etc). Solution: - Introduce stdpath('runtime'), and store sockets there. - Establish "/tmp/nvim.user/" as the root of all Nvim temp dirs. - Make ok() actually useful. - Introduce assert_nolog(). closes neovim#3517 closes neovim#17093
Problem: - Since c57f6b2 neovim#8519, sockets are created in ~/.local/… but XDG spec says: "XDG_RUNTIME_DIR: Must be on the local filesystem", which implies that XDG_STATE_DIR is potentially non-local. - Not easy to inspect Nvim-created temp files (for debugging etc). Solution: - Introduce stdpath('runtime'), and store sockets there. - Establish "/tmp/nvim.user/" as the root of all Nvim temp dirs. - Make ok() actually useful. - Introduce assert_nolog(). closes neovim#3517 closes neovim#17093
Problem: - Since c57f6b2 neovim#8519, sockets are created in ~/.local/… but XDG spec says: "XDG_RUNTIME_DIR: Must be on the local filesystem", which implies that XDG_STATE_DIR is potentially non-local. - Not easy to inspect Nvim-created temp files (for debugging etc). Solution: - Introduce stdpath('runtime'), and store sockets there. - Establish "/tmp/nvim.user/" as the root of all Nvim temp dirs. - Make ok() actually useful. - Introduce assert_nolog(). closes neovim#3517 closes neovim#17093
Problem: - Since c57f6b2 neovim#8519, sockets are created in ~/.local/… but XDG spec says: "XDG_RUNTIME_DIR: Must be on the local filesystem", which implies that XDG_STATE_DIR is potentially non-local. - Not easy to inspect Nvim-created temp files (for debugging etc). Solution: - Introduce stdpath('runtime'), and store sockets there. - Establish "/tmp/nvim.user/" as the root of all Nvim temp dirs. - Make ok() actually useful. - Introduce assert_nolog(). closes neovim#3517 closes neovim#17093
Problem: - Since c57f6b2 neovim#8519, sockets are created in ~/.local/… but XDG spec says: "XDG_RUNTIME_DIR: Must be on the local filesystem", which implies that XDG_STATE_DIR is potentially non-local. - Not easy to inspect Nvim-created temp files (for debugging etc). Solution: - Introduce stdpath('runtime'), and store sockets there. - Establish "/tmp/nvim.user/" as the root of all Nvim temp dirs. - Make ok() actually useful. - Introduce assert_nolog(). closes neovim#3517 closes neovim#17093
Problem: - Since c57f6b2 neovim#8519, sockets are created in ~/.local/… but XDG spec says: "XDG_RUNTIME_DIR: Must be on the local filesystem", which implies that XDG_STATE_DIR is potentially non-local. - Not easy to inspect Nvim-created temp files (for debugging etc). Solution: - Introduce stdpath('run') ($XDG_RUNTIME_DIR), store sockets there. - Establish "/tmp/nvim.user/" as the tempdir root shared by all Nvims. - Make ok() actually useful. - Introduce assert_nolog(). closes neovim#3517 closes neovim#17093
Problem: - Since c57f6b2 neovim#8519, sockets are created in ~/.local/… but XDG spec says: "XDG_RUNTIME_DIR: Must be on the local filesystem", which implies that XDG_STATE_DIR is potentially non-local. - Not easy to inspect Nvim-created temp files (for debugging etc). Solution: - Introduce stdpath('run') ($XDG_RUNTIME_DIR), store sockets there. - Establish "/tmp/nvim.user/" as the tempdir root shared by all Nvims. - Make ok() actually useful. - Introduce assert_nolog(). closes neovim#3517 closes neovim#17093
Problem: - Since c57f6b2 #8519, sockets are created in ~/.local/… but XDG spec says: "XDG_RUNTIME_DIR: Must be on the local filesystem", which implies that XDG_STATE_DIR is potentially non-local. - Not easy to inspect Nvim-created temp files (for debugging etc). Solution: - Store sockets in stdpath('run') ($XDG_RUNTIME_DIR). - Establish "/tmp/nvim.user/" as the tempdir root shared by all Nvims. - Make ok() actually useful. - Introduce assert_nolog(). closes #3517 closes #17093
Problem: - Since c57f6b2 neovim#8519, sockets are created in ~/.local/… but XDG spec says: "XDG_RUNTIME_DIR: Must be on the local filesystem", which implies that XDG_STATE_DIR is potentially non-local. - Not easy to inspect Nvim-created temp files (for debugging etc). Solution: - Store sockets in stdpath('run') ($XDG_RUNTIME_DIR). - Establish "/tmp/nvim.user/" as the tempdir root shared by all Nvims. - Make ok() actually useful. - Introduce assert_nolog(). closes neovim#3517 closes neovim#17093
Problem: - Since c57f6b2 neovim#8519, sockets are created in ~/.local/… but XDG spec says: "XDG_RUNTIME_DIR: Must be on the local filesystem", which implies that XDG_STATE_DIR is potentially non-local. - Not easy to inspect Nvim-created temp files (for debugging etc). Solution: - Store sockets in stdpath('run') ($XDG_RUNTIME_DIR). - Establish "/tmp/nvim.user/" as the tempdir root shared by all Nvims. - Make ok() actually useful. - Introduce assert_nolog(). closes neovim#3517 closes neovim#17093
Hi,
I got curious how difficult it would be to move the neovim temporary files beneath
$XDG_RUNTIME_DIRand it turned out to be quite simple. At least that's what it looks like - please let me know if I missed anything.The XDG Base Directory Specification suggests to store "runtime files" below
$XDG_RUNTIME_DIRwhen this environment variable is set. Currently, neovim defaults to using a directory below$TMPDIRor/tmp. This change makes theXDG_RUNTIME_DIRthe preferred place for the temporary directory, but keeps fallback to the other locations when this environment variable is not set.I see this topic was brought up before in #3517. I think this PR would resolve that issue, but I have not dug through the entire history of it to be certain...