Kate Find In Files > Export Matches stopped working

Hello! Happy New Year!

EndeavourOS with kate v 24.12.0-1 , recently (last 2-4 weeks?) can no longer use “export matches” in the “find in files” tool. I really like using this and I don’t know any good replacement. Ideas of what the cause/solution could be?

An older version is functioning as expected on my Debian machine.

I included all the details but if you are framiliar with the tool the screenshot should be sufficient.

After I made the post with a few screenshots and links I got an error saying I can only have 1 screenshot and 0 links due to being a new user. So I had to remove links. And I smooshed 3 screenshots into 1, I hope it makes sense.

mega screenshot

Problem

detailed steps

steps

  • create a fresh user account in linux to rule out any issue with configuration; switch xfce4 user to new user
  • open kate, create a text file with some text (I select-alled The Kate Handbook index page)
  • enable the plugin “Search & Replace”
  • Edit > Find in files
  • toggle regex button ( {}) to ON
  • create a search query: kate
  • click Search button
  • right-click the top of the results list like “16 matches (16 checked) found in current file”
  • select Export matches

See mega screenshot - Part A

  • opens a dialogue with a text input field where you can put the regex replacement string
  • in the text entry field at the top, enter \0 to use the entire match
  • click Generate

what happens

Expected: The “Result” box below text entry field should populate with hits

Actual: Nothing. No changes in the result box.

See mega screenshot - Part B

troubleshooting

tried:

  • different queries
  • different replacement strings
  • different files
  • toggling options
  • reboot
  • system fully updated/upgraded
  • reinstalled Kate
  • check Output and Diagnostics tools at the bottom — nothing there
  • no other signs of trouble are found

was unable to find anyone else with similar problems:

  • search kate bug tracker
  • read kate documentation
  • wasn’t able to find a separate repo/tracker for the plugin
  • search this forum
  • search the web

application details

Installed package is extra/kate. (Link removed due to new user not being allowed to include them.)

pacman -Qi kate
pacman -Qi kate
Name            : kate
Version         : 24.12.0-1
Description     : Advanced text editor
Architecture    : x86_64
URL             : https://apps.kde.org/kate/
Licenses        : GPL-2.0-or-later  LGPL-2.0-or-later
Groups          : kde-applications  kde-utilities
Provides        : kwrite
Depends On      : gcc-libs  glibc  kbookmarks  kcolorscheme  kcompletion
                  kconfig  kconfigwidgets  kcoreaddons  kcrash  kdbusaddons
                  kguiaddons  ki18n  kiconthemes  kio  knewstuff  kparts
                  kservice  ktexteditor  kuserfeedback  kwidgetsaddons
                  kwindowsystem  kxmlgui  qt6-base  syntax-highlighting
Optional Deps   : clang: C and C++ LSP support [installed]
                  git: git-blame plugin [installed]
                  konsole: open a terminal in Kate [installed]
                  python-lsp-server: Python LSP support
                  qt6-declarative: RBQL plugin [installed]
                  qtkeychain-qt6: SQL plugin [installed]
                  rust: Rust LSP support [installed]
                  texlab: LaTeX LSP support
Required By     : None
Optional For    : kdevelop
Conflicts With  : kwrite
Replaces        : kwrite
Installed Size  : 33.41 MiB
Packager        : Antonio Rojas <arojas@archlinux.org>
Build Date      : Mon 09 Dec 2024 12:08:56 PM
Install Date    : Thu 02 Jan 2025 04:52:25 AM
Install Reason  : Explicitly installed
Install Script  : No
Validated By    : Signature

plugin

I do not find anywhere in the application where the plugin has separate version information.

As a new user I am not allowed to post a link but I think the relevant section of Kate documentation would be stable5/en/kate/kate/kate-application-plugin-searchinfiles.html. However the “export matches” doesn’t seem to be mentioned.

working as expected on another computer

It works properly on Debian 12 running Kate v 22.12.3. This is same text, query and match string as above.

See mega screenshot - Part C

Appreciate any ideas!

1 Like

Hi! Well, I could never make heads or tails out of regular expressions, but I tried what you listed out in that post and the same thing happens to me - so I’d trust that you know what you’re doing with the search expression more than I do :slight_smile:

Others might possibly have ideas on different ways to interpret or compose what you’re typing to be matched in there, but otherwise, it looks to me like you have all the right stuff there to put together a well-detailed bug report!

The community guide to filing and submitting bug reports, so they can be reviewed by KDE community developers, is located here: Get Involved/Issue Reporting - KDE Community Wiki

OK, I will do this. I need to reformat it to work in their form.

Regex is wonderful and I am so glad I learned how to use it a little bit. If you work with text, just a basic working knowledge of it improves life. And it is available widely in many different application types, even libreoffice or their proprietary alternatives.

The website called “regexr” (I can’t post links— websearch for it) helps to learn it. You provide a sample text and a query. It highlights the parts of your results in color so you can understand how things work. And there is reference material available right there. For a long time I only used regex via this kind of web interface. Only more recently I became confident enough to go without the colorful support and use plain text like here with kate or be even braver to go with sed.

(Never use a remote web tool like regexr to work with sensitive text files. You can run your own local instance of it if you need to work with private info, though. They have a github where the GPL source is available.)

2 Likes

Posting links for you:

Site: https://regexr.com/

Source code: GitHub - gskinner/regexr: RegExr is a HTML/JS based tool for creating, testing, and learning about Regular Expressions.

Pretty cool, thanks!

1 Like