[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Elisp newbie trying a derived mode
From: |
davex |
Subject: |
Elisp newbie trying a derived mode |
Date: |
28 Sep 2006 12:02:48 -0700 |
User-agent: |
G2/1.0 |
Hello all, my first post here, and I've recently started coding elisp.
I want a simple method of interactively selecting multiple files or
directories, and passing the selection list to an external program.
My first thought was to tweak dired mode, so that I could just navigate
around dirs, marking files and dirs that I want (with 'm') and then
have a special key call dired-do-shell-command with something to
append each marked entry to a text file.
Question: is there something simpler than dired to tweak? All I really
need is the directory navigation and marking capability.
Another question: as long as I run dired first, the following code lets
me do M-x file-select-mode, showing a dired type buffer, and my
C-c k *does* print the message (yippee), but when I try to mark a
file with 'm', I get 'No subdir-alist in elisp'. Anyone know why?
(defun !fsm-keyfunc ()
(interactive)
(message "you pushed the key")
)
(defun !fsm-func ()
(local-set-key "\C-ck" '!fsm-keyfunc)
)
(define-derived-mode file-select-mode
dired-mode "file-select"
"Major mode for file selection."
(setq file-select-mode-hook '!fsm-func)
)
Thank you for your time! Any guidance will be greatly appreciated.
- Elisp newbie trying a derived mode,
davex <=