[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: dired-do-rename on "." and ".."
From: |
Markus Rost |
Subject: |
Re: dired-do-rename on "." and ".." |
Date: |
Wed, 4 Jun 2003 18:16:02 -0400 (EDT) |
Not wanting to spend a lot of time, I wrote code that won't let most
Dired commands operate on either . or ...
With your change you get an error when creating new subdirectories in
dired with key "+". I couldn't spend much time on it, but I think the
following patch fixes this.
* dired.el (dired-get-filename): Don't err for . and .. for calls
from dired-add-entry.
===Buffer *vc-diff*=========================================
*** dired.el.~1.260.~ Wed Jun 4 14:09:46 2003
--- dired.el Wed Jun 4 18:05:36 2003
***************
*** 1487,1499 ****
(cond
((null file)
nil)
((and (not no-error-if-not-filep)
(save-excursion
(beginning-of-line)
(looking-at dired-re-dir)))
(error "Cannot operate on `.' or `..'"))
- ((eq localp 'verbatim)
- file)
((and (eq localp 'no-dir) already-absolute)
(file-name-nondirectory file))
(already-absolute
--- 1487,1499 ----
(cond
((null file)
nil)
+ ((eq localp 'verbatim)
+ file)
((and (not no-error-if-not-filep)
(save-excursion
(beginning-of-line)
(looking-at dired-re-dir)))
(error "Cannot operate on `.' or `..'"))
((and (eq localp 'no-dir) already-absolute)
(file-name-nondirectory file))
(already-absolute
============================================================
- dired-do-rename on "." and "..", Markus Rost, 2003/06/01
- Re: dired-do-rename on "." and "..", Richard Stallman, 2003/06/03
- Re: dired-do-rename on "." and "..", Markus Rost, 2003/06/03
- Re: dired-do-rename on "." and "..", Richard Stallman, 2003/06/04
- Re: dired-do-rename on "." and "..",
Markus Rost <=
- Re: dired-do-rename on "." and "..", Luc Teirlinck, 2003/06/05
- Re: dired-do-rename on "." and "..", Richard Stallman, 2003/06/07
- Re: dired-do-rename on "." and "..", Luc Teirlinck, 2003/06/07
- Re: dired-do-rename on "." and "..", Luc Teirlinck, 2003/06/07
- Re: dired-do-rename on "." and "..", Luc Teirlinck, 2003/06/07
- Re: dired-do-rename on "." and "..", Markus Rost, 2003/06/07
- Re: dired-do-rename on "." and "..", Luc Teirlinck, 2003/06/07
- Re: dired-do-rename on "." and "..", Luc Teirlinck, 2003/06/07
- Re: dired-do-rename on "." and "..", Luc Teirlinck, 2003/06/07
- Re: dired-do-rename on "." and "..", Markus Rost, 2003/06/07