From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Spencer Baugh Newsgroups: gmane.emacs.bugs Subject: bug#64533: [PATCH] Support displaying function name in the header line Date: Sat, 8 Jul 2023 14:14:30 -0400 Message-ID: References: <83y1jqb7pt.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000127b4005fffdb9b4" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29025"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 64533@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jul 08 20:15:15 2023 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 1qICSh-0007Kn-Ej for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 08 Jul 2023 20:15:15 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qICSX-0006i1-A2; Sat, 08 Jul 2023 14:15:05 -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 1qICSV-0006hk-5h for bug-gnu-emacs@gnu.org; Sat, 08 Jul 2023 14:15:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qICSU-0005j0-J6 for bug-gnu-emacs@gnu.org; Sat, 08 Jul 2023 14:15:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qICSU-0000qv-FU for bug-gnu-emacs@gnu.org; Sat, 08 Jul 2023 14:15:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Spencer Baugh Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 08 Jul 2023 18:15:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64533 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 64533-submit@debbugs.gnu.org id=B64533.16888400893227 (code B ref 64533); Sat, 08 Jul 2023 18:15:02 +0000 Original-Received: (at 64533) by debbugs.gnu.org; 8 Jul 2023 18:14:49 +0000 Original-Received: from localhost ([127.0.0.1]:45176 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qICSG-0000pz-VP for submit@debbugs.gnu.org; Sat, 08 Jul 2023 14:14:49 -0400 Original-Received: from mxout5.mail.janestreet.com ([64.215.233.18]:36617) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qICSF-0000pa-6s for 64533@debbugs.gnu.org; Sat, 08 Jul 2023 14:14:47 -0400 Original-Received: from mail-lj1-f199.google.com ([209.85.208.199]) by mxgoog2.mail.janestreet.com with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) (Exim 4.96) id 1qICS9-003Mog-0Z for 64533@debbugs.gnu.org; Sat, 08 Jul 2023 14:14:41 -0400 Original-Received: by mail-lj1-f199.google.com with SMTP id 38308e7fff4ca-2b6ad424a46so28568201fa.3 for <64533@debbugs.gnu.org>; Sat, 08 Jul 2023 11:14:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com; s=google; t=1688840080; x=1691432080; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=fCZ2E4z2FBW6en6fOydoWHWdGFdS4f3+qsosn/W3G/c=; b=i8HmCkQEMxvgu4o+nxGIhbMkGoxNCP0uEfjSvgA8IFdxVWrJQrZeZK9Gza/h9xA87x 4mA8mL9QkHVQP+HKzqtPz0LFMSzPYx3dVnM5J4h7S3eiVVcZqWpFuQTbTzKhYkuPP5ox edqAPbM/fV8jWVB7hkEqFhaOXBGZ5/l/MOFRY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688840080; x=1691432080; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=fCZ2E4z2FBW6en6fOydoWHWdGFdS4f3+qsosn/W3G/c=; b=Jw+wgQTKtAZwre1J08HBuzAUPQVDz4Si6uwp1OjZ6glyjPVwNs68TK3x44zD9uR7gp dtPNOjKPibZdJZJLXyMXDKgLQMfLC/CwefkOa/G8mqpukW5+wBQi5RsO/YfgkMRj0GuH G/QlzxQUIJqhSCU0SVVClpOOO1JtDDQvx9zXJxxm5cV8zh/KHu1V9jl04cf3/MJpTPWl V2JTNmVXe4iC566DXzuHUpVg5yMPGJvMm5nwKtrRvKDKsj5hdGACCaaUPCTsIbrrZgzP GmbgE4CCwUF2pboO0YGLw5aU9vcAozCpC7N3Jtw8oOyMV4MJG7YLGLOfi9eeOMU91752 tnMA== X-Gm-Message-State: ABy/qLbb5ziWzL9HWcYSQ/f85takeNl6S7q5m6GwuRtWZo16govvXU+m 5o0W6j2glkKBuKnMzDLTFXxhtwlb1OE9C3QSFtTVpr3zAiPJo/PCdPrBcC8yqueLCpcRuF0CND2 cBXzcYV540QN6icsuKfyeX19e98s60Q== X-Received: by 2002:a2e:300a:0:b0:2b6:e361:4b3c with SMTP id w10-20020a2e300a000000b002b6e3614b3cmr5592912ljw.14.1688840080679; Sat, 08 Jul 2023 11:14:40 -0700 (PDT) X-Google-Smtp-Source: APBJJlFN76p8fXpKvUzz7f21PuRmLdeqy0UsC2Ym6JwBFuDVAAtCMwMkCk/JLQmko/c/MW1x4rvI9ubeIXihe4kAKks= X-Received: by 2002:a2e:300a:0:b0:2b6:e361:4b3c with SMTP id w10-20020a2e300a000000b002b6e3614b3cmr5592905ljw.14.1688840080351; Sat, 08 Jul 2023 11:14:40 -0700 (PDT) In-Reply-To: <83y1jqb7pt.fsf@gnu.org> 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:264787 Archived-At: --000000000000127b4005fffdb9b4 Content-Type: text/plain; charset="UTF-8" On Sat, Jul 8, 2023, 14:04 Eli Zaretskii wrote: > > From: Spencer Baugh > > Date: Sat, 08 Jul 2023 13:56:23 -0400 > > > > +(defcustom which-func-use-header-line nil > > + "If non-nil, display the function name in the header line." > > + :type '(choice (const :tag "Display in header line" t) > > + (const :tag "Don't display in header line" nil))) > > + > > +(defcustom which-func-use-mode-line t > > + "If non-nil, display the function name in the mode line." > > + :type '(choice (const :tag "Display in mode line" t) > > + (const :tag "Don't display in mode line" nil))) > > Defcustom's should have a :version tag. > Will do. And why 2 separate defcustom's instead of just one? It looks > un-economical, and also allows for situations in which the behavior is > unclear without examining the code. > If I had, say, a single defcustom with possible values 'header 'mode and 'both, I would need to add an :eval to mode-line-format to decide whether to include the function name. I assumed that was undesirable. Although I could make these current defcustoms into internal variables and just set them based on a single defcustom, would that be good? Also, I think this needs a NEWS entry, and the user manual should be > amended to account for the new optional display. > Will do. > Thanks. > --000000000000127b4005fffdb9b4 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Sat, Jul 8, 2023, 14:04 Eli Zaretskii <eliz@gnu.org> wrote:
> From: Spencer Baugh <sbaugh@janestreet.com>
> Date: Sat, 08 Jul 2023 13:56:23 -0400
>
> +(defcustom which-func-use-header-line nil
> +=C2=A0 "If non-nil, display the function name in the header line= ."
> +=C2=A0 :type '(choice (const :tag "Display in header line&qu= ot; t)
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(const = :tag "Don't display in header line" nil)))
> +
> +(defcustom which-func-use-mode-line t
> +=C2=A0 "If non-nil, display the function name in the mode line.&= quot;
> +=C2=A0 :type '(choice (const :tag "Display in mode line"= ; t)
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(const = :tag "Don't display in mode line" nil)))

Defcustom's should have a :version tag.

Will d= o.

And why 2 separate defcustom's instead of just one?=C2=A0 It looks
un-economical, and also allows for situations in which the behavior is
unclear without examining the code.

If I had, say, a single defcustom with p= ossible values 'header 'mode and 'both, I would need to add an = :eval to mode-line-format to decide whether to include the function name. I= assumed that was undesirable.

Although I could make these current defcustoms into internal variabl= es and just set them based on a single defcustom, would that be good?
=

Also, I think this needs a NEWS entry, and the user manual should be
amended to account for the new optional display.

Will do.


Thanks.
--000000000000127b4005fffdb9b4--