emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Subprojects in project.el


From: João Távora
Subject: Re: Subprojects in project.el
Date: Tue, 29 Nov 2022 10:03:09 +0000
User-agent: Gnus/5.13 (Gnus v5.13)

Dmitry Gutov <dgutov@yandex.ru> writes:

> On 26/11/22 11:42, João Távora wrote:
>> Dmitry Gutov <dgutov@yandex.ru> writes:
>> 
>>> On 26/11/22 02:37, João Távora wrote:
>>>> Dmitry Gutov <dgutov@yandex.ru> writes:
>>>>
>>>>>>>> I can't understand what is discourteous about this.
>>>>>>> That would be not following the procedure the maintainer has asked you
>>>>>>> to follow.
>>>>>> If that means silencing me on emacs-devel, then you're out of luck.
>>>>>
>>>>> Is that what you do when you ask somebody to use the bug tracker?
>>>> I'll use the bug tracker when I think it's appropriate.  Let's not
>>>> insinuate I'm some kind of inconsiderate delinquent for not moving the
>>>> discussion there as you would want.  I'm not reporting a bug and I've
>>>> politely declined your suggestion, so stop beating this horse.
>>>
>>> Must be nice to be the person who gets to decide what is appropriate
>>> in any situation.
>> As long as this list's maintainer doesn't object, I get to decide
>> where
>> _I_ post to, thank you very much.
>
> I'll keep that in mind.
>
>>> By modifying each and every command. I don't think it would be
>>> appropriate for 'project-current' itself to react to the value of
>>> current-prefix-arg.
>> It's very unfortunate to modify "each and every command" unless of
>> course you mean doing it via a uniform interface.
>> I don't understand why these "project" commands that operate on a
>> project don't befittingly take a PROJECT argument.  That argument's
>> value could be interactively calculated from a
>> project-read-project-maybe command that decides if and how to prompt.
>
> Hysterical raisins.
>
> But 'C-x p f' and 'C-x p g' call 'project-current' directly. What's
> that about some new command?

Don't know what you are talking aboutIt seems very reasonable to do
this instead:

diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el
index c7b2c386ccd..02f5d25e054 100644
--- a/lisp/progmodes/project.el
+++ b/lisp/progmodes/project.el
@@ -1151,11 +1151,11 @@ project-compilation-buffer-name-function
                  (function :tag "Custom function")))
 
 ;;;###autoload
-(defun project-compile ()
+(defun project-compile (project)
   "Run `compile' in the project root."
   (declare (interactive-only compile))
-  (interactive)
-  (let ((default-directory (project-root (project-current t)))
+  (interactive (project-current t))
+  (let ((default-directory (project-root project))
         (compilation-buffer-name-function
          (or project-compilation-buffer-name-function
              compilation-buffer-name-function)))





reply via email to

[Prev in Thread] Current Thread [Next in Thread]