emacs-devel
[Top][All Lists]
Advanced

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

Re: [Emacs-diffs] trunk r116999: Provide function for asking vc about pr


From: Stefan Monnier
Subject: Re: [Emacs-diffs] trunk r116999: Provide function for asking vc about project root
Date: Mon, 21 Apr 2014 17:51:10 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux)

>>> +        (condition-case err
>>> +            (vc-call-backend backend 'root default-directory)
>>> +          (vc-not-supported
>>> +           (unless (eq (cadr err) 'root)
>>> +             (signal (car err) (cdr err)))
>>> +           nil)))))
>> Why do we need this gymnastics?
> So that we don't accidentally suppress errors we *don't* expect to get.

No: I see the hypothetical reason, but I was wondering about
a practical reason.  IOW, I think this is overkill.  Note that the cost
is not only in code complexity but catching&re-raising signals also
defeats the backtraces in debug-on-error, which can be a pain.

I even wonder if we should allow `root' to fail.  E.g. RCS/CVS could
just walk up the directories until there's no RCS/CVS subdir.


        Stefan



reply via email to

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