Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Emacs tips

Name: Anonymous 2008-04-11 12:34

ITT we give fairly short tips or advice about Emacs.

1
If you want line numbers for Emacs, use Linum mode: http://stud4.tuwien.ac.at/~e0225855/linum/linum.html
You'll probably want to have a space between the line numbers and your buffer's content, so modify linum.el: on line 160 or so of linum.el, change (setq width (max width (length str))) to (setq width (max width (+ (length str) 1))).
Example here: http://www.emacswiki.org/pics/static/LinumGap.png

2
ido-mode for M-x:


    (defun ido-execute ()
      (interactive)
      (call-interactively
       (intern
        (ido-completing-read
         "M-x "
         (let (cmd-list)
           (mapatoms (lambda (S) (when (commandp S) (setq cmd-list (cons (format "%S" S) cmd-list)))))
           cmd-list)))))
   
    (global-set-key "\M-x" 'ido-execute)

Good for newbies.

Name: Anonymous 2008-04-11 16:04

>>34
You might also like this. It will hide the compilation buffer when the compilation finished without errors.
(defun compilation-buffer-resize (buffer string)
  (cond ((string-match "finished" string)
         (bury-buffer buffer)
         (delete-windows-on buffer)
        (t
         (fit-window-to-buffer (get-buffer-window buffer) (/ (- (frame-height) 2) 2))))))

(add-hook 'compilation-finish-functions 'compilation-buffer-resize)

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List