🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.emacs
Article #8261

nice addition to dired

#8261
From: Erik Murrey
Date: Fri, 06 Jan 1989 21:02
30 lines
1425 bytes
Here is a "one-liner" that I added to dired that saves a few dozen
keystrokes, called "dired-exit" that quits a dired session and removes
the buffer.  This is *great* when you are recursing down directories
with dired, and need to pop back without leaving a mess of dired buffers
behind...  I bind it to my "q" key:

Just add this to your .emacs file, (or just add the key definition to
your dired hook, if you already have one...)

;;; dired-exit hook stuff... 1/6/89 erik@mpx2.UUCP
(setq dired-mode-hook 'set-my-dired-keys-hook)

(defun set-my-dired-keys-hook ()
  "My favorite dired vars."
  (local-set-key "q" 'dired-exit)))

;;; command to quit a dired session...
(defun dired-exit ()
  "Quit editing this directory."
  (interactive)
  (kill-buffer (current-buffer)))


...Erik
-- 
Erik Murrey                            /|   //  /~~~~/  |  /
MPX Data Systems, Inc.                / | / /  /____/   |/
erik@mpx2.UUCP                       /  /  /  /        /|  Data Systems, Inc. 
{spl1,vu-vlsi,bpa}!mpx1!erik        /     /  /       /  |====================
Technical Details
Message-ID: <331@mpx2.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watmath!clyde!att!alberta!ubc-cs!uw-beaver!mit-eddie!mpx2.UUCP!erik

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watmath!clyde!att!alberta!ubc-cs!uw-beaver!mit-eddie!mpx2.UUCP!erik
From: erik@mpx2.UUCP (Erik Murrey)
Newsgroups: comp.emacs
Subject: nice addition to dired
Message-ID: <331@mpx2.UUCP>
Date: 6 Jan 89 21:02:38 GMT
Sender: uucp@eddie.MIT.EDU
Organization: MPX Data Systems, Inc. ,  Wayne, PA
Lines: 30