From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thierry Volpiatto Newsgroups: gmane.emacs.devel Subject: bugfix eshell/rm Date: Fri, 11 Mar 2011 09:04:07 +0100 Message-ID: <8762rqozgo.fsf@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1299830677 30569 80.91.229.12 (11 Mar 2011 08:04:37 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 11 Mar 2011 08:04:37 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Mar 11 09:04:31 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PxxKm-00014V-Bv for ged-emacs-devel@m.gmane.org; Fri, 11 Mar 2011 09:04:28 +0100 Original-Received: from localhost ([127.0.0.1]:39291 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PxxKl-00013M-JD for ged-emacs-devel@m.gmane.org; Fri, 11 Mar 2011 03:04:27 -0500 Original-Received: from [140.186.70.92] (port=57243 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PxxKh-00013G-EU for emacs-devel@gnu.org; Fri, 11 Mar 2011 03:04:24 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PxxKg-0001mk-Jg for emacs-devel@gnu.org; Fri, 11 Mar 2011 03:04:23 -0500 Original-Received: from lo.gmane.org ([80.91.229.12]:35789) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PxxKg-0001mT-AH for emacs-devel@gnu.org; Fri, 11 Mar 2011 03:04:22 -0500 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1PxxKe-00011R-Nq for emacs-devel@gnu.org; Fri, 11 Mar 2011 09:04:20 +0100 Original-Received: from 244.211.85-79.rev.gaoland.net ([79.85.211.244]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 11 Mar 2011 09:04:20 +0100 Original-Received: from thierry.volpiatto by 244.211.85-79.rev.gaoland.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 11 Mar 2011 09:04:20 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 39 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 244.211.85-79.rev.gaoland.net User-Agent: Gnus/5.110014 (No Gnus v0.14) Emacs/23.3 (gnu/linux) Cancel-Lock: sha1:/+DpJVx0vruX0LGXy1fOw0AGqFA= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 80.91.229.12 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:137086 Archived-At: Hi all, `eshell-remove-entries' use a not bound 'verbose' variable, and fail. To reproduce bug, try "rm -rf /some/directory" in eshell. This patch fix it. however there is maybe other calls to `eshell-remove-entries' to fix. This is on emacs-23.3 --8<---------------cut here---------------start------------->8--- diff --git a/lisp/eshell/em-unix.el b/lisp/eshell/em-unix.el index 8f61270..0a79e80 100644 --- a/lisp/eshell/em-unix.el +++ b/lisp/eshell/em-unix.el @@ -194,7 +194,7 @@ Otherwise, Emacs will attempt to use rsh to invoke du on the remote machine." (Info-menu (car args)) (setq args (cdr args))))) -(defun eshell-remove-entries (path files &optional top-level) +(defun eshell-remove-entries (path files &optional top-level verbose) "From PATH, remove all of the given FILES, perhaps interactively." (while files (if (string-match "\\`\\.\\.?\\'" @@ -298,7 +298,7 @@ Remove (unlink) the FILE(s).") (y-or-n-p (format "rm: descend into directory `%s'? " entry))) - (eshell-remove-entries nil (list entry) t)) + (eshell-remove-entries nil (list entry) t nil)) (eshell-error (format "rm: %s: is a directory\n" entry))) (eshell-remove-entries nil (list entry) t))))) (setq args (cdr args))) --8<---------------cut here---------------end--------------->8--- -- A+ Thierry Get my Gnupg key: gpg --keyserver pgp.mit.edu --recv-keys 59F29997