From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.help Subject: Re: project-mode vs projectile (Was: How to profile restoring from .emacs.desktop) Date: Sun, 27 Jun 2021 03:20:42 +0300 Message-ID: <2d559b9c-8466-a3d9-bd24-78e2a64c03ca@yandex.ru> References: <864kj2nw2s.fsf@dod.no> <86v9bhlzky.fsf@dod.no> <86o8h8n165.fsf@dod.no> <865yyady70.fsf_-_@dod.no> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30740"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 To: Steinar Bang , help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jun 27 02:21:19 2021 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lxIY2-0007rE-Bi for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 27 Jun 2021 02:21:18 +0200 Original-Received: from localhost ([::1]:36228 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lxIY0-0004Xq-Jm for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 26 Jun 2021 20:21:16 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58328) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lxIXZ-0004WD-Nj for help-gnu-emacs@gnu.org; Sat, 26 Jun 2021 20:20:50 -0400 Original-Received: from mail-ed1-x52b.google.com ([2a00:1450:4864:20::52b]:36512) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lxIXX-00052x-0J for help-gnu-emacs@gnu.org; Sat, 26 Jun 2021 20:20:48 -0400 Original-Received: by mail-ed1-x52b.google.com with SMTP id h2so19302701edt.3 for ; Sat, 26 Jun 2021 17:20:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=BkMhv3C8pNONPz9h1l/YGfARBrN1JE5d7IoJvbHuEWs=; b=Zw0mRzdTpYCaHEP09WLsq3dIaQwyvm2DdpOXT/Pqdq9HBN7Jun2a34MvHERtJQuJnI zAzZ48biLLTL4gO96qRZe4FVOLB2/d6FxLI11saEhk8ja/Z8jRxIaaVeShQgSXaOvbl9 P+923vpsBfvBnVMzhzpXjVO7kkV922mABaz4zhHi9+PalnH/Ol4sbw00NcSdDItvT71k o9ngzPXal80JUtly2gtNaM1XZLE30Tz6pSkcuIXSmvSFJXFhbxP6PC6XyLR2JsW69VIx syn9JvuTHcPaSmddh/CL+EvLislojto3NZtzviMEiEiAq8GpXBBzYj4PuMLoUscDHgBp T4Aw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=BkMhv3C8pNONPz9h1l/YGfARBrN1JE5d7IoJvbHuEWs=; b=ZQVC2WEryrKVnENx4HguyNa2Sg5ugDyW5c3AaJvlT9DUCAq4c/kueEXKhYQmyoPNrI I1n2/jFnXDxMt8Rnx+x6n7NBYqCs2rPLMRBMdFPl78masMknykCxxF59s++8S+HGldEI ydMu2bD2HiH5DIAn3zQKRDNd6Tc99HeWQog/8Vo6IqofOSNZIYRkCfmrZyUp8PZVO7G+ bjxcd0p1zyPXt9X3+T7GA3Tdc5rpPcU9Ir5pqPNumq6P3GGGIgwF4Bjr46QYsa2rdsSc rrVDcIkZM8VMsAdfrTq/n0oX5b+8ZtX/YuRwOzKIiDFA/BwxhBGnv2CIq4MrjH1zGs09 kSHw== X-Gm-Message-State: AOAM531kmm/AQLXMx1lE5bJ77xSWJjhm9hhz6CeHEfgUsV2WSih0R+HY tAwyrAuyb/S/Ws2c9FsksHBHefwd3+U= X-Google-Smtp-Source: ABdhPJxDkD9bSba2u/vPnv+RcWY9lN79TSR09XlEKklidamdPCq0Ds3kMg3yPRJAg6tTqCEMM4XDxQ== X-Received: by 2002:aa7:c845:: with SMTP id g5mr24498575edt.306.1624753244227; Sat, 26 Jun 2021 17:20:44 -0700 (PDT) Original-Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id b25sm6937641edv.9.2021.06.26.17.20.43 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 26 Jun 2021 17:20:43 -0700 (PDT) In-Reply-To: <865yyady70.fsf_-_@dod.no> Content-Language: en-US Received-SPF: pass client-ip=2a00:1450:4864:20::52b; envelope-from=raaahh@gmail.com; helo=mail-ed1-x52b.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, NICE_REPLY_A=-0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:131284 Archived-At: 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?