unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Dmitry Gutov <dgutov@yandex.ru>
To: Steinar Bang <sb@dod.no>, help-gnu-emacs@gnu.org
Subject: Re: project-mode vs projectile (Was: How to profile restoring from .emacs.desktop)
Date: Sun, 27 Jun 2021 03:20:42 +0300	[thread overview]
Message-ID: <2d559b9c-8466-a3d9-bd24-78e2a64c03ca@yandex.ru> (raw)
In-Reply-To: <865yyady70.fsf_-_@dod.no>

Hi!

Sorry for the late reply.

On 19.06.2021 12:02, Steinar Bang wrote:

>> And it's grown again a bit in Emacs 28, with a global keymap and a set
>> of project-scoped commands in it, among other things.
> 
>> Most importantly, you can install the latest version of project.el
>> inside Emacs 26 or 27 from GNU ELPA.
> 
> Maybe it is time for me to try project-mode out again, then?

First of all, it's not a mode. A recent enough version of project.el 
just installs a global keymap and lets you use its bindings.

One advantage is it doesn't run any code (e.g. root-finding code) until 
you actually use one of the related commands.

> Is there an overview on what kind of commands are available in the emacs
> 28 project-mode?

'C-x p C-h' should give you a reasonably complete list.

> By this time I have about 6 months of actively using projectile (once I
> got the startup issues cleared away and using the cache instead), and
> I've quite grown to like it.

I've used it for years, it's a handy package. project.el started out as 
a kind of backdoor to be able to use projectile indirectly in core Emacs 
commands. That still hasn't panned out exactly, but I'm hopeful on that 
front too.

> I have replaced navigating with switch-to-buffer with the
> projectile-find-file file command, and switch between projects with
> projectile-switch-open-project command and find a directory with the
> projectile-find-dir command (the find file and find dir commands stay
> within a project).

There is still no 'project-find-dir' command, but we should add one. 
There is a related bug report somewhere in debbugs.

> Other useful commands:
>   - projectile-grep which rgreps inside a project useful
>   - projectile-compile-project (very useful for maven projects, where the
>     mvn command must be run at the top directory of the project far from
>     the file being edited)
>   - projectile-find-tag (very useful, once I was able to make CTAGS
>     recognize ES6 javascript)

There are counterparts to the first two, but what does the last one do? 
It's it basically the same as xref-find-definitions?

> What I'm missing are commands that do the same thing as the project
> level commands for project modules, in particular for maven multi-module
> projects.
> 
> The most important command to get a module command for is the compile
> command (because building a single module takes a lot less time than
> building the entire reactor build), but module specific search and
> navigate commands would also be useful.
> 
> Does project-mode have a concept of modules? (the maven concept of
> modules is what's in my mind)

No concept of modules as such (though there is a defcustom to decide 
whether to treat "git submodules" as separate projects, but those are 
different kind of modules).

If you want some dedicated support, we'll need to clarify the 
requirements. For instance, would you be happy if mvn modules were 
treated as separate projects? I think that leaves only the "module 
compile command", and that seems somewhat maven-specific. You could 
create a new command which would look up what kind of project the 
current file is in, and invoke some corresponding action.

Or if you want project-compile to provide different behaviors, what 
would it do? Perhaps you'd want to customize compilation-read-command 
instead?



  reply	other threads:[~2021-06-27  0:20 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-27 17:11 How to profile restoring from .emacs.desktop Steinar Bang
2021-01-27 17:42 ` Stefan Monnier
2021-01-28 17:51   ` Steinar Bang
2021-01-28 19:08     ` Stefan Monnier
2021-01-28 22:31       ` Steinar Bang
2021-01-28 22:58         ` Stefan Monnier
2021-01-28 23:33           ` Dmitry Gutov
2021-06-19  9:02             ` project-mode vs projectile (Was: How to profile restoring from .emacs.desktop) Steinar Bang
2021-06-27  0:20               ` Dmitry Gutov [this message]
2021-09-05 11:35                 ` project-mode vs projectile Steinar Bang
2021-09-05 14:56                   ` Nikolay Kudryavtsev
2021-10-07  2:39                   ` Dmitry Gutov
2021-01-29 22:05           ` How to profile restoring from .emacs.desktop Steinar Bang

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=2d559b9c-8466-a3d9-bd24-78e2a64c03ca@yandex.ru \
    --to=dgutov@yandex.ru \
    --cc=help-gnu-emacs@gnu.org \
    --cc=sb@dod.no \
    /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.
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).