unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Spencer Baugh <sbaugh@janestreet.com>
Cc: 63870@debbugs.gnu.org
Subject: bug#63870: 29.0.90; project.el can't dynamically populate the project list
Date: Wed, 28 Jun 2023 15:56:34 +0300	[thread overview]
Message-ID: <83bkgzvj7h.fsf@gnu.org> (raw)
In-Reply-To: <iery1k3yd7d.fsf@janestreet.com> (message from Spencer Baugh on Wed, 28 Jun 2023 08:37:58 -0400)

> From: Spencer Baugh <sbaugh@janestreet.com>
> Cc: 63870@debbugs.gnu.org
> Date: Wed, 28 Jun 2023 08:37:58 -0400
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> >> Absolutely.  I am trying to be careful about this: project-watch
> >> shouldn't create watches on VCS directories.
> >
> > But below you explicitly give an example where it will.  And given the
> > fact that the majority of project.el projects use VCS as its backend,
> > I'd say we are already there...
> 
> No: the watch on a directory is removed once the directory becomes a VCS
> directory.

No, AFAIU the watch is removed once there is a project in the
directory.  But a VCS can work on a directory regardles of any project
creation.

> > Once again, this is dangerous; users could easily shoot themselves in
> > the foot, because not many are aware of the pitfall of using file
> > notifications for many directories.  It makes no sense to warn against
> > something and at the same time let callers easily stumble upon that.
> 
> I agree with that, I suppose.  Personally I would be fine with a
> mandatory 1 or 2 levels of recursion, since I only need 2.  Do you have
> a suggestion for what that interface could look like?  It feels a bit
> awkward...

I'd actually begin by not providing even 1 level.  Let the callers
call this new function  explicitly for every directory which they want
watching.  If someone ever complains that this is somehow inconvenient
(although I don't see why: directory-files is simple to use), then we
could consider extending the API.

But that's MO; please wait for Dmitry to chime in.





  reply	other threads:[~2023-06-28 12:56 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-03 11:55 bug#63870: 29.0.90; project.el can't dynamically populate the project list Spencer Baugh
2023-06-15 19:30 ` Spencer Baugh
2023-06-16  5:45   ` Eli Zaretskii
2023-06-17  2:55 ` Dmitry Gutov
2023-06-27 19:29   ` Spencer Baugh
2023-06-27 19:27 ` Spencer Baugh
2023-06-28 11:24   ` Eli Zaretskii
2023-06-28 12:05     ` Spencer Baugh
2023-06-28 12:18       ` Eli Zaretskii
2023-06-28 12:37         ` Spencer Baugh
2023-06-28 12:56           ` Eli Zaretskii [this message]
2023-07-18  2:21             ` Dmitry Gutov
2023-07-18 16:28               ` Spencer Baugh
2023-07-18 17:41                 ` Juri Linkov
2023-07-27  1:59                   ` Dmitry Gutov
2023-07-27  1:57                 ` 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

  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=83bkgzvj7h.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=63870@debbugs.gnu.org \
    --cc=sbaugh@janestreet.com \
    /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).