Ticket #4477 (new enhancement)
mcedit temporary files path configuration option
Reported by: | opty | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | Future Releases |
Component: | mcedit | Version: | 4.8.27 |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Branch state: | no branch | Votes for changeset: |
Description
Please add support for mcedit temporary files path configuration option (or environment variable) so editing a file doesn't update its directory modification timestamp when no changes finally made.
Change History
comment:3 Changed 18 months ago by opty
For example lockfile:
lrwxrwxrwx 1 opty users 31 2023-06-21 14:29:08.829943934 +0200 .#testfile -> opty@vodopnik.domain.lan.21285
comment:4 follow-up: ↓ 6 Changed 18 months ago by zaytsev
Does vim have such a configuration option? Sounds like nobody needed it in 30 years.
comment:5 Changed 18 months ago by ossi
i don't think that lock files should be even considered temporary files in the first place.
one could in principle specify a centralized location for lock files and encode the edited file's location in each lock file's name, but this would break down for remote files.
a more fundamental question to ask is whether separate lock files are the right approach in the first place, given that one could use proper advisory locking instead. unfortunately, the vfs is sort of in the way (though it could be actually done even for sh:// - at considerable cost).
comment:6 in reply to: ↑ 4 Changed 18 months ago by opty
Replying to zaytsev:
Does vim have such a configuration option? Sounds like nobody needed it in 30 years.
backupdir, directory and swapdir :-)
Now that I'm thinking about it, I could cp -a the file to a temporary directory, run mcedit there and then cp -a it back but I haven't created such wrapper yet so it probably doesn't bother me that much. :-)
BTW, not just me who noticed:
linux - Directory last modified date - Stack Overflow
vim changes modification time of folder on saving file in it under windows 7 - Stack Overflow
s/made/saved/