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 18:32:31 +0200 Message-ID: <86wmh3f8bk.fsf@gnu.org> References: <86iksoit19.fsf@gnu.org> <865xonipdj.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="689"; 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 17:33:14 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 1tCLjV-000AZc-R3 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 16 Nov 2024 17:33:13 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tCLjN-00047o-AA; Sat, 16 Nov 2024 11:33:05 -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 1tCLjK-00047Z-4w for bug-gnu-emacs@gnu.org; Sat, 16 Nov 2024 11:33:02 -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 1tCLjJ-0000HV-Sc for bug-gnu-emacs@gnu.org; Sat, 16 Nov 2024 11:33:01 -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=ISBQ/seQ0VZ8vkL7bfxzKNP+dSe2vbWR6tDMM0OuQe4=; b=IOSdTK5HfyAqE2EWlHn4g2lKhDC67wrb0dpwpuprDV7t+Mjq5TyCeJAg/CIcCnPyXs9QR4Wp8s9+L3sG9ZRVBG2C+o0Am3RzXtGcpa+93Ua/4v1KHZH2yHd38uNOBSD+PzPq4/j1QpRP4DyybfYlXtss2WiSz4YeOUipFCHG8JOGxLXvbS7dOoR8v3BoLBHFBjHHHt/5IgwDOYLDDuK2sa9ZtvKrawCP0yUGdxhGTsB7iLVd4M3LW1P0cPxqr9/m8lRKZvG9eDAapYd9d1+XCTIQ1OJBgr+q5lYduV1/cmyybzzNM5qJ91VL9+yvX8vXmor2EBORC9ew23IdHI2j3Q==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tCLjJ-0003Uc-MR for bug-gnu-emacs@gnu.org; Sat, 16 Nov 2024 11:33:01 -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 16:33:01 +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.173177476413400 (code B ref 74362); Sat, 16 Nov 2024 16:33:01 +0000 Original-Received: (at 74362) by debbugs.gnu.org; 16 Nov 2024 16:32:44 +0000 Original-Received: from localhost ([127.0.0.1]:54511 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tCLj2-0003U1-25 for submit@debbugs.gnu.org; Sat, 16 Nov 2024 11:32:44 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:39686) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tCLj0-0003Tl-6L for 74362@debbugs.gnu.org; Sat, 16 Nov 2024 11:32:42 -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 1tCLiu-0000DM-OZ; Sat, 16 Nov 2024 11:32:36 -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=ISBQ/seQ0VZ8vkL7bfxzKNP+dSe2vbWR6tDMM0OuQe4=; b=izndINHwDSKt Ok+QY0xUhE2WsxjBMnWPFKVNa0vOObqaCnit6ioe5R4JYiU3H9OBz0NiCBmi9Ft70X26eREfUPQtk QuLcvxIJjteShnKKbhVwcd6V7pLu8eW3aHmgsingh+wgX5kLVdUCAfXBi9x9Mkm59ldLHCXUMWn3m baWQzHt3EUgl8M8da8zcFNcMGNAseraP1iFLYeL/uy3kohNFC/db72KR8rVjktbs9c5wcqfEhFP28 Lm0CYhnvAcBMbejamYEFyjnbgGBq405uMn1SzHqH0eIgxtCvI2xZg3/BNDV7rVoH0DCQSdv+G8G3Z RwA6oZCdgj/zRFbiRTfQOQ==; In-Reply-To: (message from Stefan Monnier on Sat, 16 Nov 2024 10:12:21 -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:295472 Archived-At: > From: Stefan Monnier > Cc: 74362@debbugs.gnu.org > Date: Sat, 16 Nov 2024 10:12:21 -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? > > I don't understand why you'd want that, so I don't know how it should be > phrased. Can you point to some other help-echo which states such > a thing, for inspiration? It is unusual, yes. But it is also unusual to expect completion in any such field, since it is not the minibuffer. Anyway, it isn't worth the argument, just forget it. I can make such a change myself if I think it's a good thing. > > Btw, could set-face-font also benefit from this improvement? > > AFAICT `set-face-font` already has its own completion. Right, it just expects an unusual character as the first character of a font's name. > >> + ;; 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? > > I doubt it's worth the trouble, but if you insist I'll do that. Someone will ask for that even if I don't ;-) > >> + :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? > > Because those use the `color` widget defined in `wid-edit.el`: Got it, thanks. (Maybe we should have a 'font' widget, then, in some distant future.)