earth tech

[software and hardware technology originating from or otherwise pertinent to planet earth]

use these buttons to share this blog on portal sites:

Add to Google

Monday, October 26, 2009

 

Fix Emacs Backspace Ctl-H

Put this in your .emacs file...

(global-set-key "\C-h" 'backward-delete-char)

Labels: ,

Sunday, March 15, 2009

 

HowTo: Hide listings of hidden directories in Emacs 'dired' mode.

In order to not show hidden file names in the Emacs dired directory listings, take the following steps:

  1. Use the Meta–x to enter a command.
  2. At the M–x prompt, type customize–groupand hit <Enter>
  3. At the ’Customize group (default emacs):’ prompt type ’dired
  4. In the Emacs customization buffer for group Dired, find the option setting titled List Directory Verbose Switches [option variable name is list-directory-verbose-switches]
  5. Remove the a from the string value provided to list-directory-verbose-switches
  6. Save the changes.

Here is the Lisp code to set this option:

(if
    (eq system-type 'vax-vms)
    "/PROTECTION/SIZE/DATE/OWNER/WIDTH=(OWNER:10)" "-l")

The Lisp code can be placed in the .emacs file manually, if that method of editing and setting the Emacs environment options is preferred.

Labels: , , , , ,

Friday, January 12, 2007

 

GNU Emacs Mouse Wheel

Scott Hurring's .emacs has some lines of interest:

;; Turn ON mouse wheel support
(mouse-wheel-mode)

This mouse-wheel-mode doesn't seem to be available in GNU Emacs 20.4.1 (sparc-sun-solaris2.5.1) - instead a couple functions are defined in the .emacs:

;; Mousewheel
(defun sd-mousewheel-scroll-up (event)
  "Scroll window under mouse up by five lines."
  (interactive "e")
  (let ((current-window (selected-window)))
    (unwind-protect
        (progn 
          (select-window (posn-window (event-start event)))
          (scroll-up 5))
      (select-window current-window))))

(defun sd-mousewheel-scroll-down (event)
  "Scroll window under mouse down by five lines."
  (interactive "e")
  (let ((current-window (selected-window)))
    (unwind-protect
        (progn 
          (select-window (posn-window (event-start event)))
          (scroll-down 5))
      (select-window current-window))))

(global-set-key (kbd "") 'sd-mousewheel-scroll-up)
(global-set-key (kbd "") 'sd-mousewheel-scroll-down)

Seems like quite a lot of code, but this probably is what's obscured by the mwheel and mouse-wheel-mode modules.

According to the Fedora Emacs docs, the following should work with "the older version 20 of Emacs":

;; Enable wheelmouse support by default
(require 'mwheel)

However, this doesn't seem to work with the Solaris version - probably because mwheel appears is not installed.

Other items of interest here include:

;; show line numbers at bottom
(setq line-number-mode t)
(setq column-number-mode t)
(line-number-mode t)
(column-number-mode t)

;; no crap in *scratch* on startup
(setq inhibit-startup-message t)
(setq inhibit-startup-echo-area-message t)

Labels: , , ,

Archives

2006/12   2007/01   2007/05   2007/06   2007/07   2007/08   2007/10   2008/01   2008/02   2008/03   2008/05   2008/11   2008/12   2009/01   2009/02   2009/03   2009/04   2009/05   2009/07   2009/09   2009/10   2009/11   2009/12   2010/01  

This page is powered by Blogger. Isn't yours?

Subscribe to Posts [Atom]