From: Dmitry Gutov <dgutov@yandex.ru>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: master 6e796b5: Stop project-root from going into infinite recursion
Date: Thu, 18 Mar 2021 02:37:21 +0200 [thread overview]
Message-ID: <149b5d9e-37d1-ea9e-f39d-38c2707588b3@yandex.ru> (raw)
In-Reply-To: <jwvsg4th13u.fsf-monnier+emacs@gnu.org>
On 18.03.2021 00:29, Stefan Monnier wrote:
> I see. I consider the difference between the two as an error in CLOS,
> but I didn't have the courage to remove it in cl-generic.el;-)
I'm no CLOS expect, so I was choosing purely on how the names sound.
> FWIW, you could also get what you want with something like:
>
> (cl-defgeneric project-root (project)
> "Return root directory of the current project.
>
> It usually contains the main build file, dependencies
> configuration file, etc. Though neither is mandatory.
>
> The directory name must be absolute.")
>
> (cl-defmethod project-root (project
> &context (project--within-roots-fallback
> (eql nil)))
> (car (project-roots project)))
>
> This way there indeed won't be any applicable method when
> project--within-roots-fallback is non-nil;-)
That's a neat suggestion, thanks!
prev parent reply other threads:[~2021-03-18 0:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20210317164927.28196.12402@vcs0.savannah.gnu.org>
[not found] ` <20210317164928.C2C11209AA@vcs0.savannah.gnu.org>
2021-03-17 21:33 ` master 6e796b5: Stop project-root from going into infinite recursion Stefan Monnier
2021-03-17 21:52 ` Dmitry Gutov
2021-03-17 22:29 ` Stefan Monnier
2021-03-18 0:37 ` Dmitry Gutov [this message]
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=149b5d9e-37d1-ea9e-f39d-38c2707588b3@yandex.ru \
--to=dgutov@yandex.ru \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
/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.