Closed gilch closed 1 month ago
Hi,
As I understand, some files from "My Documents" could not be added as commands using "learn as open". There is no difference when running Enso with admin and regular terminal. Did I understood correctly? Most likely it is some permission issue. Please give your user full control on the files and try again.
I opened the File Explorer properties dialog on both an affected and unaffected file. The ownership and permissions were identical, so I don't think that's it.
I made a simple custom command for faster testing. It seems to show the same issue as "learn as open":
def cmd_what(ensoapi):
"""Displays the current selection dict"""
ensoapi.display_message(ensoapi.get_selection())
Affected files show {}
—an empty dict. This will also show multiple file selections, up to the display length limit of Enso's message window. Sometimes a file that can't be detected individually will show up in a group. That's weird.
I have yet to find a folder that doesn't work. It's always files. It seems like the difference is that file types with a preview in the File Explorer preview pane fail. Could the preview be locking out Enso somehow? Except photos have always worked so far, and they do have a preview, so that doesn't make sense either.
The same group may work or fail depending on what order I select the files. If a previewable file is last, Enso can't detect the group. That's exactly what decides which preview is shown. I'll try copying a picture file to Documents to see how it groups.
Yeah, I tried grouping with a .jpg
file. It works like a file without a preview, despite showing one. Either individually, or as the last item of a group, Enso can see it. I'm not sure how Enso decides to order the returned tuple of paths, but it doesn't seem to be the selection order.
If I turn off the File Explorer preview pane or use the details pane instead, everything seems to work. That's an easy enough workaround, I suppose, but something is wrong with how Enso is handling the situation.
So my "certain folders" assumption in the title was wrong. It's just that certain folders tended to have different file types. Some previewable in File Explorer, some not.
So, this turns out to be the problem of Windows Shell. Personally I never use file preview, so this error went unnoticed, Enso probably can do anything about this, because it uses Windows API to obtain explorer selection.
For example, in my documents folder and the
.enso/
folder. But my pictures folder works. I like to use the "learn as open" on certain files/folders in there. I can manually create shortcuts in File Explorer and drop them in the.enso/commands/learned/
folder for the same effect, but this can get tedious if I'm making a lot of changes.I can reproduce even when running the
debug.bat
with an admin terminal. No difference in the debug log as far as I can tell. It does sayClipboard contains CF_CLIPBOARD_VIEWER_IGNORE.
, but it does that whether it can find the file selection or not.I'm using the latest release (version 1.1). This is on Windows 11 Home 23H2. Is this a known issue in Enso? Do I need to grant some security permission beyond an admin terminal?