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

Pages: 1-4041-

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!

Name: Anonymous 2009-01-29 2:21

How do you change the color of filename which is displayed at the titlebar?
I'm having trouble reading it.
any help will be appriciated.
thanks!

Name: Trollbot9000 2009-07-01 8:56


else and Java does Adding a new  age of Computing.

Name: Trollbot9000 2009-07-01 9:18

Want some examples in an attempt to  get us to  the issue of  WYSIWYG editing has  come up This  is a thread  And saging a  thread pushes it  down and starts  clapping her hands  together see this  is where the  output and input  are generated About  the only thing.

Name: Anonymous 2009-08-12 15:20

>>35


Test

Name: Anonymous 2009-08-16 17:14

in fact In fact, the the          good the          good posters posters 12 posters 12:44 44:43 44:43  jorick jorick perhaps jorick perhaps what What about What about my my fault my fault was was an was an  undergradute undergradute. These undergradute. These guys guys And guys And  Lain Lain.  Lain Lain.  Lain.  Lain

Name: Anonymous 2010-06-30 3:34

>>13
tl;dr warning

Richard Stallman couldn't recommend OpenBSD as a fully free operating system, because a requirement is that it can't have non-free software in it's repository, or recommend non-free software.  Only a small list of (Gnu/)Linux distributions are officially recommend by the FSF. Most, including Slackware, Debian, and Ubuntu are not.

A lot of the work to support Emacs (and other Gnu software) on windows was done by a third party, cygnus solutions.  The first "freedom" of free-software is that you can run the software however you want, including running it on an operating system the author doesn't approve of.

But that's irrelevant, because I would never use OpenBSD, anyway. They act like 13 year-olds on their mailinglists, this is illustrated by the fact that some butthurt dev came on some random thread about emacs to cry. It's often proclaimed by the OpenBSD team that their precious operating system is secure, though it's anything but, http://allthatiswrong.wordpress.com/2010/01/20/the-insecurity-of-openbsd/   Only good thing that came out of OpenBSD was OpenSSH.

Name: Anonymous 2010-06-30 8:16

>>48
If you think 164 words is too long to read, I don't think your opinion is valid, and would like to direct you /Polecat Kebabs/

Name: Anonymous 2010-06-30 8:29

>>49
Validity is a property of mutations to propositions. Opinions are neither valid nor invalid.

Name: Anonymous 2010-06-30 8:33

>>50
My point remains.

Name: Anonymous 2010-06-30 9:19

Does anyone know of an M-x glasses-mode equivalent for Vim? It's a feature I always wanted to try out because it would improve code readability but couldn't find an alternative to it.

Name: Anonymous 2010-06-30 9:26

>>52
Try writing better code.

Name: Anonymous 2010-06-30 10:14

>>52

Stop writing in Java

Name: Anonymous 2010-06-30 11:47

>>53
I am trying but that entails reading code written by others.

>>54
I would, if my paycheck didn't depend on it right now.

Name: Anonymous 2010-06-30 14:22

>>13
Everyman is a hypocrite, son. Facts of life. Just ask the man that has teenaged daughters....

Name: Anonymous 2010-06-30 14:53

>>13
because he knows without windows support the software is worth much less. What does sound more important: Emacs a linux toy vs multiplatform editor 'EMACS'.

Name: Anonymous 2010-06-30 15:51

>>57
Emacs was fifteen years old before Torvalds even started working on the Linux kernel. Anyone who would have called it ``a Linux toy'' before the addition of Windows support wouldn't have started calling it multi-platform afterwards, because they wouldn't have a clue what the term means.

Name: Anonymous 2011-02-03 2:28

Name: Sgt.Kabukiman 2012-05-21 16:17

All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy

Name: Anonymous 2012-05-21 18:01

Rei.

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