<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-17552332</id><updated>2011-08-17T05:02:37.275+02:00</updated><category term='scripting'/><category term='c++ template specialization'/><category term='commandline'/><category term='plasma applet'/><category term='development'/><category term='annotations'/><category term='developer meeting'/><category term='Latex'/><category term='compile'/><category term='kde'/><category term='luggage'/><category term='kate'/><category term='cmake'/><category term='spellchecking'/><category term='git'/><category term='ot'/><category term='concepts'/><category term='qt designer'/><category term='akademy'/><category term='features'/><category term='techbase'/><category term='highlighting'/><category term='kdesvn-build'/><category term='indentation'/><category term='kwrite'/><category term='coffee'/><category term='system monitor'/><category term='rant'/><category term='memory leak'/><title type='text'>dhaumann</title><subtitle type='html'>News around KDE and Kate.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://dhaumann.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://dhaumann.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>dhaumann</name><uri>http://www.blogger.com/profile/06242913572752671774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>80</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-17552332.post-6954488208862521960</id><published>2010-07-09T13:58:00.002+02:00</published><updated>2010-07-15T08:50:25.708+02:00</updated><title type='text'>Moving my Blog</title><content type='html'>Since we have a new &lt;a href="http://www.kate-editor.org/"&gt;Kate Homepage&lt;/a&gt;, I''ve moved all my content over. Now the kate homepage at least has lots of Kate related content :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17552332-6954488208862521960?l=dhaumann.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dhaumann.blogspot.com/feeds/6954488208862521960/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17552332&amp;postID=6954488208862521960' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/6954488208862521960'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/6954488208862521960'/><link rel='alternate' type='text/html' href='http://dhaumann.blogspot.com/2010/07/moving-my-blog.html' title='Moving my Blog'/><author><name>dhaumann</name><uri>http://www.blogger.com/profile/06242913572752671774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17552332.post-2499066169715163391</id><published>2010-07-09T11:04:00.005+02:00</published><updated>2010-07-09T11:27:50.092+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='kate'/><category scheme='http://www.blogger.com/atom/ns#' term='kde'/><title type='text'>Kate: Scripted Actions</title><content type='html'>Finally, I came around to implement scripted actions for Kate in KDE SC 4.6. Let's take a look at how this works. When Kate starts, it searches for $KDEDIRS/share/apps/katepart/script/ for *.js files. As example, let's take a look at utils.js there:&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;/* kate-script&lt;br /&gt;* author: Dominik Haumann&lt;br /&gt;* license: LGPL&lt;br /&gt;* revision: 3&lt;br /&gt;* kate-version: 3.4&lt;br /&gt;* type: commands&lt;br /&gt;* functions: moveLinesDown&lt;br /&gt;*/&lt;br /&gt;&lt;br /&gt;function moveLinesDown()&lt;br /&gt;{&lt;br /&gt;  var fromLine = -1;&lt;br /&gt;  var toLine = -1;&lt;br /&gt;&lt;br /&gt;  var selectionRange = view.selection();&lt;br /&gt;  if (selectionRange.isValid() &amp;amp;&amp;amp; selectionRange.end.line &amp;lt; document.lines() - 1) {&lt;br /&gt;      toLine = selectionRange.start.line;&lt;br /&gt;      fromLine = selectionRange.end.line + 1;&lt;br /&gt;  } else if (view.cursorPosition().line &amp;lt; document.lines() - 1) {&lt;br /&gt;      toLine = view.cursorPosition().line;&lt;br /&gt;      fromLine = toLine + 1;&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  if (fromLine != -1 &amp;amp;&amp;amp; toLine != -1) {&lt;br /&gt;      var text = document.line(fromLine);&lt;br /&gt;&lt;br /&gt;      document.editBegin();&lt;br /&gt;      document.removeLine(fromLine);&lt;br /&gt;      document.insertLine(toLine, text);&lt;br /&gt;      document.editEnd();&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;function action(cmd)&lt;br /&gt;{&lt;br /&gt;  var a = new Array();&lt;br /&gt;  if (cmd == "moveLinesDown") {&lt;br /&gt;      a['text'] = i18n("Move Lines Down");&lt;br /&gt;      a['icon'] = "";&lt;br /&gt;      a['category'] = "";&lt;br /&gt;      a['interactive'] = false;&lt;br /&gt;      a['shortcut'] = "";&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  return a;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;function help(cmd)&lt;br /&gt;{&lt;br /&gt;  if (cmd == "moveLinesDown") {&lt;br /&gt;      return i18n("Move selected lines down.");&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;/blockquote&gt;What happens is the following:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;the header tells kate that there is an exported function "moveLinesDown"&lt;/li&gt;&lt;li&gt;so when Kate Part is loaded, it calls "action(moveLinesDown)" to check whether this function should be exposed in the GUI. Here, we return the action info that includes the displayed text, an icon, a category, whether the script needs user input (interactive) and a default shortcut. Of course, you can change the shortcuts, and also configure the toolbars to show the actions.&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;With this, every user is able to script arbitrary editing functions for Kate Part. We don't have to implement all those helpers in C++ anymore. The result looks like this:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_JcjnuQSFzjw/TDbqo9NbCQI/AAAAAAAAAEM/8RVBJ2l17mc/s1600/scriptaction.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 298px;" src="http://3.bp.blogspot.com/_JcjnuQSFzjw/TDbqo9NbCQI/AAAAAAAAAEM/8RVBJ2l17mc/s400/scriptaction.png" alt="" id="BLOGGER_PHOTO_ID_5491834784971426050" border="0" /&gt;&lt;/a&gt;You can have this already now, you just have to use the &lt;a href="http://gitorious.org/kate/pages/Building%20Kate"&gt;development version&lt;/a&gt; of Kate :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17552332-2499066169715163391?l=dhaumann.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dhaumann.blogspot.com/feeds/2499066169715163391/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17552332&amp;postID=2499066169715163391' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/2499066169715163391'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/2499066169715163391'/><link rel='alternate' type='text/html' href='http://dhaumann.blogspot.com/2010/07/kate-scripted-actions.html' title='Kate: Scripted Actions'/><author><name>dhaumann</name><uri>http://www.blogger.com/profile/06242913572752671774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_JcjnuQSFzjw/TDbqo9NbCQI/AAAAAAAAAEM/8RVBJ2l17mc/s72-c/scriptaction.png' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17552332.post-8138401591640445140</id><published>2010-07-07T00:11:00.008+02:00</published><updated>2010-07-07T00:32:45.011+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='kate'/><category scheme='http://www.blogger.com/atom/ns#' term='kde'/><title type='text'>Enjoying Tampere</title><content type='html'>As always, the KDE conference has its funny sides, as you can see on the photo: 4 Kate developers shaping the future of the (as you all know) most awesome application: Kate :-)&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_JcjnuQSFzjw/TDOqNVjjtwI/AAAAAAAAAEE/iwPLElohTnE/s1600/prettywoman-small.jpeg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 300px;" src="http://2.bp.blogspot.com/_JcjnuQSFzjw/TDOqNVjjtwI/AAAAAAAAAEE/iwPLElohTnE/s400/prettywoman-small.jpeg" alt="" id="BLOGGER_PHOTO_ID_5490919516796073730" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17552332-8138401591640445140?l=dhaumann.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/8138401591640445140'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/8138401591640445140'/><link rel='alternate' type='text/html' href='http://dhaumann.blogspot.com/2010/07/enjoying-tampere.html' title='Enjoying Tampere'/><author><name>dhaumann</name><uri>http://www.blogger.com/profile/06242913572752671774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_JcjnuQSFzjw/TDOqNVjjtwI/AAAAAAAAAEE/iwPLElohTnE/s72-c/prettywoman-small.jpeg' height='72' width='72'/></entry><entry><id>tag:blogger.com,1999:blog-17552332.post-7150622821781436048</id><published>2010-06-24T22:32:00.003+02:00</published><updated>2010-06-24T22:56:33.326+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='kate'/><category scheme='http://www.blogger.com/atom/ns#' term='kde'/><title type='text'>A Flashback of Kate in Gitorious</title><content type='html'>Back in February, I blogged about &lt;a href="http://dhaumann.blogspot.com/2010/02/kate-partly-moving-to-gitorious.html"&gt;Kate's move to gitorious&lt;/a&gt;. The main reason for this move was to make building Kate as easy as possible. If you want to build Kate as part of KDE, (as of now) you have to compile kdesupport, phonon, dbusmenu-qt, kdelibs, kdepimlibs, kdebase for kwrite and kdesdk for the kate application. Getting all this done is a huge effort, especially if you are new to KDE development (I very well remember my own times spending weeks to get everything going. Be aware of new contributors might now close to nothing about KDE and all the dependencies!).&lt;br /&gt;As &lt;span style="font-style: italic;"&gt;getting new contributors is essential for keeping a project alive&lt;/span&gt;, the barrier to get involved should be as low as possible. And exactly this was achieved by moving all pieces to one place (this was gitorious for us). &lt;a href="http://gitorious.org/kate/pages/Building%20Kate"&gt;Building Kate is so simple right&lt;/a&gt; now that we can even make bug reporters build Kate out of the box. This helps a lot, and even results in patches from time to time. We also got quite some merge requests.&lt;br /&gt;There were several voices at that time that considered moving "away from KDE" was very bad. However, this is not the case, as Christoph is synchronizing all the changes in KDE's subversion and gitorious almost every day.  This is certainly not optimal, but looking back at the last months, we can say it was worth it.&lt;br /&gt;KDE is moving to &lt;a href="http://cgit.kde.org/"&gt;git.kde.org&lt;/a&gt; in the near future. This also raises the discussion about how KDE's source code will be organized. Speaking for Kate, we certainly want to have all of Kate's code in one place, just as it is now with gitorious, no matter what :) I hope we can find a solution the KDE community can live with. To be discussed, maybe &lt;a href="http://akademy2010.kde.org/"&gt;in Tampere in two weeks&lt;/a&gt;? :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17552332-7150622821781436048?l=dhaumann.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dhaumann.blogspot.com/feeds/7150622821781436048/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17552332&amp;postID=7150622821781436048' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/7150622821781436048'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/7150622821781436048'/><link rel='alternate' type='text/html' href='http://dhaumann.blogspot.com/2010/06/flashback-of-kate-in-gitorious.html' title='A Flashback of Kate in Gitorious'/><author><name>dhaumann</name><uri>http://www.blogger.com/profile/06242913572752671774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17552332.post-7620325598828254868</id><published>2010-06-19T11:48:00.004+02:00</published><updated>2010-06-19T12:41:53.111+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='kate'/><category scheme='http://www.blogger.com/atom/ns#' term='kde'/><title type='text'>Kate: Debugging with Qt-Creator</title><content type='html'>Let's have a quick look at how to debug Kate and KWrite with Qt-Creator. First, make sure you meet the requirements:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;&lt;a href="http://gitorious.org/kate/pages/Building%20Kate"&gt;build Kate according to this tutorial&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://get.qt.nokia.com/qtcreator/"&gt;install Qt-Creator&lt;/a&gt; (in my case this is version 2.0.0rc1)&lt;/li&gt;&lt;/ol&gt;Setup the Kate project Qt-Creator once like this&lt;br /&gt;&lt;ol&gt;&lt;li&gt;start Qt-Creator: &lt;span style="font-family:courier new;"&gt;~/kde/run.sh /path/to/qtcreator/bin/qtcreator&lt;/span&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;invoke &lt;span style="font-family:courier new;"&gt;File &gt; Open File or Project&lt;/span&gt; and choose &lt;span style="font-family:courier new;"&gt;~/kde/kate/CMakeLists.txt&lt;/span&gt;&lt;/li&gt;&lt;li&gt;Build Location: choose &lt;span style="font-family:courier new;"&gt;~/kde/build&lt;/span&gt;&lt;/li&gt;&lt;li&gt;Run CMake arguments: choose &lt;span style="font-family:courier new;"&gt;../kate -DCMAKE_BUILD_TYPE=debugfull -DCMAKE_INSTALL_PREFIX=~/kde/usr&lt;/span&gt;&lt;/li&gt;&lt;li&gt;click the button "Run CMake" and then "Finish"&lt;/li&gt;&lt;/ol&gt;Start debugging like this&lt;br /&gt;&lt;ol&gt;&lt;li&gt;click the "hammer" icon button on the very bottom left to compile Kate&lt;/li&gt;&lt;li&gt;click the "computer" icon button (3 icons above the hammer icon)  and choose "kate" (or "kwrite") in the Run combo box&lt;/li&gt;&lt;li&gt;choose the "Debug" icon in the left pane&lt;/li&gt;&lt;li&gt;invoke "Debug &gt; Start Debugging (F5)", now Kate starts&lt;br /&gt;&lt;/li&gt;&lt;li&gt; open part/document/katedocument.cpp in the file tree view on the left&lt;/li&gt;&lt;li&gt;go to the line "&lt;span style="font-family:courier new;"&gt;KateDocument::insertText&lt;/span&gt;" and click "Debug &gt; Toggle Breakpoint (F9)"&lt;/li&gt;&lt;li&gt;now if you type a character in Kate, Qt-Crator will halt in &lt;span style="font-family:courier new;"&gt;KateDocument::insertText&lt;/span&gt;&lt;/li&gt;&lt;li&gt;chose "Debug &gt; Step Opver (F10)" (and "Debug &gt; Stip Into (F11)") to step through the code&lt;/li&gt;&lt;li&gt;click on "Locals and Watchers" in the debugging pane on the bottom and you see the values of local variables&lt;/li&gt;&lt;/ol&gt;Happy debugging :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17552332-7620325598828254868?l=dhaumann.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dhaumann.blogspot.com/feeds/7620325598828254868/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17552332&amp;postID=7620325598828254868' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/7620325598828254868'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/7620325598828254868'/><link rel='alternate' type='text/html' href='http://dhaumann.blogspot.com/2010/06/kate-debugging-with-qt-creator.html' title='Kate: Debugging with Qt-Creator'/><author><name>dhaumann</name><uri>http://www.blogger.com/profile/06242913572752671774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17552332.post-2473804493196951881</id><published>2010-06-10T22:55:00.003+02:00</published><updated>2010-06-20T23:58:22.871+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='kate'/><category scheme='http://www.blogger.com/atom/ns#' term='kde'/><title type='text'>Kate: Code Folding Crash</title><content type='html'>We still have a &lt;a href="http://bugs.kde.org/show_bug.cgi?id=213964"&gt;crash in Kate's code folding code&lt;/a&gt;; no one was able to find a proper fix, yet. So if you want to get your hands dirty, &lt;a href="http://gitorious.org/kate/pages/Building%20Kate"&gt;just build Kate&lt;/a&gt;, find a fix and  be the hero of all Kate developers :)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Update: &lt;/span&gt;Fixed by Stefan Schenk &lt;a href="http://gitorious.org/kate/kate/commit/8db89fcffbb18a9001eedbc4d33256026fd5ae85"&gt;in this commit for KDE 4.5&lt;/a&gt;. Awesome! :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17552332-2473804493196951881?l=dhaumann.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dhaumann.blogspot.com/feeds/2473804493196951881/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17552332&amp;postID=2473804493196951881' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/2473804493196951881'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/2473804493196951881'/><link rel='alternate' type='text/html' href='http://dhaumann.blogspot.com/2010/06/kate-code-folding-crash.html' title='Kate: Code Folding Crash'/><author><name>dhaumann</name><uri>http://www.blogger.com/profile/06242913572752671774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17552332.post-708385261916750422</id><published>2010-04-28T17:53:00.002+02:00</published><updated>2010-04-29T00:10:48.263+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='kate'/><category scheme='http://www.blogger.com/atom/ns#' term='kde'/><title type='text'>Kate Internals: Smart Cursors and Smart Ranges</title><content type='html'>&lt;span style="font-size:180%;"&gt;SmartCursors and SmartRanges in KDE 4.0 - KDE 4.4&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Since KDE 4.0 the KTextEditor interfaces have so called &lt;a href="http://api.kde.org/4.4-api/kdelibs-apidocs/interfaces/ktexteditor/html/classKTextEditor_1_1SmartCursor.html"&gt;SmartCursors&lt;/a&gt; and &lt;a href="http://api.kde.org/4.4-api/kdelibs-apidocs/interfaces/ktexteditor/html/classKTextEditor_1_1SmartRange.html"&gt;SmartRanges&lt;/a&gt;. A SmartCursor is a text cursor (i.e. a line/column tuple) , which is bound to a text document. When editing the text document, the cursor is automatically moved such that it maintains its position. You need this for the displayed text cursor in a view for instance. If you type text, the cursor automatically moves.&lt;br /&gt;A SmartRange consists of two SmartCursors: start and end. We use that for instance for the text selection or the inline spell checking, or KDevelop uses it to add arbitrary highlighting to parsed C/C++ code. Again, if you modify text in the document, the text range automatically moves, expands or shrinks.&lt;br /&gt;&lt;br /&gt;The concept of SmartCursors and SmartRanges is doubtless very useful. However, for KDE 4.5 the Kate developers came up with an alternative implementation that will even deprecate the SmartCursors and SmartRanges in KDE 4.6. The reason for this is that the current implementation has several problems, which we will discuss in the following.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:180%;"&gt;API Usage&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The &lt;a href="http://api.kde.org/4.4-api/kdelibs-apidocs/interfaces/ktexteditor/html/classKTextEditor_1_1SmartRange.html"&gt;SmartRanges&lt;/a&gt; API can be used in very wrong ways. For instance, the &lt;a href="http://api.kde.org/4.4-api/kdelibs-apidocs/interfaces/ktexteditor/html/classKTextEditor_1_1SmartInterface.html"&gt;SmartInterface&lt;/a&gt; has the two functions deleteCursors() and deleteRanges(). Besides that, a document reload also deletes all SmartCursors and SmartRanges. Both cases lead to a dangling pointer if you use SmartCursors or SmartRanges. Hence, whenever you use them, you always need a so-called &lt;a href="http://api.kde.org/4.4-api/kdelibs-apidocs/interfaces/ktexteditor/html/classKTextEditor_1_1SmartCursorWatcher.html"&gt;SmartCursorWatcher&lt;/a&gt; /&lt;a href="http://api.kde.org/4.4-api/kdelibs-apidocs/interfaces/ktexteditor/html/classKTextEditor_1_1SmartCursorNotifier.html"&gt; SmartCursorNotifier&lt;/a&gt; and  &lt;a href="http://api.kde.org/4.4-api/kdelibs-apidocs/interfaces/ktexteditor/html/classKTextEditor_1_1SmartRangeWatcher.html"&gt;SmartRangeWatcher&lt;/a&gt; / &lt;a href="http://api.kde.org/4.4-api/kdelibs-apidocs/interfaces/ktexteditor/html/classKTextEditor_1_1SmartRangeNotifier.html"&gt;SmartRangeNotifier&lt;/a&gt;, which tell you that your SmartCursor or SmartRange is about to be deleted. Watcher and Notifier basically do the same thing. Besides deletion notification, they also tell you more e.g. that the SmartCursor position changed. If you use a notifier, those notifications are sent via signals. If you use a watcher, you have to overwrite virtuals. That is, we have two different concepts that basically do the same thing. If you use thousands of SmartRanges e.g. for arbitrary highlighting, we have possibly thousands of those emits, which does not really scale.&lt;br /&gt;&lt;br /&gt;The API also allows to have parent/child relations, i.e. a SmartRange can have children and a parent. It is possible to traverse this hierarchy, and again since you get the pointers you can delete arbitrary SmartRanges or SmartCursors. Another reason why you always need a notifier or watcher. And if you have a notifier/watcher, you always have the signals emitted when e.g. a cursor changes, as explained above.&lt;br /&gt;&lt;br /&gt;Further, we have lots of places where we use reference object KTextEditor::Cursor&amp;amp; as parameter. This const reference-object signals that it does not change. But due to SmartRange deriving from KTextEditor::Cursor, this object might also be a SmartCursor. So despite of being declared as a const object, it may change its position behind your back. This may lead to unexpected behaviours in e.g. loops where the line or column of the cursor is assumed to be constant. This is a problem in almost all functions in KatePart, so passing SmartCursors as Cursors is a very bad idea, but of course allowed.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:180%;"&gt;Scaleability Problems&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;As mentioned above, you always need a Notifier or Watcher for all SmartCursors and SmartRanges. This will emit lots of signals you probably rarely need. Still, there is no way around it. This is a huge overhead, it simply does not scale.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:180%;"&gt;Implementation&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The implementation is really complex and rather undocumented in most areas. Unfortunately, only very few (or maybe even no one) really understand the code. Besides that, it is very fragile. If you change something, you might break the code. Hence, we often heard similar comments like "don't touch the code, otherwise it will break". Such comments alone already indicate that the current implementation is not maintainable. Unmaintainable code is bad, especially in open source projects (this is not a good way to gain new developers at all). There are other downsides of the current implementation: SmartCursors need a lot of memory for each instance; there are lots of features like animations for SmartRanges, which make the code even more complex; redundancy of watchers and notifiers bloat the code and influence the runtime behavior.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:180%;"&gt;Threading&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;It seems there was the idea of making the KTextEditor interfaces thread safe. The SmartRanges interact with the content of the document, e.g. querying lines count and line length of lines in the text buffer. As this is done by other threads we need correct locking in all places: in document content changes, in smart cursors, in smart ranges, in the painting routines, etc. The current state in KatePart is that not all functions do the right locking. That's why we have lots of asserts/crashs. KatePart already has more than 150 lockings at the moment, but they still do not voer problems. And very few developers (or no one?) really know when to lock and when not to. This is especially complex since we want to ensure that the locks are not hold while emitting signals or calling functions provided from the outside as callbacks, this is still not done completely right, too.&lt;br /&gt;&lt;br /&gt;If you think about Qt, the GUI widgets are also not thread-safe, they all live in the main thread. And if you need data in other threads, you always use queued signals. This is pretty much what we experience in KatePart now. Not enough locking? Too much locking? In other words: It's far too complex to make the KTextEditor interfaces thread-safe...&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:180%;"&gt;Threading and Revisions&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now to another issue in the implementation. KDevelop uses KTextEditor::Ranges in the parsing thread. Think of the following use case: KDevelop gets all the document text in the current revision (or version, if you prefer). Now it takes some time until the parsing is finished. When it's finished, KDevelop uses the Ranges (which initially belong to the old revision of the document), and then translates those ranges to the current version of the text document (this is simple: Just track all edits inside KatePart (delete, insert, wrap, unwrap) and apply those transformations to the ranges). Now we transformed ranges from an old text revision to the current text revision. This means KDevelop does not have to parse everything again, as it knows exactly which parts changed. Awesome indeed :) However, now comes the problem: To transform Cursors and Ranges between revisions, you have to tell the SmartInterface about the revision you are working with. This is done via SmartInterface::useRevision(int). The API documentation says: &lt;span style="font-style: italic;"&gt;Tell the smart interface to work against the given &lt;/span&gt;&lt;em style="font-style: italic;"&gt;revision&lt;/em&gt;&lt;span style="font-style: italic;"&gt; when creating cursors and ranges.&lt;/span&gt; That is, if you call useRevision() once, all succeeding calls like newSmartRange() etc are working in the past (at that revision). Also kind of cool, since useRevision() works locally in each thread. That is different threads don't influence each other. But there is huge problem with this: Think of a KTextEditor user (KDevelop, Kile, ...) uses useRevision() in the main thread. Then all succeding calls of e.g. newSmartRange() use an old revision instead of the current one. Hence, KatePart itself is completely broken in that case. (This case is now catched via a qFatal() in KatePart). But again this shows that multi-threading simply complicates the matter a lot. It would have been much easier to say transformRange(int fromRevision, int toRevision) instead of just one translateFromRevision() that translates the given range against the revision specified through useRevision(). Hence, the current API is unfortunately pretty much broken by design.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:180%;"&gt;A necessary Step?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Often it's hard to get things done right in the first try. So maybe the issues above are a necessary step to a much better implementation. And that is exactly what happened in the last two months: We have new interfaces called &lt;a href="http://api.kde.org/4.x-api/kdelibs-apidocs/interfaces/ktexteditor/html/classKTextEditor_1_1MovingInterface.html"&gt;MovingInterface&lt;/a&gt;, &lt;a href="http://api.kde.org/4.x-api/kdelibs-apidocs/interfaces/ktexteditor/html/classKTextEditor_1_1MovingCursor.html"&gt;MovingCursor&lt;/a&gt; and &lt;a href="http://api.kde.org/4.x-api/kdelibs-apidocs/interfaces/ktexteditor/html/classKTextEditor_1_1MovingRange.html"&gt;MovingRange&lt;/a&gt;. For feedback there is &lt;a href="http://api.kde.org/4.x-api/kdelibs-apidocs/interfaces/ktexteditor/html/classKTextEditor_1_1MovingRangeFeedback.html"&gt;MovingRangeFeedback&lt;/a&gt;, which uses callbacks for notification (no signals by intention). All those classes have unit tests. KatePart in KDE 4.6 will not implement any Smart* interface anymore. Hence, KatePart will be completely single threaded again. We already started to remove several thousands of lines Smart* code that was never used/finished. Much more will follow immediately after the KDE 4.5 release. This means all developers using Smart* from the KTextEditor interfaces should migrate to the Moving* pendents for KDE 4.5 already, if possible.&lt;br /&gt;&lt;br /&gt;I'll provide very detailed information about the Moving* implementation in further blogs during the next month.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17552332-708385261916750422?l=dhaumann.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dhaumann.blogspot.com/feeds/708385261916750422/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17552332&amp;postID=708385261916750422' title='17 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/708385261916750422'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/708385261916750422'/><link rel='alternate' type='text/html' href='http://dhaumann.blogspot.com/2010/04/kate-internals-smart-cursors-and-smart.html' title='Kate Internals: Smart Cursors and Smart Ranges'/><author><name>dhaumann</name><uri>http://www.blogger.com/profile/06242913572752671774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>17</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17552332.post-7808805427561406133</id><published>2010-04-27T21:45:00.005+02:00</published><updated>2010-04-27T21:55:11.719+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='kate'/><category scheme='http://www.blogger.com/atom/ns#' term='kde'/><title type='text'>Kate XML Completion Plugin</title><content type='html'>A while ago I've blogged about the Kate's most powerful plugins: the &lt;a href="http://dhaumann.blogspot.com/2010/01/kate-xml-completion-plugin-help-wanted.html"&gt;XML completion plugin&lt;/a&gt;. Thanks to Tomáš Trnka this plugin is back alive with all its features since today and compiled by default in trunk: It will be included in KDE 4.5. Yay! :) And if you need it already now for KDE 4.4, you can &lt;a href="http://dhaumann.blogspot.com/2010/04/quick-compiling-kate-in-stable-kde.html"&gt;build Kate yourself very easily according to this howto&lt;/a&gt;, without touching your global KDE installation (probably interesting for KDE documentation writers!). Have fun!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17552332-7808805427561406133?l=dhaumann.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dhaumann.blogspot.com/feeds/7808805427561406133/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17552332&amp;postID=7808805427561406133' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/7808805427561406133'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/7808805427561406133'/><link rel='alternate' type='text/html' href='http://dhaumann.blogspot.com/2010/04/kate-xml-completion-plugin.html' title='Kate XML Completion Plugin'/><author><name>dhaumann</name><uri>http://www.blogger.com/profile/06242913572752671774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17552332.post-170918468375071990</id><published>2010-04-17T14:10:00.006+02:00</published><updated>2010-05-01T15:50:35.452+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='kate'/><category scheme='http://www.blogger.com/atom/ns#' term='kde'/><title type='text'>Quick Compiling Kate in a stable KDE Environment</title><content type='html'>Since all of the &lt;a href="http://gitorious.org/kate"&gt;Kate code is now co-hosted on gitorious&lt;/a&gt;, it became very easy to build Kate in your stable KDE &gt;= 4.4 environment. This means you can run the newest version of Kate with very few effort. Just give it a try and do the following steps:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;make sure you have the following packages installed: git, cmake and kdelibs development package (on openSUSE this is &lt;span style="font-family:courier new;"&gt;git&lt;/span&gt;, &lt;span style="font-family:courier new;"&gt;cmake&lt;/span&gt; and &lt;span style="font-family:courier new;"&gt;libkde4-devel&lt;/span&gt;)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;create and change into a KDE development directory:&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;mkdir ~/kde; cd ~/kde&lt;/span&gt;&lt;/li&gt;&lt;li&gt;get a copy of the Kate code:&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;git clone git://gitorious.org/kate/kate.git&lt;/span&gt;&lt;/li&gt;&lt;li&gt;create and change into a build directory for compilation:&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;mkdir build; cd build&lt;/span&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;run the configure process with cmake:&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;cmake ../kate -DCMAKE_BUILD_TYPE=fulldebug \&lt;br /&gt;-DCMAKE_INSTALL_PREFIX=~/kde/usr&lt;/span&gt;&lt;/li&gt;&lt;li&gt;compile Kate:&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;make&lt;/span&gt;&lt;/li&gt;&lt;li&gt;finally install Kate:&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;make install&lt;/span&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;That's all! This installs Kate locally into the separate directory &lt;span style="font-family:courier new;"&gt;~/kde/usr&lt;/span&gt;, so that your global KDE installation will not be touched at all.&lt;br /&gt;&lt;br /&gt;Now on to starting the newly compiled Kate. Create a file ~/kde/run.sh with the following content:&lt;br /&gt;&lt;pre&gt;&lt;blockquote&gt;&lt;span style="font-family:courier new;"&gt;#!/bin/bash&lt;br /&gt;export KATE_DIR=~/kde/usr&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;export PATH=$KATE_DIR/bin:$PATH&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;export LD_LIBRARY_PATH=$KATE_DIR/lib:$LD_LIBRARY_PATH&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;export KDEDIR=$KATE_DIR&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;export KDEDIRS=$KDEDIR&lt;br /&gt;export XDG_DATA_DIRS=$XDG_DATA_DIRS:$KATE_DIR/share&lt;br /&gt;# update KDE's system configuration cache&lt;br /&gt;kbuildsycoca4&lt;br /&gt;# start app&lt;br /&gt;$@&lt;/span&gt;&lt;/blockquote&gt;&lt;/pre&gt;Now you can run the compiled Kate version with &lt;span style="font-weight: bold;font-family:courier new;" &gt;~/kde/run.sh kate&lt;/span&gt;. Just calling &lt;span style="font-weight: bold;font-family:courier new;" &gt;kate&lt;/span&gt; directly will start the system version of Kate.&lt;br /&gt;&lt;br /&gt;Your copy of Kate contains &lt;a href="http://gitorious.org/kate/kate/trees/master"&gt;all of the Kate code&lt;/a&gt;, i.e.: the KTextEditor interfaces, Kate Part, KWrite and the Kate Application. Feel free to send patches to our mailing list &lt;a href="mailto:kwrite-devel@kde.org"&gt;kwrite-devel@kde.org&lt;/a&gt;. And join &lt;a href="irc://irc.kde.org/kate"&gt;#kate on irc.kde.org&lt;/a&gt; :-)&lt;br /&gt;&lt;br /&gt;Note for KDE developers: All the changes in git are merged back to KDE's subversion repository in a timely manner. So don't  worry about Kate moving away from KDE; this is not the case.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;(Updated on 2010-04-17: Allow installation into local directory.&lt;/span&gt;)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17552332-170918468375071990?l=dhaumann.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dhaumann.blogspot.com/feeds/170918468375071990/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17552332&amp;postID=170918468375071990' title='16 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/170918468375071990'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/170918468375071990'/><link rel='alternate' type='text/html' href='http://dhaumann.blogspot.com/2010/04/quick-compiling-kate-in-stable-kde.html' title='Quick Compiling Kate in a stable KDE Environment'/><author><name>dhaumann</name><uri>http://www.blogger.com/profile/06242913572752671774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>16</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17552332.post-5479136798111683507</id><published>2010-03-02T23:17:00.004+01:00</published><updated>2010-03-02T23:34:29.519+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='kate'/><category scheme='http://www.blogger.com/atom/ns#' term='kde'/><title type='text'>Kate Internals: Text Buffer</title><content type='html'>&lt;p&gt;Right now, in Kate's gitorious repository we, or rather mainly Christoph, is rewriting the heart of Kate: The text buffer. In this blog I'll explain how the text buffer works in detail. After reading, you'll be able to understand the code. And be warned: Probably you will be desperately amazed about its awesomeness! So this is a must read :^) The following content is based on the &lt;a href="http://gitorious.org/kate/pages/Design%20Idea%20for%20KateTextBuffer"&gt;notes for design ideas for the new text buffer&lt;/a&gt;.&lt;a href="http://gitorious.org/kate/pages/Design%20Idea%20for%20KateTextBuffer"&gt;&lt;span style="font-weight: bold;font-size:130%;" &gt;&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;span style="font-weight: bold;"&gt;Storage&lt;/span&gt;. Kate Part internally stores the content of a text document as a QVector of text lines. Each text line holds the text in a QString object as well as additional data like color attributes for highlighting. Inserting and removing text lines implies inserting or removing items in the QVector of the text lines. This is can get slow when there are thousands of text lines in a document, because QVector has to move the memory every time. Thus, to keep text operations fast, Kate splits all text lines into several text blocks: Each text block contains a certain amount of lines (e.g. 256). The expense of memory movement is then always limited. When a text block grows too much, it is automatically split. When the amount of lines in a text block shrinks, it is merged with the previous text block. In other words, Kate's text buffer automatically balances the text blocks. The basic idea of Kate's text buffer, the text blocks and text lines looks like this:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_JcjnuQSFzjw/S4xLUOf6_3I/AAAAAAAAAD0/O7sJBv_HxOI/s1600-h/katetextbuffer.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://1.bp.blogspot.com/_JcjnuQSFzjw/S4xLUOf6_3I/AAAAAAAAAD0/O7sJBv_HxOI/s400/katetextbuffer.png" alt="" id="BLOGGER_PHOTO_ID_5443808860445540210" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;span style="font-weight: bold;"&gt;Text Cursors and Ranges.&lt;/span&gt; Text manipulation always takes place at certain positions in a text. Such a position is called a text cursor. Each text cursor is defined by a line and a column. Further, to specify e.g. text selections, we need text ranges. A text range has a start cursor and an end cursor. For instance, if you have two views of the same document, you want the cursor in the 2nd view to keep its correct position in the text if you insert text in the 1st view. Thus, text cursors have to be kind of intelligent. Whenever text changes, each text cursor needs to be moved. As a text range just consists of two text cursors, we will focus only on text cursors for now. The question is how to implement this efficiently? If we store all text cursors in a list in the text buffer, we have to iterate over all text cursors on every editing operation. This obviously does not scale for thousands of text cursors (KDevelop for instance uses thousands of text cursors for the highlighting). The solution is the same as with the text content itself: Let's just put a list of all text cursors in a text block to the text block itself. During text editing, we only have to adapt all text cursors of a single text block instead of all text cursors in a document. This looks as follows:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_JcjnuQSFzjw/S4xQzccKZqI/AAAAAAAAAD8/SaGY_7uhR0I/s1600-h/katetextcursor.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://2.bp.blogspot.com/_JcjnuQSFzjw/S4xQzccKZqI/AAAAAAAAAD8/SaGY_7uhR0I/s400/katetextcursor.png" alt="" id="BLOGGER_PHOTO_ID_5443814894321952418" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;span style="font-weight: bold;"&gt;Editing Operations&lt;/span&gt;. When editing text, you usually have only four different types of text manipulation:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;insert text at a text cursor inside one line&lt;br /&gt;&lt;/li&gt;&lt;li&gt;remove text at a text cursor inside one line&lt;br /&gt;&lt;/li&gt;&lt;li&gt;wrap line at a text cursor (e.g. by hitting &amp;lt;return/enter&amp;gt;)&lt;/li&gt;&lt;li&gt;unwrap line (e.g. by hitting &amp;lt;backspace&amp;gt; at the beginning of a line)&lt;/li&gt;&lt;/ol&gt;Those editing primitives are implemented in the Kate::TextBuffer and Kate::TextBlock and take care of balancing the text blocks. For each one the set of text cursors in a text block has to be adapted. Of course, corner cases need to be taken into account: For instance, unwrapping the first line in a text block means that cursors in the first line need to be moved to the previous text block. All editing primitives emit a signal, such that additional layers later can track what happens. For instance, the undo/redo system needs to know all editing operations. Or on top of that we could implement vim like swap file support, i.e., track all changes from the beginning, and if Kate crashes, replay all the editing primitives on the original files.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;span style="font-weight: bold;"&gt;Transactions&lt;/span&gt;. A transaction consists of several of the four editing operations. For instance, if you select text and then move it to another location in the document with drag &amp;amp; drop you want this to be grouped together to a single text operation on undo/redo. (The text operations in this case are unwrap lines and remove text, then insert text and wrap line). To be able to specify which parts of text operations belong together, the text buffer provides two functions: startEditing() starts a transaction and finishEditing() closes it. Those functions use reference counting, so you can call startEditing() multiple times and only the last finishEditing() completes a transaction. Again, signals are emitted e.g. in finishEditing() such that other layers (undo/redo system) are notified about this.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;span style="font-weight: bold;"&gt;Revisions&lt;/span&gt;. As an easy way to check whether a document changed you can get the current revision of the text buffer. The revision is simply an int64 starting with 0 after loading a document. The revision is incremented in every of the 4 editing primitives. This way you don't have to listen to multiple signals like textInserted() and textRemoved(). This could be useful for e.g. KDevelop's background parser: Parse a file. When done, check whether the revision is the same. If yes, parsing was successful. If not, parse again. This is how QtCreator does it. Easy and straight forward.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;span style="font-weight: bold;"&gt;Unit Tests&lt;/span&gt;. The text buffer, text block, text line, text cursors are all designed such that unit tests can be written. Hence, each of the above implementation details will be covered by unit tests.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;span style="font-weight: bold;"&gt;Further ideas&lt;/span&gt;. As mentioned previously, the design of the text buffer leaves room for further features. For now, let's face two ideas:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Vim like swap files: If Kate or the application using Kate Part crashes, the unsaved data in the text document is lost. Vim has a backup mechanism called 'swap files' to recover from crashes to avoid data loss since years, and it works as follows: Each of the 4 editing primitives explained above are streamed into a separate file. When you save a file successfully, the swap file is cleared. If a crash happens, vim loads the original text document and then replays all editing operations in the swap file. This way the current unsaved editing state is recovered; no data is lost. Since the text buffer emits all necessary signals, implementing this feature is kind of trivial. Any takers?&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Right now, the highlighting works in an extra class, accessing the text buffer's text lines and setting the text attributes such as the color. As idea, we could also derive a class Kate::HighlightingBuffer from Kate::TextBuffer and do the additional modifications in the derived class instead of an extra class. We'll have to see whether that makes sense.&lt;/li&gt;&lt;/ul&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;span style="font-weight: bold;"&gt;Please Contribute&lt;/span&gt;.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;join &lt;a href="irc://irc.kde.org/kate"&gt;#kate on irc://irc.kde.org&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://gitorious.org/kate"&gt;checkout the code base&lt;/a&gt;, clone it, create branches, and merge back!&lt;/li&gt;&lt;li&gt;other kate internals: &lt;a href="http://dhaumann.blogspot.com/2008/11/kate-internals-undoredo-system.html"&gt;undo/redo system&lt;/a&gt; (little bit outdated, but all in all still valid)&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17552332-5479136798111683507?l=dhaumann.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dhaumann.blogspot.com/feeds/5479136798111683507/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17552332&amp;postID=5479136798111683507' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/5479136798111683507'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/5479136798111683507'/><link rel='alternate' type='text/html' href='http://dhaumann.blogspot.com/2010/02/kate-internals-text-bufferu.html' title='Kate Internals: Text Buffer'/><author><name>dhaumann</name><uri>http://www.blogger.com/profile/06242913572752671774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_JcjnuQSFzjw/S4xLUOf6_3I/AAAAAAAAAD0/O7sJBv_HxOI/s72-c/katetextbuffer.png' height='72' width='72'/><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17552332.post-661928641299258641</id><published>2010-02-27T16:55:00.004+01:00</published><updated>2010-02-27T17:17:33.174+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='kate'/><category scheme='http://www.blogger.com/atom/ns#' term='git'/><category scheme='http://www.blogger.com/atom/ns#' term='kde'/><title type='text'>Kate Partly Moving to Gitorious</title><content type='html'>We are about to move the applications Kate and KWrite as well as the libraries KTextEditor and Kate Part to &lt;a href="http://gitorious.org/kate"&gt;gitorious&lt;/a&gt;. Christoph is working on the migration right now in order to keep the development history. Things look good so far, so the migration is soon finished.&lt;br /&gt;We have discussed a bit about the migration to gitorious on the Kate Developer Meeting and Christoph came up with this mainly because building only KTextEditor, Kate Part, KWrite and Kate is much &lt;span style="font-style: italic;"&gt;faster and easier&lt;/span&gt; compared to building the KDE modules kdesupport, kdelibs, kdepimlibs, kdebase, kdesdk.&lt;br /&gt;I myself remember the time where I started KDE development, and it took more than two weeks to have a first successful build of KDE. You have to learn so many things at once, like revision control, lots of so far unknown software, and what not. Talking to other developers verifies this. In other words: Getting into KDE development is not easy and straight forward.&lt;br /&gt;Moving to gitorious removes this barrier for Kate development: You just checkout the Kate repository and that's all you need. It would be nice if you join Kate development and contribute patches :)&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;What does that mean for Kate in KDE? &lt;span style="font-style: italic;"&gt;Nothing changes.&lt;/span&gt; We will merge the changes in Gitorious back to the main KDE development line and vice versa.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17552332-661928641299258641?l=dhaumann.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dhaumann.blogspot.com/feeds/661928641299258641/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17552332&amp;postID=661928641299258641' title='11 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/661928641299258641'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/661928641299258641'/><link rel='alternate' type='text/html' href='http://dhaumann.blogspot.com/2010/02/kate-partly-moving-to-gitorious.html' title='Kate Partly Moving to Gitorious'/><author><name>dhaumann</name><uri>http://www.blogger.com/profile/06242913572752671774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>11</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17552332.post-1801796113184880232</id><published>2010-02-17T14:15:00.004+01:00</published><updated>2010-02-17T16:06:43.827+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='kate'/><category scheme='http://www.blogger.com/atom/ns#' term='developer meeting'/><category scheme='http://www.blogger.com/atom/ns#' term='kde'/><title type='text'>The Power of Developer Meetings</title><content type='html'>Since several years, we have lots of small &lt;a href="http://ev.kde.org/activities/devmeetings/"&gt;developer meetings in the KDE project&lt;/a&gt;, gratefully supported by the KDE e.V. There, developers of a certain project (e.g. KMail/kdepim, Plasma, you name it) meet to discuss further plans and to push the project further. From experience we can tell that those meetings are really beneficial in several ways:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Social aspect: You get to know the other developers involved in the project in real life, which is a great motivation factor. This also happens at KDE's annual conference &lt;a href="http://akademy.kde.org/"&gt;Akademy&lt;/a&gt;, although there are &lt;span style="font-style: italic;"&gt;a lot&lt;/span&gt; more people.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Productivity: Since you are sitting next to each other discussions about &lt;span style="font-style: italic;"&gt;how&lt;/span&gt; to do &lt;span style="font-style: italic;"&gt;what&lt;/span&gt; are very focused. It's amazing how quickly a project can evolve this way. (I haven't seen such focused work in companies, yet. I guess the variance in the knowledge of people involved is higher. And the motivation is usually very different).&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Knowledge Transfer: Since participants are experts in different areas, discussions lead to knowledge transfer. This is essential, as sometimes developers have very few free time to contributes to a project. Spreading the knowledge helps a lot to keep the project alive.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Steady Contributions: We are always open for new contributors. Just send a patch, &lt;a href="http://techbase.kde.org/Contribute/Get_a_SVN_Account"&gt;get commit access&lt;/a&gt; and join development. Experience shows that participants of a developer meeting usually contribute for years to come.&lt;/li&gt;&lt;/ul&gt;Enough said, here is what happened the last three days in Kate:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://websvn.kde.org/?view=revision&amp;amp;revision=1091712"&gt;memory optimization:&lt;/a&gt; &lt;a href="http://websvn.kde.org/?view=revision&amp;amp;revision=1091718"&gt;remove unused&lt;/a&gt; &lt;a href="http://websvn.kde.org/?view=revision&amp;amp;revision=1091735"&gt;edit history items&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="https://bugs.kde.org/show_bug.cgi?id=227293"&gt;fix crash in doHighlight due to wrong initialization&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="https://bugs.kde.org/show_bug.cgi?id=190853"&gt;don't squeeze captions in the window title&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="https://bugs.kde.org/show_bug.cgi?id=225746"&gt;fix crash when using katepart in e.g. konqueror&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://websvn.kde.org/?view=revision&amp;amp;revision=1091115"&gt;kate vi mode improvements&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="https://bugs.kde.org/show_bug.cgi?id=223624"&gt;fix: invalid js commands lead to a crash&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://websvn.kde.org/?view=revision&amp;amp;revision=1091074"&gt;share code snippets between kate and kdevelop&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="https://bugs.kde.org/show_bug.cgi?id=196516"&gt;more syntax highlighting files for asm dialects&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://websvn.kde.org/?view=revision&amp;amp;revision=1091041"&gt;replace: show number of replacements in a passive popup&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="https://bugs.kde.org/show_bug.cgi?id=125104"&gt;new command line command: unwrap&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="https://bugs.kde.org/show_bug.cgi?id=227008"&gt;fix crash when switching sessions with multiple main windows&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="https://bugs.kde.org/show_bug.cgi?id=129494"&gt;fix incorrect global replace %s///g&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="https://bugs.kde.org/show_bug.cgi?id=226409"&gt;fix crash in smart range group handling&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://websvn.kde.org/?view=revision&amp;amp;revision=1090637"&gt;turn search option "highlight all" into the action "find all"&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://websvn.kde.org/?view=revision&amp;amp;revision=1090635"&gt;replace old text snippet plugin with new one&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://websvn.kde.org/?view=revision&amp;amp;revision=1090601"&gt;optimize away nops for text editing&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://websvn.kde.org/?view=revision&amp;amp;revision=1090598"&gt;fixes in the template handler code&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://websvn.kde.org/?view=revision&amp;amp;revision=1090593"&gt;remove pythong browser plugin, since the symbol viewer plugin can do the same and much more&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://websvn.kde.org/?view=revision&amp;amp;revision=1090592"&gt;remove unmaintained html tools plugin, since it was never ported&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://websvn.kde.org/?view=revision&amp;amp;revision=1090558"&gt;optimization for bracket matching&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://websvn.kde.org/?view=revision&amp;amp;revision=1090515"&gt;new text snippet plugin: context aware snippet completion&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="https://bugs.kde.org/show_bug.cgi?id=226529"&gt;fix filtering in the file browser plugin&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://websvn.kde.org/?view=revision&amp;amp;revision=1090382"&gt;always start search&amp;amp;replace from cursor&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://websvn.kde.org/?view=revision&amp;amp;revision=1090377"&gt;developer doumentation&lt;/a&gt; &lt;a href="http://websvn.kde.org/?view=revision&amp;amp;revision=1090380"&gt;for smart range usage&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="https://bugs.kde.org/show_bug.cgi?id=169415"&gt;cstyle indenter: fix indentation of multi-line comments&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://websvn.kde.org/?view=revision&amp;amp;revision=1090241"&gt;update of syntax highlighting for MySQL&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://websvn.kde.org/?view=revision&amp;amp;revision=1090237"&gt;performance optimization&lt;/a&gt; &lt;a href="http://websvn.kde.org/?view=revision&amp;amp;revision=1090238"&gt;in the highlighting system:&lt;/a&gt; &lt;a href="https://bugs.kde.org/show_bug.cgi?id=225228"&gt;bug&lt;/a&gt;, &lt;a href="https://bugs.kde.org/show_bug.cgi?id=145686"&gt;bug&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="https://bugs.kde.org/show_bug.cgi?id=152203"&gt;fix crash in removeTrailingSpaces, if undo/redo is active&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://websvn.kde.org/?view=revision&amp;amp;revision=1090122"&gt;new interface for getting the mode at a given cursor&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;search &amp;amp; replace: &lt;a href="http://websvn.kde.org/?view=revision&amp;amp;revision=1090106"&gt;lots of&lt;/a&gt; &lt;a href="http://websvn.kde.org/?view=revision&amp;amp;revision=1090100"&gt;code&lt;/a&gt; &lt;a href="http://websvn.kde.org/?view=revision&amp;amp;revision=1090103"&gt;cleanups&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://websvn.kde.org/?view=revision&amp;amp;revision=1090101"&gt;basic regression tests for search&lt;/a&gt;, &lt;a href="http://websvn.kde.org/?view=revision&amp;amp;revision=1090102"&gt;scripting&lt;/a&gt;, &lt;a href="http://websvn.kde.org/?view=revision&amp;amp;revision=1090164"&gt;and more&lt;/a&gt;...&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://websvn.kde.org/?view=revision&amp;amp;revision=1090086"&gt;scripting: add support for quoting in command line scripts&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="https://bugs.kde.org/show_bug.cgi?id=226724"&gt;Kate crashes because of spell checking&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="https://bugs.kde.org/show_bug.cgi?id=222181"&gt;fix regression: with auto brackets + selection&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="https://bugs.kde.org/show_bug.cgi?id=213096"&gt;find-in-files: set filter correctly when opening the search&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://websvn.kde.org/?view=revision&amp;amp;revision=1089691"&gt;fix: make reload-scripts work with new functions&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://websvn.kde.org/?view=revision&amp;amp;revision=1089690"&gt;share a KCompletion object between all KateCmdLineEdits&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;There are even more changes I left out. Most of those changes will be in KDE 4.4.1. If you want to help, join #kate in irc.kde.org!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17552332-1801796113184880232?l=dhaumann.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dhaumann.blogspot.com/feeds/1801796113184880232/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17552332&amp;postID=1801796113184880232' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/1801796113184880232'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/1801796113184880232'/><link rel='alternate' type='text/html' href='http://dhaumann.blogspot.com/2010/02/power-of-developer-meetings.html' title='The Power of Developer Meetings'/><author><name>dhaumann</name><uri>http://www.blogger.com/profile/06242913572752671774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17552332.post-7535481033629764946</id><published>2010-02-17T13:57:00.006+01:00</published><updated>2010-02-17T14:56:36.337+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='kate'/><category scheme='http://www.blogger.com/atom/ns#' term='kde'/><category scheme='http://www.blogger.com/atom/ns#' term='scripting'/><title type='text'>Developer Meeting: More on scripting Kate</title><content type='html'>We are 10 people here at the developer meeting in Berlin. Kate, KDevelop as well as Okteta see a lot of commits. I'll mainly talk about what's happening in the holy Kate land, though :-)&lt;br /&gt;Yesterday I closed a bug requesting an "unwrap" feature in Kate that works like "Tools &gt; Join Lines" but maintains paragraph separation, i.e., empty lines are not removed. This feature is implemented now in javascript. Further infos:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="https://bugs.kde.org/show_bug.cgi?id=125104"&gt;the bug report&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://websvn.kde.org/trunk/KDE/kdelibs/kate/script/data/utils.js?r1=1091040&amp;amp;r2=1091039&amp;amp;pathrev=1091040"&gt;the javascript implementation&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;To run the script simply switch to the command line (F7) and write "unwrap". If you have further ideas about useful scripts, don't hesitate to start hacking right away, see also&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://docs.kde.org/stable/en/kdesdk/kate/advanced-editing-tools-scripting.html"&gt;how to extend Kate with scripting&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;Fixes with regard to the scripting support in the last days are&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://websvn.kde.org/?revision=1089691&amp;amp;view=revision"&gt;make reload-scripts work properly&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://websvn.kde.org/?revision=1089690&amp;amp;view=revision"&gt;fix command line completion for new scripts without restarting kate&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://websvn.kde.org/?revision=1090086&amp;amp;view=revision"&gt;support quoting in arguments for scripts&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://websvn.kde.org/?revision=1091093&amp;amp;view=revision"&gt;fix crash for invalid commands in scripts&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;Those fixes will be in KDE 4.4.1. More to come in other blog entries :-)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17552332-7535481033629764946?l=dhaumann.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dhaumann.blogspot.com/feeds/7535481033629764946/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17552332&amp;postID=7535481033629764946' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/7535481033629764946'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/7535481033629764946'/><link rel='alternate' type='text/html' href='http://dhaumann.blogspot.com/2010/02/developer-meeting-more-on-scripting.html' title='Developer Meeting: More on scripting Kate'/><author><name>dhaumann</name><uri>http://www.blogger.com/profile/06242913572752671774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17552332.post-4039352904560190689</id><published>2010-01-17T12:58:00.003+01:00</published><updated>2010-01-17T13:28:47.854+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='kate'/><category scheme='http://www.blogger.com/atom/ns#' term='kde'/><title type='text'>Kate XML Completion Plugin: Help Wanted</title><content type='html'>In KDE3 Kate had a plugin called "XML Completion Plugin".  It was able to list XML elements, attributes and attribute values and entities in a completion popup menu depending on the currently active DTD. For instance, it was able to complete all your KDE/docbook tags and, thus, was one of the best tools for writing KDE documentation.&lt;br /&gt;&lt;br /&gt;Unfortunately, &lt;a href="https://bugs.kde.org/show_bug.cgi?id=222859"&gt;this plugin has not been ported to KDE4&lt;/a&gt;, yet. So this is a request for developers: Please someone pick it up and make it available for Kate in KDE4.&lt;br /&gt;&lt;br /&gt;The location in svn is: &lt;a href="http://websvn.kde.org/trunk/KDE/kdesdk/kate/plugins/xmltools"&gt;trunk/KDE/kdesdk/kate/plugins/xmltools&lt;/a&gt;&lt;br /&gt;Just enable this folder in the kate/plugins/CMakeLists.txt file and start porting it. The code completion interface changed quite a lot, but there are other plugins and good api documentation (&lt;a href="http://api.kde.org/4.x-api/kdelibs-apidocs/interfaces/ktexteditor/html/index.html"&gt;KTextEditor interfaces&lt;/a&gt;, &lt;a href="http://api.kde.org/4.x-api/kdesdk-apidocs/kate/interfaces/kate/html/index.html"&gt;Kate Application interfaces&lt;/a&gt;) where you can have a look at how things work.&lt;br /&gt;&lt;br /&gt;Having a working XML Completion plugin for KDE4.5 would be awesome.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17552332-4039352904560190689?l=dhaumann.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dhaumann.blogspot.com/feeds/4039352904560190689/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17552332&amp;postID=4039352904560190689' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/4039352904560190689'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/4039352904560190689'/><link rel='alternate' type='text/html' href='http://dhaumann.blogspot.com/2010/01/kate-xml-completion-plugin-help-wanted.html' title='Kate XML Completion Plugin: Help Wanted'/><author><name>dhaumann</name><uri>http://www.blogger.com/profile/06242913572752671774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17552332.post-3880047017542431873</id><published>2009-11-01T15:04:00.004+01:00</published><updated>2009-11-01T22:19:11.614+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='kate'/><category scheme='http://www.blogger.com/atom/ns#' term='kde'/><category scheme='http://www.blogger.com/atom/ns#' term='scripting'/><title type='text'>Scripting Kate</title><content type='html'>In my &lt;a href="http://dhaumann.blogspot.com/2009/10/extending-kate-with-scripts.html"&gt;last blog&lt;/a&gt; I explained Kate's scripting features in KDE 4.4. To better understand how scripting can be used let's look at some use cases.&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="https://bugs.kde.org/show_bug.cgi?id=125104"&gt;join lines&lt;/a&gt;: This feature request wants the action "join lines" to not join different paragraphs, i.e. not remove empty lines. We have not implemented this wish, as there are probably users who prefer the current behaviour. This request can be fixed by writing a small script that joins the lines according to the user's wishes.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="https://bugs.kde.org/show_bug.cgi?id=93398"&gt;reformat paragraph&lt;/a&gt;: An intelligent reformatter for paragraphs. Should be rather straight forward to implement.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;XML tools: In KDE3, Kate once had a xmltools plugin. Unfortunately noone ported it to KDE4. The plugin provided lots of very useful features for xml editing. For example, you could select text and then wrap it with xml elements, e.g. "text" would become "&amp;lt;para&amp;gt;text&amp;lt;/para&amp;gt;". This is a perfect example for a command line script as well. Any volunteers? :)&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;Scripting also brings us closer to fixing the following reports:&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="https://bugs.kde.org/show_bug.cgi?id=44908"&gt;macro system&lt;/a&gt;: Kate still does not have a macro system. A macro can be interpreted as a group of scripts, executed in a sequence (more or less). The vi input mode already supports pretty complex commands, and the code for scripting is all there. It's just a matter of putting this together so it's usable for users.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://bugs.kde.org/show_bug.cgi?id=65740"&gt;word count&lt;/a&gt;: maybe the word count features can be implemented by a script (too slow?). Problem is, that a script cannot show dialogs etc.&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;To make scripting an even better experience, we still need to implement binding shortcuts to scripts. Again: any volunteers? :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17552332-3880047017542431873?l=dhaumann.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dhaumann.blogspot.com/feeds/3880047017542431873/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17552332&amp;postID=3880047017542431873' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/3880047017542431873'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/3880047017542431873'/><link rel='alternate' type='text/html' href='http://dhaumann.blogspot.com/2009/11/scripting-kate.html' title='Scripting Kate'/><author><name>dhaumann</name><uri>http://www.blogger.com/profile/06242913572752671774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17552332.post-8311003868506503993</id><published>2009-10-29T18:41:00.007+01:00</published><updated>2009-10-29T19:11:14.241+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='kate'/><category scheme='http://www.blogger.com/atom/ns#' term='kde'/><category scheme='http://www.blogger.com/atom/ns#' term='scripting'/><title type='text'>Extending Kate with Scripts</title><content type='html'>As mentioned in one of my &lt;a href="http://dhaumann.blogspot.com/2009_09_01_archive.html"&gt;last blogs&lt;/a&gt;, there has been quite some work for JavaScript scripting support in trunk recently. So what will Kate 3.4 (KDE 4.4) will bring? This is explained in detail in the sections:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Indentation Scripting&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Command Line Scripting&lt;/li&gt;&lt;li&gt;Some Remarks&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;The scripting allows to extend Kate with lots of little helper functions. All users can add scripts as they wish. The documentation here is copied from the &lt;a href="http://docs.kde.org/development/en/kdesdk/kate/advanced-editing-tools-scripting.html"&gt;official Kate handbook&lt;/a&gt;. So instead of using this blog as reference, please use the handbook later for an up-to-date version. To script something useful, you'll need to know the scripting API. All the available functions are documented in the section &lt;a href="http://docs.kde.org/development/en/kdesdk/kate/advanced-editing-tools-scripting.html#advanced-editing-tools-scripting-api"&gt;Scripting API in the handbook&lt;/a&gt; as well. Enough said, here we go:&lt;br /&gt;&lt;div class="titlepage"&gt;&lt;div&gt;&lt;div&gt;&lt;h2 class="title" style="clear: both;"&gt;&lt;a name="advanced-editing-tools-scripting"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="titlepage"&gt;&lt;div&gt;&lt;div&gt;&lt;h2 class="title" style="clear: both;"&gt;&lt;a name="advanced-editing-tools-scripting"&gt;&lt;/a&gt;Extending &lt;span class="application"&gt;Kate&lt;/span&gt; with Scripts&lt;/h2&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt; Since &lt;span class="application"&gt;Kate&lt;/span&gt; 3.4 in KDE 4.4 the &lt;span class="application"&gt;Kate&lt;/span&gt; editor component is easily extensible by writing scripts. The scripting language is ECMAScript (widely known as JavaScript). &lt;span class="application"&gt;Kate&lt;/span&gt; supports two kinds of scripts: indentation and command line scripts. &lt;/p&gt;&lt;div class="sect2" lang="en"&gt;&lt;div class="titlepage"&gt;&lt;div&gt;&lt;div&gt;&lt;h3 class="title"&gt;&lt;a name="advanced-editing-tools-scripting-indentation"&gt;&lt;/a&gt;Indentation Scripts&lt;/h3&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt; Indentation scripts - also referred as indenters - automatically indent the source code while typing text. As example, after hitting the return-key code the indentation level often increases. &lt;/p&gt;&lt;p&gt; The following sections describe step by step how to create the skeleton for a simple indenter. As first step, create a new &lt;code class="filename"&gt;*.js&lt;/code&gt; file called e.g. &lt;code class="filename"&gt;javascript.js&lt;/code&gt; in the local home folder &lt;code class="filename"&gt;$KDEHOME/share/apps/katepart/script&lt;/code&gt;. &lt;/p&gt;&lt;div class="sect3" lang="en"&gt;&lt;div class="titlepage"&gt;&lt;div&gt;&lt;div&gt;&lt;h4 class="title"&gt;&lt;a name="advanced-editing-tools-scripting-indentation-header"&gt;&lt;/a&gt;The Indentation Script Header&lt;/h4&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt; The header of the file &lt;code class="filename"&gt;javascript.js&lt;/code&gt; is embedded in a comment and is of the following form  &lt;/p&gt;&lt;pre class="programlisting"&gt;/* kate-script&lt;br /&gt;* name: JavaScript&lt;br /&gt;* author: Example Name &lt;example.name@some.address.org&gt;&lt;br /&gt;* license: BSD&lt;br /&gt;* revision: 1&lt;br /&gt;* kate-version: 3.4&lt;br /&gt;* type: indentation&lt;br /&gt;* required-syntax-style: javascript&lt;br /&gt;* indent-languages: javascript&lt;br /&gt;* priority: 0&lt;br /&gt;*&lt;br /&gt;* A line without colon ':' stops header parsing. That is, you can add optional&lt;br /&gt;* text here such as a detailed license.&lt;br /&gt;*/&lt;br /&gt;&lt;/example.name@some.address.org&gt;&lt;/pre&gt;&lt;p&gt;  Each entry is explained in detail now: &lt;/p&gt;&lt;div class="itemizedlist"&gt;&lt;ul type="disc"&gt;&lt;li&gt;&lt;code class="literal"&gt;kate-script&lt;/code&gt; [required]: This text string has to appear in the first line of the &lt;code class="filename"&gt;*.js&lt;/code&gt; file, otherwise &lt;span class="application"&gt;Kate&lt;/span&gt; skips the script. &lt;/li&gt;&lt;li&gt;&lt;code class="literal"&gt;name&lt;/code&gt; [required]: This is the indenter name that appears in the menu &lt;span doc="http://nwalsh.com/xsl/documentation/1.0" class="guiitem"&gt;&lt;span class="guimenu"&gt;Tools&lt;/span&gt;&lt;/span&gt;-&gt;&lt;span doc="http://nwalsh.com/xsl/documentation/1.0" class="guiitem"&gt;&lt;span class="guimenuitem"&gt;Indentation&lt;/span&gt;&lt;/span&gt; and in the configuration dialog. &lt;/li&gt;&lt;li&gt;&lt;code class="literal"&gt;author&lt;/code&gt; [optional]: The author's name and contact information. &lt;/li&gt;&lt;li&gt;&lt;code class="literal"&gt;license&lt;/code&gt; [optional]: Short form of the license, such as BSD or LGPLv3. &lt;/li&gt;&lt;li&gt;&lt;code class="literal"&gt;revision&lt;/code&gt; [required]: The revision of the script. This number should be increased whenever the script is modified. &lt;/li&gt;&lt;li&gt;&lt;code class="literal"&gt;kate-version&lt;/code&gt; [required]: Minimal required &lt;span class="application"&gt;Kate&lt;/span&gt; version. &lt;/li&gt;&lt;li&gt;&lt;code class="literal"&gt;type&lt;/code&gt; [required]: The type must be “&lt;span class="quote"&gt;&lt;code class="literal"&gt;indentation&lt;/code&gt;&lt;/span&gt;”, otherwise &lt;span class="application"&gt;Kate&lt;/span&gt; skips this script. &lt;/li&gt;&lt;li&gt;&lt;code class="literal"&gt;required-syntax-style&lt;/code&gt; [optional]: Comma separated list of required syntax highlighting styles. This is important for indenters that rely on specific highlight information in the document. If a required syntax style is specified, the indenter is available only when the appropriate highlighter is active. This prevents “&lt;span class="quote"&gt;undefined behavior&lt;/span&gt;” caused by using the indenter without the expected highlighting schema. For instance, the Ruby indenter makes use of this in the files &lt;code class="filename"&gt;ruby.js&lt;/code&gt; and &lt;code class="filename"&gt;ruby.xml&lt;/code&gt;. &lt;/li&gt;&lt;li&gt;&lt;code class="literal"&gt;indent-languages&lt;/code&gt; [optional]: Comma separated list of syntax styles the indenter can indent correctly, e.g.: c++, java. &lt;/li&gt;&lt;li&gt;&lt;code class="literal"&gt;priority&lt;/code&gt; [optional]: If several indenters are suited for a certain highlighted file, the priority decides which indenter is chosen as default indenter. &lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt; &lt;span class="application"&gt;Kate&lt;/span&gt; reads all pairs of the form “&lt;span class="quote"&gt;&lt;span doc="http://nwalsh.com/xsl/documentation/1.0" class="replaceable"&gt;&lt;em class="replaceable"&gt;&lt;code&gt;key&lt;/code&gt;&lt;/em&gt;&lt;/span&gt;:&lt;span doc="http://nwalsh.com/xsl/documentation/1.0" class="replaceable"&gt;&lt;em class="replaceable"&gt;&lt;code&gt;value&lt;/code&gt;&lt;/em&gt;&lt;/span&gt;&lt;/span&gt;” until it cannot fine a colon anymore. This implies that the header can contain arbitrary text such as a license as shown in the example. &lt;/p&gt;&lt;/div&gt;&lt;div class="sect3" lang="en"&gt;&lt;div class="titlepage"&gt;&lt;div&gt;&lt;div&gt;&lt;h4 class="title"&gt;&lt;a name="advanced-editing-tools-scripting-indentation-body"&gt;&lt;/a&gt;The Indenter Source Code&lt;/h4&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt; Having specified the header this section explains how the indentation scripting itself works. The basic skeleton of the body looks like this:  &lt;/p&gt;&lt;pre class="programlisting"&gt;triggerCharacters = "{}/:;";&lt;br /&gt;function indent(line, indentWidth, ch)&lt;br /&gt;{&lt;br /&gt;  // called for each newline (ch == '\n') and all characters specified in&lt;br /&gt;  // the global variable triggerCharacters. When calling &lt;span doc="http://nwalsh.com/xsl/documentation/1.0" class="guiitem"&gt;&lt;span class="guimenu"&gt;Tools&lt;/span&gt;&lt;/span&gt;-&gt;&lt;span doc="http://nwalsh.com/xsl/documentation/1.0" class="guiitem"&gt;&lt;span class="guimenuitem"&gt;Align&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;  // the variable ch is empty, i.e. ch == ''.&lt;br /&gt;  //&lt;br /&gt;  // see also: Scripting API&lt;br /&gt;  return -2;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;p&gt;  The function &lt;code class="function"&gt;indent()&lt;/code&gt; has three parameters: &lt;/p&gt;&lt;div class="itemizedlist"&gt;&lt;ul type="disc"&gt;&lt;li&gt;&lt;code class="literal"&gt;line&lt;/code&gt;: the line that has to be indented&lt;/li&gt;&lt;li&gt;&lt;code class="literal"&gt;indentWidth&lt;/code&gt;: the indentation width in amount of spaces&lt;/li&gt;&lt;li&gt;&lt;code class="literal"&gt;ch&lt;/code&gt;: either a newline character (&lt;code class="literal"&gt;ch == '\n'&lt;/code&gt;), the trigger character specified in &lt;code class="literal"&gt;triggerCharacters&lt;/code&gt; or empty if the user invoked the action &lt;span doc="http://nwalsh.com/xsl/documentation/1.0" class="guiitem"&gt;&lt;span class="guimenu"&gt;Tools&lt;/span&gt;&lt;/span&gt;-&gt;&lt;span doc="http://nwalsh.com/xsl/documentation/1.0" class="guiitem"&gt;&lt;span class="guimenuitem"&gt;Align&lt;/span&gt;&lt;/span&gt;.&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;p&gt; The return value of the &lt;code class="function"&gt;indent()&lt;/code&gt; function specifies how the line will be indented. If the return value is a simple integer number, it is interpreted as follows: &lt;/p&gt;&lt;div class="itemizedlist"&gt;&lt;ul type="disc"&gt;&lt;li&gt;return value &lt;code class="literal"&gt;-2&lt;/code&gt;: do nothing&lt;/li&gt;&lt;li&gt;return value &lt;code class="literal"&gt;-1&lt;/code&gt;: keep indentation (searches for previous non-blank line)&lt;/li&gt;&lt;li&gt;return value &lt;code class="literal"&gt; 0&lt;/code&gt;: numbers &gt;= 0 specify the indentation depth in spaces&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;p&gt; Alternatively, an array of two elements can be returned: &lt;/p&gt;&lt;div class="itemizedlist"&gt;&lt;ul type="disc"&gt;&lt;li&gt;&lt;code class="literal"&gt;return [ indent, align ];&lt;/code&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;p&gt; In this case, the first element is the indentation depth like above with the same meaning of the special values. However, the second element is an absolute value representing a column for “&lt;span class="quote"&gt;alignment&lt;/span&gt;”. If this value is higher than the indent value, the difference represents a number of spaces to be added after the indentation of the first parameter. Otherwise, the second number is ignored. Using tabs and spaces for indentation is often referred to as “&lt;span class="quote"&gt;mixed mode&lt;/span&gt;”. &lt;/p&gt;&lt;p&gt; Consider the following example: Assume using tabs to indent, and tab width is set to 4. Here, &amp;lt;tab&amp;gt; represents a tab and '.' a space: &lt;/p&gt;&lt;pre class="programlisting"&gt;1: &amp;lt;tab&amp;gt;&amp;lt;tab&amp;gt;foobar("hello",&lt;br /&gt;2: &amp;lt;tab&amp;gt;&amp;lt;tab&amp;gt;......."world");&lt;br /&gt;&lt;/pre&gt;&lt;p&gt; When indenting line 2, the &lt;code class="function"&gt;indent()&lt;/code&gt; function returns [8, 15]. As result, two tabs are inserted to indent to column 8, and 7 spaces are added to align the second parameter under the first, so that it stays aligned if the file is viewed with a different tab width. &lt;/p&gt;&lt;p&gt; A default KDE installation ships &lt;span class="application"&gt;Kate&lt;/span&gt; with several indenters. The corresponding JavaScript source code can be found in &lt;code class="filename"&gt;$KDRDIR/share/apps/katepart/script&lt;/code&gt;. &lt;/p&gt;&lt;p&gt; Developing an indenter requires to reload the scripts to see whether the changes behave appropriately. Instead of restarting the application, simply switch to the command line and invoke the command &lt;span doc="http://nwalsh.com/xsl/documentation/1.0" class="command"&gt;&lt;span&gt;&lt;strong class="command"&gt;reload-scripts&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;. &lt;/p&gt;&lt;p&gt; If you develop useful scripts please consider contributing to the &lt;span class="application"&gt;Kate&lt;/span&gt; Project by &lt;a href="mailto:kwrite-devel@kde.org" target="_top"&gt;contacting the mailing list&lt;/a&gt;. &lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="sect2" lang="en"&gt;&lt;div class="titlepage"&gt;&lt;div&gt;&lt;div&gt;&lt;h3 class="title"&gt;&lt;a name="advanced-editing-tools-scripting-command-line"&gt;&lt;/a&gt;Command Line Scripts&lt;/h3&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt; As it is hard to satisfy everyone's needs, &lt;span class="application"&gt;Kate&lt;/span&gt; supports little helper tools for quick text manipulation through the &lt;a href="http://docs.kde.org/development/en/kdesdk/kate/advanced-editing-tools-commandline.html" title="The Editor Component Command Line"&gt;built-in command line&lt;/a&gt;. For instance, the command &lt;span doc="http://nwalsh.com/xsl/documentation/1.0" class="command"&gt;&lt;span&gt;&lt;strong class="command"&gt;sort&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt; is implemented as script. This section explains how to create &lt;code class="filename"&gt;*.js&lt;/code&gt; files to extend &lt;span class="application"&gt;Kate&lt;/span&gt; with arbitrary helper scripts. &lt;/p&gt;&lt;p&gt; Command line scripts are located in the save folder as indentation scripts. So as first step, create a new &lt;code class="filename"&gt;*.js&lt;/code&gt; file called &lt;code class="filename"&gt;myutils.js&lt;/code&gt; in the local home folder &lt;code class="filename"&gt;$KDEHOME/share/apps/katepart/script&lt;/code&gt;. &lt;/p&gt;&lt;div class="sect3" lang="en"&gt;&lt;div class="titlepage"&gt;&lt;div&gt;&lt;div&gt;&lt;h4 class="title"&gt;&lt;a name="advanced-editing-tools-scripting-command-line-header"&gt;&lt;/a&gt;The Command Line Script Header&lt;/h4&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt; The header of each command line script is embedded in a comment and is of the following form  &lt;/p&gt;&lt;pre class="programlisting"&gt;/* kate-script&lt;br /&gt;* author: Example Name &lt;example.name@some.address.org&gt;&lt;br /&gt;* license: BSD&lt;br /&gt;* revision: 1&lt;br /&gt;* kate-version: 3.4&lt;br /&gt;* type: commands&lt;br /&gt;* functions: sort, format-paragraph&lt;br /&gt;*&lt;br /&gt;* A line without colon ':' stops header parsing. That is, you can add optional&lt;br /&gt;* text here such as a detailed license.&lt;br /&gt;*/&lt;br /&gt;&lt;/example.name@some.address.org&gt;&lt;/pre&gt;&lt;p&gt;  Each entry is explained in detail now: &lt;/p&gt;&lt;div class="itemizedlist"&gt;&lt;ul type="disc"&gt;&lt;li&gt;&lt;code class="literal"&gt;kate-script&lt;/code&gt; [required]: This text string has to appear in the first line of the &lt;code class="filename"&gt;*.js&lt;/code&gt; file, otherwise &lt;span class="application"&gt;Kate&lt;/span&gt; skips the script.&lt;/li&gt;&lt;li&gt;&lt;code class="literal"&gt;author&lt;/code&gt; [optional]: The author's name and contact information.&lt;/li&gt;&lt;li&gt;&lt;code class="literal"&gt;license&lt;/code&gt; [optional]: Short form of the license, such as BSD or LGPLv3.&lt;/li&gt;&lt;li&gt;&lt;code class="literal"&gt;revision&lt;/code&gt; [required]: The revision of the script. This number should be increased whenever the script is modified.&lt;/li&gt;&lt;li&gt;&lt;code class="literal"&gt;kate-version&lt;/code&gt; [required]: Minimal required &lt;span class="application"&gt;Kate&lt;/span&gt; version.&lt;/li&gt;&lt;li&gt;&lt;code class="literal"&gt;type&lt;/code&gt; [required]: The type must be 'commands', otherwise &lt;span class="application"&gt;Kate&lt;/span&gt; skips this script.&lt;/li&gt;&lt;li&gt;&lt;code class="literal"&gt;functions&lt;/code&gt; [required]: Comma separated list of commands in the script.&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt; &lt;span class="application"&gt;Kate&lt;/span&gt; reads all pairs of the form “&lt;span class="quote"&gt;&lt;span doc="http://nwalsh.com/xsl/documentation/1.0" class="replaceable"&gt;&lt;em class="replaceable"&gt;&lt;code&gt;key&lt;/code&gt;&lt;/em&gt;&lt;/span&gt;:&lt;span doc="http://nwalsh.com/xsl/documentation/1.0" class="replaceable"&gt;&lt;em class="replaceable"&gt;&lt;code&gt;value&lt;/code&gt;&lt;/em&gt;&lt;/span&gt;&lt;/span&gt;” until it cannot fine a colon anymore. This implies that the header can contain arbitrary text such as a license as shown in the example. The value of the key functions is a comma separated list of command line commands. This means a single script contains an arbitrary amount of command line commands. Each function is available through &lt;span class="application"&gt;Kate&lt;/span&gt;'s &lt;a href="http://docs.kde.org/development/en/kdesdk/kate/advanced-editing-tools-commandline.html" title="The Editor Component Command Line"&gt;built-in command line&lt;/a&gt;. &lt;/p&gt;&lt;/div&gt;&lt;div class="sect3" lang="en"&gt;&lt;div class="titlepage"&gt;&lt;div&gt;&lt;div&gt;&lt;h4 class="title"&gt;&lt;a name="advanced-editing-tools-scripting-command-line-body"&gt;&lt;/a&gt;The Script Source Code&lt;/h4&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt; All functions specified in the header have to be implemented in the script. For instance, the script file from the example above needs to implement the two functions &lt;span doc="http://nwalsh.com/xsl/documentation/1.0" class="command"&gt;&lt;span&gt;&lt;strong class="command"&gt;sort&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt; and &lt;span doc="http://nwalsh.com/xsl/documentation/1.0" class="command"&gt;&lt;span&gt;&lt;strong class="command"&gt;format-paragraph&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;. All functions have the following syntax:  &lt;/p&gt;&lt;pre class="programlisting"&gt;function &lt;name&gt;(arg1, arg2, ...)&lt;br /&gt;{&lt;br /&gt;  // ... implementation, see also: Scripting API&lt;br /&gt;}&lt;br /&gt;&lt;/name&gt;&lt;/pre&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt; Arguments in the command line are passed to the function as &lt;span doc="http://nwalsh.com/xsl/documentation/1.0" class="parameter"&gt;&lt;em class="parameter"&gt;&lt;code&gt;arg1&lt;/code&gt;&lt;/em&gt;&lt;/span&gt;, &lt;span doc="http://nwalsh.com/xsl/documentation/1.0" class="parameter"&gt;&lt;em class="parameter"&gt;&lt;code&gt;arg2&lt;/code&gt;&lt;/em&gt;&lt;/span&gt;, etc. In order to provide documentation for each command, simply implement the '&lt;code class="function"&gt;help&lt;/code&gt;' function as follows:  &lt;/p&gt;&lt;pre class="programlisting"&gt;function help(cmd)&lt;br /&gt;{&lt;br /&gt;  if (cmd == "sort") {&lt;br /&gt;      return "Sort the selected text.";&lt;br /&gt;  } else if (cmd == "...") {&lt;br /&gt;      // ...&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;p&gt;  Executing &lt;span doc="http://nwalsh.com/xsl/documentation/1.0" class="command"&gt;&lt;span&gt;&lt;strong class="command"&gt;help sort&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt; in the command line then calls this help function with the argument &lt;span doc="http://nwalsh.com/xsl/documentation/1.0" class="parameter"&gt;&lt;em class="parameter"&gt;&lt;code&gt;cmd&lt;/code&gt;&lt;/em&gt;&lt;/span&gt; set to the given command, i.e. &lt;span doc="http://nwalsh.com/xsl/documentation/1.0" class="parameter"&gt;&lt;em class="parameter"&gt;&lt;code&gt;cmd == "sort"&lt;/code&gt;&lt;/em&gt;&lt;/span&gt;. &lt;span class="application"&gt;Kate&lt;/span&gt; then presents the returned text as documentation to the user. &lt;/p&gt;&lt;p&gt; Developing a command line script requires to reload the scripts to see whether the changes behave appropriately. Instead of restarting the application, simply switch to the command line and invoke the command &lt;span doc="http://nwalsh.com/xsl/documentation/1.0" class="command"&gt;&lt;span&gt;&lt;strong class="command"&gt;reload-scripts&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;. &lt;/p&gt;&lt;p&gt; If you develop useful scripts please consider contributing to the &lt;span class="application"&gt;Kate&lt;/span&gt; Project by &lt;a href="mailto:kwrite-devel@kde.org" target="_top"&gt;contacting the mailing list&lt;/a&gt;.&lt;br /&gt;&lt;/p&gt;&lt;h2 class="title" style="clear: both;"&gt;Final Remarks&lt;br /&gt;&lt;/h2&gt;Right now, it's not possible to assign shortcuts to command line commands. Thus, there is no way of executing scripted commands with shortcuts. Volunteers wanted!&lt;br /&gt;&lt;br /&gt;The command line scripting can be accessed for all KTextEditor users through the &lt;a href="http://api.kde.org/4.x-api/kdelibs-apidocs/interfaces/ktexteditor/html/classKTextEditor_1_1CommandInterface.html"&gt;KTextEditor::CommandInterface&lt;/a&gt;. That is, you can query a specific command and &lt;a href="http://api.kde.org/4.x-api/kdelibs-apidocs/interfaces/ktexteditor/html/classKTextEditor_1_1Command.html#afcf59107ca87d860fc7a17e507df02d2"&gt;execute it&lt;/a&gt; with arbitrary parameters (The parameter cmd contains the command itself including all arguments. Example: cmd = "goto 65").&lt;br /&gt;&lt;br /&gt;Kate's command line itself is actually a quite powerful tool. It's a little bit sad that it's rather unknown. If you want to know more, just invoke "View -&gt; Swith to command line" (shortcut: F7) and start typing text. More details are in the &lt;a href="http://docs.kde.org/development/en/kdesdk/kate/advanced-editing-tools-commandline.html"&gt;Kate handbook&lt;/a&gt; as well.&lt;br /&gt;&lt;br /&gt;The Kate scripting API can be found &lt;a href="http://docs.kde.org/development/en/kdesdk/kate/advanced-editing-tools-scripting.html#advanced-editing-tools-scripting-api"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17552332-8311003868506503993?l=dhaumann.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dhaumann.blogspot.com/feeds/8311003868506503993/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17552332&amp;postID=8311003868506503993' title='9 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/8311003868506503993'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/8311003868506503993'/><link rel='alternate' type='text/html' href='http://dhaumann.blogspot.com/2009/10/extending-kate-with-scripts.html' title='Extending Kate with Scripts'/><author><name>dhaumann</name><uri>http://www.blogger.com/profile/06242913572752671774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>9</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17552332.post-5871317070464366077</id><published>2009-10-05T22:26:00.003+02:00</published><updated>2009-10-05T22:30:37.550+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='techbase'/><category scheme='http://www.blogger.com/atom/ns#' term='kde'/><title type='text'>Help on TechBase, KDE Community Forums</title><content type='html'>From time to time techbase readers ask questions in the associated talk pages, e.g. with regard to bugs in the tutorials. Usually, they get no reply. This is mainly because noone gets even noticed about this. I've added a &lt;a href="http://forum.kde.org/viewforum.php?f=108"&gt;link to the KDE Community Forum&lt;/a&gt; now on top of each techbase page (&lt;a href="http://techbase.kde.org/MediaWiki:Sitenotice"&gt;MediaWiki:sidenotice&lt;/a&gt;). Maybe this helps that developers new to KDE get more help. A little...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17552332-5871317070464366077?l=dhaumann.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dhaumann.blogspot.com/feeds/5871317070464366077/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17552332&amp;postID=5871317070464366077' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/5871317070464366077'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/5871317070464366077'/><link rel='alternate' type='text/html' href='http://dhaumann.blogspot.com/2009/10/help-on-techbase-kde-community-forums.html' title='Help on TechBase, KDE Community Forums'/><author><name>dhaumann</name><uri>http://www.blogger.com/profile/06242913572752671774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17552332.post-6792008834749687075</id><published>2009-09-18T00:36:00.004+02:00</published><updated>2009-09-18T00:45:57.932+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='kate'/><category scheme='http://www.blogger.com/atom/ns#' term='kde'/><title type='text'>News from the Holy Kate Land</title><content type='html'>Since we now all know that Kate is holy (thanks to rms. By accident, he obviously confused Kate with emacs, though) let's have a look at what's going on. In the last months Kate development is quite active, so here is a quick update:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;new: &lt;a href="http://dhaumann.blogspot.com/2009/07/followup-on-kates-on-fly-spellchecking.html"&gt;on-the-fly spell checking&lt;/a&gt; thanks to Michel Ludwig. Highlights include e.g. spell checking in comments of source code or latex parts. Also, constructs like sch\"on work in latex.&lt;/li&gt;&lt;li&gt;extended scripting support in the command line, more on that later&lt;/li&gt;&lt;li&gt;more and more mature vi input mode&lt;/li&gt;&lt;li&gt;&lt;a href="https://bugs.kde.org/buglist.cgi?query_format=advanced&amp;amp;short_desc_type=allwordssubstr&amp;amp;short_desc=&amp;amp;product=kate&amp;amp;long_desc_type=substring&amp;amp;long_desc=&amp;amp;bug_file_loc_type=allwordssubstr&amp;amp;bug_file_loc=&amp;amp;keywords_type=allwords&amp;amp;keywords=&amp;amp;bug_status=RESOLVED&amp;amp;bug_status=CLOSED&amp;amp;resolution=FIXED&amp;amp;resolution=WORKSFORME&amp;amp;emailassigned_to1=1&amp;amp;emailtype1=substring&amp;amp;email1=&amp;amp;emailassigned_to2=1&amp;amp;emailreporter2=1&amp;amp;emailcc2=1&amp;amp;emailtype2=substring&amp;amp;email2=&amp;amp;bugidtype=include&amp;amp;bug_id=&amp;amp;votes=&amp;amp;chfieldfrom=2009-06-25&amp;amp;chfieldto=Now&amp;amp;chfieldvalue=&amp;amp;cmdtype=doit&amp;amp;order=Reuse+same+sort+as+last+time&amp;amp;field0-0-0=noop&amp;amp;type0-0-0=noop&amp;amp;value0-0-0="&gt;lots of bug fixing&lt;/a&gt;. quite impressive bug squashing by Pascal Létourneau for more than 4 months now&lt;/li&gt;&lt;li&gt;lots of refactoring and code cleanups thanks to Bernhard!&lt;/li&gt;&lt;li&gt;"Find in Files" appears by default again in the tool view,&lt;/li&gt;&lt;li&gt;"File Browser" uses UrlNavigator, huge code cleanup&lt;/li&gt;&lt;li&gt;convenience updates of syntax highlighting&lt;/li&gt;&lt;li&gt;delayed highlighting of code folding ranges to prevent flickering on mouse move&lt;/li&gt;&lt;li&gt;new command line commands: 'toggle-header' in the Open Header plugin. 'grep' and 'find-in-files'&lt;/li&gt;&lt;li&gt;haskell and lilypond indenter&lt;/li&gt;&lt;li&gt;much, much more, see commits for details.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;Thanks to all contributors involved in Kate development. Keep it up :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17552332-6792008834749687075?l=dhaumann.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dhaumann.blogspot.com/feeds/6792008834749687075/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17552332&amp;postID=6792008834749687075' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/6792008834749687075'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/6792008834749687075'/><link rel='alternate' type='text/html' href='http://dhaumann.blogspot.com/2009/09/news-from-holy-kate-land.html' title='News from the Holy Kate Land'/><author><name>dhaumann</name><uri>http://www.blogger.com/profile/06242913572752671774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17552332.post-640304409290899200</id><published>2009-07-08T12:09:00.003+02:00</published><updated>2009-07-08T12:47:01.919+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='kate'/><category scheme='http://www.blogger.com/atom/ns#' term='spellchecking'/><category scheme='http://www.blogger.com/atom/ns#' term='kde'/><title type='text'>Followup on Kate's on-the-fly spellchecking</title><content type='html'>As there was a lot of feedback in the &lt;a href="http://dhaumann.blogspot.com/2009/07/on-fly-spellchecking-in-kate.html"&gt;last blog&lt;/a&gt;, I'll answer some of the questions here.&lt;br /&gt;&lt;br /&gt;&gt; &lt;span style="font-style: italic;"&gt;Where can I get this patch?&lt;/span&gt;&lt;br /&gt;The relevant subversion revisions are r992778, r992779, r992780, r992784.&lt;br /&gt;&lt;br /&gt;&gt; &lt;span style="font-style: italic;"&gt;Will it be available in 4.3, or only in 4.4?&lt;/span&gt;&lt;br /&gt;As KDE 4.3 will be released end of the month, this feature will be available in KDE 4.4 and not earlier.&lt;br /&gt;&lt;br /&gt;&gt; &lt;span style="font-style: italic;"&gt;Please, please tell me that it's powered by Sonnet, one of the most awaited KDE4 pillar by me...&lt;/span&gt;&lt;br /&gt;Yes, it uses Sonnet :)&lt;br /&gt;The old spellcheck dialog however still uses the old spellchecking code without Sonnet. Any volunteers to port this? Also, the on-the-fly spellchecking needs to be more configurable in Kate's config dialog, e.g. selecting the correct language.&lt;br /&gt;&lt;br /&gt;&gt; &lt;span style="font-style: italic;"&gt;Thanks so much, this was the feature I was mostly longing for in kate.&lt;/span&gt;&lt;br /&gt;Yes, it is one of the &lt;a href="http://bugs.kde.org/show_bug.cgi?id=33857"&gt;oldest reports&lt;/a&gt; with &lt;span style="font-weight: bold;"&gt;1245 votes&lt;/span&gt;!&lt;br /&gt;&lt;br /&gt;&gt; What languages are supported support?&lt;br /&gt;&lt;s&gt;On-the-fly spellchecking works if the specific itemDatas are marked with spellChecking="true" or "1" in the xml highlighting definition files.&lt;/s&gt; UPDATE: On-the-fly spellchecking is enabled for all itemDatas by default in the xml highlighting defintion files. To disable it, you have to add &lt;span style="font-weight: bold;"&gt;spellChecking="false"&lt;/span&gt; or "0" to an itemData, e.g. at the end of the &lt;a href="http://websvn.kde.org/trunk/KDE/kdelibs/kate/syntax/data/cpp.xml?view=markup"&gt;cpp.xml&lt;/a&gt; file:&lt;br /&gt;&lt;pre&gt;&lt;blockquote&gt;&lt;br /&gt;&amp;lt;itemDatas&amp;gt;&lt;br /&gt;&amp;lt;itemData name="Normal Text" &lt;span style="font-weight: bold;"&gt;spellChecking="0"&lt;/span&gt; /&amp;gt;&lt;br /&gt;...&lt;br /&gt;&amp;lt;itemData name="String"&lt;span style="font-weight: bold;"&gt;&lt;/span&gt; /&amp;gt;&lt;br /&gt;&amp;lt;itemData name="String Char" &lt;span style="font-weight: bold;"&gt;spellChecking="0"&lt;/span&gt; /&amp;gt;&lt;br /&gt;&amp;lt;itemData name="Comment" /&amp;gt;&lt;br /&gt;&amp;lt;itemData name="Symbol" &lt;span style="font-weight: bold;"&gt;spellChecking="0"&lt;/span&gt; /&amp;gt;&lt;br /&gt;...&lt;br /&gt;&amp;lt;/itemData&amp;gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;/pre&gt;&lt;br /&gt;So we have to go through all .xml files and change the relevant parts in the itemDatas section. And that's where we need your help, as we don't know all the languages :) ...and if you want to test this feature, you first have to enable it in Tools &gt; On-the-fly spellchecking.&lt;br /&gt;PS: Is there a better name? Maybe Inline spellchecking? Any linguistic experts around? :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17552332-640304409290899200?l=dhaumann.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dhaumann.blogspot.com/feeds/640304409290899200/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17552332&amp;postID=640304409290899200' title='12 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/640304409290899200'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/640304409290899200'/><link rel='alternate' type='text/html' href='http://dhaumann.blogspot.com/2009/07/followup-on-kates-on-fly-spellchecking.html' title='Followup on Kate&apos;s on-the-fly spellchecking'/><author><name>dhaumann</name><uri>http://www.blogger.com/profile/06242913572752671774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>12</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17552332.post-3060177377271941781</id><published>2009-07-07T20:51:00.003+02:00</published><updated>2009-07-07T20:57:30.741+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='kate'/><category scheme='http://www.blogger.com/atom/ns#' term='Latex'/><category scheme='http://www.blogger.com/atom/ns#' term='kde'/><title type='text'>On-the-fly spellchecking in Kate</title><content type='html'>Christoph just added an awesome and long awaited feature: on-the-fly spellchecking. 'Kate's xml highlighting files now have an additional attribute in the itemData section: spellChecking="true/false". C++ comments and strings can be spellchecked now :) Same for all other languages such as Latex. Really big thanks to Michel Ludwig for the patch, good work! Screenshot for latex highlighting:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_JcjnuQSFzjw/SlOZuLvbdHI/AAAAAAAAADs/mX4dVlvZA50/s1600-h/snapshot1.png"&gt;&lt;img style="cursor: pointer; width: 400px; height: 326px;" src="http://1.bp.blogspot.com/_JcjnuQSFzjw/SlOZuLvbdHI/AAAAAAAAADs/mX4dVlvZA50/s400/snapshot1.png" alt="" id="BLOGGER_PHOTO_ID_5355793400578405490" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17552332-3060177377271941781?l=dhaumann.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dhaumann.blogspot.com/feeds/3060177377271941781/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17552332&amp;postID=3060177377271941781' title='12 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/3060177377271941781'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/3060177377271941781'/><link rel='alternate' type='text/html' href='http://dhaumann.blogspot.com/2009/07/on-fly-spellchecking-in-kate.html' title='On-the-fly spellchecking in Kate'/><author><name>dhaumann</name><uri>http://www.blogger.com/profile/06242913572752671774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_JcjnuQSFzjw/SlOZuLvbdHI/AAAAAAAAADs/mX4dVlvZA50/s72-c/snapshot1.png' height='72' width='72'/><thr:total>12</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17552332.post-3774344458695696680</id><published>2009-06-07T13:55:00.004+02:00</published><updated>2010-02-18T18:33:08.472+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='kate'/><category scheme='http://www.blogger.com/atom/ns#' term='kde'/><title type='text'>Kate Test Regression Suite</title><content type='html'>This blog is mainly about documenting the process how to run Kate Part's test regression suite and probably not much use for other developers.&lt;br /&gt;&lt;br /&gt;Step I: Setup the environment&lt;br /&gt;&lt;ol&gt;&lt;li&gt; create the file ~/.testkateregression. The content of this file is a single line pointing to the folder of the checkout of the test regression suite data. For me this is&lt;br /&gt;/home/dh/kde/tests/katetests/regression/ &lt;/li&gt;&lt;li&gt;Create the folder where you checkout the suite&lt;br /&gt;mkdir /home/dh/kde/tests&lt;/li&gt;&lt;li&gt;Change to this folder&lt;/li&gt;&lt;li&gt;Checkout the data:&lt;br /&gt;svn co svn://anonsvn.kde.org/home/kde/trunk/tests/katetests&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;Now all the data is there for testing.&lt;br /&gt;&lt;br /&gt;Step II: Run the test suite&lt;br /&gt;&lt;ol&gt;&lt;li&gt;go to your build directory of kate (e.g. kdelibs/build/kate/tests/&lt;/li&gt;&lt;li&gt;run the complete suite:&lt;br /&gt;./testkateregression.shell&lt;/li&gt;&lt;li&gt;run specific tests, e.g. for the c indenter:&lt;br /&gt;./testkateregression.shell -t indent/csmart&lt;/li&gt;&lt;/ol&gt;That's it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17552332-3774344458695696680?l=dhaumann.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dhaumann.blogspot.com/feeds/3774344458695696680/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17552332&amp;postID=3774344458695696680' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/3774344458695696680'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/3774344458695696680'/><link rel='alternate' type='text/html' href='http://dhaumann.blogspot.com/2009/06/kate-test-regression-suite.html' title='Kate Test Regression Suite'/><author><name>dhaumann</name><uri>http://www.blogger.com/profile/06242913572752671774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17552332.post-4750684597390725517</id><published>2009-03-17T20:53:00.002+01:00</published><updated>2009-03-17T20:59:01.384+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='system monitor'/><category scheme='http://www.blogger.com/atom/ns#' term='kde'/><title type='text'>Again System Load Viewer</title><content type='html'>It's in &lt;a href="http://websvn.kde.org/trunk/KDE/kdeplasma-addons/applets/systemloadviewer/"&gt;kdeplasma-addons&lt;/a&gt; now will be part of KDE 4.3. For those who can't wait we have released &lt;a href="http://www.kde-look.org/content/show.php/System+Status?content=74891"&gt;version 0.6 for KDE 4.2&lt;/a&gt;. I encourage developers to get their hands dirty and make it look even better. Another idea is to automatically use the plasma colors so it visually integrates better into the desktop. It's more than good enough though, as it has all the features of KDE3's System Monitor and some more (like support for showing all CPUs' usage). Have fun :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17552332-4750684597390725517?l=dhaumann.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dhaumann.blogspot.com/feeds/4750684597390725517/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17552332&amp;postID=4750684597390725517' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/4750684597390725517'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/4750684597390725517'/><link rel='alternate' type='text/html' href='http://dhaumann.blogspot.com/2009/03/again-system-load-viewer.html' title='Again System Load Viewer'/><author><name>dhaumann</name><uri>http://www.blogger.com/profile/06242913572752671774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17552332.post-3757225905822879621</id><published>2009-02-27T12:14:00.004+01:00</published><updated>2009-02-27T12:33:13.501+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='development'/><category scheme='http://www.blogger.com/atom/ns#' term='kde'/><title type='text'>Creating a Plugin System</title><content type='html'>On techbase we have a tutorial about &lt;a href="http://techbase.kde.org/Development/Tutorials/Services/Plugins"&gt;extending your application with a plugin system&lt;/a&gt;. However, it's unfinished and some people need it as you can see on the talk page. So if you feel like passing your knowledge on, please fill in the missing sections to complete this tutorial. Just make sure to keep it as simple as possible, of course you can also change what's already there. Btw, we once had such a &lt;a href="http://developer.kde.org/documentation/tutorials/developing-a-plugin-structure/index.html"&gt;tutorial for KDE3&lt;/a&gt;, maybe you can copy some text from there. It would be awesome to have it for KDE4 as well :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17552332-3757225905822879621?l=dhaumann.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dhaumann.blogspot.com/feeds/3757225905822879621/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17552332&amp;postID=3757225905822879621' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/3757225905822879621'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/3757225905822879621'/><link rel='alternate' type='text/html' href='http://dhaumann.blogspot.com/2009/02/creating-plugin-system.html' title='Creating a Plugin System'/><author><name>dhaumann</name><uri>http://www.blogger.com/profile/06242913572752671774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17552332.post-2150140395936990452</id><published>2009-01-27T13:23:00.002+01:00</published><updated>2009-01-27T13:27:18.300+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='features'/><category scheme='http://www.blogger.com/atom/ns#' term='kde'/><title type='text'>Feature Plans for KDE 4.2 / 4.3</title><content type='html'>Hi KDE developers: As KDE 4.2 is about to be released you should move all your &lt;a href="http://techbase.kde.org/Schedules/KDE4/4.2_Feature_Plan"&gt;features that did not make it into the KDE 4.2 release&lt;/a&gt; to the &lt;a href="http://techbase.kde.org/Schedules/KDE4/4.3_Feature_Plan"&gt;KDE 4.3 feature plan&lt;/a&gt;. Thanks! :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17552332-2150140395936990452?l=dhaumann.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dhaumann.blogspot.com/feeds/2150140395936990452/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17552332&amp;postID=2150140395936990452' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/2150140395936990452'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/2150140395936990452'/><link rel='alternate' type='text/html' href='http://dhaumann.blogspot.com/2009/01/feature-plans-for-kde-42-43.html' title='Feature Plans for KDE 4.2 / 4.3'/><author><name>dhaumann</name><uri>http://www.blogger.com/profile/06242913572752671774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17552332.post-7176262166538674857</id><published>2009-01-09T19:50:00.003+01:00</published><updated>2009-01-09T20:01:33.148+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='techbase'/><category scheme='http://www.blogger.com/atom/ns#' term='kdesvn-build'/><category scheme='http://www.blogger.com/atom/ns#' term='kde'/><category scheme='http://www.blogger.com/atom/ns#' term='compile'/><title type='text'>Compile Time</title><content type='html'>Recompiling kdelibs, kdepimlibs, kdebase, kdesdk, kdeplasma-addons, playground/base/plasma all in all takes about &lt;span style="font-weight: bold;"&gt;2h 13min&lt;/span&gt; on my t41p (1.7GHz, 1.5GB ram). It's still quite fast imo, but I imagine with today's hardware it's maybe 30 minutes? See below for detailed infos. I'm using mpyne's &lt;a href="http://kdesvn-build.kde.org/"&gt;excellent kdesvn-build scripts&lt;/a&gt; to build KDE from trunk. I even believe this should be the default way for building trunk instead of the &lt;a href="http://techbase.kde.org/Getting_Started/Build/KDE4"&gt;rough road we propose on techbase&lt;/a&gt; right now. Are there any reasons not to use kdesvn-build?&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;blockquote&gt;Building kdelibs (1/6)&lt;br /&gt;       Preparing build system for kdelibs.&lt;br /&gt;       Running cmake...&lt;br /&gt;       Compiling, attempt 1...&lt;br /&gt;       Build succeeded after 44 minutes, and 56 seconds.&lt;br /&gt;       Installing kdelibs.&lt;br /&gt;       Overall time for kdelibs was &lt;span style="font-weight: bold;"&gt;48 minutes, and 49 seconds&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;Building kdepimlibs (2/6)&lt;br /&gt;       Preparing build system for kdepimlibs.&lt;br /&gt;       Running cmake...&lt;br /&gt;       Compiling, attempt 1...&lt;br /&gt;       Build succeeded after 7 minutes, and 53 seconds.&lt;br /&gt;       Installing kdepimlibs.&lt;br /&gt;       Overall time for kdepimlibs was &lt;span style="font-weight: bold;"&gt;8 minutes, and 14 seconds&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;Building kdebase (3/6)&lt;br /&gt;       Preparing build system for kdebase.&lt;br /&gt;       Running cmake...&lt;br /&gt;       Compiling, attempt 1...&lt;br /&gt;       Build succeeded after 52 minutes, and 35 seconds.&lt;br /&gt;       Installing kdebase.&lt;br /&gt;       Overall time for kdebase was &lt;span style="font-weight: bold;"&gt;57 minutes, and 44 seconds&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;Building kdesdk (4/6) &lt;span style="font-weight: bold;"&gt;# note: several subdirs commented out&lt;/span&gt;&lt;br /&gt;       Preparing build system for kdesdk.&lt;br /&gt;       Running cmake...&lt;br /&gt;       Compiling, attempt 1...&lt;br /&gt;       Build succeeded after 8 minutes, and 26 seconds.&lt;br /&gt;       Installing kdesdk.&lt;br /&gt;       Overall time for kdesdk was &lt;span style="font-weight: bold;"&gt;8 minutes, and 45 seconds&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;Building kdeplasma-addons (5/6)&lt;br /&gt;       Preparing build system for kdeplasma-addons.&lt;br /&gt;       Running cmake...&lt;br /&gt;       Compiling, attempt 1...&lt;br /&gt;       Build succeeded after 6 minutes, and 15 seconds.&lt;br /&gt;       Installing kdeplasma-addons.&lt;br /&gt;       Overall time for kdeplasma-addons was &lt;span style="font-weight: bold;"&gt;6 minutes, and 24 seconds&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;Building plasma (6/6) # this is: playground/base/plasma&lt;br /&gt;       Preparing build system for plasma.&lt;br /&gt;       Running cmake...&lt;br /&gt;       Compiling, attempt 1...&lt;br /&gt;       Build succeeded after 3 minutes, and 25 seconds.&lt;br /&gt;       Installing plasma.&lt;br /&gt;       Overall time for plasma was &lt;span style="font-weight: bold;"&gt;3 minutes, and 35 seconds&lt;/span&gt;.&lt;/blockquote&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17552332-7176262166538674857?l=dhaumann.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dhaumann.blogspot.com/feeds/7176262166538674857/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17552332&amp;postID=7176262166538674857' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/7176262166538674857'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/7176262166538674857'/><link rel='alternate' type='text/html' href='http://dhaumann.blogspot.com/2009/01/compile-time.html' title='Compile Time'/><author><name>dhaumann</name><uri>http://www.blogger.com/profile/06242913572752671774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17552332.post-126642918680589126</id><published>2009-01-04T15:05:00.005+01:00</published><updated>2009-01-05T19:19:08.042+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='cmake'/><title type='text'>Quickie: Faster compilation with cmake</title><content type='html'>It happens again and again that developers complain about cmake being too slow when compiling after a quick change. The solution is to use&lt;br /&gt;&lt;ul&gt;&lt;li&gt;make &lt;span style="font-style: italic;"&gt;$target&lt;/span&gt;/fast&lt;/li&gt;&lt;li&gt;make install/fast&lt;/li&gt;&lt;/ul&gt;This way, cmake skips the dependency checking. As example, whenever I change code in kdelibs/kate, I type make katepart/fast and make install/fast.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17552332-126642918680589126?l=dhaumann.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dhaumann.blogspot.com/feeds/126642918680589126/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17552332&amp;postID=126642918680589126' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/126642918680589126'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/126642918680589126'/><link rel='alternate' type='text/html' href='http://dhaumann.blogspot.com/2009/01/quickie-faster-compilation-with-cmake.html' title='Quickie: Faster compilation with cmake'/><author><name>dhaumann</name><uri>http://www.blogger.com/profile/06242913572752671774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17552332.post-8740961854074589570</id><published>2009-01-02T17:28:00.006+01:00</published><updated>2009-01-27T13:33:35.464+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='plasma applet'/><category scheme='http://www.blogger.com/atom/ns#' term='kde'/><title type='text'>System Load Viewer</title><content type='html'>Last year I've blogged about the &lt;a href="http://dhaumann.blogspot.com/2008/05/i-miss-applet-which-shows-system-usage.html"&gt;missing system monitor&lt;/a&gt; with the three bars for the panel and about its port to Plasma. Meanwhile other developers &lt;a href="http://www.kde-look.org/content/show.php/System+Status?content=74891"&gt;also did a port&lt;/a&gt; called System Status. In a collaboration with them we finally have the applet back in &lt;a href="http://websvn.kde.org/trunk/kdereview/plasma/applets/systemloadviewer"&gt;KDE's subversion&lt;/a&gt;, the name is now "System Load Viewer" and it uses the data engine "systemmonitor" that already exists in KDE 4.2.&lt;br /&gt;So if you want to have the plasmoid for your KDE4.2 desktop, it should be straightforward to compile/install.&lt;br /&gt;On the screenshot you can see the plasmoid in action. There are two instances, one on the panel and one on the desktop. The one on the left is the KDE3 one.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_JcjnuQSFzjw/SV5C46qPUqI/AAAAAAAAACQ/BHHOPImx9kc/s1600-h/systemloadviewer.png"&gt;&lt;img style="cursor: pointer; width: 400px; height: 251px;" src="http://3.bp.blogspot.com/_JcjnuQSFzjw/SV5C46qPUqI/AAAAAAAAACQ/BHHOPImx9kc/s400/systemloadviewer.png" alt="" id="BLOGGER_PHOTO_ID_5286736558166069922" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;It's worth to mention that the plasmoid already supports more featues than the KDE3 version. Features include:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;show all cpus (for computers with multicores)&lt;/li&gt;&lt;li&gt;tooltip updates continuously&lt;/li&gt;&lt;li&gt;nicer visualization (maybe needs some more tweaks)&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;As soon as the KDE 4.2 freeze is over we'll have to see where we can put the plasmoid to make sure it's available for KDE 4.3 :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17552332-8740961854074589570?l=dhaumann.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dhaumann.blogspot.com/feeds/8740961854074589570/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17552332&amp;postID=8740961854074589570' title='17 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/8740961854074589570'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/8740961854074589570'/><link rel='alternate' type='text/html' href='http://dhaumann.blogspot.com/2009/01/system-load-viewer.html' title='System Load Viewer'/><author><name>dhaumann</name><uri>http://www.blogger.com/profile/06242913572752671774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_JcjnuQSFzjw/SV5C46qPUqI/AAAAAAAAACQ/BHHOPImx9kc/s72-c/systemloadviewer.png' height='72' width='72'/><thr:total>17</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17552332.post-3116277449540833801</id><published>2008-11-14T16:10:00.003+01:00</published><updated>2008-11-14T16:30:35.309+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='kate'/><title type='text'>Kate Internals: The Undo/Redo System</title><content type='html'>The Kate Editor Component (also called KatePart) has its own &lt;span style="font-weight: bold;"&gt;undo/redo system&lt;/span&gt;. It did not change much since KDE2 and basically it is very simple. Meanwhile there are classes for &lt;a href="http://doc.trolltech.com/4.4/qundostack.html"&gt;undo/redo support in Qt&lt;/a&gt; as well. In fact both systems are very similar. Let's focus on KatePart's system for now.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-size:130%;" &gt;Text Operations&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;First we have to take a look at what actions need to be saved. In KatePart this basically comes down to&lt;br /&gt;&lt;ul&gt;&lt;li&gt;insert text or line&lt;/li&gt;&lt;li&gt;remove text or line&lt;/li&gt;&lt;li&gt;selection changes&lt;/li&gt;&lt;li&gt;(and a few others like wrapping a line)&lt;/li&gt;&lt;/ul&gt;When typing text, each keystroke inserts a character. This is exactly one &lt;span style="font-weight: bold;"&gt;undo/redo item&lt;/span&gt;. As example, typing a character '&lt;span style="font-style: italic;"&gt;x&lt;/span&gt;' creates a new undo item:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;the content is '&lt;span style="font-style: italic;"&gt;x&lt;/span&gt;'&lt;/li&gt;&lt;li&gt;the type is '&lt;span style="font-style: italic;"&gt;insert text&lt;/span&gt;'&lt;/li&gt;&lt;/ul&gt;Undo in this case means '&lt;span style="font-style: italic;"&gt;remove x&lt;/span&gt;'. Redo means '&lt;span style="font-style: italic;"&gt;insert x (again)&lt;/span&gt;'. The undo/redo history is just a list (more like a stack to be precise) of simple edit actions.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;KateUndo Items&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;In KatePart, an undo item is represented by the class &lt;a href="http://websvn.kde.org/trunk/KDE/kdelibs/kate/document/kateundo.cpp"&gt;KateUndo&lt;/a&gt;:&lt;br /&gt;&lt;pre&gt;&lt;blockquote style="font-family: courier new;"&gt;class KateUndo {&lt;br /&gt; public:&lt;br /&gt;   KateUndo (KateUndoGroup::UndoType type, uint line,&lt;br /&gt;             uint col, uint len, const QString &amp;amp;text);&lt;br /&gt;   ~KateUndo ();&lt;br /&gt;&lt;br /&gt;   bool merge(KateUndo* u);&lt;br /&gt;&lt;br /&gt;   void undo (KateDocument *doc);&lt;br /&gt;   void redo (KateDocument *doc);&lt;br /&gt;&lt;br /&gt;   inline KateUndoGroup::UndoType type() const;&lt;br /&gt;&lt;br /&gt;   inline uint line () const;&lt;br /&gt;   inline uint col () const;&lt;br /&gt;   inline uint len() const;&lt;br /&gt;&lt;br /&gt;   inline const QString&amp;amp; text() const { return m_text; }&lt;br /&gt;};&lt;/blockquote&gt;&lt;/pre&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;Item Merging&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Note the function KateUndo::merge(KateUndo* u); This functions merges two undo items of the same type if possible. For instance, typing 'hello world' inserts one undo item for every character, i.e. 11 undo items of type 'insert text'. Kate merges those 11 items into only 1 item with the string 'hello world'. Merging leads to less KateUndo items (less memory) and faster undo/redo replaying.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;Item Grouping&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;What's still missing is the possibility to &lt;span style="font-weight: bold;"&gt;group several undo items together&lt;/span&gt;. Imagine you have selected the text 'hello world' and paste the text 'cheers' from the clipboard. What happens is this&lt;br /&gt;&lt;ol&gt;&lt;li&gt;remove selected text&lt;/li&gt;&lt;li&gt;insert text from clipboard&lt;/li&gt;&lt;/ol&gt;So there are two undo items of different type. They cannot be merged into only one KateUndo item. Though, we want to support undoing both items in one go, that's why we add several undo items into undo groups. In KatePart, this is done by the class &lt;a href="http://websvn.kde.org/trunk/KDE/kdelibs/kate/document/kateundo.h"&gt;KateUndoGroup&lt;/a&gt;:&lt;br /&gt;&lt;pre&gt;&lt;blockquote&gt;&lt;span style="font-family:courier new;"&gt;class KateUndoGroup&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;  public:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    explicit KateUndoGroup (KateDocument *doc);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    ~KateUndoGroup ();&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    void undo ();&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    void redo ();&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    enum UndoType { ... };&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    void addItem (KateUndoGroup::UndoType type, uint line, uint col, uint len, const QString &amp;amp;text);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    void setUndoSelection (const KTextEditor::Range &amp;amp;selection);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    void setRedoSelection (const KTextEditor::Range &amp;amp;selection);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    void setUndoCursor(const KTextEditor::Cursor &amp;amp;cursor);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    void setRedoCursor(const KTextEditor::Cursor &amp;amp;cursor);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    bool merge(KateUndoGroup* newGroup,bool complex);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    void safePoint (bool safePoint=true);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;};&lt;/span&gt;&lt;/blockquote&gt;&lt;/pre&gt;Every KateUndo item belongs to one KateUndoGroup. A KateUndoGroup can have an arbitrary count of KateUndo items. In the example above we want to group '&lt;span style="font-style: italic;"&gt;remove selected text&lt;/span&gt;' and '&lt;span style="font-style: italic;"&gt;insert text&lt;/span&gt;' together. Grouping can be explicitely done in the code as follows (simplified version):&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;/span&gt;&lt;pre&gt;&lt;blockquote&gt;&lt;span style="font-family:courier new;"&gt;void &lt;/span&gt;&lt;a style="font-family: courier new;" href="http://api.kde.org/4.x-api/kdelibs-apidocs/kate/html/katedocument_8cpp-source.html#l04218"&gt;KateDocument::paste&lt;/a&gt;&lt;span style="font-family:courier new;"&gt; ( KateView* view, QClipboard::Mode mode )&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;  QString s = QApplication::clipboard()-&gt;text(mode);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;  editStart();&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    view-&gt;removeSelectedText();&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    insertText(pos, s, view-&gt;blockSelectionMode());&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;  editEnd();&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;}&lt;/span&gt;&lt;/blockquote&gt;&lt;/pre&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;Grouping: editStart()/editEnd()&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The call of &lt;a href="http://api.kde.org/4.x-api/kdelibs-apidocs/kate/html/katedocument_8cpp-source.html#l00933"&gt;editStart()&lt;/a&gt; tells the document that an edit operation is running. All text operations are added to the current KateUndoGroup, until &lt;a href="http://api.kde.org/4.x-api/kdelibs-apidocs/kate/html/katedocument_8cpp-source.html#l01043"&gt;editEnd()&lt;/a&gt; is called. editStart() and editEnd() do reference counting, i.e. editStart() can be called nested as long as for each call of editStart() there is (finally) a call of editEnd().&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;Grouping: Cursors and Selections&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Undoing the paste-action above should restore the selection if there was one previously. Redo (i.e. paste again) should remove the selection again. So there are &lt;span style="font-weight: bold;"&gt;two different types of selections&lt;/span&gt;: one before the undo group, and one after. That's why each undo group has the functions setUndoSelection() and setRedoSelection(). The same applies for the cursor position: We have to store &lt;span style="font-weight: bold;"&gt;two different cursor positions&lt;/span&gt;, one for undo and one for redo.&lt;br /&gt;For instance, imagine we removed the text 'world'. Undo (i.e. insert '&lt;span style="font-style: italic;"&gt;hello&lt;/span&gt;') should set the cursor position to the end of 'hello'. Redo (i.e. remove '&lt;span style="font-style: italic;"&gt;hello&lt;/span&gt;') should set the cursor position to the start of it.&lt;br /&gt;&lt;br /&gt;Luckily a programmer does not have to set the undo/redo cursor positions and text selections manually. &lt;a href="http://api.kde.org/4.x-api/kdelibs-apidocs/kate/html/katedocument_8cpp-source.html#l00964"&gt;undoStart()&lt;/a&gt; is called the first time editStart() is called. The closing editEnd() finally calls &lt;a href="http://api.kde.org/4.x-api/kdelibs-apidocs/kate/html/katedocument_8cpp-source.html#l00976"&gt;undoEnd()&lt;/a&gt;. So undoStart() sets the undo cursor position and undo text selection, while undoEnd() sets the redo cursor position and redo text selection.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;Group Merging&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The careful reader might have noticed KateUndoGroup::merge(). So merging of two groups is also supported. Whether text operations should be merged into an existing undo group can be controlled with KateDocument::setUndoDontMerge(). Pasting text for example set's this flag.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;Undo and Redo&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Every document in KatePart has two lists: An &lt;span style="font-weight: bold;"&gt;undo list&lt;/span&gt;, and a &lt;span style="font-weight: bold;"&gt;redo list&lt;/span&gt;. Suppose we have 10 KateUndoGroups in the undo list and the user invokes undo 4 times. Then the undo list only contains 6 items and the redo list 4. Now it is also possible to redo. However, typing text clears the redo list.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;Document Modified Flag&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;KateDocument::updateModifed() is called to update the &lt;span style="font-weight: bold;"&gt;modified flag&lt;/span&gt; of a file. This update also relies on the current active undo group. Saving the file saves a pointer to the current undo group, and later we simply can check whether the current undo group is the active one. Pretty simple mechanism. However, there right now seems to be a bug you can reproduce as follows:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;save doc &lt;span style="font-style: italic;"&gt;[not modified]&lt;/span&gt;&lt;/li&gt;&lt;li&gt;type a character &lt;span style="font-style: italic;"&gt;[modified]&lt;/span&gt;&lt;/li&gt;&lt;li&gt;undo &lt;span style="font-style: italic;"&gt;[not modified]&lt;/span&gt;&lt;/li&gt;&lt;li&gt;type a character &lt;span style="font-style: italic;"&gt;[modified]&lt;/span&gt;&lt;/li&gt;&lt;li&gt;undo &lt;span style="font-style: italic;"&gt;[still modified]&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;Step 5 is incorrect, as the document is not modified here. Maybe now you have enough knowledge to fix this. Any takers? :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17552332-3116277449540833801?l=dhaumann.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dhaumann.blogspot.com/feeds/3116277449540833801/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17552332&amp;postID=3116277449540833801' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/3116277449540833801'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/3116277449540833801'/><link rel='alternate' type='text/html' href='http://dhaumann.blogspot.com/2008/11/kate-internals-undoredo-system.html' title='Kate Internals: The Undo/Redo System'/><author><name>dhaumann</name><uri>http://www.blogger.com/profile/06242913572752671774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17552332.post-5465293624336421325</id><published>2008-08-14T23:28:00.002+02:00</published><updated>2008-08-14T23:30:41.329+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='akademy'/><category scheme='http://www.blogger.com/atom/ns#' term='kate'/><category scheme='http://www.blogger.com/atom/ns#' term='kde'/><title type='text'>Akademy 08: Kate Flashback</title><content type='html'>This Akademy's Kate changes include&lt;br /&gt;&lt;ul&gt;&lt;li&gt;fix: drag &amp;amp; drop of text&lt;br /&gt;&lt;/li&gt;&lt;li&gt;code completion: only show group header if the group name is not empty&lt;/li&gt;&lt;li&gt;reintroduction of buffer blocks in Kate's document buffer (one buffer contains up to 4096 lines). The blocks build a linked list. Editing a 500 MB file kind of works now again. It's still rather slow, though.&lt;/li&gt;&lt;li&gt;more speedup in Kate's document buffer&lt;/li&gt;&lt;li&gt;Kate is using KEncodingProber instead of KEncodingDetector now&lt;/li&gt;&lt;li&gt;generate internal version of KatePart automatically, so developers don't have to adapt it manually each release&lt;/li&gt;&lt;li&gt;python encoding detection plugin that warns if encoding is not correct while saving&lt;/li&gt;&lt;li&gt;new plugin: Backtrace browser, mainly for developers&lt;/li&gt;&lt;li&gt;find in files: several speed optimizations&lt;/li&gt;&lt;li&gt;find in files: progress indicator while search is active&lt;/li&gt;&lt;li&gt;find in files: redesign of workflow. Search happens with non-modal dialog and results are shown in toolviews.&lt;/li&gt;&lt;li&gt;lots of vi mode changes&lt;/li&gt;&lt;li&gt;lots of bugs closed, mainly old ones&lt;/li&gt;&lt;li&gt;some real bug fixes...&lt;/li&gt;&lt;li&gt;things I forgot&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17552332-5465293624336421325?l=dhaumann.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dhaumann.blogspot.com/feeds/5465293624336421325/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17552332&amp;postID=5465293624336421325' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/5465293624336421325'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/5465293624336421325'/><link rel='alternate' type='text/html' href='http://dhaumann.blogspot.com/2008/08/akademy-08-kate-flashback.html' title='Akademy 08: Kate Flashback'/><author><name>dhaumann</name><uri>http://www.blogger.com/profile/06242913572752671774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17552332.post-3720617195731357421</id><published>2008-08-12T17:13:00.005+02:00</published><updated>2008-08-12T17:21:10.191+02:00</updated><title type='text'>Kate: Fast backtrace navigation</title><content type='html'>I've added a new plugin to kdesdk/kate/plugin: a backtrace browser. It's meant for developers and probably of no use for users. What does it do? It shows a backtrace delivered by gdb in a listview in a Kate toolview. Clicking on an item opens the selected file and jumps to the correct line number. It works for backtraces generated on your own machine, but it will also work for backtraces from other people, i.e. with /home/dummy/qt-copy/.../qwidget.cpp will still be found on other machines. For that to work, you have to index the directories where the source code is located.&lt;br /&gt;Sometimes there are several files with the same name, e.g.&lt;ul&gt;&lt;li&gt;trunk/kdegraphics/okular/generators/dvi/config.h&lt;/li&gt;&lt;li&gt;trunk/kdepim/mimelib/mimelib/config.h&lt;/li&gt;&lt;/ul&gt;To pick the right choice, the plugin picks the last two parts of the url, in this case this would be&lt;br /&gt;&lt;ul&gt;&lt;li&gt;dvi/config.h&lt;/li&gt;&lt;li&gt;mimelib/config.h&lt;/li&gt;&lt;/ul&gt;and then usually finds the correct one. Indexing trunk/KDE and branches/KDE/4.1 of course will lead to a clash, now way to fix it. Maybe I could present a list of valid files to the user and let the user pick the right one. I don't think that's necessary though for now.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;How to configure&lt;/span&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Enable the plugin: go to Settings &gt; Configure Kate &gt; Application Plugins and enable 'Kate Backtrace Browser'&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_JcjnuQSFzjw/SKGpTC4siKI/AAAAAAAAABU/RSgBUgutmPU/s1600-h/btbrowser-enable.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://4.bp.blogspot.com/_JcjnuQSFzjw/SKGpTC4siKI/AAAAAAAAABU/RSgBUgutmPU/s400/btbrowser-enable.jpg" alt="" id="BLOGGER_PHOTO_ID_5233650386638506146" border="0" /&gt;&lt;/a&gt;&lt;/li&gt;&lt;li&gt;A config page appeared, so click on it and add the directories containing the source code&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_JcjnuQSFzjw/SKGpf0SzDyI/AAAAAAAAABc/LY7RWRi9Wd0/s1600-h/btbrowser-configure.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://2.bp.blogspot.com/_JcjnuQSFzjw/SKGpf0SzDyI/AAAAAAAAABc/LY7RWRi9Wd0/s400/btbrowser-configure.jpg" alt="" id="BLOGGER_PHOTO_ID_5233650606059753250" border="0" /&gt;&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Clicking OK will start indexing. It will take some time (the index of kdesupport + kdelibs + kdepimlibs + kdebase + kdesdk + playground/plasma + plasma-addons + kdevplatform + kdegraphics is about 6MB)&lt;/li&gt;&lt;/ol&gt;When indexing is finished, open the toolview "Backtrace Browser". Now you can load a backtrace from the clipboard (e.g. when you clicked "Copy to Clipboard" in Dr. Konqi) or from a file.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_JcjnuQSFzjw/SKGpsTLocuI/AAAAAAAAABk/dj-7kU8BV2E/s1600-h/btbrowser-usage.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://1.bp.blogspot.com/_JcjnuQSFzjw/SKGpsTLocuI/AAAAAAAAABk/dj-7kU8BV2E/s400/btbrowser-usage.jpg" alt="" id="BLOGGER_PHOTO_ID_5233650820509627106" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Hope it's useful :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17552332-3720617195731357421?l=dhaumann.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dhaumann.blogspot.com/feeds/3720617195731357421/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17552332&amp;postID=3720617195731357421' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/3720617195731357421'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/3720617195731357421'/><link rel='alternate' type='text/html' href='http://dhaumann.blogspot.com/2008/08/kate-fast-backtrace-navigation.html' title='Kate: Fast backtrace navigation'/><author><name>dhaumann</name><uri>http://www.blogger.com/profile/06242913572752671774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_JcjnuQSFzjw/SKGpTC4siKI/AAAAAAAAABU/RSgBUgutmPU/s72-c/btbrowser-enable.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17552332.post-268492857626725639</id><published>2008-07-06T20:26:00.005+02:00</published><updated>2008-07-06T21:12:57.910+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='c++ template specialization'/><title type='text'>C++ Template magic</title><content type='html'>Now that Johan talked about why the &lt;a href="http://www.thelins.se/johan/2008/07/stl-rocks.html"&gt;STL simply rocks&lt;/a&gt; I have to add a quick note about C++ templates in general, to be precise about template specialization. I've recently written a ring buffer template, something like&lt;br /&gt;&lt;pre&gt;&lt;span style="font-family:courier new;"&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;template &amp;lt;class T, int TSize&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;class RingBuffer&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;public:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;  RingBuffer();&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;  // ...&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;  void append(int count, T* first);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;private:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;  std::vector&amp;lt;T&amp;gt; buffer;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;  int start;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;  int end;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;};&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;template &amp;lt;class T, int TSize&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;RingBuffer&amp;lt;T,TSize&amp;gt;::RingBuffer()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;  buffer.resize(TSize);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;  start = 0;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;  end = 0;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;template &amp;lt;class T, int TSize&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;void RingBuffer&amp;lt;T,TSize&amp;gt;::append(int count, T* first)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;  // code omitted: make sure count elements fit, otherwise return&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;  // now there are two cases: either count elements fit completely,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;  // or we have to wrap around at the end of the ring buffer.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;  // the case of a wrap around is ignored here, too&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;  copyHelper(&amp;amp;buffer[start], first, count);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;}&lt;/span&gt;&lt;/pre&gt;Now the function copyHelper looks like this:&lt;br /&gt;&lt;pre&gt;&lt;span style="font-family:courier new;"&gt;template &amp;lt;class T, int TSize&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;static inline void copyHelper(T* dest, T* src, int count)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;  while (count--) {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    *dest++ = *src++;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;  }&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;}&lt;/span&gt;&lt;/pre&gt;copyHelper simply assigns count elements with the operator=(), as T can also be a class. But in the case of T being e.g. a simple char this code part performs really bad. However, there is a solution: Template specialization. That means, we add another function copyHelper() and the compiler then is clever enough to pick the correct one:&lt;br /&gt;&lt;pre&gt;&lt;span style="font-family:courier new;"&gt;template &amp;lt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;static inline void copyHelper&amp;lt;char&amp;gt;(char* dest, char* src, int count)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;  memcpy(dest, src, count);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;}&lt;/span&gt;&lt;/pre&gt;Now the code is really fast in the case of char. In other words, with template specialization we can heavily tune template code in a lot of cases. And ideally, STL implementations do exactly this, don't they? Does Qt use template specialization for its template classes?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17552332-268492857626725639?l=dhaumann.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dhaumann.blogspot.com/feeds/268492857626725639/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17552332&amp;postID=268492857626725639' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/268492857626725639'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/268492857626725639'/><link rel='alternate' type='text/html' href='http://dhaumann.blogspot.com/2008/07/c-template-magic.html' title='C++ Template magic'/><author><name>dhaumann</name><uri>http://www.blogger.com/profile/06242913572752671774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17552332.post-293546077526864548</id><published>2008-05-31T09:48:00.003+02:00</published><updated>2008-12-09T16:36:47.186+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='system monitor'/><category scheme='http://www.blogger.com/atom/ns#' term='plasma applet'/><category scheme='http://www.blogger.com/atom/ns#' term='kde'/><title type='text'>"I miss the applet which shows system usage"</title><content type='html'>...is one of the comments on &lt;a href="http://pusling.com/blog/?p=72"&gt;Sune's blog&lt;/a&gt;. "I won’t call it a a must-have, but I’d love to have it back :D". Well, I call it a must have, that's why I've ported it to KDE4 a week ago:&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_JcjnuQSFzjw/SEEDaesc1JI/AAAAAAAAABM/A-YuYnaBK5Y/s1600-h/plasma-systemmonitor-graphicsview.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://1.bp.blogspot.com/_JcjnuQSFzjw/SEEDaesc1JI/AAAAAAAAABM/A-YuYnaBK5Y/s400/plasma-systemmonitor-graphicsview.png" alt="" id="BLOGGER_PHOTO_ID_5206446397667988626" border="0" /&gt;&lt;/a&gt;The code is not in svn yet (here is the &lt;a href="http://www.gmdsoft.de/haumann/kde/systemmonitor.tar.gz"&gt;code&lt;/a&gt; for now). I still had issues with correct resizing and believe there was also a bug in the plasma lib when I developed it which seems to be fixed now. I didn't have time for more testing, but finally this has to go in for KDE 4.2 :)&lt;br /&gt;Besides that, I'm not yet content with how the data engine publishs data. The situation is that all system monitor data is extracted in &lt;span style="font-style: italic;"&gt;one&lt;/span&gt; tick, but I still would like to publish it in &lt;span style="font-style: italic;"&gt;three&lt;/span&gt; categories: cpu, mem and swap. But if I do so, an applet's dataUpdated() function is called 3 times and that's not what I want. So for now I put the data into the category systemmonitor and named the items cpu-total, cpu-kernel, ..., swap-total, swap-used, mem-total, mem-kernel, mem-cached, ... However the other way of categorization would be better :) Any ideas?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17552332-293546077526864548?l=dhaumann.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dhaumann.blogspot.com/feeds/293546077526864548/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17552332&amp;postID=293546077526864548' title='10 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/293546077526864548'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/293546077526864548'/><link rel='alternate' type='text/html' href='http://dhaumann.blogspot.com/2008/05/i-miss-applet-which-shows-system-usage.html' title='&quot;I miss the applet which shows system usage&quot;'/><author><name>dhaumann</name><uri>http://www.blogger.com/profile/06242913572752671774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_JcjnuQSFzjw/SEEDaesc1JI/AAAAAAAAABM/A-YuYnaBK5Y/s72-c/plasma-systemmonitor-graphicsview.png' height='72' width='72'/><thr:total>10</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17552332.post-2667203597523355078</id><published>2008-04-22T11:05:00.002+02:00</published><updated>2008-04-22T11:07:25.984+02:00</updated><title type='text'>Offline for 3 months</title><content type='html'>I don't have internet the next 3 months. Maybe here and there at some point. That means I can not review the techbase changes. Also, I'll be rather silent wrt kate/kwrite.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17552332-2667203597523355078?l=dhaumann.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dhaumann.blogspot.com/feeds/2667203597523355078/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17552332&amp;postID=2667203597523355078' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/2667203597523355078'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/2667203597523355078'/><link rel='alternate' type='text/html' href='http://dhaumann.blogspot.com/2008/04/offline-for-3-months.html' title='Offline for 3 months'/><author><name>dhaumann</name><uri>http://www.blogger.com/profile/06242913572752671774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17552332.post-2981868650630424302</id><published>2008-04-16T11:39:00.004+02:00</published><updated>2008-12-09T16:36:47.335+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='kwrite'/><category scheme='http://www.blogger.com/atom/ns#' term='kde'/><title type='text'>Do you understand the word HTML?</title><content type='html'>During the &lt;a href="http://dot.kde.org/1208269318/"&gt;Kate developer meeting&lt;/a&gt; we also thought about simplifying KWrite and how to make the decision whether KWrite should be launched in full featured mode or in a stripped version. ...well, and we found a really funny idea:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_JcjnuQSFzjw/SAXLaO1HblI/AAAAAAAAABE/bKJ9-I4nb6k/s1600-h/P1020901.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://3.bp.blogspot.com/_JcjnuQSFzjw/SAXLaO1HblI/AAAAAAAAABE/bKJ9-I4nb6k/s400/P1020901.JPG" alt="" id="BLOGGER_PHOTO_ID_5189777797132283474" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Note, that this would even work, the question would be rather annoying, though :) The solution right now is to always start KWrite in a simple mode. Mostly only actions are hidden in the menus (@distributors: &lt;span style="font-family: courier new;"&gt;kdelibs/kate/data/katepartsimpleui.rc&lt;/span&gt;), but you can also change c++ code at Kate part level, as there are some functions:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;bool KateDocument::simpleMode() (kate part internal), and&lt;/li&gt;&lt;li&gt;bool KTextEditor::Editor::simpleMode() (along with setSimpleMode())&lt;/li&gt;&lt;/ul&gt;This way config dialogs can be adapted depending on the mode as well. Ah, and if you want the normal mode back, go into the KWrite settings and enable &lt;span style="font-family: courier new;"&gt;[x] Enable Developer Mode&lt;/span&gt;. Then restart KWrite.&lt;br /&gt;&lt;br /&gt;PS: Tackat, we came up with this image before our phone call. That's why it was really funny when you said HTML is something that should not be removed. hehe... :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17552332-2981868650630424302?l=dhaumann.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dhaumann.blogspot.com/feeds/2981868650630424302/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17552332&amp;postID=2981868650630424302' title='11 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/2981868650630424302'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/2981868650630424302'/><link rel='alternate' type='text/html' href='http://dhaumann.blogspot.com/2008/04/do-you-understand-word-html.html' title='Do you understand the word HTML?'/><author><name>dhaumann</name><uri>http://www.blogger.com/profile/06242913572752671774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_JcjnuQSFzjw/SAXLaO1HblI/AAAAAAAAABE/bKJ9-I4nb6k/s72-c/P1020901.JPG' height='72' width='72'/><thr:total>11</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17552332.post-1697193389895998953</id><published>2008-04-15T15:29:00.008+02:00</published><updated>2008-12-09T16:36:47.645+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='kate'/><category scheme='http://www.blogger.com/atom/ns#' term='coffee'/><category scheme='http://www.blogger.com/atom/ns#' term='kde'/><category scheme='http://www.blogger.com/atom/ns#' term='annotations'/><title type='text'>Kate Meeting: Day 1 and 2</title><content type='html'>&lt;a href="http://kate-editor.org/news/development-sprint-results"&gt;The Kate Developer Meeting&lt;/a&gt; was a productive weekend and once more shows how important the developer sprints are. The summary will be on the dot shortly. Work already started on several topics. As everyone want screenshots, here we go: The new annotation interface available now in KTextEditor can be use to e.g. show svn annotations directly in kate:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_JcjnuQSFzjw/SAS_Qe1HbjI/AAAAAAAAAA0/W6C00c79l6k/s1600-h/kate-annotations.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 333px; height: 271px;" src="http://3.bp.blogspot.com/_JcjnuQSFzjw/SAS_Qe1HbjI/AAAAAAAAAA0/W6C00c79l6k/s400/kate-annotations.png" alt="" id="BLOGGER_PHOTO_ID_5189482960512314930" border="0" /&gt;&lt;/a&gt;basysKom's coffee maching is simply the best: It can do everything, you just have to press the right key combos:&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_JcjnuQSFzjw/SATADO1HbkI/AAAAAAAAAA8/1_eFQ6eSaew/s1600-h/P1020906.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://2.bp.blogspot.com/_JcjnuQSFzjw/SATADO1HbkI/AAAAAAAAAA8/1_eFQ6eSaew/s400/P1020906.JPG" alt="" id="BLOGGER_PHOTO_ID_5189483832390676034" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17552332-1697193389895998953?l=dhaumann.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dhaumann.blogspot.com/feeds/1697193389895998953/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17552332&amp;postID=1697193389895998953' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/1697193389895998953'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/1697193389895998953'/><link rel='alternate' type='text/html' href='http://dhaumann.blogspot.com/2008/04/kate-meeting-day-1-and-2.html' title='Kate Meeting: Day 1 and 2'/><author><name>dhaumann</name><uri>http://www.blogger.com/profile/06242913572752671774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_JcjnuQSFzjw/SAS_Qe1HbjI/AAAAAAAAAA0/W6C00c79l6k/s72-c/kate-annotations.png' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17552332.post-4012253179367230766</id><published>2008-04-11T18:20:00.004+02:00</published><updated>2008-04-11T18:50:01.761+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='kate'/><category scheme='http://www.blogger.com/atom/ns#' term='developer meeting'/><category scheme='http://www.blogger.com/atom/ns#' term='kde'/><title type='text'>Kate Meeting: Day 0</title><content type='html'>Finally it all begins: Anders and Joseph arrived at basysKom and we've started to discuss some things we want to do for KDE 4.1. Later, we are going to meet with the rest of the attendees in a restaurant to get to know each other. The official start of the meeting is tomorrow morning. If you are interested in contributing to Kate, just join #kate on irc.kde.org. I'm looking forward to the next two days :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17552332-4012253179367230766?l=dhaumann.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dhaumann.blogspot.com/feeds/4012253179367230766/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17552332&amp;postID=4012253179367230766' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/4012253179367230766'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/4012253179367230766'/><link rel='alternate' type='text/html' href='http://dhaumann.blogspot.com/2008/04/kate-meeting-day-0.html' title='Kate Meeting: Day 0'/><author><name>dhaumann</name><uri>http://www.blogger.com/profile/06242913572752671774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17552332.post-4079912430251813627</id><published>2008-03-19T20:49:00.003+01:00</published><updated>2008-03-19T20:56:52.065+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='kde'/><category scheme='http://www.blogger.com/atom/ns#' term='compile'/><title type='text'>How to compile and run KDE4</title><content type='html'>...or rather how to setup a KDE4 development environment. There already is a howto on techbase, but I'm using my own scripts since years, and they work just fine. I've made them public in my user space on techbase: &lt;a href="http://techbase.kde.org/index.php?title=User:Dhaumann/Compiling_KDE4"&gt;User:Dhaumann/Compiling KDE4&lt;/a&gt;. The howto is very short but complete. It does not have any troubleshooting sections. This is intentional: If you have any errors, fix them and rerun the scripts. Happy compiling :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17552332-4079912430251813627?l=dhaumann.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dhaumann.blogspot.com/feeds/4079912430251813627/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17552332&amp;postID=4079912430251813627' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/4079912430251813627'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/4079912430251813627'/><link rel='alternate' type='text/html' href='http://dhaumann.blogspot.com/2008/03/how-to-compile-and-run-kde4.html' title='How to compile and run KDE4'/><author><name>dhaumann</name><uri>http://www.blogger.com/profile/06242913572752671774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17552332.post-6062032253797977797</id><published>2008-01-30T23:26:00.000+01:00</published><updated>2008-01-30T23:39:31.156+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='techbase'/><category scheme='http://www.blogger.com/atom/ns#' term='features'/><category scheme='http://www.blogger.com/atom/ns#' term='kde'/><title type='text'>Feature Plan on TechBase</title><content type='html'>The &lt;span style="font-weight: bold;"&gt;Planned Features&lt;/span&gt; list is up and running again. &lt;a href="http://techbase.kde.org/index.php?title=Schedules/KDE4/4.1_Feature_Plan"&gt;It just needs to be filled&lt;/a&gt;. If you are a KDE developer you should consider to add your planned features to the list :) There are three templates you can use:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;{{FeatureDone|project|description|email-address|first-name name}}&lt;/li&gt;&lt;li&gt;{{FeatureInProgress|project|description|email-address|first-name name}}&lt;/li&gt;&lt;li&gt;{{FeatureTodo|project|description|email-address|first-name name}}&lt;/li&gt;&lt;/ul&gt;Another todo-item now is to merge the old feature lists into techbase.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17552332-6062032253797977797?l=dhaumann.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dhaumann.blogspot.com/feeds/6062032253797977797/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17552332&amp;postID=6062032253797977797' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/6062032253797977797'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/6062032253797977797'/><link rel='alternate' type='text/html' href='http://dhaumann.blogspot.com/2008/01/feature-plan-on-techbase.html' title='Feature Plan on TechBase'/><author><name>dhaumann</name><uri>http://www.blogger.com/profile/06242913572752671774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17552332.post-5796423577076254980</id><published>2008-01-28T23:02:00.000+01:00</published><updated>2008-01-28T23:22:50.842+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='techbase'/><title type='text'>Growing articles on TechBase</title><content type='html'>Right now TechBase has content in &lt;a href="http://techbase.kde.org/index.php?title=Help:Wiki_Translation"&gt;19 languages&lt;/a&gt;. Sometimes articles grow bigger over time. &lt;a href="http://techbase.kde.org/index.php?title=Getting_Started/Build/KDE4"&gt;How to build KDE4&lt;/a&gt; is the prefect example. Here is a list of pages about building KDE4 (not counting translations):&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Getting Started/Build/KDE4 &lt;/li&gt;&lt;li&gt;Getting Started/Build/KDE4/Arch Linux&lt;/li&gt;&lt;li&gt;Getting Started/Build/KDE4/Ark Linux&lt;/li&gt;&lt;li&gt;Getting Started/Build/KDE4/Cygwin&lt;/li&gt;&lt;li&gt;Getting Started/Build/KDE4/Fedora&lt;/li&gt;&lt;li&gt;Getting Started/Build/KDE4/FreeBSD &lt;/li&gt;&lt;li&gt;Getting Started/Build/KDE4/Gentoo &lt;/li&gt;&lt;li&gt;Getting Started/Build/KDE4/Kubuntu and Debian&lt;/li&gt;&lt;li&gt;Getting Started/Build/KDE4/Mac OS X &lt;/li&gt;&lt;li&gt;Getting Started/Build/KDE4/Mac OS X 10.5 issues&lt;/li&gt;&lt;li&gt;Getting Started/Build/KDE4/Mandriva &lt;/li&gt;&lt;li&gt;Getting Started/Build/KDE4/Prerequisites&lt;/li&gt;&lt;li&gt;Getting Started/Build/KDE4/Troubleshooting &lt;/li&gt;&lt;li&gt;Getting Started/Build/KDE4/Windows &lt;/li&gt;&lt;li&gt;Getting Started/Build/KDE4/Windows/3rd-party libraries&lt;/li&gt;&lt;li&gt;Getting Started/Build/KDE4/Windows/Building DBus &lt;/li&gt;&lt;li&gt;Getting Started/Build/KDE4/Windows/Building KDESupport Libraries &lt;/li&gt;&lt;li&gt;Getting Started/Build/KDE4/Windows/Building Qt 4&lt;/li&gt;&lt;li&gt;Getting Started/Build/KDE4/Windows/Environment &lt;/li&gt;&lt;li&gt;Getting Started/Build/KDE4/Windows/GCC And MinGW &lt;/li&gt;&lt;li&gt;Getting Started/Build/KDE4/Windows/Littlecms.patch&lt;/li&gt;&lt;li&gt;Getting Started/Build/KDE4/Windows/MS Visual Studio &lt;/li&gt;&lt;li&gt;Getting Started/Build/KDE4/Windows/MinGW Build Tips &lt;/li&gt;&lt;li&gt;Getting Started/Build/KDE4/Windows/Windows Vista&lt;/li&gt;&lt;li&gt;Getting Started/Build/KDE4/Windows/additional libraries &lt;/li&gt;&lt;li&gt;Getting Started/Build/KDE4/Windows/emerge &lt;/li&gt;&lt;li&gt;Getting Started/Build/KDE4/kdesvn-build&lt;/li&gt;&lt;li&gt;Getting Started/Build/KDE4/openSUSE &lt;/li&gt;&lt;li&gt;Getting Started/Build/KDE4 Alpha 1&lt;/li&gt;&lt;li&gt;Getting Started/Build/KDE4 Alpha 2&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-weight: bold;"&gt;That makes 30 pages.&lt;/span&gt; Some thoughts about this. Splitting up articles makes translation more difficult. There are more pages that have to be synced. It can be unclear where to find the information you are looking for. It's messy. What about&lt;br /&gt;&lt;ul&gt;&lt;li&gt;1 page »Distribution Specials«, instead of 11 separated pages?&lt;/li&gt;&lt;li&gt;a cleanup instead of a split, if the page grows more and more?&lt;/li&gt;&lt;li&gt;talk pages sometimes fit better?&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;Agreed, if pages really get long, a meaningful split makes sense. But sometimes it does not!? Thoughts? :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17552332-5796423577076254980?l=dhaumann.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dhaumann.blogspot.com/feeds/5796423577076254980/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17552332&amp;postID=5796423577076254980' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/5796423577076254980'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/5796423577076254980'/><link rel='alternate' type='text/html' href='http://dhaumann.blogspot.com/2008/01/growing-articles-on-techbase.html' title='Growing articles on TechBase'/><author><name>dhaumann</name><uri>http://www.blogger.com/profile/06242913572752671774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17552332.post-7234626114084393585</id><published>2008-01-27T21:57:00.000+01:00</published><updated>2008-01-27T22:03:50.279+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='techbase'/><title type='text'>TechBase: Contributing...</title><content type='html'>How you can help to make maintaining TechBase easier:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;login before you edit pages. Reviewing an edit of a logged in user is often as easy as "ah, user X, his content is ok anyway, next one..."&lt;/li&gt;&lt;li&gt;do not use the "I-form". Who is 'I'? Noone knows. Especially not years later. Using 'I' in talk pages is perfectly fine. But please avoid it in articles :)&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17552332-7234626114084393585?l=dhaumann.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dhaumann.blogspot.com/feeds/7234626114084393585/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17552332&amp;postID=7234626114084393585' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/7234626114084393585'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/7234626114084393585'/><link rel='alternate' type='text/html' href='http://dhaumann.blogspot.com/2008/01/techbase-contributing.html' title='TechBase: Contributing...'/><author><name>dhaumann</name><uri>http://www.blogger.com/profile/06242913572752671774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17552332.post-4974912974643759147</id><published>2008-01-07T21:27:00.000+01:00</published><updated>2008-01-07T21:35:48.328+01:00</updated><title type='text'>Reviewing TechBase Changes</title><content type='html'>KDE's &lt;a href="http://techbase.kde.org"&gt;techbase&lt;/a&gt; wiki is pretty much alive and I'm especially surprised that the &lt;a href="http://techbase.kde.org/Help:Wiki_Translation"&gt;translation system&lt;/a&gt; works really well. Of course there is some maintenance work to do and I'm reviewing every change so far.&lt;br /&gt;I was away from Dec. 27th until 4th of January. Unfortunately, the "recent changes" feature  allows me to see only the changes from 1st January till today. &lt;span style="font-weight: bold;"&gt;So if you have the &lt;a href="http://techbase.kde.org/index.php?title=Special:Recentchanges&amp;amp;feed=rss"&gt;RSS&lt;/a&gt;/&lt;a href="http://techbase.kde.org/index.php?title=Special:Recentchanges&amp;amp;feed=atom"&gt;Atom&lt;/a&gt; feed please review the changes from 27th until 31th of December and fix spam/typos/whatever you think needs to be fixed! :)&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17552332-4974912974643759147?l=dhaumann.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dhaumann.blogspot.com/feeds/4974912974643759147/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17552332&amp;postID=4974912974643759147' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/4974912974643759147'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/4974912974643759147'/><link rel='alternate' type='text/html' href='http://dhaumann.blogspot.com/2008/01/reviewing-techbase-changes.html' title='Reviewing TechBase Changes'/><author><name>dhaumann</name><uri>http://www.blogger.com/profile/06242913572752671774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17552332.post-6759184063227342252</id><published>2007-12-21T13:03:00.000+01:00</published><updated>2007-12-21T13:16:03.722+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='concepts'/><title type='text'>Encapsulation is not Information Hiding</title><content type='html'>As food for thought and in reply to &lt;a href="http://www.kdedevelopers.org/node/3163"&gt;Why Encapsulation is a Good Thing&lt;/a&gt; it's interesting to take a closer look. What does encapsulation mean exactly, and what can you do with it? Maybe what you really want is Information Hiding? ...and encapsulation is just a way of possibly achieving it? If you are interested in the details/differences, read the article &lt;a href="http://www.javaworld.com/javaworld/jw-05-2001/jw-0518-encapsulation.html"&gt;Encapsulation is not Information Hiding&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17552332-6759184063227342252?l=dhaumann.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dhaumann.blogspot.com/feeds/6759184063227342252/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17552332&amp;postID=6759184063227342252' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/6759184063227342252'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/6759184063227342252'/><link rel='alternate' type='text/html' href='http://dhaumann.blogspot.com/2007/12/encapsulation-is-not-information-hiding.html' title='Encapsulation is not Information Hiding'/><author><name>dhaumann</name><uri>http://www.blogger.com/profile/06242913572752671774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17552332.post-871537887971667735</id><published>2007-12-21T12:41:00.000+01:00</published><updated>2007-12-21T12:58:14.621+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='techbase'/><category scheme='http://www.blogger.com/atom/ns#' term='kde'/><title type='text'>To all TechBase Contributors</title><content type='html'>I've just added a new page which lists the KDE TechBase contributors. The idea is to have contact data for quick questions as well as build teams for different maintenance tasks. If you are active in the techbase wiki, please &lt;a href="http://techbase.kde.org/KDE_TechBase:Contributors"&gt;add yourself to the list&lt;/a&gt; - be it as a reviewer reading the &lt;a href="http://techbase.kde.org/Special:Recentchanges"&gt;RSS feed&lt;/a&gt;, translator or article writer...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17552332-871537887971667735?l=dhaumann.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dhaumann.blogspot.com/feeds/871537887971667735/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17552332&amp;postID=871537887971667735' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/871537887971667735'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/871537887971667735'/><link rel='alternate' type='text/html' href='http://dhaumann.blogspot.com/2007/12/to-all-techbase-contributors.html' title='To all TechBase Contributors'/><author><name>dhaumann</name><uri>http://www.blogger.com/profile/06242913572752671774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17552332.post-3268157761361733219</id><published>2007-11-22T11:55:00.000+01:00</published><updated>2007-11-22T12:09:25.202+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='memory leak'/><category scheme='http://www.blogger.com/atom/ns#' term='kde'/><title type='text'>Memory Leak Continued</title><content type='html'>There was some confusion with regard to &lt;a href="http://dhaumann.blogspot.com/2007/11/memory-leak-ui-files-and-direct.html"&gt;my last blog&lt;/a&gt; about leaking memory. Suppose the ui_mywidget.h files looks like this:&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;class Ui_Widget&lt;br /&gt;{&lt;br /&gt;public:&lt;br /&gt;   QGridLayout *gridLayout;&lt;br /&gt;   QGroupBox *groupBox;&lt;br /&gt;   QGridLayout *gridLayout1;&lt;br /&gt;   QListWidget *listWidget;&lt;br /&gt;   QSpacerItem *spacerItem;&lt;br /&gt;   QPushButton *pushButton;&lt;br /&gt;&lt;br /&gt;   void setupUi(QWidget *Widget);&lt;br /&gt;   void retranslateUi(QWidget *Widget);&lt;br /&gt;};&lt;/pre&gt;&lt;/blockquote&gt;Of course, those 6 QObject derived classes are deleted. But the sizeof(Ui_Widget) = 6 * sizeof(void*) = 24 bytes are not deleted. As Ui_Widget is not QObject derived those 24 bytes leak. Confirmed by &lt;a href="http://techbase.kde.org/Development/Tools/Valgrind"&gt;valgrind&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;In a comment to my last blog Paolo suggested to use auto_ptr or &lt;a href="http://www.boost.org/libs/smart_ptr/scoped_ptr.htm"&gt;scoped_ptr&lt;/a&gt;, which is more elegant than an extra wrapper class :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17552332-3268157761361733219?l=dhaumann.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dhaumann.blogspot.com/feeds/3268157761361733219/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17552332&amp;postID=3268157761361733219' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/3268157761361733219'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/3268157761361733219'/><link rel='alternate' type='text/html' href='http://dhaumann.blogspot.com/2007/11/memory-leak-continued.html' title='Memory Leak Continued'/><author><name>dhaumann</name><uri>http://www.blogger.com/profile/06242913572752671774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17552332.post-4533577671175459338</id><published>2007-11-21T22:38:00.000+01:00</published><updated>2007-11-22T20:34:10.188+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='kde'/><category scheme='http://www.blogger.com/atom/ns#' term='qt designer'/><title type='text'>Memory leak: Ui files and direct approach</title><content type='html'>The KDE codebase often uses a forward declaration in the .h-file to speedup compilation. The code often looks like this:&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;// header file&lt;br /&gt;namespace Ui { class MyWidget; }&lt;br /&gt;class MyDialog : public KDialog {&lt;br /&gt;// ...&lt;br /&gt;private:&lt;br /&gt;Ui::MyWidget *ui;&lt;br /&gt;};&lt;/pre&gt;&lt;/blockquote&gt;The impl looks like this:&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;// source file&lt;br /&gt;#include "mydialog.h"&lt;br /&gt;#include "ui_mywidget.h"&lt;br /&gt;MyDialog::MyDialog() : KDialog()&lt;br /&gt;{&lt;br /&gt;QWidget *w = new QWidget(this);&lt;br /&gt;setMainWidget(w);&lt;br /&gt;ui = new Ui::MyWidget(); // allocation&lt;br /&gt;ui-&gt;setupUi(w);&lt;br /&gt;// ui-&gt;...&lt;br /&gt;}&lt;/pre&gt;&lt;/blockquote&gt;See the memory leak? &lt;span style="font-weight: bold;"&gt;You have to call »delete ui;« in the destructor&lt;/span&gt; if you use the »direct approach«. &lt;a href="http://lxr.kde.org/ident?i=Ui"&gt;Searching in lxr.kde.org&lt;/a&gt; shows &lt;span style="font-style: italic;"&gt;lots&lt;/span&gt; of results, and in some places this delete is missing indeed. Happy fixing :)&lt;br /&gt;&lt;br /&gt;&lt;hr /&gt;&lt;span style="font-weight: bold;"&gt;Update:&lt;/span&gt; The really correct fix is to guard the pointer with an auto_ptr or scoped_ptr. For further details &lt;a href="http://dhaumann.blogspot.com/2007/11/memory-leak-ui-files-and-direct.html#c3247518843345483865"&gt;read the&lt;/a&gt; &lt;a href="http://dhaumann.blogspot.com/2007/11/memory-leak-ui-files-and-direct.html#c6385817874350497424"&gt;comments below&lt;/a&gt;. Or use &lt;a href="http://doc.trolltech.com/4.3/designer-using-a-component.html"&gt;another approach to include your ui-file&lt;/a&gt;.&lt;br /&gt;&lt;hr /&gt;&lt;br /&gt;If you do not want to delete it manually, you can for instance use a workaround like this:&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;// header file&lt;br /&gt;&lt;s&gt;namespace Ui { class MyWidget; }&lt;/s&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;class MyWidget;&lt;/span&gt;&lt;br /&gt;class MyDialog : public KDialog {&lt;br /&gt;// ...&lt;br /&gt;private:&lt;br /&gt;&lt;s&gt;Ui::&lt;/s&gt;MyWidget *ui;&lt;br /&gt;};&lt;/pre&gt;&lt;/blockquote&gt;Source file:&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;// source file&lt;br /&gt;#include "mydialog.h"&lt;br /&gt;#include "ui_mywidget.h"&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;class MyWidget : public QWidget, public Ui::MyWidget {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;public:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;    MyWidget( QWidget * parent = 0 ) : QWidget( parent )&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;    { setupUi(this); }&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;};&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;MyDialog::MyDialog() : KDialog()&lt;br /&gt;{&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;ui = new MyWidget(this);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;setMainWidget(ui);&lt;/span&gt;&lt;br /&gt;&lt;s&gt;QWidget *w = new QWidget(this);&lt;/s&gt;&lt;br /&gt;&lt;s&gt;setMainWidget(w);&lt;/s&gt;&lt;br /&gt;&lt;s&gt;ui = new Ui::MyDialog(); // allocation&lt;/s&gt;&lt;br /&gt;&lt;s&gt;ui-&gt;setupUi(w);&lt;/s&gt;&lt;br /&gt;// ui-&gt;...&lt;br /&gt;}&lt;/pre&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17552332-4533577671175459338?l=dhaumann.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dhaumann.blogspot.com/feeds/4533577671175459338/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17552332&amp;postID=4533577671175459338' title='17 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/4533577671175459338'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/4533577671175459338'/><link rel='alternate' type='text/html' href='http://dhaumann.blogspot.com/2007/11/memory-leak-ui-files-and-direct.html' title='Memory leak: Ui files and direct approach'/><author><name>dhaumann</name><uri>http://www.blogger.com/profile/06242913572752671774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>17</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17552332.post-4298010922213337716</id><published>2007-10-22T11:44:00.000+02:00</published><updated>2007-10-22T12:05:00.980+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='rant'/><title type='text'>Once in a while...</title><content type='html'>...I simply don't get it.&lt;br /&gt;Recently there was &lt;a href="http://www.linux.com/feature/62165"&gt;this&lt;/a&gt; article on linux.com about [...]. Well, did you know that Konqueror can do all this, too, and much more? Launch Konqueror, split the view and you can transfer data right away with EVERY protocol KDE supports. ftp, fish, webdav and a &lt;span style="font-weight: bold;"&gt;lot other protocols&lt;/span&gt;. No need for an extra ftp client... In short, &lt;span style="font-weight: bold;"&gt;Konqueror is the &lt;/span&gt;&lt;a style="font-weight: bold;" href="http://lindesk.com/2007/05/using-konqueror-as-an-ftp-client/"&gt;best&lt;/a&gt; - and you can even use it on the Linux desktop.&lt;br /&gt;...now I stumbled over &lt;a href="http://www.linux.com/feature/119603"&gt;this&lt;/a&gt; article on linux.com about [...]. In Konqueror you can &lt;a href="http://techbase.kde.org/Development/Tutorials/Creating_Konqueror_Service_Menus"&gt;do this for ages&lt;/a&gt;, too, the concept is called &lt;span style="font-style: italic;"&gt;service menus&lt;/span&gt;. And it is very mighty and at the same time very simple to extend. And - if you have a look - there are &lt;a href="http://kde-apps.org/index.php?xcontentmode=287"&gt;thousands&lt;/a&gt; of context menus available, of course with the slight difference that contributors at &lt;a href="http://www.kde-apps.org/"&gt;kde-apps.org&lt;/a&gt; don't get 100$ for their work ;)&lt;br /&gt;I wonder why such articles make it to linux.com at all. This is a drop of quality, imo. This is not about KDE vs. Gnome. It's about that articles should be objective and consider several alternatives. The first solution you read about isn't always the Holy Grail. Sorry for the rant.&lt;br /&gt;&lt;br /&gt;PS: Maybe ed is the best text editor, I still prefer &lt;a href="http://www.kate-editor.org"&gt;Kate&lt;/a&gt;, though. *blah* :-)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17552332-4298010922213337716?l=dhaumann.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dhaumann.blogspot.com/feeds/4298010922213337716/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17552332&amp;postID=4298010922213337716' title='8 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/4298010922213337716'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/4298010922213337716'/><link rel='alternate' type='text/html' href='http://dhaumann.blogspot.com/2007/10/once-in-while.html' title='Once in a while...'/><author><name>dhaumann</name><uri>http://www.blogger.com/profile/06242913572752671774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>8</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17552332.post-7086886118512634542</id><published>2007-09-12T21:23:00.000+02:00</published><updated>2007-09-13T02:24:20.278+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='highlighting'/><category scheme='http://www.blogger.com/atom/ns#' term='kate'/><title type='text'>Kate Highlighting Power</title><content type='html'>Kate's highlighting capabilities are amazing. If you want you can highlight really complex syntax, without having to hardcode rules in C++. As an example, we'll take a look at how Lua comments can be realized:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-family:courier new;"&gt;--[=[&lt;/span&gt; starts a multiline comment (the '=' chars are optional)&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:courier new;"&gt;]=]&lt;/span&gt; ends the multiline comment&lt;/li&gt;&lt;li&gt;the number of '=' chars in &lt;span style="font-family:courier new;"&gt;]=]&lt;/span&gt; must match the number of &lt;span style="font-family:courier new;"&gt;--[=[&lt;/span&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;That means: When the highlighting processor matches the end of a multiline comment, it has to know how many '=' chars started the comment. Thanks to the concept of &lt;span style="font-style: italic;"&gt;dynamic rules and contexts&lt;/span&gt; Kate is able to do that. The highlighting file looks like this. First comes the header&lt;br /&gt;&lt;pre&gt;&lt;blockquote style="font-family: courier new;"&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;br /&gt;&amp;lt;!DOCTYPE language SYSTEM "language.dtd" &amp;gt;&lt;br /&gt;&amp;lt;language name="Test" version="1.0" kateversion="2.4" section="Markup" extensions="" mimetype=""&amp;gt;&lt;br /&gt;  &amp;lt;highlighting&amp;gt;&lt;/blockquote&gt;&lt;/pre&gt;Then the body with the contexts. We start in the first context called &lt;span style="font-style: italic;"&gt;"Normal Text"&lt;/span&gt;. When the regular expression &lt;span style="font-family:courier new;"&gt;--[(=*)[&lt;/span&gt; matches it switches to the context Comment.&lt;br /&gt;&lt;pre&gt;&lt;blockquote style="font-family: courier new;"&gt;    &amp;lt;contexts&amp;gt;&lt;br /&gt;      &amp;lt;context attribute="Normal Text" lineEndContext="#stay" name="Normal"&amp;gt;&lt;br /&gt;        &amp;lt;RegExpr attribute="Comment" context="Comment" String="--\[(=*)\[" dynamic="true"/&amp;gt;&lt;br /&gt;      &amp;lt;/context&amp;gt;&lt;/blockquote&gt;&lt;/pre&gt;The part &lt;span style="font-family:courier new;"&gt;(=*)&lt;/span&gt; is now available as %1 in the rule below:&lt;br /&gt;&lt;pre&gt;&lt;blockquote style="font-family: courier new;"&gt;      &amp;lt;context name="Comment" attribute="Comment" lineEndContext="#stay" dynamic="true" &amp;gt;&lt;br /&gt;        &amp;lt;RegExpr attribute="Comment" context="#pop" String="\]%1\]" dynamic="true" /&amp;gt;&lt;br /&gt;      &amp;lt;/context&amp;gt;&lt;br /&gt;    &amp;lt;/contexts&amp;gt;&lt;/blockquote&gt;&lt;/pre&gt;The last part is the footer:&lt;br /&gt;&lt;pre&gt;&lt;blockquote style="font-family: courier new;"&gt;    &amp;lt;itemDatas&amp;gt;&lt;br /&gt;      &amp;lt;itemData name="Normal Text" defStyleNum="dsNormal" /&amp;gt;&lt;br /&gt;      &amp;lt;itemData name="Comment"     defStyleNum="dsComment" /&amp;gt;&lt;br /&gt;    &amp;lt;/itemDatas&amp;gt;&lt;br /&gt;  &amp;lt;/highlighting&amp;gt;&lt;br /&gt;&amp;lt;/language&amp;gt;&lt;/blockquote&gt;&lt;/pre&gt;If you want to know more about Kate's highlighting, &lt;a href="http://kate-editor.org/article/writing_a_kate_highlighting_xml_file"&gt;have a look at the documentation&lt;/a&gt; :) There are also &lt;a href="http://bugs.kde.org/buglist.cgi?short_desc_type=allwordssubstr&amp;short_desc=&amp;long_desc_type=allwordssubstr&amp;long_desc=&amp;product=kate&amp;bug_status=UNCONFIRMED&amp;bug_status=NEW&amp;bug_status=ASSIGNED&amp;bug_status=REOPENED&amp;bug_status=VERIFIED&amp;bug_severity=critical&amp;bug_severity=grave&amp;bug_severity=major&amp;bug_severity=crash&amp;bug_severity=normal&amp;bug_severity=minor&amp;bugidtype=include&amp;bug_id=&amp;votes=&amp;emailtype1=substring&amp;email1=&amp;emailtype2=substring&amp;email2=&amp;changedin=&amp;chfieldfrom=&amp;chfieldto=Now&amp;chfieldvalue=&amp;newqueryname=&amp;order=bugs.bug_id"&gt;lots of bug reports&lt;/a&gt;, so if you want to contribute you can fix them!&lt;br /&gt;&lt;br /&gt;&lt;i&gt;PS: As I don't know much about Lua, comments might work differently. That does not really matter, as the example still shows what you can do :)&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17552332-7086886118512634542?l=dhaumann.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dhaumann.blogspot.com/feeds/7086886118512634542/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17552332&amp;postID=7086886118512634542' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/7086886118512634542'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/7086886118512634542'/><link rel='alternate' type='text/html' href='http://dhaumann.blogspot.com/2007/09/kates-highlighting-capabilities-are.html' title='Kate Highlighting Power'/><author><name>dhaumann</name><uri>http://www.blogger.com/profile/06242913572752671774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17552332.post-5281913159288531355</id><published>2007-08-29T11:23:00.000+02:00</published><updated>2007-08-29T11:29:21.442+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='features'/><category scheme='http://www.blogger.com/atom/ns#' term='kde'/><title type='text'>List of new KDE features</title><content type='html'>Hi, our &lt;a href="http://developer.kde.org/development-versions/kde-4.0-features.html"&gt;list of KDE features&lt;/a&gt; heavily lacks updates :)&lt;br /&gt;So everyone checkout&lt;br /&gt;&lt;blockquote&gt;trunk/www/sites/developer/development-versions&lt;/blockquote&gt;and update kde-features.xml :) At some point we'll enable the techbase extension so the list shows up there as well.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17552332-5281913159288531355?l=dhaumann.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dhaumann.blogspot.com/feeds/5281913159288531355/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17552332&amp;postID=5281913159288531355' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/5281913159288531355'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/5281913159288531355'/><link rel='alternate' type='text/html' href='http://dhaumann.blogspot.com/2007/08/list-of-new-kde-features.html' title='List of new KDE features'/><author><name>dhaumann</name><uri>http://www.blogger.com/profile/06242913572752671774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17552332.post-2276848273641521883</id><published>2007-08-12T10:49:00.001+02:00</published><updated>2007-08-12T12:33:05.543+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ot'/><title type='text'>OT: T-Online Software</title><content type='html'>I had to install the "T-Online Software 5" recently on a Win98 box. Starting the T-Online setup a message popped up:&lt;br /&gt;&lt;blockquote&gt;You need at least Internet Explorer 5.5. Setup terminated!&lt;/blockquote&gt;Sigh, I found a IE5.5 offline setup. Next try:&lt;br /&gt;&lt;blockquote&gt;You need at least a resolution of 800x600. Setup terminated!&lt;/blockquote&gt;I found the graphics card chip, installed the drivers and switched the resolution. Next try:&lt;br /&gt;&lt;blockquote&gt;The language version of the OS is not German. Setup terminated!&lt;/blockquote&gt;Now that is clearly how software should &lt;span style="font-style: italic;"&gt;not&lt;/span&gt; work. It seems to be impossible to install the T-Online software. I would install Linux, but it's quite a change for a ~90 years old user :(&lt;br /&gt;&lt;blockquote&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17552332-2276848273641521883?l=dhaumann.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dhaumann.blogspot.com/feeds/2276848273641521883/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17552332&amp;postID=2276848273641521883' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/2276848273641521883'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/2276848273641521883'/><link rel='alternate' type='text/html' href='http://dhaumann.blogspot.com/2007/08/ot-t-online-software.html' title='OT: T-Online Software'/><author><name>dhaumann</name><uri>http://www.blogger.com/profile/06242913572752671774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17552332.post-6223981448895614565</id><published>2007-07-21T13:29:00.000+02:00</published><updated>2007-07-21T13:52:57.635+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='kate'/><category scheme='http://www.blogger.com/atom/ns#' term='commandline'/><category scheme='http://www.blogger.com/atom/ns#' term='scripting'/><title type='text'>Extending Kate by Scripts</title><content type='html'>We &lt;a href="http://dhaumann.blogspot.com/2007/07/kate-scripting-indentation.html"&gt;have&lt;/a&gt; &lt;a href="http://dhaumann.blogspot.com/2007/07/kate-more-on-indentation-scripting.html"&gt;seen&lt;/a&gt; how scripting basically works for indentation. It's also possible to register commandline functions (The command line is bound to F7 by default, or invoke View &gt; Switch to Command Line). We will consider a small example again: sort the selected text.&lt;br /&gt;&lt;blockquote&gt;&lt;span style="font-family:courier new;"&gt;/*&amp;nbsp;kate-script&lt;br /&gt;&amp;nbsp;*&amp;nbsp;name:&amp;nbsp;unused&lt;br /&gt;&amp;nbsp;*&amp;nbsp;author:&amp;nbsp;foo&amp;nbsp;bar&lt;br /&gt;&amp;nbsp;*&amp;nbsp;license:&amp;nbsp;LGPL&lt;br /&gt;&amp;nbsp;*&amp;nbsp;version:&amp;nbsp;1&lt;br /&gt;&amp;nbsp;*&amp;nbsp;kate-version:&amp;nbsp;3.0&lt;br /&gt;&amp;nbsp;*&amp;nbsp;functions:&amp;nbsp;sorter&lt;br /&gt;&amp;nbsp;*/&lt;br /&gt;&lt;br /&gt;function&amp;nbsp;sorter&amp;nbsp;()&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if&amp;nbsp;(view.hasSelection())&amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;var&amp;nbsp;start&amp;nbsp;=&amp;nbsp;view.startOfSelection().line;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;var&amp;nbsp;end&amp;nbsp;=&amp;nbsp;view.endOfSelection().line;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;var&amp;nbsp;text&amp;nbsp;=&amp;nbsp;document.textRange(start,&amp;nbsp;0,&amp;nbsp;end,&amp;nbsp;document.lineLength(end));&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;var&amp;nbsp;lines&amp;nbsp;=&amp;nbsp;text.split("\n");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;lines.sort();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;text&amp;nbsp;=&amp;nbsp;lines.join("\n");&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;view.clearSelection();&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;document.editBegin();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;document.removeText(start,&amp;nbsp;0,&amp;nbsp;end,&amp;nbsp;document.lineLength(end));&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;document.insertText(start,&amp;nbsp;0,&amp;nbsp;text);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;document.editEnd();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;}&lt;/span&gt;&lt;/blockquote&gt;The header line &lt;span style="font-weight: bold;"&gt;functions: sorter&lt;/span&gt; makes Kate Part aware of the function in the script. A list of functions is supported, separated by white spaces. You can use the function by typing 'sorter' in the commandline.&lt;br /&gt;Some todo items:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;provide better JavaScript API. For example: document.textRange() takes 4 parameters. It would be more elegant to take one range or two cursors, just like we do in the KTextEditor interfaces in kdelibs/interfaces/ktexteditor&lt;br /&gt;&lt;/li&gt;&lt;li&gt;make is possible to bind scripts to shortcuts. This could be done by e.g. binding commandline functions to shortcuts or implementing a vim-like command-mode in Kate's commandline. How to configure the shortcuts is unclear, though.&lt;/li&gt;&lt;li&gt;then, think about replacing the C++ implementations of 'uppercase', 'lowercase', 'capitalize' etc. with scripts&lt;/li&gt;&lt;li&gt;things I forgot...&lt;/li&gt;&lt;/ul&gt;If you are interested subscribe to kwrite-devel@kde.org and contribute :) We also need indentation scripts, of course!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17552332-6223981448895614565?l=dhaumann.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dhaumann.blogspot.com/feeds/6223981448895614565/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17552332&amp;postID=6223981448895614565' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/6223981448895614565'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/6223981448895614565'/><link rel='alternate' type='text/html' href='http://dhaumann.blogspot.com/2007/07/extending-kate-by-scripts.html' title='Extending Kate by Scripts'/><author><name>dhaumann</name><uri>http://www.blogger.com/profile/06242913572752671774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17552332.post-8663844284191508014</id><published>2007-07-20T19:18:00.001+02:00</published><updated>2007-07-20T19:19:08.735+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='kate'/><category scheme='http://www.blogger.com/atom/ns#' term='indentation'/><category scheme='http://www.blogger.com/atom/ns#' term='scripting'/><title type='text'>Kate: More on Indentation Scripting</title><content type='html'>&lt;a href="http://dhaumann.blogspot.com/2007/07/kate-scripting-indentation.html"&gt;My last blog&lt;/a&gt; was about the theory of how indentation works by using javascripts. Now we will look at a concrete example: a LISP-style indenter. (LISP indentation is easy, that's why it's a good example).&lt;br /&gt;The rules:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;comments starting with ;;; always have indentation 0&lt;/li&gt;&lt;li&gt;comments starting with ;; should be aligned with the next line&lt;/li&gt;&lt;li&gt;comments starting with ; should only appear behind code, so they are simply ignored&lt;/li&gt;&lt;li&gt;every '(' indents and every ')' unindents&lt;/li&gt;&lt;/ul&gt;lisp.js looks like this:&lt;br /&gt;&lt;blockquote&gt;&lt;span style="font-family:courier new;"&gt;/**&amp;nbsp;kate-script&lt;br /&gt;&amp;nbsp;*&amp;nbsp;name:&amp;nbsp;LISP&lt;br /&gt;&amp;nbsp;*&amp;nbsp;license:&amp;nbsp;LGPL&lt;br /&gt;&amp;nbsp;*&amp;nbsp;author:&amp;nbsp;foo&amp;nbsp;bar&lt;br /&gt;&amp;nbsp;*&amp;nbsp;version:&amp;nbsp;1&lt;br /&gt;&amp;nbsp;*&amp;nbsp;kate-version:&amp;nbsp;3.0&lt;br /&gt;&amp;nbsp;*&amp;nbsp;type:&amp;nbsp;indentation&lt;br /&gt;&amp;nbsp;*/&lt;br /&gt;//&amp;nbsp;indent&amp;nbsp;should&amp;nbsp;be&amp;nbsp;called&amp;nbsp;when&amp;nbsp;;&amp;nbsp;is&amp;nbsp;pressed&lt;br /&gt;triggerCharacters&amp;nbsp;=&amp;nbsp;";";&lt;br /&gt;function&amp;nbsp;indent(line,&amp;nbsp;indentWidth,&amp;nbsp;ch)&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//&amp;nbsp;special&amp;nbsp;rules:&amp;nbsp;;;;&amp;nbsp;-&gt;&amp;nbsp;indent&amp;nbsp;0&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;;;&amp;nbsp;&amp;nbsp;-&gt;&amp;nbsp;align&amp;nbsp;with&amp;nbsp;next&amp;nbsp;line,&amp;nbsp;if&amp;nbsp;possible&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;;&amp;nbsp;&amp;nbsp;&amp;nbsp;-&gt;&amp;nbsp;usually&amp;nbsp;on&amp;nbsp;the&amp;nbsp;same&amp;nbsp;line&amp;nbsp;as&amp;nbsp;code&amp;nbsp;-&gt;&amp;nbsp;ignore&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;textLine&amp;nbsp;=&amp;nbsp;document.line(line);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if&amp;nbsp;(textLine.search(/^\s*;;;/)&amp;nbsp;!=&amp;nbsp;-1)&amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return&amp;nbsp;0;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;else&amp;nbsp;if&amp;nbsp;(textLine.search(/^\s*;;/)&amp;nbsp;!=&amp;nbsp;-1)&amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//&amp;nbsp;try&amp;nbsp;to&amp;nbsp;align&amp;nbsp;with&amp;nbsp;the&amp;nbsp;next&amp;nbsp;line&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;nextLine&amp;nbsp;=&amp;nbsp;document.nextNonEmptyLine(line&amp;nbsp;+&amp;nbsp;1);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if&amp;nbsp;(nextLine&amp;nbsp;!=&amp;nbsp;-1)&amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return&amp;nbsp;document.firstVirtualColumn(nextLine);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;cursor&amp;nbsp;=&amp;nbsp;document.anchor(line,&amp;nbsp;0,&amp;nbsp;'(');&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if&amp;nbsp;(cursor)&amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return&amp;nbsp;document.toVirtualColumn(cursor.line,&amp;nbsp;cursor.column)&amp;nbsp;+&amp;nbsp;indentWidth;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;else&amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return 0;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;}&lt;/span&gt;&lt;br /&gt;&lt;/blockquote&gt;The result:&lt;br /&gt;&lt;blockquote&gt;&lt;span style="font-family: courier new;"&gt;;;;&amp;nbsp;fib&amp;nbsp;:&amp;nbsp;number&amp;nbsp;-&gt;&amp;nbsp;number&lt;br /&gt;(define&amp;nbsp;(fib&amp;nbsp;n)&lt;br /&gt;&amp;nbsp;&amp;nbsp;(if&amp;nbsp;(&amp;lt;&amp;nbsp;n&amp;nbsp;2)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;1&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;(+&amp;nbsp;(fib&amp;nbsp;(-&amp;nbsp;n&amp;nbsp;1))&amp;nbsp;(fib&amp;nbsp;(-&amp;nbsp;n&amp;nbsp;2)))))&lt;/span&gt;&lt;/blockquote&gt;As this indenter is scripted, everybody can adapt the style to the own needs.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17552332-8663844284191508014?l=dhaumann.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dhaumann.blogspot.com/feeds/8663844284191508014/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17552332&amp;postID=8663844284191508014' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/8663844284191508014'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/8663844284191508014'/><link rel='alternate' type='text/html' href='http://dhaumann.blogspot.com/2007/07/kate-more-on-indentation-scripting.html' title='Kate: More on Indentation Scripting'/><author><name>dhaumann</name><uri>http://www.blogger.com/profile/06242913572752671774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17552332.post-9028803239237923566</id><published>2007-07-18T13:17:00.000+02:00</published><updated>2007-07-19T01:12:13.190+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='kate'/><category scheme='http://www.blogger.com/atom/ns#' term='indentation'/><category scheme='http://www.blogger.com/atom/ns#' term='scripting'/><title type='text'>Kate Scripting: Indentation</title><content type='html'>Kate Part in KDE4 supports the ECMAScript (JavaScript) language by using &lt;a href="http://api.kde.org/4.0-api/kdelibs-apidocs/kjs/html/classes.html"&gt;kjs&lt;/a&gt;. In KDE3 we had several hard-coded indenters in C++, the idea is to let scripts do all the indentation in KDE4.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;How does it work?&lt;/span&gt; It is similar to vim: You simply create a script in the directory $KDEDIR/share/apps/katepart/jscript. An indentation script has to follow several rules:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;it must have a valid script header (the first line must include the string &lt;span style="font-weight: bold;"&gt;kate-script&lt;/span&gt; and indentation scripts must have the &lt;span style="font-weight: bold;"&gt;type: indentation&lt;/span&gt;)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;it must define some variables and functions&lt;/li&gt;&lt;/ol&gt;Whenever the user types a character, the flow in Kate Part works like this&lt;br /&gt;&lt;ol&gt;&lt;li&gt;check the indentation script's &lt;span style="font-weight: bold;"&gt;trigger characters&lt;/span&gt;, i.e. whether the script wants to indent code for the typed character&lt;/li&gt;&lt;li&gt;if yes, call the indentation function&lt;/li&gt;&lt;li&gt;the return value of the indentation function is an &lt;span style="font-weight: bold;"&gt;integer value representing the new indentation depth&lt;/span&gt; in spaces.&lt;/li&gt;&lt;/ol&gt;In the 3rd step there are 2 special cases for the return value:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;return value = -1:&lt;/span&gt; Kate keeps the indentation, that is it searches for the last non-empty line and uses its indentation for the current line&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;return value &lt; -1&lt;/span&gt; tells Kate to do nothing&lt;/li&gt;&lt;/ol&gt;&lt;span style="font-weight: bold;"&gt;So how does a script look like exactly?&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;The name does not really matter, so let's call it foobar.js:&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;blockquote&gt;&lt;/blockquote&gt;&lt;blockquote&gt;/* kate-script&lt;br /&gt;* name: MyLanguage Indenter&lt;br /&gt;* license: LGPL&lt;br /&gt;* author: Foo Bar &lt;foo@gmx.baz&gt;&lt;br /&gt;* version: 1&lt;br /&gt;* kate-version: 3.0&lt;br /&gt;* type: indentation&lt;br /&gt;*&lt;br /&gt;* &lt;optional&gt;optional bla bla here&lt;br /&gt;*/&lt;br /&gt;&lt;br /&gt;// specifies the characters which should trigger indent() beside the default '\n'&lt;br /&gt;triggerCharacters = "{}";&lt;br /&gt;&lt;br /&gt;// called for the triggerCharacters {} and &lt;enter return=""&gt;&lt;br /&gt;function indent(line, indentWidth, typedChar)&lt;br /&gt;{&lt;br /&gt; // do calculations here&lt;br /&gt; // if typedChar is an empty string, the user hit enter/return&lt;br /&gt;&lt;br /&gt;// todo: Implement your indentation algorithms here.&lt;br /&gt;&lt;enter return=""&gt;   return -1; // keep indentation&lt;br /&gt;}&lt;/enter&gt;&lt;/enter&gt;&lt;/optional&gt;&lt;/foo@gmx.baz&gt;&lt;/blockquote&gt;More details on the header:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;name [required]: the name will appear in Kate's menus&lt;/li&gt;&lt;li&gt;license [optional]: not visible in gui, but should be specified in js-files. it is always better to have a defined license&lt;/li&gt;&lt;li&gt;author [optional]: name &lt;email&gt;&lt;/email&gt;&lt;/li&gt;&lt;li&gt;version [optional]: recommended. an integer&lt;/li&gt;&lt;li&gt;kate-version [required]: the minimum required kate-version (e.g. for api changes)&lt;/li&gt;&lt;li&gt;type [required]: must be set to indentation&lt;/li&gt;&lt;/ul&gt;The only missing part is the API which Kate Part exports to access the document and the view. Right now, there is no API documentation, so you have to look at the code:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://websvn.kde.org/trunk/KDE/kdelibs/kate/jscript/katejscript.cpp?revision=683169&amp;view=markup"&gt;kdelibs/kate/jscript/katejscript.cpp&lt;/a&gt; search for "&lt;span style="font-weight: bold;"&gt;@Begin&lt;/span&gt;" tags&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;You will find, that the current document exports functions like&lt;br /&gt;&lt;ul&gt;&lt;li&gt;document.fileName()&lt;/li&gt;&lt;li&gt;document.isModified()&lt;/li&gt;&lt;li&gt;document.charAt(line, column)&lt;/li&gt;&lt;li&gt;etc...&lt;/li&gt;&lt;/ul&gt;The view exports functions like&lt;br /&gt;&lt;ul&gt;&lt;li&gt;view.cursorPosition()&lt;/li&gt;&lt;li&gt;view.hasSelection()&lt;/li&gt;&lt;li&gt;view.clearSelection()&lt;/li&gt;&lt;li&gt;...&lt;/li&gt;&lt;/ul&gt;That's the boring part of this blog. The interesting one is unfortunately shorter: &lt;span style="font-weight: bold;"&gt;we are looking for contributors&lt;/span&gt; who want to write scripts or help in the C++ implementation :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17552332-9028803239237923566?l=dhaumann.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dhaumann.blogspot.com/feeds/9028803239237923566/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17552332&amp;postID=9028803239237923566' title='9 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/9028803239237923566'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/9028803239237923566'/><link rel='alternate' type='text/html' href='http://dhaumann.blogspot.com/2007/07/kate-scripting-indentation.html' title='Kate Scripting: Indentation'/><author><name>dhaumann</name><uri>http://www.blogger.com/profile/06242913572752671774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>9</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17552332.post-3602228724326106806</id><published>2007-07-14T21:39:00.001+02:00</published><updated>2007-07-14T21:42:27.695+02:00</updated><title type='text'>Luggage continued</title><content type='html'>Quick notice: I have my bag back. It was wet inside -- probably for 2 weeks, no wonder it started to get moldy inside, and I'm not sure yet whether I can use some of the clothes. Well done BA &amp;amp; Heathrow.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17552332-3602228724326106806?l=dhaumann.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dhaumann.blogspot.com/feeds/3602228724326106806/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17552332&amp;postID=3602228724326106806' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/3602228724326106806'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/3602228724326106806'/><link rel='alternate' type='text/html' href='http://dhaumann.blogspot.com/2007/07/luggage-continued.html' title='Luggage continued'/><author><name>dhaumann</name><uri>http://www.blogger.com/profile/06242913572752671774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17552332.post-7489970954319693809</id><published>2007-07-11T20:36:00.000+02:00</published><updated>2007-07-11T20:59:45.765+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='akademy'/><category scheme='http://www.blogger.com/atom/ns#' term='luggage'/><title type='text'>Deeply impressed...</title><content type='html'>Hey, I wasn't aware there was another one &lt;a href="http://troy-at-kde.livejournal.com/4561.html"&gt;who did not get his luggage at all&lt;/a&gt; in Glasgow. I traveled from Frankfurt(Germany) to London (Heathrow) and then on to Glasgow. When I arrived, my luggage was missing. British Airways told me it would still be in London but it should arrive the same day and they would bring it to the Euro Hostel - cool :) &lt;span style="font-style: italic;"&gt;How naive!&lt;/span&gt; Of course it did not arrive... and it didn't arrive the whole week.&lt;br /&gt;The online status always said "&lt;span style="font-weight: bold;"&gt;Still tracing, check back later&lt;/span&gt;". When I flew back I asked at the Glasgow airport again and was told they can not see more than what I see online. When I asked whether they could call London/Heathrow by phone they said &lt;span style="font-weight: bold;"&gt;in London/Heathrow 20.000 bags are missing&lt;/span&gt; so it would be pointless. If the system is so unreliable, why don't they simply close the airport. moo&lt;br /&gt;When I arrived in London I asked again, and a BA-service guy told me he could see that my luggage was being sent to Glasgow by road. &lt;span style="font-style: italic; font-weight: bold;"&gt;By road???&lt;/span&gt; Hell, it takes them 1 hour by plane, so what? And I even told them that I would leave this day. So why to Glasgow at all now?&lt;br /&gt;Well, finally I sat in the plane... which ironically had a delay because it had one bag too much. Hey, that could have been mine... :)&lt;br /&gt;Back in Frankfurt I asked again, and at least this time they were capable of changing the destination address to where I live in Germany. Strange, I told them in Glasgow in the first place, but they seem to be pretty much incapable... :)&lt;br /&gt;So here we go: Back in Germany... in the meanwhile I wondered whether I'd see my bag ever again. Today, almost 2 weeks later, the state incredibly changed to "&lt;span style="font-weight: bold;"&gt;Received at the airport, delivery in progress&lt;/span&gt;". Wow, I'm deeply impressed... really great job. Wait: at which airport? Glasgow? London? Frankfurt? Or somewhere else in the world? *sigh*&lt;br /&gt;So in short: I &lt;span style="font-style: italic;"&gt;still&lt;/span&gt; don't have my luggage back... :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17552332-7489970954319693809?l=dhaumann.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dhaumann.blogspot.com/feeds/7489970954319693809/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17552332&amp;postID=7489970954319693809' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/7489970954319693809'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/7489970954319693809'/><link rel='alternate' type='text/html' href='http://dhaumann.blogspot.com/2007/07/deeply-impressed.html' title='Deeply impressed...'/><author><name>dhaumann</name><uri>http://www.blogger.com/profile/06242913572752671774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17552332.post-1083593015571809668</id><published>2007-06-17T23:55:00.000+02:00</published><updated>2007-06-18T00:01:20.028+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='techbase'/><category scheme='http://www.blogger.com/atom/ns#' term='kde'/><title type='text'>Translation of TechBase</title><content type='html'>As contributors started to translate articles in TechBase to other languages I wrote a quick howto which explains the &lt;a href="http://techbase.kde.org/Help:Wiki_Translation"&gt;translation system&lt;/a&gt;. It is pretty easy since danimo simplified it with a &lt;a href="http://techbase.kde.org/Template:I18n/Language_Navigation_Bar"&gt;nifty template&lt;/a&gt; :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17552332-1083593015571809668?l=dhaumann.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dhaumann.blogspot.com/feeds/1083593015571809668/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17552332&amp;postID=1083593015571809668' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/1083593015571809668'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/1083593015571809668'/><link rel='alternate' type='text/html' href='http://dhaumann.blogspot.com/2007/06/translation-of-techbase.html' title='Translation of TechBase'/><author><name>dhaumann</name><uri>http://www.blogger.com/profile/06242913572752671774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17552332.post-3661683483445397335</id><published>2007-05-31T13:00:00.000+02:00</published><updated>2007-05-31T13:31:57.256+02:00</updated><title type='text'>Quickies: classmapper, tb</title><content type='html'>&lt;a href="http://api.kde.org"&gt;api.kde.org&lt;/a&gt; got an overhaul, the redirect of the old class mapper does not work yet, so just edit your web shortcuts and change the one for 'kde:' to point to&lt;br /&gt;&lt;ul&gt;&lt;li&gt;http://api.kde.org/classmapper.php?class=\{@}&lt;/li&gt;&lt;li&gt;appending &amp;version=3.5 will search in KDE3.5&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;Thanks to Bram, we have a new article called &lt;a style="font-style: italic;" href="http://techbase.kde.org/Development/Tutorials/Debugging/How_to_create_useful_crash_reports"&gt;How to create useful crash reports&lt;/a&gt; in our &lt;a href="http://techbase.kde.org/"&gt;tb&lt;/a&gt;. It is mainly aimed at users who fill in bug reports in KDE's bug tracking system.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17552332-3661683483445397335?l=dhaumann.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dhaumann.blogspot.com/feeds/3661683483445397335/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17552332&amp;postID=3661683483445397335' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/3661683483445397335'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/3661683483445397335'/><link rel='alternate' type='text/html' href='http://dhaumann.blogspot.com/2007/05/quickies-classmapper-tb.html' title='Quickies: classmapper, tb'/><author><name>dhaumann</name><uri>http://www.blogger.com/profile/06242913572752671774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17552332.post-6537526436203580470</id><published>2007-03-27T21:15:00.000+02:00</published><updated>2007-03-28T00:23:47.404+02:00</updated><title type='text'>svn up qt-copy...</title><content type='html'>...and only &lt;span style="font-weight: bold;"&gt;1 hour, 35 minutes&lt;/span&gt; later it was finished! Enough said.&lt;br /&gt;Update (disambiguation): &lt;span style="font-weight: bold;"&gt;svn via https&lt;/span&gt; took the time, not the compiling itself :-)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17552332-6537526436203580470?l=dhaumann.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dhaumann.blogspot.com/feeds/6537526436203580470/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17552332&amp;postID=6537526436203580470' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/6537526436203580470'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/6537526436203580470'/><link rel='alternate' type='text/html' href='http://dhaumann.blogspot.com/2007/03/svn-up-qt-copy.html' title='svn up qt-copy...'/><author><name>dhaumann</name><uri>http://www.blogger.com/profile/06242913572752671774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17552332.post-778136951510538618</id><published>2007-03-18T01:18:00.000+01:00</published><updated>2008-12-09T16:36:48.221+01:00</updated><title type='text'>KDE@CeBIT: first two days</title><content type='html'>Carsten was already faster and blogged about &lt;a href="http://cniehaus.livejournal.com/34755.html"&gt;day 3@CeBIT&lt;/a&gt; - so it's time to talk about the &lt;span style="font-weight: bold;"&gt;first two days&lt;/span&gt; :)&lt;br /&gt;The first two days we had a rather small booth compared to other projects in the LinuxPark (Hall 5): Placed in the corner next to the Debian booth (see photo). However, we managed to attract many interested eyes, and that's after all what's important (see photo).&lt;br /&gt;The CeBIT is very much a business event: many people are wearing suits which is not really surprising as the audience is of course different to for example the &lt;a href="http://www.linuxtag.org/"&gt;LinuxTag&lt;/a&gt;. As such they have another background: Sometimes they never even saw KDE. That's good as we could show step by step the power of KDE: the desktop itself (kicker, K-button, desktop), applications like KMail users usually need or Amarok with iPod support.&lt;br /&gt;Sometimes the questions were more detailed, amongst others -- of course -- &lt;span style="font-weight: bold;"&gt;What will KDE4 look like?&lt;/span&gt; This one is very important and we tried to promote the &lt;a href="http://www.kdedevelopers.org/node/2600"&gt;difference between KDE4 and KDE4.0&lt;/a&gt;, the very first KDE4 release. In short, KDE4.0 is the first release in the whole KDE4 lifetime.  As such will ship new &lt;a href="http://solid.kde.org/"&gt;tec&lt;/a&gt;&lt;a href="http://plasma.kde.org/"&gt;hn&lt;/a&gt;&lt;a href="http://phonon.kde.org/"&gt;ol&lt;/a&gt;&lt;a href="http://www.vandenoever.info/software/strigi/"&gt;og&lt;/a&gt;&lt;a href="http://doc.trolltech.com/4.2/qtdbus.html"&gt;ies&lt;/a&gt; and cleaned up APIs. Many work went into the core of KDE which is not even visible to the user. When KDE4.0 is released applications will first have to use it. It does not  make &lt;span style="font-style: italic;"&gt;*plop*&lt;/span&gt; and we have a full blown KDE4 which can be compared to the thousands of applications available for KDE3.5. Even the KDE4 components itself (like plasma) probably will &lt;span style="font-style: italic;"&gt;not&lt;/span&gt; contain all the features and be perfect right from the start.&lt;br /&gt;This is even good to some degree: It is perfectly fine if plasma is basically the same as what we know from the KDE3.5 workspace - it's a well and long tested behaviour after all. I think we did a good job with regard to issues like this and the interested parties understood that. We demonstrated KDE4 versions of Kate, &lt;a href="http://dot.kde.org/1172721427/"&gt;Dolphin&lt;/a&gt;, KRunner and KSysGuard including the new Oxygen icon theme and the general feedback was positive :)&lt;br /&gt;Besides that, we gave lots of KDE-T-shirts, pins and bags for free (iff they made a small donation). I'm sure I forgot something, but it's a way too late now and I have to be at the &lt;a href="http://www.kdedevelopers.org/node/2728"&gt;decibel&lt;/a&gt; &lt;a href="http://duncan.mac-vicar.com/blog/archives/197"&gt;hackathon&lt;/a&gt; in some hours again *tired* :)&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_JcjnuQSFzjw/RfyUTPu_yjI/AAAAAAAAAAM/w5UzjgLaw2Q/s1600-h/p1010956.jpg"&gt;&lt;img style="cursor: pointer;" src="http://2.bp.blogspot.com/_JcjnuQSFzjw/RfyUTPu_yjI/AAAAAAAAAAM/w5UzjgLaw2Q/s320/p1010956.jpg" alt="" id="BLOGGER_PHOTO_ID_5043068741110188594" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_JcjnuQSFzjw/RfyU-Pu_ykI/AAAAAAAAAAU/Cz8WbhFCoU0/s1600-h/p1010973.jpg"&gt;&lt;img style="cursor: pointer;" src="http://2.bp.blogspot.com/_JcjnuQSFzjw/RfyU-Pu_ykI/AAAAAAAAAAU/Cz8WbhFCoU0/s320/p1010973.jpg" alt="" id="BLOGGER_PHOTO_ID_5043069479844563522" border="0" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17552332-778136951510538618?l=dhaumann.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dhaumann.blogspot.com/feeds/778136951510538618/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17552332&amp;postID=778136951510538618' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/778136951510538618'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/778136951510538618'/><link rel='alternate' type='text/html' href='http://dhaumann.blogspot.com/2007/03/kdecebit-first-two-days.html' title='KDE@CeBIT: first two days'/><author><name>dhaumann</name><uri>http://www.blogger.com/profile/06242913572752671774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_JcjnuQSFzjw/RfyUTPu_yjI/AAAAAAAAAAM/w5UzjgLaw2Q/s72-c/p1010956.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17552332.post-7539186781096943229</id><published>2007-03-05T11:13:00.000+01:00</published><updated>2007-03-05T11:25:41.645+01:00</updated><title type='text'>Quickies: D-Bus, TechBase</title><content type='html'>&lt;ul&gt;&lt;li&gt;&lt;s&gt;DBUS&lt;/s&gt; D-Bus&lt;/li&gt;&lt;li&gt;&lt;a href="http://techbase.kde.org"&gt;techbase.kde.org&lt;/a&gt; finally has a name&lt;/li&gt;&lt;li&gt;KDE contributors with an svn account are in the group &lt;span style="font-style: italic;"&gt;KDEDevelopers&lt;/span&gt;, they additionally have the right to delete pages in techbase... &lt;a href="http://techbase.kde.org/Special:Listusers"&gt;if you are not in this group&lt;/a&gt; but have a svn account please let us know (#kde-www)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;...todo: they also should be able to protect pages so that they are only editable for users in the KDEDevelopers group&lt;/li&gt;&lt;li&gt;techbase uses &lt;a href="http://techbase.kde.org/Help:Wiki_Structure#Sub-pages"&gt;subpages&lt;/a&gt; - please avoid adding toplevel pages :)&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17552332-7539186781096943229?l=dhaumann.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dhaumann.blogspot.com/feeds/7539186781096943229/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17552332&amp;postID=7539186781096943229' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/7539186781096943229'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/7539186781096943229'/><link rel='alternate' type='text/html' href='http://dhaumann.blogspot.com/2007/03/quickies-d-bus-techbase.html' title='Quickies: D-Bus, TechBase'/><author><name>dhaumann</name><uri>http://www.blogger.com/profile/06242913572752671774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17552332.post-116820591107871947</id><published>2007-01-07T22:24:00.000+01:00</published><updated>2007-03-01T14:40:31.434+01:00</updated><title type='text'>Developer Wiki Structure</title><content type='html'>The last friday we had 20 people on IRC in #kde-www, that is a lot compared to the 2-5 people usually sticking around there. Some of those 20 are quite active in the &lt;a href="http://techbase.kde.org"&gt;techbase wiki&lt;/a&gt; so that we have a constant flow of &lt;a href="http://techbase.kde.org/Special:Recentchanges"&gt;commits&lt;/a&gt;. However, there is still a lot of work to do: Migrating tutorials, &lt;a href="http://techbase.kde.org/Development/Architecture"&gt;architecture pages&lt;/a&gt;, and more. As you probably know MediaWiki is usually a flat wiki, that is all pages are usually placed in the top. For instance, this is how Wikipedia works. On KDE's techbase wiki we wanted to have a structure even in the URL if possible. It turned out we were lucky because MediaWiki has  a features called &lt;a href="http://meta.wikimedia.org/wiki/Sub-page"&gt;sub-pages&lt;/a&gt;. In short, a sub-page is something like a parent-child relation (like a sub-folder), and the benefits for us are&lt;br /&gt;&lt;ul&gt;&lt;li&gt; they automatically provide us with a &lt;b&gt;hierarchy&lt;/b&gt; which is reflected in the URL itself &lt;/li&gt;&lt;li&gt; automatically generated &lt;i&gt;backlinks&lt;/i&gt; provide easy navigation&lt;/li&gt;&lt;/ul&gt;For further information, read the page about our &lt;a href="http://techbase.kde.org/Help:Wiki_Structure"&gt;wiki structure&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17552332-116820591107871947?l=dhaumann.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dhaumann.blogspot.com/feeds/116820591107871947/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17552332&amp;postID=116820591107871947' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/116820591107871947'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/116820591107871947'/><link rel='alternate' type='text/html' href='http://dhaumann.blogspot.com/2007/01/developer-wiki-structure.html' title='Developer Wiki Structure'/><author><name>dhaumann</name><uri>http://www.blogger.com/profile/06242913572752671774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17552332.post-116725879669259127</id><published>2006-12-27T23:05:00.000+01:00</published><updated>2006-12-27T23:46:15.423+01:00</updated><title type='text'>API documentation &amp; refactored kdelibs/kdeui</title><content type='html'>During the last weeks/days the directory structure of especially kdelibs/kdeui got a major overhaul: in KDE 3 all files of a module were in the same directory which was more or less a mess as you did not know immediately which files belonged to the same category. &lt;a href="http://websvn.kde.org/trunk/KDE/kdelibs/kdeui/"&gt;kdelibs/kdeui in KDE4&lt;/a&gt; has a rather clean structure now (similar to the one in Qt) by using subfolders like&lt;br /&gt;&lt;ul&gt;&lt;li&gt;actions&lt;/li&gt;&lt;li&gt;dialogs&lt;/li&gt;&lt;li&gt;widgets&lt;/li&gt;&lt;li&gt;xmlgui&lt;/li&gt;&lt;li&gt;several others...&lt;/li&gt;&lt;/ul&gt;Compare this to &lt;a href="http://websvn.kde.org/branches/KDE/3.5/kdelibs/kdeui"&gt;KDE3's kdelibs/kdeui&lt;/a&gt; structure. For KDE4 this is a huge benefit, as we have clearly defined groups. We already had lots of discussions in the past about API documentation and this is exactly where the new structure is important: In Qt every class usually belongs to a group (&lt;a href="http://doc.trolltech.com/4.2/groups.html"&gt;example&lt;/a&gt;). Our API documentation tool &lt;a href="http://www.stack.nl/%7Edimitri/doxygen/"&gt;doxygen&lt;/a&gt; of course supports &lt;a href="http://www.stack.nl/%7Edimitri/doxygen/grouping.html"&gt;grouping&lt;/a&gt;, and now it is even easy to know which class should be in which group. For instance, all classes in the widgets directory should be in the '&lt;span style="font-style: italic;"&gt;Widgets&lt;/span&gt;' group, and then maybe even more fine-grained divided into sub-groups.&lt;br /&gt;By the way, we have a policy that every widget in kdelibs has a screenshot to immediately see how it looks like - another nice way to get involved :)&lt;br /&gt;All in all this is really awesome and I'd like to thank all involved developers. Next prey is &lt;a href="http://websvn.kde.org/trunk/KDE/kdelibs/kdecore/"&gt;kdelibs/kdecore&lt;/a&gt;? =)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17552332-116725879669259127?l=dhaumann.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dhaumann.blogspot.com/feeds/116725879669259127/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17552332&amp;postID=116725879669259127' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/116725879669259127'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/116725879669259127'/><link rel='alternate' type='text/html' href='http://dhaumann.blogspot.com/2006/12/api-documentation-refactored.html' title='API documentation &amp; refactored kdelibs/kdeui'/><author><name>dhaumann</name><uri>http://www.blogger.com/profile/06242913572752671774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17552332.post-116725710967798776</id><published>2006-12-27T22:44:00.000+01:00</published><updated>2007-03-01T14:39:06.665+01:00</updated><title type='text'>Friday is developer wiki day</title><content type='html'>Some time ago we started to migrate our &lt;a href="http://developer.kde.org/"&gt;developer.kde.org&lt;/a&gt; pages to a mediawiki based solution at &lt;a href="http://techbase.kde.org/"&gt;techbase.kde.org&lt;/a&gt;. In order to give the wiki a big boost we always meet on fridays on &lt;a href="irc://irc.kde.org/#kde-www"&gt;irc.kde.org #kde-www&lt;/a&gt;. This friday we will continue to migrate content, besides that we want to find a &lt;a href="http://techbase.kde.org/KDE_TechBase:Migrate_content#Roadmap"&gt;roadmap and a target date&lt;/a&gt; at which we can turn off the &lt;span style="font-style: italic;"&gt;old&lt;/span&gt; developer pages.&lt;br /&gt;To make this friday an even greater success we need as many volunteers as possible joining us. It is also a nice opportunity to get in touch with the KDE community - we are happy about every new face and - believe us - we don't eat anyone :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17552332-116725710967798776?l=dhaumann.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dhaumann.blogspot.com/feeds/116725710967798776/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17552332&amp;postID=116725710967798776' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/116725710967798776'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/116725710967798776'/><link rel='alternate' type='text/html' href='http://dhaumann.blogspot.com/2006/12/friday-is-developer-wiki-day.html' title='Friday is developer wiki day'/><author><name>dhaumann</name><uri>http://www.blogger.com/profile/06242913572752671774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17552332.post-116708450792357669</id><published>2006-12-25T22:56:00.000+01:00</published><updated>2006-12-26T02:03:36.120+01:00</updated><title type='text'>God Jul</title><content type='html'>I'm back in Germany after my stay in Sweden. All in all, it was an awesome time. I also traveled to the north to a town called Kiruna (indeed starting with a 'K' =) and you probably guess what I found there: snow, &lt;span style="font-style: italic;"&gt;lots of snow&lt;/span&gt;. To give you an impression here are two images :)&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/x/blogger/4106/1694/1600/65984/kiruna-kde.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/x/blogger/4106/1694/320/829854/kiruna-kde.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/x/blogger/4106/1694/1600/953365/kiruna-snow.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/x/blogger/4106/1694/320/631090/kiruna-snow.jpg" alt="" border="0" /&gt;&lt;/a&gt;That are nice pictures for the current time of year, so God Jul to everyone and KDE :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17552332-116708450792357669?l=dhaumann.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dhaumann.blogspot.com/feeds/116708450792357669/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17552332&amp;postID=116708450792357669' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/116708450792357669'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/116708450792357669'/><link rel='alternate' type='text/html' href='http://dhaumann.blogspot.com/2006/12/god-jul.html' title='God Jul'/><author><name>dhaumann</name><uri>http://www.blogger.com/profile/06242913572752671774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17552332.post-116619395429437420</id><published>2006-12-15T15:26:00.000+01:00</published><updated>2006-12-15T15:45:54.326+01:00</updated><title type='text'>developer wiki</title><content type='html'>Now it's kind of official: The first blog about our new developer wiki &lt;a href="http://aseigo.blogspot.com/2006/12/developer-wiki-fridays.html"&gt;by Aaron&lt;/a&gt;. I'm very happy the wiki gets more attention, and in fact this is a very good opportunity to get started with KDE. As Aaron already mentioned we want the wiki to become a first class citizen for KDE related developer resources. The main task right now is to port pages from the "old" developer pages to the new wiki. At the same time we can restructure the pages like moving KDE 2 and KDE 3 related content to own pages etc. As it is a &lt;a href="http://en.wikipedia.org/wiki/Wiki"&gt;wiki&lt;/a&gt;, everyone is welcome to help. If you want to get in touch with us join us in irc (irc.kde.org, #kde-www)!&lt;br /&gt;Some time ago I &lt;a href="http://www.gmdsoft.de/haumann/kde/wikify.perl"&gt;wrote a small perl script&lt;/a&gt; with which you can convert the html code of the old developer pages to wiki syntax. It's not perfect, but speeds up the process of porting a page tremendously :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17552332-116619395429437420?l=dhaumann.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dhaumann.blogspot.com/feeds/116619395429437420/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17552332&amp;postID=116619395429437420' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/116619395429437420'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/116619395429437420'/><link rel='alternate' type='text/html' href='http://dhaumann.blogspot.com/2006/12/developer-wiki.html' title='developer wiki'/><author><name>dhaumann</name><uri>http://www.blogger.com/profile/06242913572752671774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17552332.post-116475153514468566</id><published>2006-11-28T22:45:00.000+01:00</published><updated>2006-11-28T23:05:35.770+01:00</updated><title type='text'>KateMDI: sidebar and focus...</title><content type='html'>Since KDE 3.5.5 Kate has its own MDI implementation. It is similar to KMDI but ships with a lot less bugs (yes, and features). One thing bothering me is the focus issue: Which sidebar has the focus? If you do not know, you have to have sharp eyes to find out. In KDE4 I just hacked in such a feature (&lt;a href="http://www.gmdsoft.de/haumann/kde/kde4-kate-sidebar-focus.diff"&gt;here is the patch&lt;/a&gt;). On the screenshot you can see that every sidebar now has an additional pane on the top. Unfocused sidebars have a gray pane (default window background color), a focused sidebar has a blue pane with white text (just like selected text). Which sidebar has focus? - Right, it's the Documents sidebar :) It work's pretty well, so is it worth committing (a cleaner version of)  the patch? I initially hoped that &lt;a href="http://doc.trolltech.com/4.2/qdockwidget.html"&gt;QDockWidgets&lt;/a&gt; would provide this functionality by default. Similar discussions take place on &lt;a href="http://lists.kde.org/?l=kde-usability&amp;m=116455623020477&amp;amp;w=2"&gt;kde-core-devel&lt;/a&gt; as well (about KTabBar &amp; friends)...&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/4106/1694/1600/katemdi.png"&gt;&lt;img style="cursor: pointer;" src="http://photos1.blogger.com/blogger/4106/1694/400/katemdi.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17552332-116475153514468566?l=dhaumann.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dhaumann.blogspot.com/feeds/116475153514468566/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17552332&amp;postID=116475153514468566' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/116475153514468566'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/116475153514468566'/><link rel='alternate' type='text/html' href='http://dhaumann.blogspot.com/2006/11/katemdi-sidebar-and-focus.html' title='KateMDI: sidebar and focus...'/><author><name>dhaumann</name><uri>http://www.blogger.com/profile/06242913572752671774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17552332.post-116068938752418369</id><published>2006-10-12T23:35:00.000+02:00</published><updated>2006-10-12T23:43:07.536+02:00</updated><title type='text'>Share Kate Highlighting Files</title><content type='html'>Thanks to Frank we have a &lt;a href="http://kde-files.org/"&gt;dedicated section for Kate Highlighting files on kde-files.org&lt;/a&gt; now. We encourage everyone to publish their .xml files there. The Kate team agreed to add more highlighting files to the official Kate releases, though, as long as they are of general use. For KDE4 we plan to have a section for Kate Indentation scripts, too. But that's content for another blog, which will follow later :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17552332-116068938752418369?l=dhaumann.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dhaumann.blogspot.com/feeds/116068938752418369/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17552332&amp;postID=116068938752418369' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/116068938752418369'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/116068938752418369'/><link rel='alternate' type='text/html' href='http://dhaumann.blogspot.com/2006/10/share-kate-highlighting-files.html' title='Share Kate Highlighting Files'/><author><name>dhaumann</name><uri>http://www.blogger.com/profile/06242913572752671774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17552332.post-115955194000417670</id><published>2006-09-29T19:34:00.000+02:00</published><updated>2006-09-29T20:01:42.886+02:00</updated><title type='text'>Kate: More eye-candy</title><content type='html'>Two years ago we had the KDE conference in Ludwigsburg, Germany. At that time, Martijn Klingens committed a patch to &lt;a href="http://lists.kde.org/?l=kwrite-devel&amp;m=109424792916463&amp;amp;w=2"&gt;show trailing spaces&lt;/a&gt; in Kate. I just change the visualization a bit, the change is in for KDE4 :) Tabs are marked with a '»' character, and spaces with a dot. On the left you can see the old and on the right the new version; Here is a screenshot:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/4106/1694/1600/tabsspaces.0.png"&gt;&lt;img style="cursor: pointer;" src="http://photos1.blogger.com/blogger/4106/1694/400/tabsspaces.0.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17552332-115955194000417670?l=dhaumann.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dhaumann.blogspot.com/feeds/115955194000417670/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17552332&amp;postID=115955194000417670' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/115955194000417670'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/115955194000417670'/><link rel='alternate' type='text/html' href='http://dhaumann.blogspot.com/2006/09/kate-more-eye-candy.html' title='Kate: More eye-candy'/><author><name>dhaumann</name><uri>http://www.blogger.com/profile/06242913572752671774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17552332.post-115930163664352327</id><published>2006-09-26T21:58:00.000+02:00</published><updated>2006-09-26T22:13:56.910+02:00</updated><title type='text'>Hibernate</title><content type='html'>I use the &lt;a href="http://packages.gentoo.org/ebuilds/?suspend2-sources-2.6.18"&gt;suspend2-sources&lt;/a&gt; in Gentoo. After upgrading to XOrg7.1 with newest ATI drivers (fglrx,  version 8.29.6) hibernate did not work anymore. Suspend-to-disk hanged at the point: "&lt;span style="font-style: italic;"&gt;Doing atomic copy&lt;/span&gt;".&lt;br /&gt;&lt;br /&gt;While searching the web I &lt;a href="http://wiki.cchtml.com/index.php/Suspend2"&gt;found a fix&lt;/a&gt;: Edit hibernate.conf (or /etc/hibernate/common.conf) and set&lt;br /&gt;&lt;blockquote&gt;ProcSetting extra_pages_allowance 20000&lt;/blockquote&gt;That did the trick :) Tomorrow will be my &lt;a href="http://dhaumann.blogspot.com/2006/09/bad-luck.html"&gt;second attempt to fly to Dublin&lt;/a&gt;. So far it looks pretty promising :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17552332-115930163664352327?l=dhaumann.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dhaumann.blogspot.com/feeds/115930163664352327/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17552332&amp;postID=115930163664352327' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/115930163664352327'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/115930163664352327'/><link rel='alternate' type='text/html' href='http://dhaumann.blogspot.com/2006/09/hibernate.html' title='Hibernate'/><author><name>dhaumann</name><uri>http://www.blogger.com/profile/06242913572752671774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17552332.post-115896573830280753</id><published>2006-09-23T00:46:00.000+02:00</published><updated>2006-09-23T00:55:38.313+02:00</updated><title type='text'>Bad Luck</title><content type='html'>As everyone else I wanted to fly to Dublin on friday, too. While packing the day before I noticed I could not find my identity card. To make it short: I was at the airport with a copy and several other papers that (more or less) state my identity, but no luck. There is no way to travel without a valid identity card to Dublin.&lt;br /&gt;&lt;br /&gt;So I'll take another plane 5 days later, on wednesday. There is a small chance (maybe 5%) I might be able to come on monday already. Let's see... :)&lt;br /&gt;&lt;br /&gt;All in all I'm missing almost all of the highlights, just look into the &lt;a href="http://akademy.kde.org/conference/program.php"&gt;conference program&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Lesson learned: Start packing 1-2 weeks before. sooooo stupid :(&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17552332-115896573830280753?l=dhaumann.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dhaumann.blogspot.com/feeds/115896573830280753/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17552332&amp;postID=115896573830280753' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/115896573830280753'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/115896573830280753'/><link rel='alternate' type='text/html' href='http://dhaumann.blogspot.com/2006/09/bad-luck.html' title='Bad Luck'/><author><name>dhaumann</name><uri>http://www.blogger.com/profile/06242913572752671774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17552332.post-115838609475442975</id><published>2006-09-16T07:53:00.000+02:00</published><updated>2006-09-16T07:56:33.303+02:00</updated><title type='text'>The Wheel of Time Turns...</title><content type='html'>...and this time it turns out that I &lt;span style="font-style: italic;"&gt;am&lt;/span&gt; going to akademy. Dublin I'm coming, wheee! :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17552332-115838609475442975?l=dhaumann.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dhaumann.blogspot.com/feeds/115838609475442975/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17552332&amp;postID=115838609475442975' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/115838609475442975'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/115838609475442975'/><link rel='alternate' type='text/html' href='http://dhaumann.blogspot.com/2006/09/wheel-of-time-turns.html' title='The Wheel of Time Turns...'/><author><name>dhaumann</name><uri>http://www.blogger.com/profile/06242913572752671774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17552332.post-115607662130299319</id><published>2006-08-20T14:14:00.000+02:00</published><updated>2006-08-21T17:48:13.920+02:00</updated><title type='text'>Moving</title><content type='html'>Last week I moved to Skövde in Sweden. It's a middle-sized town (about 50000 inhabitants iirc) in the central of Sweden just between the two big seas. The weather is quite nice still and so far everything looks interesting. I did not see an elk yet, though :)&lt;br /&gt;&lt;br /&gt;In order to have internet access I have to go into a shopping mall. This makes KDE development a bit harder for me as I used to be in contact via IRC a lot and use the web as api reference. That's it for now :)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;update 2006-08-21&lt;/span&gt;: Skövde has about 50000 inhabitants.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17552332-115607662130299319?l=dhaumann.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dhaumann.blogspot.com/feeds/115607662130299319/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17552332&amp;postID=115607662130299319' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/115607662130299319'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/115607662130299319'/><link rel='alternate' type='text/html' href='http://dhaumann.blogspot.com/2006/08/moving.html' title='Moving'/><author><name>dhaumann</name><uri>http://www.blogger.com/profile/06242913572752671774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17552332.post-115512027902513841</id><published>2006-08-09T12:33:00.000+02:00</published><updated>2006-08-09T12:44:39.036+02:00</updated><title type='text'>Smart End</title><content type='html'>Since KDE 3.5.4 Kate Part supports "&lt;a href="http://bugs.kde.org/show_bug.cgi?id=78258"&gt;smart end&lt;/a&gt;". Right now it behaves like this when pressing "end":&lt;br /&gt;&lt;ol&gt;&lt;li&gt;go to last non-space character&lt;br /&gt;&lt;/li&gt;&lt;li&gt; go to the last character (i.e. hit end twice)&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;I'm writing this blog to get feedback about what's the right/expected behaviour. Is it as described above, or should we first go to the very last character, and to the last non-space only when hitting then end-key twice?&lt;br /&gt;&lt;br /&gt;Feedback along with why you prefer solution A or B is welcome!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17552332-115512027902513841?l=dhaumann.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dhaumann.blogspot.com/feeds/115512027902513841/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17552332&amp;postID=115512027902513841' title='13 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/115512027902513841'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/115512027902513841'/><link rel='alternate' type='text/html' href='http://dhaumann.blogspot.com/2006/08/smart-end.html' title='Smart End'/><author><name>dhaumann</name><uri>http://www.blogger.com/profile/06242913572752671774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>13</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17552332.post-115373295971025527</id><published>2006-08-02T20:51:00.000+02:00</published><updated>2006-08-02T20:57:02.720+02:00</updated><title type='text'>Kate in KDE 3.5.4</title><content type='html'>Finally, &lt;a href="http://www.kde.org/announcements/announce-3.5.4.php"&gt;KDE 3.5.4 is out&lt;/a&gt;! We were able to &lt;a href="http://bugs.kde.org/buglist.cgi?&amp;product=kate&amp;amp;resolution=FIXED&amp;resolution=WORKSFORME&amp;amp;chfield=resolution&amp;chfieldfrom=2006-05-25&amp;amp;chfieldto=2006-07-24"&gt;fix a lot of issues in Kate&lt;/a&gt; and the &lt;a href="http://bugs.kde.org/reports.cgi?product=kate&amp;output=show_chart&amp;amp;datasets=NEW%3A&amp;datasets=ASSIGNED%3A&amp;amp;datasets=REOPENED%3A&amp;datasets=UNCONFIRMED%3A&amp;amp;links=1&amp;banner=1&amp;amp;quip=0"&gt;bug curves went noticeably down&lt;/a&gt;. Thanks to all contributors for the nice KDE release :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17552332-115373295971025527?l=dhaumann.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dhaumann.blogspot.com/feeds/115373295971025527/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17552332&amp;postID=115373295971025527' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/115373295971025527'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/115373295971025527'/><link rel='alternate' type='text/html' href='http://dhaumann.blogspot.com/2006/08/kate-in-kde-354.html' title='Kate in KDE 3.5.4'/><author><name>dhaumann</name><uri>http://www.blogger.com/profile/06242913572752671774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17552332.post-115368162179588377</id><published>2006-07-23T21:02:00.000+02:00</published><updated>2006-07-23T21:07:01.806+02:00</updated><title type='text'>Kate: Shortcomings of .kateconfig file</title><content type='html'>Assume you have a .kateconfig file optimized for C++ code that replaces tabs on save. Now you open a Makefile that contains tabs (due to its strict syntax). If you save the Makefile in kate, the tabs then are replaced which results in a corrupted Makefile.&lt;br /&gt;&lt;br /&gt;In other words: The .kateconfig file applies to &lt;span style="font-style: italic;"&gt;every&lt;/span&gt; file. &lt;span style="font-weight: bold;"&gt;It lacks mimetype/extension support and thus can lead to unwanted behaviours.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;So &lt;span style="font-style: italic;"&gt;if&lt;/span&gt; you use a .kateconfig file, &lt;span style="font-style: italic;"&gt;keep&lt;/span&gt; that in mind :) Maybe we should simply use modelines in the h/cpp files for now.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17552332-115368162179588377?l=dhaumann.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dhaumann.blogspot.com/feeds/115368162179588377/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17552332&amp;postID=115368162179588377' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/115368162179588377'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/115368162179588377'/><link rel='alternate' type='text/html' href='http://dhaumann.blogspot.com/2006/07/kate-shortcomings-of-kateconfig-file.html' title='Kate: Shortcomings of .kateconfig file'/><author><name>dhaumann</name><uri>http://www.blogger.com/profile/06242913572752671774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17552332.post-115364655799836340</id><published>2006-07-23T10:56:00.000+02:00</published><updated>2006-07-23T11:25:38.926+02:00</updated><title type='text'>Indentation and Coding Style</title><content type='html'>&lt;a href="http://lists.kde.org/?l=kde-core-devel&amp;m=115340952719876&amp;amp;w=2"&gt;kdelibs will have coding style conventions&lt;/a&gt;. In general. this is not a bad idea. Our 45528 slocs in KatePart all use a &lt;span style="font-style: italic;"&gt;consistent&lt;/span&gt; indent-width of 2 spaces. Changing this does not really make sense - ok, if svn praise -w (sure, we never need svn blame in our code ;) finally works, we can discuss this again.&lt;br /&gt;&lt;br /&gt;In other words: How "consistent" will kdelibs get with this new conventions? The interesting part of Zack's mail is&lt;br /&gt;&lt;blockquote&gt;[...]&lt;br /&gt;No exceptions. Either everything or nothing&lt;br /&gt;[...]&lt;/blockquote&gt;While everything would really be cool, in truth it's not possible to achieve, is it? We will have exceptions or rather violations, I'm pretty sure :)&lt;br /&gt;&lt;br /&gt;Some developers already start adding &lt;a href="http://www.kate-editor.org/article/katepart_modelines"&gt;katepart modelines&lt;/a&gt; to their souce code. For those who don't know yet: You also can simply use a single &lt;a href="http://www.kate-editor.org/article/.kateconfig"&gt;.kateconfig file&lt;/a&gt;, which is the equivalent to emacs dir config files. You just have to make sure to set the search depth for a .kateconfig file to - let's say - 3. Do this in &lt;blockquote&gt;Settings &gt; Configure Kate... &gt; Open/Save&lt;br /&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17552332-115364655799836340?l=dhaumann.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dhaumann.blogspot.com/feeds/115364655799836340/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17552332&amp;postID=115364655799836340' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/115364655799836340'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/115364655799836340'/><link rel='alternate' type='text/html' href='http://dhaumann.blogspot.com/2006/07/indentation-and-coding-style.html' title='Indentation and Coding Style'/><author><name>dhaumann</name><uri>http://www.blogger.com/profile/06242913572752671774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17552332.post-115338589680520058</id><published>2006-07-20T10:24:00.000+02:00</published><updated>2006-07-20T10:58:16.816+02:00</updated><title type='text'>Kate Project Plugin</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/4106/1694/1600/kateprojectmanager.png"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer;" src="http://photos1.blogger.com/blogger/4106/1694/320/kateprojectmanager.png" alt="" border="0" /&gt;&lt;/a&gt;It is not a secret that removing Kate's project manager in KDE 3.5 was not the right thing to do. It seems a lot of people used it and we got &lt;a href="http://bugs.kde.org/show_bug.cgi?id=116946"&gt;many complaints&lt;/a&gt; about this decision. That also shows that it is hard go get feedback about what users are really using. If a feature is done well, noone will ever talk about it. This is paradox, as we thought the project manager was not well integrated :) (I still think that)&lt;br /&gt;&lt;br /&gt;Ok, let's come to the interesting part: Three developers wrote a new &lt;a href="http://sourceforge.net/projects/kate-prj-mng/"&gt;&lt;span style="font-style: italic;"&gt;Kate Project Manager Plugin&lt;/span&gt;&lt;/a&gt; and published an initial release on sourceforge.net and on &lt;a href="http://www.kde-apps.org/content/show.php?content=42653"&gt;kde-apps.org&lt;/a&gt;. It works quite well already and reading the comments on kde-apps.org gives me the impression that there are more features to come with the next release. -- If you are interested maybe you want to join the project...&lt;br /&gt;&lt;br /&gt;PS: I have the secret hope the plugin will be ported to KDE4 using Qt's model/view architecture, so that it has good support for multiple mainwindows :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17552332-115338589680520058?l=dhaumann.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dhaumann.blogspot.com/feeds/115338589680520058/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17552332&amp;postID=115338589680520058' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/115338589680520058'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/115338589680520058'/><link rel='alternate' type='text/html' href='http://dhaumann.blogspot.com/2006/07/kate-project-plugin.html' title='Kate Project Plugin'/><author><name>dhaumann</name><uri>http://www.blogger.com/profile/06242913572752671774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17552332.post-115209018793533470</id><published>2006-07-05T10:55:00.000+02:00</published><updated>2006-07-05T11:03:07.943+02:00</updated><title type='text'>Access Keys</title><content type='html'>Our beloved konqueror browser supports a nice feature called access keys. To enable the access key mode you simply have to press ctrl. I quite often use ctrl+c/v in forms, and thus happen to trigger actions accidentally all the time. We are lucky though, as you can &lt;a href="http://bugs.kde.org/show_bug.cgi?id=109404#c1"&gt;disable the feature&lt;/a&gt; by putting&lt;br /&gt;&lt;blockquote&gt;[Access Keys]&lt;br /&gt;Enabled=false&lt;/blockquote&gt;into your  ~/.kde/share/config/khtmlrc&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17552332-115209018793533470?l=dhaumann.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dhaumann.blogspot.com/feeds/115209018793533470/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17552332&amp;postID=115209018793533470' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/115209018793533470'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/115209018793533470'/><link rel='alternate' type='text/html' href='http://dhaumann.blogspot.com/2006/07/access-keys.html' title='Access Keys'/><author><name>dhaumann</name><uri>http://www.blogger.com/profile/06242913572752671774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17552332.post-115166363087820829</id><published>2006-06-30T12:13:00.000+02:00</published><updated>2006-06-30T13:01:05.246+02:00</updated><title type='text'>Triple clicks</title><content type='html'>Text editors and line edits support the so-called triple clicks according to &lt;a href="http://developer.kde.org/documentation/standards/kde/style/mouse/selection.html"&gt;[1]&lt;/a&gt;. The document says&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Triple Click:  Select the targeted row. [...]&lt;/li&gt;&lt;/ul&gt;It is unclear whether the "targeted row" includes the trailing linebreak. Kate Part selects the targeted line including the linebreak. You get the following behavior:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;If you move the selected row with the mouse, you usually have the linebreaks right. The same applies for copy/cut &amp;amp; paste. If you are used to it, it really is a nice feature.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;While this behavior is pretty straightforward, it is not widely in use. If you look at text edit widgets like in firefox, konqueror, Qt, KWord or OOo you will notice that they do not include the trailing newline character.&lt;br /&gt;&lt;br /&gt;Question now is: Should we change it for KDE 4 in Kate Part just to be compliant with the others? As Kate Part is an editor component mainly used for programming, my favourite option is to include it, i.e. to keep the current behavior.&lt;br /&gt;&lt;br /&gt;(update) I just stumbled over &lt;a href="http://bugs.kde.org/show_bug.cgi?id=91041"&gt;http://bugs.kde.org/show_bug.cgi?id=91041&lt;/a&gt; =)&lt;br /&gt;&lt;br /&gt;[1] &lt;a href="http://developer.kde.org/documentation/standards/kde/style/mouse/selection.html"&gt;http://developer.kde.org/documentation/standards/kde/style/mouse/selection.html&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17552332-115166363087820829?l=dhaumann.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dhaumann.blogspot.com/feeds/115166363087820829/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17552332&amp;postID=115166363087820829' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/115166363087820829'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/115166363087820829'/><link rel='alternate' type='text/html' href='http://dhaumann.blogspot.com/2006/06/triple-clicks.html' title='Triple clicks'/><author><name>dhaumann</name><uri>http://www.blogger.com/profile/06242913572752671774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17552332.post-115152237390989138</id><published>2006-06-28T21:03:00.000+02:00</published><updated>2006-06-28T21:26:05.780+02:00</updated><title type='text'>Kate Part in upcoming KDE 3.5.4</title><content type='html'>The last week was highly productive for Kate Part, as the following bugs were fixed:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://bugs.kde.org/show_bug.cgi?id=89042"&gt;89042&lt;/a&gt; while pressing "del" key kate crashes (crash, bt)&lt;/li&gt;&lt;li&gt;&lt;a href="http://bugs.kde.org/show_bug.cgi?id=103648"&gt;103648&lt;/a&gt; Codefolding Crash - Reproducable&lt;/li&gt;&lt;li&gt;&lt;a href="http://bugs.kde.org/show_bug.cgi?id=118584"&gt;118584&lt;/a&gt; scroll position not upgrading (dynamic word wrap)&lt;/li&gt;&lt;li&gt;&lt;a href="http://bugs.kde.org/show_bug.cgi?id=119435"&gt;119435&lt;/a&gt; kate crash when a file is saved&lt;/li&gt;&lt;li&gt;&lt;a href="http://bugs.kde.org/show_bug.cgi?id=123315"&gt;123315&lt;/a&gt; kwrite/kate crashes randomly after save&lt;/li&gt;&lt;li&gt;&lt;a href="http://bugs.kde.org/show_bug.cgi?id=124102"&gt;124102&lt;/a&gt; changing syntax highlighting when code is folded crashes katepart&lt;/li&gt;&lt;li&gt;&lt;a href="http://bugs.kde.org/show_bug.cgi?id=127928"&gt;127928&lt;/a&gt; kate crashes deleting a block of text&lt;/li&gt;&lt;li&gt;&lt;a href="http://bugs.kde.org/show_bug.cgi?id=128690"&gt;128690&lt;/a&gt; Dynamic word wrap makes text input slow&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://bugs.kde.org/show_bug.cgi?id=129853"&gt;129853&lt;/a&gt; Horizontal scrollbar and view not synced, if dynamic and static word wrap are off &lt;/li&gt;&lt;li&gt;and some minor issues&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;That are 6 crash fixes. Kate Part in KDE 3.5.4 will be more stable than ever :) That's especially cool for KDevelop, Quanta+, Kile - well and Kate.&lt;br /&gt;Special thanks to Andreas Kling for initiating the bug squashing sessions! You are like a blackbox: The input is a bug and your output is the fix ;)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17552332-115152237390989138?l=dhaumann.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dhaumann.blogspot.com/feeds/115152237390989138/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17552332&amp;postID=115152237390989138' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/115152237390989138'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/115152237390989138'/><link rel='alternate' type='text/html' href='http://dhaumann.blogspot.com/2006/06/kate-part-in-upcoming-kde-354.html' title='Kate Part in upcoming KDE 3.5.4'/><author><name>dhaumann</name><uri>http://www.blogger.com/profile/06242913572752671774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17552332.post-112863166460956798</id><published>2006-06-26T02:29:00.000+02:00</published><updated>2006-06-25T16:32:58.660+02:00</updated><title type='text'>Start blogging</title><content type='html'>Today I created an account and this is my first blog.&lt;br /&gt;&lt;br /&gt;Huzzah.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17552332-112863166460956798?l=dhaumann.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dhaumann.blogspot.com/feeds/112863166460956798/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17552332&amp;postID=112863166460956798' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/112863166460956798'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17552332/posts/default/112863166460956798'/><link rel='alternate' type='text/html' href='http://dhaumann.blogspot.com/2006/06/start-blogging.html' title='Start blogging'/><author><name>dhaumann</name><uri>http://www.blogger.com/profile/06242913572752671774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
