6197 comments
2357 subscribers
Follow me on Twitter (@sachac)
Subscribe! Feed reader E-mail

One #emacs day – 0. 2005.01.05 and 1. 2005.01.06

([[EmacsDay#note1][EmacsDay:1]]”[[EmacsTips#note20][EmacsTips:20]])

(Technically, one and a half, because this is the first entry)

Here are interesting tidbits from irc://irc.freenode.net/#emacs

Code

- M-x column-number-mode makes Emacs show column numbers.
- emms-locate is a useful way to play selected media files.
- Powerful buffer switching: With either iswitchb or ido, C-x b C-s. ido seems to be better than iswitchb for multitty Emacs, and comes with CVS GNU Emacs. iswitchb is in GNU Emacs and the edit-utils package for XEmacs. If you want to stick with iswitchb fulltime, add (iswitchb-default-keybindings) to your init.el.
- ess (emacs spreadsheet):
set-variable set-goal-column nil for neater navigation
- emms: (define-key dired-mode-map [.] 'emms-play-dired) after dired is already loaded
- Editing XML: Many people recommend nxml (GNU Emacs only). xsl-mode is also useful even for other XML files. xsl-mode indentation is better than xml-mode, too. xsl-mode is in the xslide package, and in the cygwin sumo package.
- If you want Python files recognized, install python-mode and (add-to-list 'auto-mode-alist (cons "\\.py\\'" 'python-mode))
- Gnus: You can use B DEL to delete drafts.
- Recursion in lambdas! (funcall #1=(lambda (n) (if (= n 0) 1 (* n (funcall #1# (1- n))))) 5) - result: 120. Not recommended.
- Use M-x goto-line to go to the nth line.
- To copy the font setting and color-theme of the old frame when you create a new frame: (defadvice make-frame (around frob-frame-parameters activate) (let ((default-frame-alist (frame-parameters))) ad-do-it))
- How to get rid of all the ^Ms at the end of lines: M-% C-q C-m RET C-q RET RET . (Better solution: M-x revert-buffer-with-coding-system, dos.)
- desktop can make Emacs jump to the previous position in a file when you reopen the file
- Setting auto-fill in file comments: -*- mode: major; mode: auto-fill -*-, where major is the major mode you want

Issues

- ess toolbar variables (customization) need to be set before ess is loaded, but ess is loaded in site-start. How do you set it, then?

Misc

- ljupdate darcs repository: http://edward.oconnor.cx/code/ljupdate/
- ERC seems to be the most popular IRC client.
- Have you checked out the Emacs LiveJournal community? http://www.livejournal.com/community/emacs/
- Don’t worry about losing local changes when you modify the source code of CVS Emacs. CVS does patches.
- Emacs under screen: C-\ might be a good Screen escape key.
- People use normal synchronization tools like rsync, unison, and CVS to sync their planner.el pages between computers.
- Hook variables named -hook tend to not take arguments, while hook variables named -functions might be called with arguments.
- Debian: /etc/emacs/site-start.d and /usr/share/emacs/site-lisp/debian-startup.el are responsible for lines like “Loading 00debian-vars (source)…”, while /usr/lib/emacsen-common/emacs-package-install is called when the deb is being set up.

On Technorati:

Short URL: http://sachachua.com/blog/p/2551

On This Day...

  • 2013: Cooking: Warm lentil salad with sausages — “Eat more healthily” is a popular New Year’s resolution. It’s on our list too – a push towards eating more [...]
  • 2012: LEGO and Indiana Jones: nuking the fridge got a lot more fun — W- picked up the LEGO Indiana Jones game to round out our collection, and we’ve all been enjoying it. The [...]
  • 2011: Moving my book notes online — I moved more of my book notes online, reasoning that a braindump is better than occasional whining about the lack [...]
  • 2010: On pen and paper — A friend of mine wanted to know my notebook preferences, so here’s what I do in terms of pen and [...]
  • 2010: Offline and online conversations — Do you miss the serendipity of hallway conversations at conferences and events? Online conversations can be more powerful than offline ones. [...]
  • 2009: Emacs, file-cache, and ido — (require 'filecache) (require 'ido) (defun file-cache-ido-find-file (file) "Using ido, interactively open file from file cache'. First select a file, matched using ido-switch-buffer [...]
  • 2009: AutoHotkey scripts for switching to windows — Muscle memory helps you be more efficient. Here’s some AutoHotkey code I use to toggle Chrome (F10), Windows Live Writer [...]
  • 2008: Teaching the attitude — J- was getting frustrated by the game of chess she was playing with her dad. She couldn’t see any good [...]
  • 2007: Neko — One of the little joys of being home is spending time with my cat, whom no one else loves, but stays [...]
  • 2007: On hold — You think that of all people, Simon and I would be able to find some way to talk for free (or [...]
  • 2007: You know, things aren’t so bad — There are lots of positive things to focus on. =) I just have to have faith that if I keep learning [...]
  • 2007: All that is precious — If I listen to the quiet stirrings of my heart, to the restlessness that prevents me from spending days here like [...]
  • 2005: Physics in the City, Eastwood, Jan 15 — As Rick posted on PLUG: The organizers of the Physics in the City on Jan. 15 at Eastwood City have lined up [...]
  • 2005: The Command Line in 2004 — http://home.earthlink.net/~android606/commandline/index.html Garrett Birkel wrote an interesting response to Neal Stephenson’s “In the Beginning was the Command Line”. On Technorati: geek
  • 2005: 43Folders: Snapshots of a Dream Productivity App — Hooks and more hooks – As I’ve repeated until I’m hoarse, apps like Quicksilver change the way you use your Mac. [...]