From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kevin Rodgers Newsgroups: gmane.emacs.help Subject: Re: emacsclient and "nonexistent symlinks" Date: Tue, 08 Mar 2011 19:57:26 -0700 Message-ID: References: <87lj0pqmso.fsf@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1299639707 609 80.91.229.12 (9 Mar 2011 03:01:47 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 9 Mar 2011 03:01:47 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Mar 09 04:01:43 2011 Return-path: Envelope-to: geh-help-gnu-emacs@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 1Px9ee-0003WI-AI for geh-help-gnu-emacs@m.gmane.org; Wed, 09 Mar 2011 04:01:43 +0100 Original-Received: from localhost ([127.0.0.1]:39174 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Px9eZ-0003Bf-CZ for geh-help-gnu-emacs@m.gmane.org; Tue, 08 Mar 2011 22:01:35 -0500 Original-Received: from [140.186.70.92] (port=45793 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Px9eC-0002aI-E9 for help-gnu-emacs@gnu.org; Tue, 08 Mar 2011 22:01:14 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Px9aj-00084S-KI for help-gnu-emacs@gnu.org; Tue, 08 Mar 2011 21:57:38 -0500 Original-Received: from lo.gmane.org ([80.91.229.12]:51136) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Px9aj-00084I-6T for help-gnu-emacs@gnu.org; Tue, 08 Mar 2011 21:57:37 -0500 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1Px9ag-0002VE-AM for help-gnu-emacs@gnu.org; Wed, 09 Mar 2011 03:57:34 +0100 Original-Received: from c-24-8-96-241.hsd1.co.comcast.net ([24.8.96.241]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 09 Mar 2011 03:57:34 +0100 Original-Received: from kevin.d.rodgers by c-24-8-96-241.hsd1.co.comcast.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 09 Mar 2011 03:57:34 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 42 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: c-24-8-96-241.hsd1.co.comcast.net User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.4; en-US; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9 In-Reply-To: <87lj0pqmso.fsf@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 80.91.229.12 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:79914 Archived-At: On 3/8/11 3:17 PM, Evans Winner wrote: > I have been doing some testing with Emacs lately and I use > it in daemon mode and connect remotely using emacsclient. > This has caused me to use M-x kill-emacs quite a bit and I > think it is this which is causing me to sometimes get files > in my filesystem that look like this in dired: > > .#.bbdb -> thorne@braintron.24188:1298889269 > > If I hit RET on one of these in dired I get a message that > says "File is a symlink to a nonexistent target". > > I am wondering several things: what are they? how do they > get there? is there something I should be doing differently? See the "Interlocking" node of the Emacs manual (aka the "Protection against Simultaneous Editing" section): When you make the first modification in an Emacs buffer that is visiting a file, Emacs records that the file is "locked" by you. (It does this by creating a specially-named symbolic link in the same directory.) Emacs removes the lock when you save the changes. The idea is that the file is locked whenever an Emacs buffer visiting it has unsaved changes. ... If Emacs or the operating system crashes, this may leave behind lock files which are stale, so you may occasionally get warnings about spurious collisions. When you determine that the collision is spurious, just use `p' to tell Emacs to go ahead anyway. > And more importantly at the moment, is there a way to > predicate on whether a file is one of these things? I know > there is `file-symlink-p' that will tell me it is a symlink, > but is there a way to see if it is also one of these bogus > synlinks? I thought userlock.el would have the answer, but it seems that ask-user-about-lock is not called from Lisp... -- Kevin Rodgers Denver, Colorado, USA