emacs-pretest-bug
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: dired-do-rename on "." and ".."


From: Luc Teirlinck
Subject: Re: dired-do-rename on "." and ".."
Date: Sat, 7 Jun 2003 15:47:16 -0500 (CDT)

Richard Stallman wrote:

       several Dired commands, including, for instance, `!' and
       dired-get-filename give errors like:

       dired-get-filename: Cannot operate on `.' or `..'

       when applied to _any_ directory, not just `.' or `..".

   Would you like to debug it?

Does the following do what you want?  If yes, I could commit it:


===File ~/dired-diff========================================
cd /usr/local/share/emacs/21.3.50/lisp/
diff -c /usr/local/share/emacs/21.3.50/lisp/dired.old.el 
/usr/local/share/emacs/21.3.50/lisp/dired.el
*** /usr/local/share/emacs/21.3.50/lisp/dired.old.el    Thu Jun  5 20:04:52 2003
--- /usr/local/share/emacs/21.3.50/lisp/dired.el        Sat Jun  7 15:15:31 2003
***************
*** 1490,1498 ****
       ((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))
--- 1490,1496 ----
       ((eq localp 'verbatim)
        file)
       ((and (not no-error-if-not-filep)
!          (member (dired-get-filename t t) '("." ".." "./" "../")))
        (error "Cannot operate on `.' or `..'"))
       ((and (eq localp 'no-dir) already-absolute)
        (file-name-nondirectory file))

Diff finished at Sat Jun  7 15:30:27
============================================================




reply via email to

[Prev in Thread] Current Thread [Next in Thread]