* emacsclient and "nonexistent symlinks"
@ 2011-03-08 22:17 Evans Winner
2011-03-09 2:57 ` Kevin Rodgers
2011-03-09 6:32 ` Tim X
0 siblings, 2 replies; 5+ messages in thread
From: Evans Winner @ 2011-03-08 22:17 UTC (permalink / raw)
To: help-gnu-emacs
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?
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?
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: emacsclient and "nonexistent symlinks"
2011-03-08 22:17 emacsclient and "nonexistent symlinks" Evans Winner
@ 2011-03-09 2:57 ` Kevin Rodgers
2011-03-09 6:32 ` Tim X
1 sibling, 0 replies; 5+ messages in thread
From: Kevin Rodgers @ 2011-03-09 2:57 UTC (permalink / raw)
To: help-gnu-emacs
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: emacsclient and "nonexistent symlinks"
2011-03-08 22:17 emacsclient and "nonexistent symlinks" Evans Winner
2011-03-09 2:57 ` Kevin Rodgers
@ 2011-03-09 6:32 ` Tim X
2011-03-09 7:21 ` Evans Winner
1 sibling, 1 reply; 5+ messages in thread
From: Tim X @ 2011-03-09 6:32 UTC (permalink / raw)
To: help-gnu-emacs
Evans Winner <ego111@gmail.com> writes:
> 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:
>
Just wondering, why are you forced to use M-x kill-emacs?
Tim
--
tcross (at) rapttech dot com dot au
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: emacsclient and "nonexistent symlinks"
2011-03-09 6:32 ` Tim X
@ 2011-03-09 7:21 ` Evans Winner
2011-03-09 8:47 ` Gregor Zattler
0 siblings, 1 reply; 5+ messages in thread
From: Evans Winner @ 2011-03-09 7:21 UTC (permalink / raw)
To: help-gnu-emacs
,------ Tim X wrote ------
| Just wondering, why are you forced to use M-x
| kill-emacs?
Well, that's a good question. Maybe there is something
obvious I don't know. I've been debugging and re-factoring
my init files and so I need to end Emacs to test the
initialization. But, as I said, I usually am working
through emacsclient. When I do C-x C-c it only ends
emacsclient, not the whole Emacs instance. So I end up
doing M-x kill-emacs. Is there a better way?
(By the way, I figured out that `file-exists-p' returns nil
for a symlink to a nonexistent target, so problem solved.)
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: emacsclient and "nonexistent symlinks"
2011-03-09 7:21 ` Evans Winner
@ 2011-03-09 8:47 ` Gregor Zattler
0 siblings, 0 replies; 5+ messages in thread
From: Gregor Zattler @ 2011-03-09 8:47 UTC (permalink / raw)
To: help-gnu-emacs
Hi Evans,
* Evans Winner <ego111@gmail.com> [09. Mar. 2011]:
> ,------ Tim X wrote ------
> | Just wondering, why are you forced to use M-x
> | kill-emacs?
>
> Well, that's a good question. Maybe there is something
> obvious I don't know. I've been debugging and re-factoring
> my init files and so I need to end Emacs to test the
> initialization. But, as I said, I usually am working
> through emacsclient. When I do C-x C-c it only ends
> emacsclient, not the whole Emacs instance. So I end up
> doing M-x kill-emacs. Is there a better way?
How about save-buffers-kill-Emacs?
Ciao, Gregor
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-03-09 8:47 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-08 22:17 emacsclient and "nonexistent symlinks" Evans Winner
2011-03-09 2:57 ` Kevin Rodgers
2011-03-09 6:32 ` Tim X
2011-03-09 7:21 ` Evans Winner
2011-03-09 8:47 ` Gregor Zattler
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).