From: Dmitry Gutov <dgutov@yandex.ru>
To: Stephen Leake <stephen_leake@stephe-leake.org>, emacs-devel@gnu.org
Subject: Re: cl-defgeneric vs random funcall in project.el
Date: Sat, 1 Aug 2015 01:52:46 +0300 [thread overview]
Message-ID: <55BBFC3E.2010405@yandex.ru> (raw)
In-Reply-To: <86fv44z94l.fsf@stephe-leake.org>
On 07/31/2015 05:36 PM, Stephen Leake wrote:
> It would help to be more specific. Since we disagree, you can't assume
> I'll guess what you have in mind; my first response was "so why would
> you want to?". To be truly persuasive, you need to anticipate that
> response, and address it before it happens.
I'm sorry, I think I've addressed that question in one (or several)
previous messages. I'm not a native speaker, and simply writing that the
first time takes a sizable amount of effort. Repeating, and rephrasing,
and reiterating, adds to that.
Further, I wasn't sure which aspect of the question you wanted
addressed: the question was "which functionality", not "why". The
assumption was that you're already clear on the latter.
To sum up: false negative results (not finding a valid occurrence of a
given symbol) are much worse than false positives (finding a false
occurrence of the given symbol, for instance, finding words in README
when looking for a Java method). So it's better when our default
behavior, with zero configuration performed by the user (maybe yet, or
maybe they're not going to configure anything further at all), leans
toward false positives rather than false negatives.
For those reasons, I've left the current implementation of
project-search-path largely intact in the recent commit. If the
backend-specialized implementation has no extra information (the user
hasn't performed any relevant configuration), then project-search-path
includes entire project-roots.
> A concrete example directory structure:
> ...
> The user has set load-path to (".../myproj/lisp" "~/.emacs.d/elpa/..."
> ".../emacs-25.0/share/..." ...)
Maybe they didn't, but even if they did...
> One search the user might want to do: find the name of an elisp function
> in a test driver script file, to see how it is tested, while
> simultaneously finding all places that function is used in the *.el
> files, to review the test cases to ensure they are sufficient.
Indeed. It's a common operation.
> It would be wrong to add the entire directory tree that contains .git;
> the user is using emacs 25, so they don't want to see the emacs 24.3
> files. Obviously, there is a separate case where they do want to see
> those files; that's a different project configuration.
It's really impractical, IMO, to have different project configurations
for different use cases. A fancy project backend could have those,
though, and the user would be able to switch to their heart's content.
We are not discussing a fancy project backend here, though.
To be clear, here are the two main "separate cases": navigating to all
definitions, and aliases for different Emacs versions; navigating to all
references to a given function, again, in code for different Emacs
versions (to be able to rename them, for instance). As a project
maintainer, I want all of those visible and on the tips of my fingers,
because I need to maintain all code. Not just the code currently loaded
in my Emacs.
> We could provide:
>
> (defun project-create (root)
> ...
> `project-root-alist' associates root directories with project objects;
> ...
> (defun project-add-search-path (project path)
> ...
> (defun project-add-search-ignore (project ignores)
Sorry, this is too much a centralized, manual configuration for my
taste. The VC project backend is simple, and requires minimal
intervention from the user. We could add some variables (to be set via
.dir-locals.el), but I don't want to have to add anything to my init.el
as soon as I start working on a new project. For one thing, my .emacs.d
is published on GitHub, for all to see.
What you've described here, could be a separate project backend. One
you're welcome to write.
> Then, in the same place they add myproj/lisp to load-path, the user
> adds:
Again, in all likelihood they don't do that anywhere. As a real example,
I have a few small Elisp one-file packages, the Git checkouts of which
are never in load-path.
During the (infrequent) bouts of their development, I evaluate the whole
buffer, write the changes, test them interactively, then commit and
push. Then wait a while while MELPA builds the new version, and upgrade
the installed one via M-x list-packages U RET.
next prev parent reply other threads:[~2015-07-31 22:52 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-28 11:31 cl-defgeneric vs random funcall in project.el Stephen Leake
2015-07-28 15:09 ` Dmitry Gutov
2015-07-28 23:57 ` Stefan Monnier
2015-07-29 0:16 ` Dmitry Gutov
2015-07-30 21:26 ` Stefan Monnier
2015-07-29 1:00 ` Stephen Leake
2015-07-29 1:19 ` Dmitry Gutov
2015-07-29 14:24 ` Stephen Leake
2015-07-29 19:54 ` Dmitry Gutov
2015-07-30 7:04 ` Stephen Leake
2015-07-30 11:30 ` Dmitry Gutov
2015-07-30 15:29 ` Stephen Leake
2015-07-30 15:37 ` Stephen Leake
2015-07-30 16:10 ` Dmitry Gutov
2015-07-30 23:25 ` Stephen Leake
2015-07-30 17:16 ` Dmitry Gutov
2015-07-30 23:33 ` Stephen Leake
2015-07-31 0:37 ` Dmitry Gutov
2015-07-31 14:36 ` Stephen Leake
2015-07-31 22:52 ` Dmitry Gutov [this message]
2015-08-01 10:21 ` Stephen Leake
2015-08-01 12:09 ` Dmitry Gutov
2015-08-01 14:20 ` Stephen Leake
2015-08-01 16:49 ` Dmitry Gutov
2015-08-01 19:08 ` Stephen Leake
2015-08-04 19:59 ` João Távora
2015-08-04 20:56 ` Dmitry Gutov
2015-08-04 22:43 ` João Távora
2015-08-04 23:35 ` Dmitry Gutov
2015-08-10 1:09 ` Dmitry Gutov
2015-08-10 3:07 ` Stephen Leake
2015-08-10 8:45 ` João Távora
2015-08-10 16:50 ` Stephen Leake
2015-08-10 19:38 ` João Távora
2015-08-10 18:07 ` Dmitry Gutov
2015-08-10 19:21 ` João Távora
2015-08-10 19:37 ` Dmitry Gutov
2015-08-10 19:47 ` João Távora
2015-08-10 19:55 ` Dmitry Gutov
2015-08-10 18:02 ` Dmitry Gutov
2015-08-07 15:02 ` Stefan Monnier
2015-08-07 15:32 ` Dmitry Gutov
2015-08-07 17:36 ` Stefan Monnier
2015-08-05 7:02 ` Stephen Leake
2015-07-30 21:31 ` 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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=55BBFC3E.2010405@yandex.ru \
--to=dgutov@yandex.ru \
--cc=emacs-devel@gnu.org \
--cc=stephen_leake@stephe-leake.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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).