problem with this script

There is a problem with this script, as well as with the HTML-tidy script for Kate distributed with KDE.

dcop ' kate * '

returns not simply “kate”, but kate-1204 or even a few kate processes in case a few windows are open. In that case the command

dcop kate KateDocumentManager activeDocumentNumber

returns “call failed”. This did work on some KDE live cd’s (perhaps where a single instance of kate was forced) but it did not on my KDE 3.5.2 (kubuntu 5.10).

I did a workaround by setting kate kate process dcop name like this:

# get kate process dcop name
katedoc=`dcop 'kate*'`
# Get the active document number
doc=`dcop $katedoc KateDocumentManager activeDocumentNumber`

but it only works when there is a single instance of kate running…

could not find a better solution. Could you perhaps fix this?

One more question: I do not see the Tools > KDE scripts menu, is that on purpose, or is it a bug?

Reply

  • You can use Markdown syntax to format and style the text.
  • You may link to images on this site using a special syntax
  • Web page addresses and e-mail addresses turn into links automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Copy the characters (respecting upper/lower case) from the image.