unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 74362@debbugs.gnu.org
Subject: bug#74362: 31.0.50; Add completions for font names
Date: Sat, 16 Nov 2024 18:32:31 +0200	[thread overview]
Message-ID: <86wmh3f8bk.fsf@gnu.org> (raw)
In-Reply-To: <jwvwmh3p6o3.fsf-monnier+emacs@gnu.org> (message from Stefan Monnier on Sat, 16 Nov 2024 10:12:21 -0500)

> From: Stefan Monnier <monnier@iro.umontreal.ca>
> 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.)





  reply	other threads:[~2024-11-16 16:32 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-14 22:48 bug#74362: 31.0.50; Add completions for font names Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-15  8:39 ` Robert Pluim
2024-11-15 16:50   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-15 17:38     ` Robert Pluim
2024-11-15 17:48       ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-15 12:24 ` Eli Zaretskii
2024-11-15 17:33   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-16  7:55     ` Eli Zaretskii
2024-11-16 15:12       ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-16 16:32         ` Eli Zaretskii [this message]
2024-11-17 22:59           ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86wmh3f8bk.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=74362@debbugs.gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).