Gentoo Archives: gentoo-user

From: Jack <ostroffjh@×××××××××××××××××.net>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] KDE plasma desktop view shows files that don't exist
Date: Sat, 27 Aug 2022 23:09:07
Message-Id: R4ABKB62.5AHH37Y3.LSYS447S@TABAO74Q.OZP3REW4.43YMOXCE
In Reply to: Re: [gentoo-user] KDE plasma desktop view shows files that don't exist by Mateusz Okulus
1 On 2022.08.25 13:18, Mateusz Okulus wrote:
2 > On 22/08/24 11:05AM, Jack wrote:
3 > > Checking here for any ideas or suggestions before I report as a KDE
4 > bug.
5 > >
6 > > I have my KDE Plasma desktop set to show my ~/Desktop folder. Two
7 > days ago,
8 > > I created a script.pl Perl script in that folder. (No, I don't
9 > generally do
10 > > work in that folder, but I just needed a quick script to deal with
11 > a file I
12 > > had just downloaded there.) After editing that file in emacs, a
13 > script.pl~
14 > > also showed up on the Desktop.  However, so did a file #script.pl#,
15 > and
16 > > actually I now have three files showing that name.  The original
17 > and the
18 > > emacs backup also show up in Dolphin and an "ls" command in a
19 > terminal. 
20 > > None of the "#" files do, however, which is expected, as there are
21 > transient
22 > > working files only during an active emacs session.
23 > >
24 > > Trying to edit one (double click) from the desktop opens an empty
25 > file, and
26 > > right clicking and selecting Properties shows the correct info as
27 > of when
28 > > the file actually existed - but if I ask for any checksums, they
29 > show up as
30 > > blank fields.
31 > >
32 > > I've looked, and have not found any relevant bug on the KDE
33 > bugzilla.  (As
34 > > it's not likely a Gentoo bug, I don't see any point in filing at
35 > b.g.o.)
36 > >
37 > > Has anyone else noticed this?  Can anyone else reproduce it?
38 > >
39 > > Thanks for any feedback.
40 > >
41 > > Jack
42 >
43 I've been unable to replicate the problem, so I will call it transient,
44 probably due to some particular timing of saving the file and exiting
45 emacs.
46 > I'm fairly sure this isn't a bug, the files exits, and are just empty,
47 > as they show both in Dolphin and using ls.
48 Thanks for the response, but you didn't read carefully. script.pl and
49 script.pl~ do show up and are real files. #script.pl# does NOT show up
50 in Dolphin or with ls, it only appears on the desktop. It is not
51 empty, it just doesn't exist any more.
52
53 I tried to replicate this on my desktop, and the # file didn't show up
54 until after I exited emacs, but it was not empty, and did show up with
55 ls. Deleting it with rm also properly removed it from the Desktop. I
56 could not replicate the problem of the files only showing up on the
57 Desktop.
58 >
59 > script.pl~ is an Emacs backup file, it's created automatically and
60 > won't
61 > be removed. It was created by Emacs when the original file was still
62 > empty.
63 Agreed.
64 >
65 > #script.pl# is an Emacs auto-saved file, which was also saved when the
66 > buffer was empty. "auto-saves happen every 300 keystrokes, or after
67 > around 30 seconds of idle time", from manual, so you probably left the
68 > empty buffer for more than 30 seconds, but the script was shorter than
69 > 300 characters, so it only auto saved the empty file.
70 Also agreed, but once you exit emacs, such files normally get deleted,
71 especially if you have saved the file. In this case, it does appear to
72 have been deleted, but the Plasma Desktop somehow didn't notice the
73 disappearance of the file.
74 >
75 > Those file exist on your system, they are just empty. That's why the
76 > dates are correct. You can simply delete them if you want.
77 The issue is that they did NOT exist. I understand empty files, but
78 that is NOT the case here. In fact, when I tried to move that file to
79 the trash, I got a permission error on the trash, and the remove pop-up
80 just sat there spinning. If I tried to delete the file (whether right
81 click/delete or select and hit the DEL key) I got an error that it
82 couldn't delete it because it didn't exist. All I can guess is that
83 somehow Plasma didn't notice that the file was removed. Once I exited
84 and restarted Xorg/Plasma, that file was gone, and, as I said, I can no
85 longer replicate the problem.
86 >
87 > Those resources might be useful:
88 > https://stackoverflow.com/a/12031838
89 > https://stackoverflow.com/a/18330742
90 >
91 > In particular you can disable backup files, if you don't care or use
92 > git
93 > for example.
94 I do understand those files and do not want to disable backup in emacs,
95 but thanks for the suggestion.
96 >
97 > Regards,
98 > mmokulus
99 Jack