Bug 370997

Summary: Include text files in the "Documents" category (e.g. for Dolphin-"Find" or for Krunner or for launchers/dashboard)
Product: [Frameworks and Libraries] baloo-widgets Reporter: pitlochry <pitlochry>
Component: generalAssignee: Pinak Ahuja <pinak.ahuja>
Status: RESOLVED FIXED    
Severity: normal CC: nate
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:

Description pitlochry 2016-10-17 10:35:13 UTC
Currently the "Documents" category does not include text files, I use many plain-text files and suggest that they should be considered a Document.

In 2014 this bug was supposedly (?) been fixed, see https://bugs.kde.org/show_bug.cgi?id=332021. 
I am filing it again because the old one's location is now obsolete (there is no "baloo" product anymore), but also because there has been no reaction to existing reports of it not being fixed on forum.kde: https://forum.kde.org/viewtopic.php?f=154&t=133468#p363638

Perhaps this results from 
if (mimeType.contains(QLatin1String("text")))
        types << Type::Text;
in line 141-142 of https://quickgit.kde.org/?p=baloo.git&a=blob&h=88bb59a01e5592abb74b1ab345bfc6765d35db57&hb=e6bd357153a790ef66dc803cd3451270e9311134&f=src%2Ffile%2Fbasicindexingjob.cpp

It would be even better, if the user could whitelist what should be defined as document (other users would choose even .tex or .html or whatever files). It would be best if one could adjust this in settings->Plasma Search->Document.

baloo 5.27.0-1 baloo-widgets 16.08.2-1 plasma 5.8.1 

Reproducible: Always

Steps to Reproduce:
1. create text/plain file, which is used as a document
2. let baloo update index
3. baloosearch or "Dolphin->Find->Any" finds it
4. "Dophin->Find->Documents" or Krunner or Launcher or Dashboard doesn't find it (as it isn't in the "Document" category)


Expected Results:  
Should find a text/plain file, which is used as a document. Or offer an option which filetypes are interpreted as documents.
Comment 1 Nate Graham 2017-10-27 17:39:55 UTC
Dophin->Find->Documents definitely returns text files now. I think this was fixed sometime between when you reported this and now.