Page 1 of 1

Preview .TXT files not working

Posted: Mon Dec 11, 2023 4:27 pm
by CB-Crew
Hello,

I have the impression that the preview of .TXT files in Void has recently stopped working. The preview in Microsoft File Explorer and also in XyPlorer, which I use, works quickly and without any problems.

What could I do? The preview of many file types works without any problems, only something that you would think would be quite simple does not... :?

Thank you

Re: Preview .TXT files not working

Posted: Mon Dec 11, 2023 7:10 pm
by therube
OS?
Version of Everything?

Does anything display in the Preview window?

Re: Preview .TXT files not working

Posted: Mon Dec 11, 2023 9:05 pm
by horst.epp
For me, the actual Everything version 1.5.0.1361a has no problems to preview *.txt files.

Re: Preview .TXT files not working

Posted: Mon Dec 11, 2023 10:13 pm
by void
Everything uses the system to render previews.

Please make sure you are using the x64 version of Everything. (Help -> About)

Please make sure Everything is installed correctly and running as a standard user:
  • In Everything, from the Tools menu, click Options.
  • Click the General tab on the left.
  • Check Store settings and data in %APPDATA%\Everything.
  • Uncheck Run as administrator.
  • Check Everything Service. (Please make sure this is tick-checked and not square-checked)
  • Click OK.
  • Exit Everything (right click the Everything tray icon and click Exit).
  • Restart Everything.


Does the issue persist?

Re: Preview .TXT files not working

Posted: Tue Dec 12, 2023 12:04 pm
by CB-Crew
horst.epp wrote: Mon Dec 11, 2023 9:05 pm For me, the actual Everything version 1.5.0.1361a has no problems to preview *.txt files.
Hello Horst,
I use Version 1.4.1.1024 (x64). I can only see that Version 1.5 is still in Alpha?

Re: Preview .TXT files not working

Posted: Tue Dec 12, 2023 12:19 pm
by CB-Crew
therube wrote: Mon Dec 11, 2023 7:10 pm OS?
Version of Everything?
Does anything display in the Preview window?
Hello

I run:
- Windows 11 Pro
- Version 22H2

- Everthing Version 1.4.1.1024 (x64)

'Everthing' runs like a charm and is a big help for me.

Preview of .PDF files is fast.
.TXT files: no preview
.DOC files: preview works
.xls files: no preview

looks a little bit funny...
void wrote: Mon Dec 11, 2023 10:13 pm Does the issue persist?
Options are set as recommendet in your post.

I think best will be to do a level one repair and reboot my maschine...

Re: Preview .TXT files not working

Posted: Tue Dec 12, 2023 11:40 pm
by void
Please try setting the PerceivedType for .txt files to text:
  • From the Start menu, search for:
    regedit
  • Right click Registry Editor and click Run as administrator.
  • In the registry editor, navigate to:
    HKEY_CLASSES_ROOT\.txt
  • On the right side, please make sure PerceivedType is set to: text

Re: Preview .TXT files not working

Posted: Fri Jan 12, 2024 5:32 pm
by Coasting3122
void wrote: Mon Dec 11, 2023 10:13 pm Everything uses the system to render previews.

Please make sure you are using the x64 version of Everything. (Help -> About)

Please make sure Everything is installed correctly and running as a standard user:
  • In Everything, from the Tools menu, click Options.
  • Click the General tab on the left.
  • Check Store settings and data in %APPDATA%\Everything.
  • Uncheck Run as administrator.
  • Check Everything Service. (Please make sure this is tick-checked and not square-checked)
  • Click OK.
  • Exit Everything (right click the Everything tray icon and click Exit).
  • Restart Everything.
Does the issue persist?
Howdy! I just verified all these steps and am still not getting preview on anything. Not sure when / why this started. It was working fine a few days ago with text based files (.txt, .md, .json, etc.) I am on Win 10 22H2 with all current updates. Everything Version 1.5.0.1363a (x64)

Any ideas, or info I can gather?

Re: Preview .TXT files not working

Posted: Fri Jan 12, 2024 7:01 pm
by Coasting3122
Answering my own question:

I just remembered that Windows Explorer has a built-in preview pane and that was not working either. It looks like the option must have gotten disabled somehow (maybe a recent patch?).

Open File Explorer
On the View Ribbon, click Options
On the resulting dialog, choose the View Tab
Scroll down to find ‘Show preview handlers in preview pane’ and make sure the option is checked (enabled)

That fixed the problem for me.
previewPane.JPG
previewPane.JPG (45.42 KiB) Viewed 2303 times

Re: Preview .TXT files not working

Posted: Sat Jan 13, 2024 3:13 pm
by NotNull
Just for the record:

Everything previews can be configured independently from the Explorer setting.
This is controlled by the show_preview_handlers_in_preview_pane setting.
Setting this to 1, will provide previews in Everything, even when disabled in Explorer.

(requires a restart of Everything)


show_preview_handlers_in_preview_pane

Re: Preview .TXT files not working

Posted: Mon Jan 22, 2024 9:37 pm
by Jolly
Is there a way to force unknown file types to show as text in the preview pane?
For example, .cmd or unknown file types

Re: Preview .TXT files not working

Posted: Mon Jan 22, 2024 10:29 pm
by NotNull
You can use the same method as described for .txt files above by void:
But instead of .txt, navigate to .cmd

Please try setting the PerceivedType for .txt files to text:
  • From the Start menu, search for:
    regedit
  • Right click Registry Editor and click Run as administrator.
  • In the registry editor, navigate to:
    HKEY_CLASSES_ROOT\.txt
  • On the right side, please make sure PerceivedType is set to: text

Re: Preview .TXT files not working

Posted: Fri Feb 23, 2024 6:29 pm
by Jolly
That worked for cmd, but I really need a way to have everything's preview handle unknown file names as text.
I'm often using backup files that have changing file extensions: Image

Ideally, everything uses a text handler for unknown files, unless it has invalid encoding, and then use a hex viewer.

Re: Preview .TXT files not working

Posted: Fri Feb 23, 2024 8:09 pm
by NotNull
Everything has a feature where it lets you define your own preview handler for some extensions. This will overrule the Windows setting.
So Window (Explorer) uses handler A and Everything then can use handler B.

The Everything preview definitions not only allow extensions, but also (regular expression) patterns.
If you are able to define patterns to match, you can use this mechanism.

Matching will be done in order of defining: the first patter/extension that matches will be used.
So in theory you could use a fetch-all pattern at the end to show all remaining files using the defined preview handler.

This will effectively ignore all Windows settings for previews. Meaning that you will need to define (and maintain) all filetypes in the Everything preview definitions, including PDF, docx, etc.
There might be a maximum length of these definitions involved. (Don't know, but seems likely)



preview_handlers INI setting.


For example -- and as a test -- the following preview_handlers setting seems to cover quite a few cases:

Code: Select all

{"filter":"regex:\.cmd@\\d{4}-\\d{2}-\\d{2}_\\d{6}","handler":"{1531d583-8375-4d3f-b5fb-d23bbd169f22}"}

Re: Preview .TXT files not working

Posted: Thu Feb 29, 2024 6:01 pm
by Jolly
Thanks, that will get me started!

I wonder if there's a way To properly set a catch all handler On windows. I managed to get one sort of working, but it overrides the preview handler for every extension.

Re: Preview .TXT files not working

Posted: Fri Mar 01, 2024 6:35 am
by void
You can set a preview handler for all files with:

HKEY_CLASSES_ROOT\*\shellex\{8895b1c6-b41f-4c1c-a562-0d564250836f}

Unfortunately, this overrides all other preview handlers.
I don't know of a way to set a fallback.
If you find one, please let us know.



I will consider an option to specify a fallback preview handler for Everything.
You can currently set a * filter in Everything to catch all files, but this too will override all system preview handlers.
Everything will use the first filter match preview handler from your preview_handlers setting.
You would need to add all preview handlers before your * preview handler.

Re: Preview .TXT files not working

Posted: Fri Mar 01, 2024 5:00 pm
by NotNull
void wrote: Fri Mar 01, 2024 6:35 am Unfortunately, this overrides all other preview handlers.
I don't know of a way to set a fallback.
If you find one, please let us know.
There might be a way ..

For experimenting only at this moment as this was only *very* briefly tested
(but seems to work in my simple environment)


Run the following command (as administrator)

Code: Select all

reg.exe add "HKCR\SystemFileAssociations\*\shellex\{8895b1c6-b41f-4c1c-a562-0d564250836f}" /ve /D "{1531d583-8375-4d3f-b5fb-d23bbd169f22}"
Alternatively: import this regfile ( also as administartor)

fallbackpreview.reg

Code: Select all

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\SystemFileAssociations\*\shellex\{8895b1c6-b41f-4c1c-a562-0d564250836f}]
@="{1531d583-8375-4d3f-b5fb-d23bbd169f22}"


Run the following CMD command (as user) to find which file extensions might give the wrong preview. All other existing previews are untouched.

On my system all these affected extensions are defined on a higher level too, so no issues here (but I don't use a mail client like Outlook on this system)

Code: Select all

for /f "usebackq delims=" %x in (`reg.exe query HKCR\SystemFileAssociations`) do @reg.exe query "%x\ShellEx\{8895b1c6-b41f-4c1c-a562-0d564250836f}" 2>nul

Output from my system, slightly compacted (Windows 11):

Code: Select all



HKEY_CLASSES_ROOT\SystemFileAssociations\*\ShellEx\{8895b1c6-b41f-4c1c-a562-0d564250836f}
    (Default)    REG_SZ    {1531d583-8375-4d3f-b5fb-d23bbd169f22}
HKEY_CLASSES_ROOT\SystemFileAssociations\.contact\ShellEx\{8895b1c6-b41f-4c1c-a562-0d564250836f}
    (Default)    REG_SZ    {13D3C4B8-B179-4ebb-BF62-F704173E7448}
HKEY_CLASSES_ROOT\SystemFileAssociations\.htm\ShellEx\{8895b1c6-b41f-4c1c-a562-0d564250836f}
    (Default)    REG_SZ    {f8b8412b-dea3-4130-b36c-5e8be73106ac}
HKEY_CLASSES_ROOT\SystemFileAssociations\.html\ShellEx\{8895b1c6-b41f-4c1c-a562-0d564250836f}
    (Default)    REG_SZ    {f8b8412b-dea3-4130-b36c-5e8be73106ac}
HKEY_CLASSES_ROOT\SystemFileAssociations\.mht\ShellEx\{8895b1c6-b41f-4c1c-a562-0d564250836f}
    (Default)    REG_SZ    {92dbad9f-5025-49b0-9078-2d78f935e341}
HKEY_CLASSES_ROOT\SystemFileAssociations\.mhtml\ShellEx\{8895b1c6-b41f-4c1c-a562-0d564250836f}
    (Default)    REG_SZ    {92dbad9f-5025-49b0-9078-2d78f935e341}
HKEY_CLASSES_ROOT\SystemFileAssociations\.msg\ShellEx\{8895b1c6-b41f-4c1c-a562-0d564250836f}
    (Default)    REG_SZ    {53BEDF0B-4E5B-4183-8DC9-B844344FA104}
HKEY_CLASSES_ROOT\SystemFileAssociations\.rtf\ShellEx\{8895b1c6-b41f-4c1c-a562-0d564250836f}
    (Default)    REG_SZ    {a42c2ccb-67d3-46fa-abe6-7d2f3488c7a3}
HKEY_CLASSES_ROOT\SystemFileAssociations\MAPI/Attachment\ShellEx\{8895b1c6-b41f-4c1c-a562-0d564250836f}
    (Default)    REG_SZ    {53BEDF0B-4E5B-4183-8DC9-B844344FA104}
HKEY_CLASSES_ROOT\SystemFileAssociations\MAPI/IPM.Activity\ShellEx\{8895b1c6-b41f-4c1c-a562-0d564250836f}
    (Default)    REG_SZ    {53BEDF0B-4E5B-4183-8DC9-B844344FA104}
HKEY_CLASSES_ROOT\SystemFileAssociations\MAPI/IPM.Appointment\ShellEx\{8895b1c6-b41f-4c1c-a562-0d564250836f}
    (Default)    REG_SZ    {53BEDF0B-4E5B-4183-8DC9-B844344FA104}
HKEY_CLASSES_ROOT\SystemFileAssociations\MAPI/IPM.Contact\ShellEx\{8895b1c6-b41f-4c1c-a562-0d564250836f}
    (Default)    REG_SZ    {53BEDF0B-4E5B-4183-8DC9-B844344FA104}
HKEY_CLASSES_ROOT\SystemFileAssociations\MAPI/IPM.DistList\ShellEx\{8895b1c6-b41f-4c1c-a562-0d564250836f}
    (Default)    REG_SZ    {53BEDF0B-4E5B-4183-8DC9-B844344FA104}
HKEY_CLASSES_ROOT\SystemFileAssociations\MAPI/IPM.Message\ShellEx\{8895b1c6-b41f-4c1c-a562-0d564250836f}
    (Default)    REG_SZ    {53BEDF0B-4E5B-4183-8DC9-B844344FA104}
HKEY_CLASSES_ROOT\SystemFileAssociations\MAPI/IPM.Note\ShellEx\{8895b1c6-b41f-4c1c-a562-0d564250836f}
    (Default)    REG_SZ    {53BEDF0B-4E5B-4183-8DC9-B844344FA104}
HKEY_CLASSES_ROOT\SystemFileAssociations\MAPI/IPM.Note.Read\ShellEx\{8895b1c6-b41f-4c1c-a562-0d564250836f}
    (Default)    REG_SZ    {53BEDF0B-4E5B-4183-8DC9-B844344FA104}
HKEY_CLASSES_ROOT\SystemFileAssociations\MAPI/IPM.Post\ShellEx\{8895b1c6-b41f-4c1c-a562-0d564250836f}
    (Default)    REG_SZ    {53BEDF0B-4E5B-4183-8DC9-B844344FA104}
HKEY_CLASSES_ROOT\SystemFileAssociations\MAPI/IPM.Post.Rss\ShellEx\{8895b1c6-b41f-4c1c-a562-0d564250836f}
    (Default)    REG_SZ    {53BEDF0B-4E5B-4183-8DC9-B844344FA104}
HKEY_CLASSES_ROOT\SystemFileAssociations\MAPI/IPM.Schedule.Meeting\ShellEx\{8895b1c6-b41f-4c1c-a562-0d564250836f}
    (Default)    REG_SZ    {53BEDF0B-4E5B-4183-8DC9-B844344FA104}
HKEY_CLASSES_ROOT\SystemFileAssociations\MAPI/IPM.StickyNote\ShellEx\{8895b1c6-b41f-4c1c-a562-0d564250836f}
    (Default)    REG_SZ    {53BEDF0B-4E5B-4183-8DC9-B844344FA104}
HKEY_CLASSES_ROOT\SystemFileAssociations\MAPI/IPM.Task\ShellEx\{8895b1c6-b41f-4c1c-a562-0d564250836f}
    (Default)    REG_SZ    {53BEDF0B-4E5B-4183-8DC9-B844344FA104}
HKEY_CLASSES_ROOT\SystemFileAssociations\text\ShellEx\{8895b1c6-b41f-4c1c-a562-0d564250836f}
    (Default)    REG_SZ    {1531d583-8375-4d3f-b5fb-d23bbd169f22}

So I needed to test previews of .htm .html .mht .mhtml .msg and .rtf files. All other extensions should be unaffected.
Not all extensions were abvailabel, but what was there previewed just fine.

Re: Preview .TXT files not working

Posted: Sat Mar 02, 2024 1:38 am
by void
The following didn't work for me:

HKEY_CLASSES_ROOT\SystemFileAssociations\*\ShellEx\{8895b1c6-b41f-4c1c-a562-0d564250836f}



However, the following did:

HKEY_CLASSES_ROOT\Unknown\ShellEx\{8895b1c6-b41f-4c1c-a562-0d564250836f}
Set the (default) value to the desired preview handler.
This preview handler will be used as a fallback in Windows Explorer.

"Unknown" is a special "PerceivedType".
There are other PerceivedTypes: audio, image, system, text and video.
The preview handler for these types can be set under:
HKEY_CLASSES_ROOT\SystemFileAssociations\PerceivedType\ShellEx\{8895b1c6-b41f-4c1c-a562-0d564250836f}



I'll make some adjustments to Everything so it behaves exactly the same as Windows Explorer.



If you know a good hex viewer preview handler please post it here.

Re: Preview .TXT files not working

Posted: Thu Mar 07, 2024 5:21 am
by void
Everything 1.5.0.1371a will now use:

HKEY_CLASSES_ROOT\unknown\ShellEx\{8895b1c6-b41f-4c1c-a562-0d564250836f}

Re: Preview .TXT files not working

Posted: Fri Mar 08, 2024 1:11 pm
by Gabarito
Is there an option to do not word wrap TXT preview?
I could not find it.

Thanks.

Re: Preview .TXT files not working

Posted: Thu Apr 18, 2024 11:58 am
by void
Is there an option to do not word wrap TXT preview?
It depends on your TXT preview handler.
It's outside the control of Everything.
Try disabling word wrap in Notepad.



Everything 1.5.0.1372a adds a advanced preview_default_handler setting to set the fallback preview handler for files.

Re: Preview .TXT files not working

Posted: Thu Apr 18, 2024 12:14 pm
by Gabarito
void wrote: Thu Apr 18, 2024 11:58 am
Is there an option to do not word wrap TXT preview?
Try disabling word wrap in Notepad.
Unfortunately, it did not work.

void wrote: Thu Apr 18, 2024 11:58 am
Everything 1.5.0.1372a adds a advanced preview_default_handler setting to set the fallback preview handler for files.
Empty is disable.
What else could I add here?
The path for my text editor?
What is the preview handler of the OS?

Re: Preview .TXT files not working

Posted: Thu Apr 18, 2024 12:46 pm
by Gabarito
I noted an undesired effect using preview window:
If I press down arrow to preview the next file, the focus goes to the preview window, even if I do not want it.

Expected behavior is to keep the focus on files, to navigate among them with keyboard arrows.
But focus always goes to the window.

[Edited]
It occurs when viewing .docx files.
.txt and image files run fine.