From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Anand Tamariya Newsgroups: gmane.emacs.devel Subject: Re: Patch: Convenience function for changing font family Date: Mon, 9 Aug 2021 12:21:43 +0530 Message-ID: References: <83r1f4h2ew.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="00000000000015c2a905c91ad2f9" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37549"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Aug 09 08:52:50 2021 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 1mCz9W-0009bi-L3 for ged-emacs-devel@m.gmane-mx.org; Mon, 09 Aug 2021 08:52:50 +0200 Original-Received: from localhost ([::1]:37208 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mCz9U-0000IJ-Ei for ged-emacs-devel@m.gmane-mx.org; Mon, 09 Aug 2021 02:52:48 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52418) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mCz8h-0007rm-UZ for emacs-devel@gnu.org; Mon, 09 Aug 2021 02:51:59 -0400 Original-Received: from mail-io1-xd2c.google.com ([2607:f8b0:4864:20::d2c]:40739) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mCz8e-0000gJ-OD; Mon, 09 Aug 2021 02:51:59 -0400 Original-Received: by mail-io1-xd2c.google.com with SMTP id m13so26048175iol.7; Sun, 08 Aug 2021 23:51:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=wyTDYdbRf9TmhIeqtN9anE7vGfCIQBv4Q3yvpNXcOGE=; b=Vayn6smkenVmB4q4Ln66d+i7yEQQU8GlbBS/nm6yJmNZXLPwHjnryWEQy+jE7BIBAc lIQEWM3hddGdVYcsaLuPSxD3/OA2gDZE6HPjCboVTY1KSs0QBsqQQ4x/kKGA82baA/9t v+86MhNPVAgeF1841o8bJTxcE8hpdbJclI6dKzodaMHmzqoHJNi/JRcjfru6r+45pcNX XL0t2XLOycCNm7HMqbCokCHBYOJxeSiLcz+zrm/lz5ZWEr9wuQ0q/TDOcKDwc7+xUPcD 7WPX4eCI/dvdAKqD3oaX/4QXgigW5txFQLcBLN17/lQodp+PMoQRnD1FBlGw/td9rJ50 CMog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=wyTDYdbRf9TmhIeqtN9anE7vGfCIQBv4Q3yvpNXcOGE=; b=ZiawbZIZVShFEiE374Q/uIPV02RQo2uhzsQ8E0g6JVK1k6h1DhDm0RSuV2N9t1SjKq AIPd7V+xGTkaobJjgkp6YxGKpPLFlks1nPzPRcXqv3PIrzwkElpxRAlu8WhkMVdVJ6TI XiJEIHUHb230XPTdFVsclLD1iGyjH+iEk+HG6mJyPOk6NsJJm1UZlTQKtL1L3QeWxe/j N15Mb18VuyMryjc2Sw5hC+F1AxnXdMnMN99HYZyqNhg2OM2D3+QWRuSUEy18zgYa5sDz dRlptHfN9POyxeWyInmpzaE4tPV7WBvZ+NpvLC3vUZiDwpt5SYfQwJSOG/LMRYSDyXl9 1/2Q== X-Gm-Message-State: AOAM533A26Pa4kE03KCS2OnWPK2/i9DjHG14JAp7e442PyJm+Xy82o3o b7gR29G5bpesPFNOMWjLRki64Q3gWQwH8O8uVhwW8P2Xmnw= X-Google-Smtp-Source: ABdhPJyF7T2kcKgJFcWqrLFPeXsGkqd7pkFNl+pZZ8wnPIGesbOJMr4i7CXf+LZH9A+hT2wi79UPAquFGdmOpXBvu6g= X-Received: by 2002:a05:6638:306:: with SMTP id w6mr21096468jap.132.1628491914526; Sun, 08 Aug 2021 23:51:54 -0700 (PDT) In-Reply-To: <83r1f4h2ew.fsf@gnu.org> Received-SPF: pass client-ip=2607:f8b0:4864:20::d2c; envelope-from=atamariya@gmail.com; helo=mail-io1-xd2c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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" Xref: news.gmane.io gmane.emacs.devel:272225 Archived-At: --00000000000015c2a905c91ad2f9 Content-Type: text/plain; charset="UTF-8" On Sun, Aug 8, 2021 at 12:02 PM Eli Zaretskii wrote: > > From: Anand Tamariya > > Date: Fri, 6 Aug 2021 14:33:48 +0530 > > > > Here's a patch for changing the font family on the fly. It's similar to > > changing font weight using the keyboard. > > Thanks, but how is this supposed to work? After applying the patch > and loading facemenu, "M-x facemenu-set-family RET" does nothing, not > even prompts for the font family; and clicking > > Edit->Text Properties->Face->family > > from the menu bar just shows "menu-bar edit Text Properties fc f" in > the echo area. > > I think one problem is that the facemenu machinery, as you use it, > expects "family" to be a face, and there's no such face. > > Did you test this with Emacs 28 from the master branch? Or what am I > missing? > > P.S. Please also provide a doc string for the new function(s), and add > a :version tag to any defcustom you add or change. > You are right. I don't understand the face menu system well. It worked for me because I was evaluating the changes in a running instance. Once I start a new instance, I can't seem to get it working without re-evaluating 'facemenu-keybindings' followed by (facemenu-update). Also, it's only supposed to work on a selection of text, i.e. you select some text and then change the font family for the selection. --00000000000015c2a905c91ad2f9 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Sun, Aug 8, 2021 at 12:02 PM Eli Zaretskii <= ;eliz@gnu.org> wro= te:
> From: A= nand Tamariya <= atamariya@gmail.com>
> Date: Fri, 6 Aug 2021 14:33:48 +0530
>
> Here's a patch for changing the font family on the fly. It's s= imilar to
> changing font weight using the keyboard.

Thanks, but how is this supposed to work?=C2=A0 After applying the patch and loading facemenu, "M-x facemenu-set-family RET" does nothing,= not
even prompts for the font family; and clicking

=C2=A0Edit->Text Properties->Face->family

from the menu bar just shows "menu-bar edit Text Properties fc f"= in
the echo area.

I think one problem is that the facemenu machinery, as you use it,
expects "family" to be a face, and there's no such face.

Did you test this with Emacs 28 from the master branch?=C2=A0 Or what am I<= br> missing?

P.S. Please also provide a doc string for the new function(s), and add
a :version tag to any defcustom you add or change.
You= are right. I don't understand the face menu system well. It worked for= me because I was evaluating the changes in a running instance. Once I star= t a new instance, I can't seem to get it working without re-evaluating = 'facemenu-keybindings' followed by (facemenu-update). Also, it'= s only supposed to work on a selection of text, i.e. you select some text a= nd then change the font family for the selection.

--00000000000015c2a905c91ad2f9--