From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Spyros Roum Newsgroups: gmane.emacs.devel Subject: Re: Add completion to compilation-read-command Date: Wed, 25 Dec 2024 22:11:52 +0000 Message-ID: <4a27c5d7-b207-4bf1-a01b-552bf88a6347@posteo.net> References: <87ttatb9g0.fsf@posteo.net> <87a5clm3p5.fsf@mail.linkov.net> <8734icaegs.fsf@posteo.net> <9a4bb215-561c-468f-97de-7d84fe7adc43@posteo.net> <87ttas80au.fsf@posteo.net> <962064f8-fab7-4867-af04-135e48a9dd15@posteo.net> <87ldw390ql.fsf@posteo.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------P6oGaH5pgd9IGjymLB00Ofnd" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21650"; mail-complaints-to="usenet@ciao.gmane.io" Cc: juri@linkov.net, emacs-devel@gnu.org To: philipk@posteo.net Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Dec 25 23:12:43 2024 Return-path: Envelope-to: ged-emacs-devel@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 1tQZcR-0005Ts-EZ for ged-emacs-devel@m.gmane-mx.org; Wed, 25 Dec 2024 23:12:43 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tQZbc-0007zO-1r; Wed, 25 Dec 2024 17:11:52 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tQZbZ-0007zB-R6 for emacs-devel@gnu.org; Wed, 25 Dec 2024 17:11:49 -0500 Original-Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tQZbX-0004xp-3E for emacs-devel@gnu.org; Wed, 25 Dec 2024 17:11:49 -0500 Original-Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 08F35240028 for ; Wed, 25 Dec 2024 23:11:44 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1735164704; bh=Bhh28rcMBgKDBdtQPHCD8KNKxdSg9xi3W30za0Rpdds=; h=Content-Type:Message-ID:Date:MIME-Version:Subject:To:Cc:From: From; b=hdIPea29tJTLyAbE2NSApStp18AudKbNxvQLZVtedDe6pz83aI9W6dX68SWswOpEf DGO7xbGCNvrO7g00Axc8ajZw2sSgU3IKVOkfXgfznjq0HAwKFtWJslaMOfEdfA3cyn WQmRjJHymE9ca0MnlzABXxxR8oHudJBFJdDtYw256NpkUspsMLKvK6zwXLUquYvpo8 B3KJ+FPUC8jmXa7wfI5OkdyfMM1E1W/RLZBM9l1iWyD1jjge0Z0qvVdWIxsFDakk+a 6y/mLwiek/j3nBdZb6hHdAPkd3ZmGzt2gHmTzGU7zrM5U+eNugkXfI5AzOWCWc32mU wZrMusOSHAlKA== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4YJQvz0JNYz6twR; Wed, 25 Dec 2024 23:11:42 +0100 (CET) Content-Language: en-US, el, el-en In-Reply-To: <87ldw390ql.fsf@posteo.net> Received-SPF: pass client-ip=185.67.36.65; envelope-from=spyros.roum@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:327122 Archived-At: This is a multi-part message in MIME format. --------------P6oGaH5pgd9IGjymLB00Ofnd Content-Type: multipart/alternative; boundary="------------FsRO9KRYn8Hg9UCkOgd2qKpa" --------------FsRO9KRYn8Hg9UCkOgd2qKpa Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Philip Kaludercic wrote: >> Also, I'm wondering if this counts as non-trivial enough that I would >> need to sign the FSF copyright. > It looks like it to me, and either way it is not bad to do that so that > you have it behind you for future contributions either to Emacs or ELPA. You are right, I have initiated the process. >> Regarding testing, as far as I can tell, there are currently no tests >> for `compilation-read-command`. >> Should I add anything? If yes, I'll probably need someone to point to >> existing tests for similar things that I can copy from. > You could take a look at test/lisp/progmodes/compile-tests.el, but I > don't think this breaks the patch, especially when dealing with > something as interactive as what you are proposing. I did check compile-tests.el and found no references to `compilation-read-command`, that's why I said I think it's not tested currently. I'll not add any tests, I wouldn't even know how to test something interactive like that. >> Am I forgetting anything else? >> From e1068206662913978d541f924205a0615f8d2d95 Mon Sep 17 00:00:00 2001 >> From: Spyros Roum >> Date: Wed, 25 Dec 2024 17:32:31 +0200 >> Subject: [PATCH] Add option for making compilation-read-command use >> completing-read > A ChageLog style commit message would be expected here as well. You can > inject the structure in vc-mode using C-c C-w. I'm not sure the level of detail I should go in describing each function I touch, so I wrote (what I think is) a lot. Let me know if it's not necessary or if it's fine as is. I did see some examples from the wiki/other commits and I think it's fine. >> + "Function used by `compilation-read-command' to get user's input. >> +Defaults to `compilation-prompt-read-shell-command', >> +but `compilation-prompt-read-command-with-completion' can be used instead for > If possible, avoid the passive phrase here. I changed it to active voice. I'll also say I'm not a native speaker, so if you think it's still weird/not good enough, please let me know. I've attached a new draft based on your feedback. Additionally, I've renamed the new function to something that describes that completion happens based on history, according to Juri's input. One additional question: The NEWS file is for version 31.1. Should the `:version` tag also be for 31.1 instead of 31? --------------FsRO9KRYn8Hg9UCkOgd2qKpa Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit
Philip Kaludercic wrote:
Also, I'm wondering if this counts as non-trivial enough that I would
need to sign the FSF copyright.
It looks like it to me, and either way it is not bad to do that so that
you have it behind you for future contributions either to Emacs or ELPA.
You are right, I have initiated the process.
Regarding testing, as far as I can tell, there are currently no tests
for `compilation-read-command`.
Should I add anything? If yes, I'll probably need someone to point to
existing tests for similar things that I can copy from.
You could take a look at test/lisp/progmodes/compile-tests.el, but I
don't think this breaks the patch, especially when dealing with
something as interactive as what you are proposing.

I did check compile-tests.el and found no references to `compilation-read-command`,
that's why I said I think it's not tested currently.
I'll not add any tests, I wouldn't even know how to test something interactive like that.

Am I forgetting anything else?
>From e1068206662913978d541f924205a0615f8d2d95 Mon Sep 17 00:00:00 2001
From: Spyros Roum <spyros.roum@posteo.net>
Date: Wed, 25 Dec 2024 17:32:31 +0200
Subject: [PATCH] Add option for making compilation-read-command use
 completing-read
A ChageLog style commit message would be expected here as well.  You can
inject the structure in vc-mode using C-c C-w.

I'm not sure the level of detail I should go in describing each function I touch, so I wrote (what I think is) a lot. Let me know if it's not necessary or if it's fine as is. I did see some examples from the wiki/other commits and I think it's fine.

+  "Function used by `compilation-read-command' to get user's input.
+Defaults to `compilation-prompt-read-shell-command',
+but `compilation-prompt-read-command-with-completion' can be used instead for
If possible, avoid the passive phrase here.

I changed it to active voice. I'll also say I'm not a native speaker, so if you think
it's still weird/not good enough, please let me know.

I've attached a new draft based on your feedback. Additionally, I've renamed the new function to something that describes that completion happens based on history, according to Juri's input.

One additional question: The NEWS file is for version 31.1. Should the `:version` tag also be for 31.1 instead of 31?

--------------FsRO9KRYn8Hg9UCkOgd2qKpa-- --------------P6oGaH5pgd9IGjymLB00Ofnd Content-Type: text/x-patch; charset=UTF-8; name="0001-Add-option-for-making-compilation-read-command-use-c.patch" Content-Disposition: attachment; filename*0="0001-Add-option-for-making-compilation-read-command-use-c.pa"; filename*1="tch" Content-Transfer-Encoding: base64 RnJvbSA3ZTE0MGMxYWI1YmZjNzQ0MDc1M2FiM2FmZjJjM2NlN2ViMzg0MTRlIE1vbiBTZXAg MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBTcHlyb3MgUm91bSA8c3B5cm9zLnJvdW1AcG9zdGVv Lm5ldD4KRGF0ZTogV2VkLCAyNSBEZWMgMjAyNCAxNzozMjozMSArMDIwMApTdWJqZWN0OiBb UEFUQ0hdIEFkZCBvcHRpb24gZm9yIG1ha2luZyBjb21waWxhdGlvbi1yZWFkLWNvbW1hbmQg dXNlCiBjb21wbGV0aW5nLXJlYWQKCiogZXRjL05FV1M6IEFkZCB0byBORVdTCiogbGlzcC9w cm9nbW9kZXMvY29tcGlsZS5lbCAoY29tcGlsYXRpb24tcmVhZC1jb21tYW5kKToKQ2FsbCBm dW5jdGlvbiBiYXNlZCBvbiBgY29tcGlsYXRpb24tcmVhZC1jb21tYW5kLWZ1bmN0aW9uYC4K Cihjb21waWxhdGlvbi1wcm9tcHQtcmVhZC1zaGVsbC1jb21tYW5kKTogVGhlIGV4aXN0aW5n CmZ1bmN0aW9uYWxpdHkgZnJvbSBjb21waWxhdGlvbi1yZWFkLWNvbW1hbmQgZXh0cmFjdGVk IHRvCmEgZnVuY3Rpb24uCgooY29tcGlsYXRpb24tcHJvbXB0LXJlYWQtd2l0aC1oaXN0b3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KQogICAgICAgICAgICAgICAgICAgICAgICAgJ2NvbXBpbGUtaGlzdG9yeSkpKQogCisoZGVm dW4gY29tcGlsYXRpb24tcHJvbXB0LXJlYWQtd2l0aC1oaXN0b3J5LWNvbXBsZXRpb24gKGNv bW1hbmQpCisgIChjb21wbGV0aW5nLXJlYWQgIkNvbXBpbGUgY29tbWFuZDogIiBjb21waWxl LWhpc3RvcnkKKyAgICAgICAgICAgICAgICAgICBuaWwgbmlsIGNvbW1hbmQKKyAgICAgICAg ICAgICAgICAgICAoaWYgKGVxdWFsIChjYXIgY29tcGlsZS1oaXN0b3J5KSBjb21tYW5kKQor ICAgICAgICAgICAgICAgICAgICAgICAnKGNvbXBpbGUtaGlzdG9yeSAuIDEpCisgICAgICAg ICAgICAgICAgICAgICAnY29tcGlsZS1oaXN0b3J5KSkpCisKKyhkZWZjdXN0b20gY29tcGls YXRpb24tcmVhZC1jb21tYW5kLWZ1bmN0aW9uCisgICMnY29tcGlsYXRpb24tcHJvbXB0LXJl YWQtc2hlbGwtY29tbWFuZAorICAiYGNvbXBpbGF0aW9uLXJlYWQtY29tbWFuZCcgdXNlcyB0 aGlzIGZ1bmN0aW9uIHRvIGdldCB1c2VyJ3MgaW5wdXQuCitEZWZhdWx0cyB0byBgY29tcGls YXRpb24tcHJvbXB0LXJlYWQtc2hlbGwtY29tbWFuZCcsCitidXQgJ2NvbXBpbGF0aW9uLXBy b21wdC1yZWFkLXdpdGgtaGlzdG9yeS1jb21wbGV0aW9uJyBjYW4gYmUgdXNlZCBpbnN0ZWFk IGZvcgorYSBjb21wbGV0aW5nIHZlcnNpb24gYmFzZWQgb24gcGFzdCBydW5zLiIKKyAgOnZl cnNpb24gIjMxLjAiCisgIDp0eXBlICdmdW5jdGlvbgorICA6b3B0aW9ucworICAobGlzdAor ICAgICMnY29tcGlsYXRpb24tcHJvbXB0LXJlYWQtc2hlbGwtY29tbWFuZAorICAgICMnY29t cGlsYXRpb24tcHJvbXB0LXJlYWQtd2l0aC1oa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