Version: (using KDE KDE 3.3.2) Installed from: Debian testing/unstable Packages OS: Linux I searchd through the dcop functions provided by kate to get the filename of the active document. However, there seems to be no such function. I found a mimeType() and a fileSize() (not working) but no url() or filename(). Or is there a totaly different method to get the filename? If not, it should be included! Regards, Martin
Try: dcop kate KateDocumentManager activeDocument best, Jeroen
Maybe I need to specify a bit: I want to use the commandline tool dcop in a shell script and what I want is the string of the URL or filename. 'dcop kate KateDocumentManager activeDocument' gives me: DCOPRef(kate,KateDocument#3) and 'dcop kate KateDocument#3' gives me QCStringList interfaces() QCStringList functions() uint documentNumber() So the only thing I get is the document number (which I allready know). No sign of a function that would return the actual name as a string. Any clues? Martin
You could try: dcop kate __KateMainWindow#1 caption But I agree, there doesn't seem to be a proper way to do this. best, Jeroen
Thanks, with the right sed command that will work for me. But I keep the wish for a more 'intuitive' access to the filename open.
Git commit e06f026555f5b0ef621b194765238e292dd4b418 by Dominik Haumann. Committed on 20/07/2011 at 19:42. Pushed by dhaumann into branch 'master'. add activeDocumentUrl dbus call BUG: 101628 M +12 -2 kate/app/katemainwindowadaptor.cpp M +6 -1 kate/app/katemainwindowadaptor.h http://commits.kde.org/kate/e06f026555f5b0ef621b194765238e292dd4b418
Git commit 0e88337feb0ab5db8710b8d77ebf9d2e208241fd by Dominik Haumann. Committed on 20/07/2011 at 19:42. Pushed by dhaumann into branch 'KDE/4.7'. add activeDocumentUrl dbus call BUG: 101628 M +12 -2 kate/app/katemainwindowadaptor.cpp M +6 -1 kate/app/katemainwindowadaptor.h http://commits.kde.org/kate/0e88337feb0ab5db8710b8d77ebf9d2e208241fd