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

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

Re: find-file sometimes doesn't


From: Bill Wohler
Subject: Re: find-file sometimes doesn't
Date: Fri, 09 Dec 2005 10:25:20 -0800
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

"Richard M. Stallman" <address@hidden> writes:

>     In the last week, sometimes maybe 1 in 20 times, "C-x C-f (find-file)
>     RET" won't find the given file. However, the symptom is that if I'm
>     editing buffer "foo", and run find-file to open file bar, instead of
>     getting two equally-sized windows containing "foo" and "bar", I get two
>     "foo" windows, one of which is only three lines high.
>
> Is this reproducible?

Yes! If you find a file that is under revision control that you do not
have permission to edit, you get the following:

  Debugger entered--Lisp error: (wrong-type-argument stringp nil)
    file-symlink-p(nil)
    vc-find-file-hook()
    run-hooks(find-file-hook)
    after-find-file(nil t)
    find-file-noselect-1(#<buffer interfaces>
    "/etc/network/interfaces" nil nil "/etc/network/interfaces" (80445
    769))
    find-file-noselect("/etc/network/interfaces" nil nil t)
    find-file("/etc/network/interfaces" t)
    call-interactively(find-file)

Oddly, this alternates. The next time you use C-x C-f on the same
file, it succeeds. Kill the buffer and find it again and it fails. The
use of revert-buffer on such a read-only buffer fails in the same way
every time.

> If so, can you please debug it?

Not completely. I tracked the problem down to find-file-name-handler
setting buffer-file-name to nil (maybe that's enough info to remind
someone of a change they made in the past couple of weeks). Here's the
stack at that time:

  Debugger entered--returning value: nil
    find-file-name-handler("/etc/network/interfaces" vc-registered)
  * vc-registered("/etc/network/interfaces")
  * vc-backend("/etc/network/interfaces")
  * byte-code(...
  * vc-find-file-hook()
    run-hooks(find-file-hook)
    after-find-file(nil nil t t nil)
    revert-buffer(t)
    call-interactively(revert-buffer)
    execute-extended-command(nil)
    call-interactively(execute-extended-command)

find-file-name-handler is down in C which is beyond my ability to
debug. But the recipe is:

1. emacs -q

2. Visit a file that is under revision control and owned by someone
   else (in my case /etc/network/interfaces is owned by `root' and is
   checked into Subversion and I'm trying to edit it as `wohler').

3. If that doesn't bomb out, revert-buffer will.

I hope that provides enough info for someone else to debug this readily.

-- 
Bill Wohler <address@hidden>  http://www.newt.com/wohler/  GnuPG ID:610BD9AD
Maintainer of comp.mail.mh FAQ and MH-E. Vote Libertarian!
If you're passed on the right, you're in the wrong lane.





reply via email to

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