Bug 384973 - No preview for initially loaded document in Kate
Summary: No preview for initially loaded document in Kate
Status: RESOLVED WORKSFORME
Alias: None
Product: kate
Classification: Applications
Component: plugin-preview (show other bugs)
Version: Git
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
: 385755 410468 (view as bug list)
Depends on: 384448 384449
Blocks:
  Show dependency treegraph
 
Reported: 2017-09-22 19:13 UTC by Friedrich W. H. Kossebau
Modified: 2020-12-02 04:34 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Friedrich W. H. Kossebau 2017-09-22 19:13:15 UTC
The first document loaded into Kate does not get any preview. Both if loaded via commandline argument or when selecting a file via the Open dialog.

Reason is that the plugin relies on the MIME type reported for the document. Right now KTextEditor only estimates that MIME type on request instead of maintaining this property itself and notifying clients about any changes (see bugs this report depends on).
Kate reuses the initially shown empty document for loading the initial file (unless the document was edited). So the preview plugin, which only updates on new document objects currently, misses to learn about a new file being loaded.

Workaround:
Either close & open again the file or switch the preview plugin shortly to preview another open document.
Comment 1 Friedrich W. H. Kossebau 2017-10-17 16:11:00 UTC
*** Bug 385755 has been marked as a duplicate of this bug. ***
Comment 2 Friedrich W. H. Kossebau 2019-07-31 19:00:54 UTC
*** Bug 410468 has been marked as a duplicate of this bug. ***
Comment 3 Christoph Cullmann 2019-08-24 15:55:34 UTC
Hi, given you no longer maintain the plugin, shall we close the self-reported issues?
Comment 4 Friedrich W. H. Kossebau 2019-08-24 16:08:35 UTC
The issues still exist though, and people run into it (see also duplicates)?

Thanks for asking in any case, but not personally attached to the plugin anymore (besides plan to rewrite this one day in a better version), so please do to these bugs whatever you do in your usual bug management :)
Comment 5 Christoph Cullmann 2019-08-24 16:34:52 UTC
Ok, let's keep them then, I will just blog about that we are in need of either a new maintainer or some bug fixers for this and point out the current list of issues.
Comment 6 Friedrich W. H. Kossebau 2019-08-24 16:38:32 UTC
Christoph, if you blog, please consider linking to the arguments where I set the plugin flawed when I proposed to delete it again: https://phabricator.kde.org/D16668

It might help people to know in advance what the challenges are here.
Comment 7 Friedrich W. H. Kossebau 2019-08-24 16:39:09 UTC
(In reply to Friedrich W. H. Kossebau from comment #6)
> Christoph, if you blog, please consider linking to the arguments where I set
> the plugin flawed when I proposed to delete it again:
> https://phabricator.kde.org/D16668

"I set" -> "I see"
Comment 8 Christoph Cullmann 2019-08-24 16:44:22 UTC
Sure ;)
Comment 10 Justin Zobel 2020-11-02 01:57:47 UTC
I can not reproduce the issue with kate from git master.

A markdown document opened from the command line or via file open shows preview correctly.
Comment 11 Bug Janitor Service 2020-11-17 04:33:42 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 12 Bug Janitor Service 2020-12-02 04:34:06 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!