https://bugs.kde.org/show_bug.cgi?id=465646

--- Comment #9 from Thomas Carmichael <carmanau...@gmail.com> ---
I've done some additional testing that may help provide more useful context.

Looking into how nano saves files, I'm wondering if the way the
"~/.local/share/applications" directory is watched, or how the files in the
directory are watched, has an impact here. I had a look at the source and saw
references to KDirWatch so I enabled Full Debug (via KDebugSettings) for both
KDirWatch and KDED and did more testing to see what output I would get.

As I understand it, when nano saves a file it overwrites the file directly, so
I expected debug output there, but got nothing on saving the file.

Testing with Kate, I checked my settings and under Open/Save > Advanced, the
"Swap file mode" is set to "Enabled, Store In Default Directory", and when
saving, it creates a temporary "kate-swp" file in the same folder and then
deletes it (it also creates the swap file if you start making changes), events
which show up in the debug output, along the lines of "kf.coreaddons.kdirwatch:
1 instance(s) monitoring the new file <filename>" and then
"kf.coreaddons.kdirwatch: "KDirWatch-XX" emitting [created/deleted]
<filename>", and those events trigger the update.

Testing with vim, there are similar events, but vim saves to a temporary file
first and then I assume it moves/saves the modified file in place of the
existing file, which also triggers the update.

With the above information, I've also tested nano by turning on the "set
lockfile" setting which creates a ".swp" file when you open, but won't delete
the swap file on saving (without exiting), however if you make another edit
after saving it will delete the old swap file and create a new one, which will
trigger the update, or once you exit, either "exit and save" or just exit after
saving manually.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to