From: Stefan Monnier <monnier@iro.umontreal.ca>
To: emacs-devel@gnu.org
Cc: Dmitry Gutov <dgutov@yandex.ru>
Subject: Re: [Emacs-diffs] scratch/project 106e023: Add new `project' package, and use it in xref
Date: Tue, 07 Jul 2015 23:44:14 -0400 [thread overview]
Message-ID: <jwvmvz7s4mp.fsf-monnier+emacsdiffs@gnu.org> (raw)
In-Reply-To: <E1ZCcvg-0001P6-2U@vcs.savannah.gnu.org> (Dmitry Gutov's message of "Wed, 08 Jul 2015 00:09:36 +0000")
> +(defvar project-functions '(project-try-vc
> + project-try-ede
> + project-ask-user)
I think I'd prefer a slightly more verbose name for this variable.
Also, I'd suggest you use (list #'foo ... #'bar) so that we
automatically check that those functions are known.
> +(cl-defgeneric project-root (project)
> + "Return the root directory of the current project.")
This should specify that it's an absolute file name.
> +(cl-defgeneric project-source-directories (project)
> + "Return the list of source directories.
> +Including any where source (or header, etc) files used by the
> +current project may be found. Including those outside of the
> +project tree."
> + (project-directories project))
Same here: we should explicitly say if relative file names can appear or
not in the output.
> +(defvar project-vc-root-files '(".git" ".hg" ".bzr"))
I'd appreciate if this could be better integrated with VC (so it
automatically picks up other names for other supported backends).
> +(defun project-try-ede (dir)
> + (when (featurep 'ede)
> + (cons 'ede (ede-directory-get-open-project dir 'ROOT))))
Why use a cons cell with the car's symbol standing for a type tag, when
the carried object is already properly self-describing (IIUC it's an
EIEIO object)?
Stefan
next parent reply other threads:[~2015-07-08 3:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20150708000935.5340.18494@vcs.savannah.gnu.org>
[not found] ` <E1ZCcvg-0001P6-2U@vcs.savannah.gnu.org>
2015-07-08 3:44 ` Stefan Monnier [this message]
2015-07-08 13:13 ` [Emacs-diffs] scratch/project 106e023: Add new `project' package, and use it in xref Dmitry Gutov
2015-07-08 14:06 ` Stefan Monnier
2015-07-09 2:05 ` Dmitry Gutov
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=jwvmvz7s4mp.fsf-monnier+emacsdiffs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=dgutov@yandex.ru \
--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.