XEmacs is a nice GUI. Problem is, most of the handy little utilities you need are written for GNU-Emacs and they don’t work too well.
I wanted to get a function like the vi `dot.’ function, that simply repeats the last command. It’s not there in XEmacs. This has been in GNU-Emacs for ages, and there is a patch for XEmacs, but I don’t have the energy to mess about building one or contacting the guy that implemented it to see if there’s a windows build with it in.
I wanted a function like the gvim get-keyword (normally bound to ^X^P) that takes the characters you’ve just typed, scans backwards (or forwards if you use ^N) for a word like the one you’ve just typed a bit of. I found this for GNU Emacs and it would’t compile with XEmacs. Have’t tried it yet but I know it’ll work. Gvim has a way of getting a whole line but I don’t need it that much.
I wanted a function like gvim find word under cursor (bound to * for forward and # for backward) and found a very simple example that I hacked to work in both directions; to be fair this worked on both. I’ve bound it to control- keypad * and -. I suppose if you’ve got tags it is’t that important, but I’ve yet to see proper tags for PL/SQL (not so sure about Python).
I don’t like the poor mouse menu stuff in XEmacs either. The mouse works like with X-Windows on GNU and if you hold down control you can get to the buffer menu, the edit menu and the mode menu from the 3 mouse buttons. XEmacs only gives you the mode menu on the third mouse button so you can’t do silly stuff like select. copy, move to another location, paste. The X-Window behaviour gives you that anyway in a much neater form. This functionality does’t work quite correctly in gvim so one up for GNU Emacs I think.
[[ Update Dec-06 most of this stuff is there but called something different, the copy existing word in buffer is
(global-set-key [C-return] ’dabbrev-expand)
– here bound to control-return. Find element under cursor, press incremental search and use ^K to select more and more of the word. Also works with reverse search as well. ^Y after incremental selects the whole of the rest of the line ]]
Tabs and indentation
This is a total pain. Tabs are mode dependent and indentation depends upon the whims of whoever set up the mode you are using. In essence, to make it work correctly for the Enter key, do this in your run file (works with both):
(global-set-key “C-m” ‘newline-and-indent)
PL/SQL mode is’t quite right. When I have the time I’ll fix it and send it back to the guy who wrote it originally. I love being able to pick the procedures and functions from a list.
I’ve also got
(setq indent-line-function ‘indent-relative-maybe)
(setq-default tab-width 2)
But can’t remember why at the moment!
Not as good as gvim, I can mark a block and indent from it. I think that once I can remember the rectangle mnemonics I’ll be OK. Bought the O’Reilly GNU Emacs book with my Xmas book token – god I’m sad.
The XEmacs mouse rectangle stuff is difficult to use. I think the GNU will win out when I get used to it.
It’s been an interesting few days but I think my productivity will start to rise, particularly with the more powerful PL/SQL mode.
Just need to add all of my abbreviations in next …
[[ Update Dec-06 dabbrev-expand makes running SQL*Plus a dream, press your bound key and up pops the column name or value from any other open buffer – brilliant ]]