From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Philip Kaludercic Newsgroups: gmane.emacs.bugs Subject: bug#64799: [PATCH] Add 'project-prompt-key' face Date: Tue, 25 Jul 2023 06:39:26 +0000 Message-ID: <87sf9cmr4x.fsf@posteo.net> References: <87zg3nqbuc.fsf@protesilaos.com> <87wmyqhhig.fsf@posteo.net> <874jluspp4.fsf@protesilaos.com> <87sf9ehgoi.fsf@posteo.net> <874jlt7t4f.fsf@protesilaos.com> <0e8dbebf-c0cb-01db-8a01-c7c7a165b826@gutov.dev> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23037"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Protesilaos Stavrou , 64799@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jul 25 08:40:17 2023 Return-path: Envelope-to: geb-bug-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 1qOBiS-0005oW-F6 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 25 Jul 2023 08:40:16 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qOBiK-0003RZ-Gm; Tue, 25 Jul 2023 02:40:08 -0400 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 1qOBiF-0003Qz-PH for bug-gnu-emacs@gnu.org; Tue, 25 Jul 2023 02:40:04 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qOBiE-00056x-3A for bug-gnu-emacs@gnu.org; Tue, 25 Jul 2023 02:40:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qOBiD-0008V6-V0 for bug-gnu-emacs@gnu.org; Tue, 25 Jul 2023 02:40:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 25 Jul 2023 06:40:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64799 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 64799-submit@debbugs.gnu.org id=B64799.169026717932645 (code B ref 64799); Tue, 25 Jul 2023 06:40:01 +0000 Original-Received: (at 64799) by debbugs.gnu.org; 25 Jul 2023 06:39:39 +0000 Original-Received: from localhost ([127.0.0.1]:44509 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qOBhr-0008UT-5z for submit@debbugs.gnu.org; Tue, 25 Jul 2023 02:39:39 -0400 Original-Received: from mout01.posteo.de ([185.67.36.65]:44329) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qOBho-0008UF-L1 for 64799@debbugs.gnu.org; Tue, 25 Jul 2023 02:39:38 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 9510E240029 for <64799@debbugs.gnu.org>; Tue, 25 Jul 2023 08:39:30 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1690267170; bh=VeZK2lCaNCtBV4z4Yk/5qG4+9iSVV7E2J8y6aKactGg=; h=From:To:Cc:Subject:Autocrypt:Date:Message-ID:MIME-Version:From; b=jt87G3R9EtgyM0ESy8qdrBNDxQVAAl6RzGcnvgeTH1UsRdkgDPcYAqzsVaeCYKuBh PoSognG495aeK9TTSs2XLX20xcI29AjmgnTUku8n/ZLpCX4bLuSu+ll+KpKfl4CAVk /g/ygOzcH2sA8xyGuB1QOFuW7A+al0Akf0QoUtpGxxevVQgp0vLbWenaVsdghEuVgL 7Wi+I+Cq+gxHkScgsL/FGpgudNe4OpUzkqUM8UCk66yzfgsPpwKnD34LCXglV7gdb0 J1coecYenwFRuyzaONLZeKemo4lFtJ9sitzYr2aKTyczob2wNOynjbvXhVGHXkeofY cR3HXMaQ3uwXQ== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4R96ns5Zrbz9ryJ; Tue, 25 Jul 2023 08:39:29 +0200 (CEST) In-Reply-To: <0e8dbebf-c0cb-01db-8a01-c7c7a165b826@gutov.dev> (Dmitry Gutov's message of "Tue, 25 Jul 2023 04:56:27 +0300") Autocrypt: addr=philipk@posteo.net; keydata= mDMEZBBQQhYJKwYBBAHaRw8BAQdAHJuofBrfqFh12uQu0Yi7mrl525F28eTmwUDflFNmdui0QlBo aWxpcCBLYWx1ZGVyY2ljIChnZW5lcmF0ZWQgYnkgYXV0b2NyeXB0LmVsKSA8cGhpbGlwa0Bwb3N0 ZW8ubmV0PoiWBBMWCAA+FiEEDg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwMFCQHhM4AFCwkI BwIGFQoJCAsCBBYCAwECHgECF4AACgkQ8xYDWXahwulikAEA77hloUiSrXgFkUVJhlKBpLCHUjA0 mWZ9j9w5d08+jVwBAK6c4iGP7j+/PhbkxaEKa4V3MzIl7zJkcNNjHCXmvFcEuDgEZBBQQhIKKwYB BAGXVQEFAQEHQI5NLiLRjZy3OfSt1dhCmFyn+fN/QKELUYQetiaoe+MMAwEIB4h+BBgWCAAmFiEE Dg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwwFCQHhM4AACgkQ8xYDWXahwukm+wEA8cml4JpK NeAu65rg+auKrPOP6TP/4YWRCTIvuYDm0joBALw98AMz7/qMHvSCeU/hw9PL6u6R2EScxtpKnWof z4oM X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:266020 Archived-At: Dmitry Gutov writes: > On 24/07/2023 08:53, Protesilaos Stavrou wrote: >>> From: Philip Kaludercic >>> Date: Sun, 23 Jul 2023 13:59:41 +0000 >> >>> [... 14 lines elided] >> >>>>> Does this even need a separate face, or shouldn't `help-key-binding' be >>>>> reused directly? >>>> >>>> That would be my choice, though also with the removal of the square >>>> brackets around it. The proposed patch is for backward-compatibility. >>> >>> Backwards-compatible to what? >> Just so that existing users do not complain. >> >>> Can someone depend on this specific behaviour? >> No, but the appearance still comes with certain expectations. Plus, >> there is this at the top of the file: >> ;; This is a GNU ELPA :core package. Avoid using functionality >> that >> ;; not compatible with the version of Emacs recorded above >> The required Emacs version is 26.1, while that of 'help-key-binding' >> is >> 28.1. > > Indeed, so if we switch to it in project.el, it will need some > polyfill for Emacs 26-27. If there is interest, this face could be added to the Compat package, if it would be OK to add Compat as a dependency for project.el on ELPA (this would also mean that project.el wouldn't have to use a custom `project--buffer-check'/`buffer-match-p' implementation). Alternatively, we could add a version/facep check and always prefer `help-key-binding' if it is available, otherwise fall-back to the current option. >> Perhaps a user option for the whole 'format' would be better? > > We can add a user option. But while we could also apply 'face' > property on that option's string value, that doesn't seem like a very > user-friendly approach toward someone who will want to change the face > used (it will require some Lisp knowledge from the user). > > But a user option to change how the prompt text is constructed -- why > not. E.g. one defaulting to "[%s] %s". Is there really such a wide range of options that users might be interested in here?