From: Theodor Thornhill <theo@thornhill.no>
To: 41736@debbugs.gnu.org
Subject: bug#41736: 28.0.50; project.el - support global patterns for project-ignores
Date: Sat, 06 Jun 2020 09:45:42 +0000 [thread overview]
Message-ID: <87mu5g34u6.fsf@thornhill.no> (raw)
Hello,
In https://debbugs.gnu.org/cgi/bugreport.cgi?bug=41572 there is talk about supporting a "plain project", and when joining that chat I realised that the "best" current implementation is the VC backend. However, this backend does not easily include other patterns to ignore.
For example we might want to ignore "node_modules", "elm-stuff" etc.
These can be added pretty easily to 'project-vc-ignores' via:
1. Major mode support: "(setq-local project-vc-ignores '("foo" "bar"))"
2. User init.el "(add-to-list project-vc-ignores "foo")"
However, there are some drawbacks.
Method 1:
- We rely on major mode to implement this
- When using "project-switch-project", then press "f - find-file" the ignore is not recognized yet since it relies on the major mode.
- It does not work when a project uses several modes
Method 2:
- Needs user to add this to own init file.
- Pollutes the defcustom globally
Is there a way to set these patters such that we still can use the fast VC backend, but not have these drawbacks?
It seems like an easy solution could be to add a "defcustom project-ignore-patterns" that the project-vc backend picks up. This could be set by both future major modes and as user customization.
FWIW, method 2 seems to work perfectly, yet seems like kind of a hack.
Theo
next reply other threads:[~2020-06-06 9:45 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-06 9:45 Theodor Thornhill [this message]
2020-06-06 9:53 ` bug#41736: 28.0.50; project.el - support global patterns for project-ignores Basil L. Contovounesios
2020-06-06 10:10 ` Theodor Thornhill
2020-06-06 11:08 ` 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=87mu5g34u6.fsf@thornhill.no \
--to=theo@thornhill.no \
--cc=41736@debbugs.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.