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 12:35

3
Or just use vim.

Name: Anonymous 2008-04-11 12:36

>>2
OH LOLOLOL I DIDANT SEE DAT COMING ROFL!!!!!!!!

Name: Anonymous 2008-04-11 12:37

>>1
1. :set number
2. :nmap <Leader>x :source ido.vim<cr>

Name: Anonymous 2008-04-11 12:38

>>3
Of course you saw it coming. Why would anyone use emacs? Seriously.

Name: Anonymous 2008-04-11 12:44

>>5
You seem to be ignoring the point of this thread. Please go have your editor arguments elsewhere. People use Emacs, get over it.

Name: Anonymous 2008-04-11 12:45

>>6
I'm sorry. I thought this was /dqn/.

Name: Anonymous 2008-04-11 12:49

How do I enable anti-aliased fonts in Emacs?

Name: Anonymous 2008-04-11 12:53

>>8
What operating system?

If Linux/Mac: Use Emacs from a terminal.
Windows: google ntemacs

Name: Anonymous 2008-04-11 12:54

To play tetris, M-x tetris.

Name: Anonymous 2008-04-11 13:02

``
In 1998 when a United Airlines plane was waiting in the queue at Chicago Airport for take-off to New Orleans (where a Usenix conference was taking place), one man stood up from his seat, demanded that they stop waiting in the queue and be permitted to deplane. Even after orders from the crew and a pilot from the cockpit he refused to sit down. The plane exited the queue and returned to the airport gangway. Security personnel ran onto the plane and removed this man, Richard Stallman, from the plane. After Richard was removed from the plane, everyone else stayed onboard and continued their journey to New Orleans.
''

Name: Anonymous 2008-04-11 13:06

VIMMERS unite!

Name: Anonymous 2008-04-11 13:16

Richard felt that this "ports tree" of ours made OpenBSD non-free. He came to our mailing lists and lectured to us specifically, yet he said nothing to the many other vendors who do the same; many of them donate to the FSF and perhaps that has something to do with it. Meanwhile, Richard has personally made sure that all the official GNU software -- including Emacs -- compiles and runs on Windows.

That man is a false leader. He is a hypocrite. There may be some people who listen to him. But we don't listen to people who do not follow their own stupid rules.

Name: Anonymous 2008-04-11 13:16

>>8
You can get Emacs with Xft support from CVS.

Name: Anonymous 2008-04-11 13:17

>>2
I don't actually feel the need to do any penances.

Name: Anonymous 2008-04-11 13:23

Name: Anonymous 2008-04-11 13:33

>>16
I lol'd at your persistence to demonstrate that vi can do everything Emacs can do, regardless of inanity.

Name: Anonymous 2008-04-11 13:35

>>17
Inanity?  Such as including Tetris in the Emacs distribution?

Name: Anonymous 2008-04-11 13:47

>>18
Such as imitating it.

Name: Anonymous 2008-04-11 13:54

>>19
The script I linked was posted in 2002, I don't know when Emacs copied that from Vim, but it's got to be way later.

Name: Anonymous 2008-04-11 14:00

;;; tetris.el --- implementation of Tetris for Emacs
;; Copyright (C) 2007 Free Software Foundation, Inc.
;; Author: Glynn Clements <glynn@sensei.co.uk>;
;; http://home.pipeline.com/~hbaker1/emacs/tetris.el
;; To adjust the
probabilites of the 7 pieces, put new non-negative
;; integers into the vector "my-weights".
;; Version: 2.01
;; Created: 2007-08-13
;; Keywords: games
;; This file is part of GNU Emacs.
;; GNU Emacs is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 2, or (at your option)
;; any later version.

Name: Anonymous 2008-04-11 14:12

>>18,19
No, writing Tetris for an editor is inane. Just because Emacs has some stupid feature, it doesn't make Vim any more impressive because it too has that stupid feature. Stop trying to validate your choice of editor. Chances are that nobody cares.

If nobody else has any Emacs tips left to post then the rest of this thread is stupidity and low self-esteem.

Name: Anonymous 2008-04-11 14:13

>>22
If nobody else has any Emacs tips left to post then the rest of this thread is stupidity and low self-esteem.
Chances are that nobody cares.

Name: Anonymous 2008-04-11 14:14

>>22
I can post Vim tricks:
au BufNewFile,BufRead ~/tabssuckproject/*.[ch] set expandtab
au BufNewFile,BufRead COMMIT_EDITMSG set syntax=diff

Name: Anonymous 2008-04-11 14:17

>>23
Evidently.

Name: Anonymous 2008-04-11 14:29

4
Enable partial-completion-mode, so you can type rev-buf instead of revert-buffer, etc.

Name: Anonymous 2008-04-11 14:42

>>26
Can you enable par-comp-mode?

Name: Anonymous 2008-04-11 14:53

/prog/: Big men with BIG problems.

Name: Anonymous 2008-04-11 15:04

>>28
Something's big alright.

Name: Anonymous 2008-04-11 15:11

>>29
Now you have two problems.

Name: Anonymous 2008-04-11 15:16

Make Emacs only scroll far enough to keep the point on the screen:
(setq scroll-margin 0) ; Scroll when point is 0 lines from edge
(setq scroll-conservatively 2)

Name: Anonymous 2008-04-11 15:34

Automatically resize temporary buffers to use not more space than needed.
(setq temp-buffer-resize-mode t)

Name: Anonymous 2008-04-11 15:34

How do I start emacs maximised?

Name: Anonymous 2008-04-11 15:51

>>32
Oh, that's a good one. Cheers.

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)

Name: Anonymous 2008-04-11 16:45

>>33
That's probably a window manager thing, although if you just want it near screen size you can specify window geometry on the command line.

Name: Anonymous 2008-04-11 17:01

>>33
devilspie?

Name: Anonymous 2008-04-11 17:43

Tis thread reminds me that my .emacs is a pretty fucking mess...

Name: Anonymous 2008-04-11 18:36

ITT Emacs Noobs

Name: Anonymous 2008-04-11 23:47

>>39
I Disagree With That Sentiment!

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