Everytime I wanted to get a console I typed F12, willing to make Yakuake come down. But sometimes I pressed F11 and then Devhelp was loaded. It’s ok when you make this mistake one, two or even three times…but It was happening a lot.
I searched my entire KDE’s shortcuts trying to find where the hell was that key binding but I had no luck. After a while, I discovered that it only happened when I was inside Emacs…hmmm…of course it was an Emacs key binding and not KDE’s one!
Ok, now I was able to remove the F11 key binding, but the fun just started: how about binding Qt’s Assistant instead of Devhelp as I’m working much more with Qt than with GTK ??? 😉
At first it looked pretty easy, just needing a few lines inside .emacs:
(defun assistant ()
"runs qt assistant"
(interactive)
(start-process-shell-command "assistant" nil "assistant")
)
(global-set-key [f11] 'assistant)
But now I really need Assistant to automatically search for a keyword when I open it. It would be much easier to just put the cursor in the keyword I want and make Assistant search for it. A few hours later I finished it and came along with the following patch on my “personal” Assistant:
0001-created-search-keyword-function.patch
And my final Emac’s function:
(defun assistant ()
"runs qt assistant"
(interactive)
(start-process-shell-command "assistant" nil "assistant" "-search" (current-word))
)
(global-set-key [f11] 'assistant)
So much fun with Qt =P
I set yakuake on “Scroll Lock”, because these days this key is not used anyway and blender uses F12 as shortcut for render (blender does not yet support changing the shortcuts, this will come with 2.50, I think).
Pingback: Bookmarks about Emacs