From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: kai.grossjohann@gmx.net (Kai =?iso-8859-1?q?Gro=DFjohann?=) Newsgroups: gmane.emacs.devel Subject: Re: Recent change to file-chase-links has a bug Date: Wed, 09 Apr 2003 15:49:40 +0200 Organization: University of Duisburg, Germany Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <84wui393wr.fsf@lucy.is.informatik.uni-duisburg.de> References: <200304090710.QAA15874@etlken.m17n.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1049897327 5551 80.91.224.249 (9 Apr 2003 14:08:47 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 9 Apr 2003 14:08:47 +0000 (UTC) Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Wed Apr 09 16:08:43 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 193GFn-0001RA-00 for ; Wed, 09 Apr 2003 16:08:43 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 193GKJ-00035j-00 for ; Wed, 09 Apr 2003 16:13:23 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 193G7Q-0006ke-02 for emacs-devel@quimby.gnus.org; Wed, 09 Apr 2003 10:00:04 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 193G75-0006hF-00 for emacs-devel@gnu.org; Wed, 09 Apr 2003 09:59:43 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 193G2P-0004J8-00 for emacs-devel@gnu.org; Wed, 09 Apr 2003 09:54:53 -0400 Original-Received: from main.gmane.org ([80.91.224.249]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 193FzO-0002sA-00 for emacs-devel@gnu.org; Wed, 09 Apr 2003 09:51:46 -0400 Original-Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 193Fyt-00007K-00 for ; Wed, 09 Apr 2003 15:51:15 +0200 Mail-Followup-To: emacs-devel@gnu.org X-Injected-Via-Gmane: http://gmane.org/ Original-To: emacs-devel@gnu.org Original-Received: from news by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 193Fyr-000070-00 for ; Wed, 09 Apr 2003 15:51:13 +0200 Original-Lines: 24 Original-X-Complaints-To: usenet@main.gmane.org Mail-Copies-To: never User-Agent: Gnus/5.090018 (Oort Gnus v0.18) Emacs/21.3.50 (gnu/linux) Cancel-Lock: sha1:So8ba5MmtFyHyGSLtiYaJAre2pw= X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Emacs development discussions. List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:13077 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:13077 Kenichi Handa writes: > Now the code is as below: > > (defun file-chase-links (filename &optional limit) > "Chase links in FILENAME until a name that is not a link. > Unlike `file-truename', this does not check whether a parent > directory name is a symbolic link. > If the optional argument LIMIT is a number, > it means chase no more than that many links and then stop." > (let (tem (newname filename) > (count 0) > (max (max limit 100))) Wild guess: Richard meant (or limit 100) instead of (max limit 100). > (while (and (or (null limit) (< count limit)) > (setq tem (file-symlink-p newname))) > (save-match-data > (if (= count max) > (error "Apparent cycle of symbolic links for %s" filename)) -- A preposition is not a good thing to end a sentence with.