From: Stefan Monnier <monnier@IRO.UMontreal.CA>
To: Daniel Colascione <dancol@dancol.org>
Cc: emacs-devel@gnu.org
Subject: Re: [Emacs-diffs] trunk r116999: Provide function for asking vc about project root
Date: Mon, 21 Apr 2014 17:51:10 -0400 [thread overview]
Message-ID: <jwvtx9mnymv.fsf-monnier+emacsdiffs@gnu.org> (raw)
In-Reply-To: <535554D4.40606@dancol.org> (Daniel Colascione's message of "Mon, 21 Apr 2014 10:26:44 -0700")
>>> + (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
next prev parent reply other threads:[~2014-04-21 21:51 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <E1Wc15p-0001h2-Rk@vcs.savannah.gnu.org>
2014-04-21 14:43 ` [Emacs-diffs] trunk r116999: Provide function for asking vc about project root Stefan Monnier
2014-04-21 17:26 ` Daniel Colascione
2014-04-21 21:51 ` Stefan Monnier [this message]
2014-04-21 21:55 ` Daniel Colascione
2014-04-22 1:44 ` Stefan Monnier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwvtx9mnymv.fsf-monnier+emacsdiffs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=dancol@dancol.org \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.