From pgf@foxharp.boston.ma.us Wed Apr 23 07:55:58 1997 Received: from foxharp.boston.ma.us (gutso.foxharp.boston.ma.us [204.253.111.241]) by mail.clark.net (8.8.5/8.6.5) with SMTP id HAA24609 for ; Wed, 23 Apr 1997 07:55:57 -0400 (EDT) Received: (qmail 2366 invoked by uid 406); 23 Apr 1997 11:56:16 -0000 To: "T.E.Dickey" Subject: Re: vile 7.0h patch In-reply-to: dickey's message of Tue, 22 Apr 1997 23:00:40 -0400. <199704230300.XAA08525@clark.net> Reply-to: pgf@foxharp.boston.ma.us Date: Wed, 23 Apr 1997 07:56:16 -0400 Message-ID: <2364.861796576@foxharp.boston.ma.us> From: Paul Fox Status: RO > I don't think I received it - the only contrib thing I've in my queue is > the patched c-filt.c from last week. > oh -- he sent it to vile-users last night, about 10 minutes before we exchanged mail. here it is. it's cute. ; Mapped to ^A-e (and M-e), a simple dired ; "Brendan O'Dea" ; one keystroke: ; if in a [dired] buffer, edit directory or file on line under cursor ; if not in a [dired] buffer, edit current directory 4 store-macro ~if &seq $cbufname "[dired]" ; if already in dired, find the name from the current line beginning-of-line ~if &equ $char 100 set-variable %dired-type "dir" ~elseif &equ $char 45 set-variable %dired-type "file" ~else write-message "Not on a file/directory" ~return ~endif end-of-line back-word set-variable %dired-selection $pathname ~else ; otherwise choose current directory set-variable %dired-type "dir" set-variable %dired-selection "." ~endif ~if &seq %dired-type "dir" ~if &seq $status TRUE ; Create list edit-file &cat "!ls -la " %dired-selection ~if &seq $identifier "total" change-directory %dired-selection 1 delete-til lines delete-to-eol insert-string &cat &cat "[" $cwd "]" next-line end-of-line back-word unmark-buffer set-mode view ~force kill-buffer "[dired]" ~force rename-buffer "[dired]" write-message $cwd delete-other-windows ~else ~force next-word set-variable %error $line ~force kill-buffer "!ls" write-message %error ~endif ~endif ~else ; prepend `.' to ensure we don't pick up an old buffer edit-file &cat "./" %dired-selection ~endif ~endm bind-key execute-macro-4 ^A-e bind-key execute-macro-4 M-e