On Emacs and stuff.

Compilation of useful information on Emacs, SBCL and SLIME.

Friday, October 21, 2011

Emacs or Ubuntu sucks.

I have a part in my dot-file that positions the Emacs window on the screen. It works on all OSes: Windows, OSX and linuxes. I use only Ubuntu for now and guess which OS puts the Emacs window on the screen incorrectly? Well, you can guess from the header of the post.

To implement the positioning, I used following link: How do I set the size of Emacs' window?
The code I have now is this:
(progn
  (set-frame-size (selected-frame) 146 39)
  (set-frame-position (selected-frame) 105 30))
Also I tried this:
(setq initial-frame-alist
 (append '((width . 135) (height . 55) (top . 15) (left . 140))
  initial-frame-alist))
Anyway, I don't get it - how it is possible to misplace the window on the screen so wrong. It blinks, jumps, resizes itself for few times and finally is placed more or less randomly on the screen.

I guess Ubuntu is not to blame. Maybe X server is, maybe Emacs itself.
But I don't care actually, should I?

Thursday, May 12, 2011

Finally got rid of tabbar and slime header line.

Last improvements are:
  • got rid of TABBAR and SLIME header line in REPL buffer, so I have less trash on the screen.
  • changed buffer switching to bs-show, which is more compact and sane
  • turned on IDO-mode, which is good for loading files
  • turned on autocomplete-mode everywhere
  • turned on highlight-symbol-mode everywhere
Here is the .emacs file:

Maybe later I would split it to different files and do something like Steve Yegge did.

Wednesday, April 20, 2011

Narrowing

Following commands seem to help very much.

In short, with "narrow" I leave only current defun in the buffer to edit, with "widen" I show complete file again.

C-x n d ...... Narrow down to the current defun (`narrow-to-defun').
C-x n w ...... Widen to make the entire buffer accessible again (`widen').

There are two more commands for region and page, but they are useless for me.
Anyway in Emacs' help one can find full description in the chapter called "Narrowing".

And yes, I added following three lines to my .emacs file to enable described functionality:
(put 'narrow-to-defun 'disabled nil)
(put 'narrow-to-page 'disabled nil)
(put 'narrow-to-region 'disabled nil)

Code folding

hs-minor-mode
show all ---------- C-c @ C-M-s
hide all ---------- C-c @ C-M-h
show block -------- C-c @ C-s
hide block -------- C-c @ C-h
toggle hide/show -- C-c @ C-c
toggle hide/show -- S-mouse-2

Another "a must": macros.

Here is a detailed description.

Friday, April 15, 2011

Current outlook.

Tuesday, April 12, 2011

Another Emacs plugin: highlight-symbol

I guess, it is a must.



C-f3 - highlight-symbol-at-point
  f3 - highlight-symbol-next
S-f3 - highlight-symbol-prev
M-f3 - highlight-symbol-prev

My Blog List

  • Under impression. - I still cannot believe that this was coded. At some point I convinced myself that this should be some kind of music video. But then... They have said that ...
    3 years ago
  • Working on KD-tree. - Trying to implement KD-tree for the ray tracer, I solve appearing problems with both environment and the language itself. Anyway, the result can be found an...
    3 years ago
Powered by Blogger.