automatically disable a global minor mode for a specific major mode

Global minor modes created with the define-globalized-minor-mode1 macro are a bit tricky. The reason your code doesn’t appear to do anything is that globalized modes utilise after-change-major-mode-hook to activate the buffer-local minor mode that they control; and that hook runs immediately after the major mode’s own hooks4. Individual modes may implement custom ways of specifying … Read more

How can I more easily switch between buffers in Emacs?

UPDATE: iswitchb-mode is obsolete in Emacs >= 24.4, replaced by ido. All of the features of iswitchdb are now provided by ido. Ross provided a link to the documentation in his answer. You can activate with the following in your .emacs (or use the customization interface as Ross suggests): (require ‘ido) (ido-mode ‘buffers) ;; only … Read more

Emacs: help me understand file/buffer management

Bind C-x C-b to ibuffer. This is a better buffer listing facility with many advanced features, and its default behaviour is to replace the current buffer with the buffer listing, and then bury the listing when you select a buffer (leaving you with the newly-selected buffer in place of the original one). You can simply … Read more

Emacs: Tramp doesn’t work

If the account you’re connecting to uses some weird fancy shell prompt, then there is a good chance that this is what makes tramp trip. Log in as root, then enter PS1=”> ” (that’s a normal, standard shell (ZSH, BASH, younameit) prompt, one that tramp will understand) then switch to the user account, and launch … Read more