unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#16815: 24.3.50; Provide completion for `describe-font' (enhancement request)
@ 2014-02-19 21:03 Drew Adams
  2016-04-29 17:35 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 8+ messages in thread
From: Drew Adams @ 2014-02-19 21:03 UTC (permalink / raw)
  To: 16815

Subject line says it all.  Please do.

In GNU Emacs 24.3.50.1 (i686-pc-mingw32)
 of 2014-02-11 on ODIEONE
Bzr revision: 116410 lekktu@gmail.com-20140211204823-l9l2s6tktfitq266
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
 `configure --prefix=/c/Devel/emacs/binary --enable-checking=yes,glyphs
 'CFLAGS=-O0 -g3' LDFLAGS=-Lc:/Devel/emacs/lib
 CPPFLAGS=-Ic:/Devel/emacs/include'





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#16815: 24.3.50; Provide completion for `describe-font' (enhancement request)
  2014-02-19 21:03 bug#16815: 24.3.50; Provide completion for `describe-font' (enhancement request) Drew Adams
@ 2016-04-29 17:35 ` Lars Ingebrigtsen
  2016-04-29 18:39   ` Drew Adams
       [not found]   ` <<640c1da6-43a2-4c50-b50f-675f0b316b8b@default>
  0 siblings, 2 replies; 8+ messages in thread
From: Lars Ingebrigtsen @ 2016-04-29 17:35 UTC (permalink / raw)
  To: Drew Adams; +Cc: 16815

Drew Adams <drew.adams@oracle.com> writes:

> Subject line says it all.  Please do.

Hm...  would that be completion over this?

(fontset-list)
=>
("-DAMA-Ubuntu Mono-normal-normal-normal-*-24-*-*-*-m-0-fontset-startup" "-*-fixed-medium-r-normal-*-16-*-*-*-*-*-fontset-standard" "-*-*-*-*-*-*-*-*-*-*-*-*-fontset-default")

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#16815: 24.3.50; Provide completion for `describe-font' (enhancement request)
  2016-04-29 17:35 ` Lars Ingebrigtsen
@ 2016-04-29 18:39   ` Drew Adams
  2016-04-29 19:23     ` Eli Zaretskii
       [not found]   ` <<640c1da6-43a2-4c50-b50f-675f0b316b8b@default>
  1 sibling, 1 reply; 8+ messages in thread
From: Drew Adams @ 2016-04-29 18:39 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 16815

> Hm...  would that be completion over this?
> 
> (fontset-list)
> =>
> ("-DAMA-Ubuntu Mono-normal-normal-normal-*-24-*-*-*-m-0-fontset-startup"
> "-*-fixed-medium-r-normal-*-16-*-*-*-*-*-fontset-standard" "-*-*-*-*-*-*-
> *-*-*-*-*-*-fontset-default")

No.  That is a list of fontsets, not fonts.

The completion candidates should be the installed fonts.

This is what I use, FWIW:

(let ((fonts        (make-hash-table :test #'equal))
      (fontset-lst  (fontset-list)))
  (setq fontset-lst  (delete "-*-*-*-*-*-*-*-*-*-*-*-*-fontset-default"
                             fontset-lst))
  (dolist (ft  (append fontset-lst (x-list-fonts "*"))  fonts)
    (puthash ft t fonts)))





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#16815: 24.3.50; Provide completion for `describe-font' (enhancement request)
  2016-04-29 18:39   ` Drew Adams
@ 2016-04-29 19:23     ` Eli Zaretskii
  2019-11-02 16:23       ` Lars Ingebrigtsen
  0 siblings, 1 reply; 8+ messages in thread
From: Eli Zaretskii @ 2016-04-29 19:23 UTC (permalink / raw)
  To: Drew Adams; +Cc: larsi, 16815

> Date: Fri, 29 Apr 2016 11:39:59 -0700 (PDT)
> From: Drew Adams <drew.adams@oracle.com>
> Cc: 16815@debbugs.gnu.org
> 
> This is what I use, FWIW:
> 
> (let ((fonts        (make-hash-table :test #'equal))
>       (fontset-lst  (fontset-list)))
>   (setq fontset-lst  (delete "-*-*-*-*-*-*-*-*-*-*-*-*-fontset-default"
>                              fontset-lst))
>   (dolist (ft  (append fontset-lst (x-list-fonts "*"))  fonts)
>     (puthash ft t fonts)))

IMO, this is madness: you are bloating the Emacs session with hundreds
of fonts, most of which Emacs will never need to use, or even know
about.  We certainly shouldn't do anything like that in Emacs.

The doc string of describe-font clearly says that the font must be one
which Emacs already loaded, so completing on all the _installed_ fonts
is definitely not TRT.





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#16815: 24.3.50; Provide completion for `describe-font' (enhancement request)
       [not found]     ` <<831t5ow76o.fsf@gnu.org>
@ 2016-04-29 19:33       ` Drew Adams
  0 siblings, 0 replies; 8+ messages in thread
From: Drew Adams @ 2016-04-29 19:33 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: larsi, 16815

> IMO, this is madness: you are bloating the Emacs session with hundreds
> of fonts, most of which Emacs will never need to use, or even know
> about.  We certainly shouldn't do anything like that in Emacs.

I don't think it is madness.  I (and others) have been taking
advantage of it for a long time.

> The doc string of describe-font clearly says that the font must be one
> which Emacs already loaded, so completing on all the _installed_ fonts
> is definitely not TRT.

I certainly wouldn't have a problem with that: completing against
the installed fonts is fine by me.  My reply to Lars was to make
the point that this is about choosing a font, not choosing a
fontset - completion should be against font names.

[Note: Things are a lot different if you can complete against
parts of the font name, and especially if you can do so
progressively, to narrow down the matching candidates.  If
all you have is a single pattern-match attempt then the
completion behavior is much less helpful/interesting.]





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#16815: 24.3.50; Provide completion for `describe-font' (enhancement request)
  2016-04-29 19:23     ` Eli Zaretskii
@ 2019-11-02 16:23       ` Lars Ingebrigtsen
  2019-11-02 17:25         ` Eli Zaretskii
  0 siblings, 1 reply; 8+ messages in thread
From: Lars Ingebrigtsen @ 2019-11-02 16:23 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 16815

Eli Zaretskii <eliz@gnu.org> writes:

>> This is what I use, FWIW:
>> 
>> (let ((fonts        (make-hash-table :test #'equal))
>>       (fontset-lst  (fontset-list)))
>>   (setq fontset-lst  (delete "-*-*-*-*-*-*-*-*-*-*-*-*-fontset-default"
>>                              fontset-lst))
>>   (dolist (ft  (append fontset-lst (x-list-fonts "*"))  fonts)
>>     (puthash ft t fonts)))
>
> IMO, this is madness: you are bloating the Emacs session with hundreds
> of fonts, most of which Emacs will never need to use, or even know
> about.  We certainly shouldn't do anything like that in Emacs.
>
> The doc string of describe-font clearly says that the font must be one
> which Emacs already loaded, so completing on all the _installed_ fonts
> is definitely not TRT.

I'm not sure I understand the objection here.  The form suggested by
Drew just gets a list of font names -- it doesn't load anything, so it
should be harmless?

And the doc string of describe-font seems to be wrong.  You can ask it
to describe a font that's not loaded.  Or at least it seems that way
when I test it.  

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#16815: 24.3.50; Provide completion for `describe-font' (enhancement request)
  2019-11-02 16:23       ` Lars Ingebrigtsen
@ 2019-11-02 17:25         ` Eli Zaretskii
  2019-11-03 15:33           ` Lars Ingebrigtsen
  0 siblings, 1 reply; 8+ messages in thread
From: Eli Zaretskii @ 2019-11-02 17:25 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 16815

> From: Lars Ingebrigtsen <larsi@gnus.org>
> Cc: Drew Adams <drew.adams@oracle.com>,  16815@debbugs.gnu.org
> Date: Sat, 02 Nov 2019 17:23:01 +0100
> 
> I'm not sure I understand the objection here.  The form suggested by
> Drew just gets a list of font names -- it doesn't load anything, so it
> should be harmless?

A list of many hundreds of long strings is not cheap.  However, ...

> And the doc string of describe-font seems to be wrong.  You can ask it
> to describe a font that's not loaded.  Or at least it seems that way
> when I test it.  

... yes, you are right, sorry.  So please also fix the doc string of
describe-font and the comments inside it, and also the doc string of
font-info, which it calls.





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#16815: 24.3.50; Provide completion for `describe-font' (enhancement request)
  2019-11-02 17:25         ` Eli Zaretskii
@ 2019-11-03 15:33           ` Lars Ingebrigtsen
  0 siblings, 0 replies; 8+ messages in thread
From: Lars Ingebrigtsen @ 2019-11-03 15:33 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 16815

Eli Zaretskii <eliz@gnu.org> writes:

>> And the doc string of describe-font seems to be wrong.  You can ask it
>> to describe a font that's not loaded.  Or at least it seems that way
>> when I test it.  
>
> ... yes, you are right, sorry.  So please also fix the doc string of
> describe-font and the comments inside it, and also the doc string of
> font-info, which it calls.

OK; done.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2019-11-03 15:33 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-19 21:03 bug#16815: 24.3.50; Provide completion for `describe-font' (enhancement request) Drew Adams
2016-04-29 17:35 ` Lars Ingebrigtsen
2016-04-29 18:39   ` Drew Adams
2016-04-29 19:23     ` Eli Zaretskii
2019-11-02 16:23       ` Lars Ingebrigtsen
2019-11-02 17:25         ` Eli Zaretskii
2019-11-03 15:33           ` Lars Ingebrigtsen
     [not found]   ` <<640c1da6-43a2-4c50-b50f-675f0b316b8b@default>
     [not found]     ` <<831t5ow76o.fsf@gnu.org>
2016-04-29 19:33       ` Drew Adams

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).