From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Protesilaos Stavrou Newsgroups: gmane.emacs.devel Subject: Re: [ELPA] Add new 'show-font' package? Date: Fri, 06 Sep 2024 09:45:39 +0300 Message-ID: <87y145fffw.fsf@protesilaos.com> References: <87msknu635.fsf@protesilaos.com> <87jzfqjtdh.fsf@posteo.net> <87wmjp49si.fsf@protesilaos.com> <87y145z3yh.fsf@posteo.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6574"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Philip Kaludercic Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Sep 06 08:46:36 2024 Return-path: Envelope-to: ged-emacs-devel@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 1smSjs-0001YR-9j for ged-emacs-devel@m.gmane-mx.org; Fri, 06 Sep 2024 08:46:36 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1smSjG-0000mf-Qs; Fri, 06 Sep 2024 02:45:58 -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 1smSj6-0000ip-2U for emacs-devel@gnu.org; Fri, 06 Sep 2024 02:45:56 -0400 Original-Received: from relay5-d.mail.gandi.net ([2001:4b98:dc4:8::225]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1smSj3-000203-OW for emacs-devel@gnu.org; Fri, 06 Sep 2024 02:45:47 -0400 Original-Received: by mail.gandi.net (Postfix) with ESMTPSA id 383171C0005; Fri, 6 Sep 2024 06:45:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protesilaos.com; s=gm1; t=1725605141; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=NWSSzk9T2rvI1nHTmWAxXekqtu/6LG/rj1bn0fXl+io=; b=LZdE7dsUqoXgxZpYsxwFzWrzrAQ//8RV+hW6Ynu2yQfAs/nMm5ZXWZt4h1HYFH5tR7hfJn wJf9OJ5FMSJ3makCwvMg9Dvv7T167gvRgG1t2edDqE+a+kNJaT2bPE1QLAIF4knwnLAFvV xnNbDd/Iy+0LBIpQFUw+X2av6m7lBvfZndAKAmwUZn21d9JgLlrjYdSfof1/b4uZn2HWsX CNeIIGFd/BNqu23IwNWIgBVeEP1kdfcNhFI5cQ1x075fk2NCW7yrgZxSsG7badPD828eJN 6180+FAB/WafOrkIb5geRSvcebA1FMK+RJqMwscMgNGterMPvy72mreLV/KIgA== In-Reply-To: <87y145z3yh.fsf@posteo.net> X-GND-Sasl: info@protesilaos.com Received-SPF: pass client-ip=2001:4b98:dc4:8::225; envelope-from=info@protesilaos.com; helo=relay5-d.mail.gandi.net X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:323449 Archived-At: > From: Philip Kaludercic > Date: Fri, 6 Sep 2024 06:33:26 +0000 > [... 20 lines elided] >>> Some general comments: It would be nice to have a command to select a >>> font. >> >> You mean to select a font to preview? This can be done, for sure, though >> I will need to decouple the preview/presentation from the file-visiting >> part. In other words, the user selects a font and then we do >> 'set-face-attribute' of its family across the buffer that we generate. >> This way, we do not need to know where the font is installed and to >> visit that file (though that is fine as well). > > Is it not possible to look up file name of the font one selects using > e.g. `completing-read' and opening that with show-font? I was thinking of the scenario where you have something like this: (completing-read "Preview font: " '("Hack" "Source Code Pro" "Iosevka Comfy")) Here we would not have file paths to visit them and enable the major mode there. But we could still produce a bespoke "*show-font*" buffer and then fontify it using the selected font family. [ The names of fonts would come from 'x-family-fonts'. ] -- Protesilaos Stavrou https://protesilaos.com