From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#74362: 31.0.50; Add completions for font names Date: Sat, 16 Nov 2024 09:55:52 +0200 Message-ID: <865xonipdj.fsf@gnu.org> References: <86iksoit19.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11344"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 74362@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Nov 16 08:57:27 2024 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 1tCDgM-0002lY-Dh for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 16 Nov 2024 08:57:26 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tCDg0-0007FG-Po; Sat, 16 Nov 2024 02:57:04 -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 1tCDfz-0007F7-74 for bug-gnu-emacs@gnu.org; Sat, 16 Nov 2024 02:57:03 -0500 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 1tCDfy-0006Qd-Tz for bug-gnu-emacs@gnu.org; Sat, 16 Nov 2024 02:57:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=References:In-Reply-To:From:Date:To:Subject; bh=JdKbrPSlfY5il7f7zW5YzIccDZxXnXVHiqoglmw0NkQ=; b=AQAOMLc8JY1ZphqiVlJ0WJpOJC592ysZ6gRC6D2xPNW5yHK+C1Jxf6ou4MxnQSWWSZXYpv5tYREH9djojV/FxnrZ/i7igDQv3+IoKBTeStWbKCKLGmLmMmkN9PvjnOqP5A7v9axjAYKiGSgmu+Mwy0jV/uZVEUUlIgCEyIWNsIdYYBZOyLpvB4lVfc5XHKyeZnhXWB0IpQ0CN49F/+QGsHyAqPGImeSaT4uGo7ORhS6XzjF3o6Sr53cftIFuaI5c1/M5V8cZzoOopeeH7xtZUcDTo4ymC+MyJbEvND2xqFDr0UpOAPz5SPKFhIcGFXqeWr58xiaBQITuwPGT1areGg==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tCDfy-000495-HL for bug-gnu-emacs@gnu.org; Sat, 16 Nov 2024 02:57:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 16 Nov 2024 07:57:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74362 X-GNU-PR-Package: emacs Original-Received: via spool by 74362-submit@debbugs.gnu.org id=B74362.173174376315867 (code B ref 74362); Sat, 16 Nov 2024 07:57:02 +0000 Original-Received: (at 74362) by debbugs.gnu.org; 16 Nov 2024 07:56:03 +0000 Original-Received: from localhost ([127.0.0.1]:51976 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tCDf1-00047r-4W for submit@debbugs.gnu.org; Sat, 16 Nov 2024 02:56:03 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:58682) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tCDey-00047F-M8 for 74362@debbugs.gnu.org; Sat, 16 Nov 2024 02:56:02 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tCDes-0006LG-C7; Sat, 16 Nov 2024 02:55:54 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=JdKbrPSlfY5il7f7zW5YzIccDZxXnXVHiqoglmw0NkQ=; b=AwmgpMUu3NjS Pp2HaxjfBE7xJf5KZDUFpE3+Ycc7crOyFcCnvAdN74ZE/ZqxPOjRnoWTynVy1NlrNAi7MQI6xHR8b +lulSc1japVs68wF75r6YByH6Xe5HMybUJXNAS35p1ZMcKqUaUVD2iRFnMxXVhpzPwszo9dDIWu+H 2/9l6Yz26fAiYSHoWgt6J2UgoPXOm+zIkyDKwbmzG6q4imlwsZOT8o+LvFF6AB5EJYk2RX40CcLF/ QAB3tYEQAJDlZql/TvcsvubZzf6rv29JlDoL3LaxWVrfcXcZlaDkpIh5sb1BZ/+8ujSpEAvTMLPnX gTjrykWGWveRC4IQKhTSlw==; In-Reply-To: (message from Stefan Monnier on Fri, 15 Nov 2024 12:33:14 -0500) 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:295433 Archived-At: > From: Stefan Monnier > Cc: 74362@debbugs.gnu.org > Date: Fri, 15 Nov 2024 12:33:14 -0500 > > > Also, the doc string of customize-face should be amended to say that > > it offers completion on fonts. > > Hmm... the docstring currently doesn't describe the UI at all (and > I can't think of a reason why it should). Similarly the manual doesn't > seem to describe any part of the UI of `customize-face`. > Apparently, we presume the UI is self-explanatory. If we want to fix > that, I think it's beyond the scope of this patch submission. How about mentioning the completion in the help-echo of this field? Btw, could set-face-font also benefit from this improvement? > > Btw, how does one invoke completion on the face attributes which are > > supposed to provide one, such as weight or colors? M-C-i doesn't seem > > to do it for me, or what am I missing? > > M-TAB worked for me on the "Foregound" color name field. > For weights, I see a menu rather than a text field so there doesn't seem > to be a "completion" option. Right. Btw^2: When we select a font, do we have to change the Foundry as well? Or does Emacs disregard any non-matching foundries (if, for example, the selected Family is not available with the specified Foundry)? > + ;; Cache the list for a max of 60s. > + (let ((time (float-time))) > + (if (and lastlist (eq (selected-frame) lastframe) > + (> 60 (- time lasttime))) Maybe the 60 thing should be a defvar? > --- a/lisp/cus-face.el > +++ b/lisp/cus-face.el > @@ -48,6 +48,7 @@ custom-declare-face > (defconst custom-face-attributes > `((:family > (string :tag "Font Family" > + :completions custom-face--font-completion > :help-echo "Font family or fontset alias name.")) I'm curious: how come :foreground and :background don't need a :completions specifier, and yet they provide completion OOTB?