[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
two suggestions for the keymap in dired mode
From: |
Daniel Ortmann |
Subject: |
two suggestions for the keymap in dired mode |
Date: |
15 Jan 2001 18:29:23 -0600 |
This bug report will be sent to the Free Software Foundation,
not to your local site managers!!
Please write in English, because the Emacs maintainers do not have
translators to read other languages for them.
In GNU Emacs 20.7.1 (i386--freebsd, X toolkit)
of Fri Sep 22 2000 on pyrl.eye
configured using `configure --with-x-toolkit --with-pop --prefix=/usr/local
i386--freebsd'
Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:
I suggest that, in dired mode, the "r" key should invoke a
dired-find-file-read-only,
and the backslash key "\\" (or something better?) invoke
dired-find-file-literally
as follows:
; the following was copied from dired-find-file in dired.el and modified.
(defalias 'dired-advertised-find-file-read-only 'dired-find-file-read-only)
(defun dired-find-file-read-only ()
"In dired, visit the file or directory named on this line in read-only
mode."
(interactive)
(let ((file-name (file-name-sans-versions (dired-get-filename) t)))
(if (file-exists-p file-name)
(find-file-read-only file-name)
(if (file-symlink-p file-name)
(error "File is a symlink to a nonexistent target")
(error "File no longer exists; type `g' to update Dired buffer")))))
(defalias 'dired-advertised-find-file-literally 'dired-find-file-literally)
(defun dired-find-file-literally ()
"In dired, visit the file or directory named on this line in read-only
mode."
(interactive)
(let ((file-name (file-name-sans-versions (dired-get-filename) t)))
(if (file-exists-p file-name)
(find-file-literally file-name)
(if (file-symlink-p file-name)
(error "File is a symlink to a nonexistent target")
(error "File no longer exists; type `g' to update Dired buffer")))))
(define-key dired-mode-map "r" 'dired-advertised-find-file-read-only)
(define-key dired-mode-map "\\" 'dired-advertised-find-file-literally)
Recent input:
return C-v C-l M-x u n h s c tab return C-x k return
M-< n n n n n ! r m SPC - r f return g ~ x y e s return
M-> q g C-n C-n return M-> C-p C-p C-p return C-x o
C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-v C-l
M-x r e p o r t - e m tab return C-g C-s s u b j e
c t C-s C-f C-f C-SPC C-e M-w M-x r e p o r t - e m
tab return
Recent messages:
Retrieving newsgroup: nnml:mail.misc...
Fetching headers for nnml:mail.misc...
Fetching headers for nnml:mail.misc...done
Generating summary...
Generating summary...done
Mark set
Loading emacsbug...
Loading emacsbug...done
Quit
Mark saved where search started
--
Daniel Ortmann IBM Circuit Technology
2414 30 av NW, #D E315, bldg 040-2
Rochester, MN 55901 3605 Hwy 52 N
507.288.7732 (h) 507.253.6795 (w)
ortmann@isl.net ortmann@us.ibm.com
"The answers are so simple and we all know where to look,
but it's easier just to avoid the question." -- Kansas
- two suggestions for the keymap in dired mode,
Daniel Ortmann <=