Bug 315519

Summary: Using kdiff3 as backend for viewing differences of the modified file
Product: [Applications] kate Reporter: Ivan S. Titov <iohann.s.titov>
Component: generalAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED INTENTIONAL    
Severity: wishlist CC: paul
Priority: NOR    
Version First Reported In: 4.0   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Ivan S. Titov 2013-02-20 14:38:41 UTC
Currently, if a file opened in kate is modified externally, dialog will open. If user chooses "view difference", kompare program will open. It should be possible to change the comparing program in ate's settings. For example, using kdiff3 instead of kompare.

Reproducible: Always
Comment 1 Dominik Haumann 2013-02-20 17:08:38 UTC
We just call
KRun::runUrl (KUrl::fromPath(m_diffFile.fileName()), "text/x-patch", activeView(), true );

So the program associated with "text/x-patch" is launched. This is by default kompare, but you can configure this also to be KDiff3. The question is, whether kdiff3 is capable of reading a diff, it seems not.

Currently, kate part just generates a diff. This diff is then read by the external application.
If you want true merging, you need to save both files in temporary locations, then start the external app, and perform the merge once the external app is closed. This is not implemented, and currently also not planned.

But it's a valid wish. So if you want to work on it, follow http://kate-editor.org/ and look into kate/part/swapfile/kateswapdiffcreator.h/cpp.
Comment 2 Dominik Haumann 2013-02-20 17:10:48 UTC
Related is bug #153109 Ability to show differences between two opened files.
Comment 3 Ivan S. Titov 2013-02-20 20:27:11 UTC
As I see from the kde-git https://projects.kde.org/projects/kde/kde-baseapps/kate/repository/revisions/3b866cee33f40888c48ec9702c933bf33436b9f1/entry/part/swapfile/kateswapdiffcreator.cpp 

Kate calls diff for diffing at some point (yeah, that's obvious, I know.). However it is possible to call kdiff3 at that moment and skip calling kompare in this case. Am I right?
Comment 4 Dominik Haumann 2013-02-20 21:06:25 UTC
Yep, that's the correct location. Can you test? :-)
Comment 5 Ivan S. Titov 2013-02-20 21:46:55 UTC
Well.. I give it a try ;-)
(In reply to comment #4)
> Yep, that's the correct location. Can you test? :-)
Comment 6 Christoph Cullmann 2015-10-08 08:55:50 UTC
Dear user,

this wish list item is now closed, as it wasn't touched in the last two years and no contributor stepped up to implement it.

The Kate/KTextEditor team is very small and we can just try to keep up with fixing bugs. Therefore wishs that show no activity for two years or more will be closed from now on to keep at least a bit overview about 'current' wishs of the users.

If you want your feature to be implemented, please step up to provide some patch for it. If you think it is really needed, you can reopen your request, but keep in mind, if no new good arguments are made and no people get attracted to help out to implement it, it will expire in two years again.

We have a nice website kate-editor.org that provides all the information needed to contribute, please make use of it. For highlighting improvements our user manual shows how to write syntax definition files.

Greetings
Christoph