From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Katsumi Yamaoka <yamaoka@jpl.org>
Cc: emacs-devel@gnu.org
Subject: Re: master 11abc4a: Merge remote-tracking branch 'origin/scratch/lexical-gnus' into trunk
Date: Mon, 01 Feb 2021 21:58:36 -0500 [thread overview]
Message-ID: <jwvv9bbp4ip.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <b4m5z3bb8mu.fsf@jpl.org> (Katsumi Yamaoka's message of "Tue, 02 Feb 2021 09:44:57 +0900")
Katsumi Yamaoka [2021-02-02 09:44:57] wrote:
> On Sun, 31 Jan 2021 17:39:54 -0500, Stefan Monnier wrote:
>> branch: master
>> commit 11abc4aef42ceaea451c264e5a7292e765d4f31b
>> Merge: cb72b83 d2341eb
>> Author: Stefan Monnier <monnier@iro.umontreal.ca>
>> Commit: Stefan Monnier <monnier@iro.umontreal.ca>
>
>> Merge remote-tracking branch 'origin/scratch/lexical-gnus' into trunk
>
> It's not a bug but my custom face setting got to malfunction by
> this change,
I think it *is* a bug ;-)
> i.e., to turn lexical-binding on on the gnus files.
> My custom face setting is something like the following:
>
> (push '((string-match "REGEX" group) . custom-face)
> gnus-group-highlight)
Indeed, I see that `gnus-group-highlight`s docstring explicitly mentions
`group` as a variable that can be used there, so we should include it.
> Where `group' is a group name; it aimed to highlight groups of
> which the name match "REGEX" by `custom-face' in the Group buffer.
> However, `group' is no longer a bound variable now. So, I'd like
> to add `group' to an env list in `gnus-group-update-eval-form' as
> the patch below. Is it ok? Thanks.
Looking at the docstring, I see that `method` is also missing, and on
the flip side, I see that additionally to what the docstring mentions,
the code provides `total` and `group-age`.
Could someone help me figure out what should happen with those
extra vars?
Should `total` and/or `group-age` be removed from the code in
`gnus-group-update-eval-form`, or should they instead be documented in
the docstring of `gnus-group-highlight` and, if so, saying what?
Stefan
diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el
index 3661b6376d..25abb911a6 100644
--- a/lisp/gnus/gnus-group.el
+++ b/lisp/gnus/gnus-group.el
@@ -367,13 +367,15 @@ gnus-group-highlight
change in a future release. For now, you can use the following
variables in the Lisp expression:
-group: The name of the group.
-unread: The number of unread articles in the group.
-method: The select method used.
-mailp: Whether it's a mail group or not.
-level: The level of the group.
-score: The score of the group.
-ticked: The number of ticked articles."
+`group': The name of the group.
+`unread': The number of unread articles in the group.
+`method': The select method used.
+`total': ??
+`mailp': Whether it's a mail group or not.
+`level': The level of the group.
+`score': The score of the group.
+`ticked': The number of ticked articles.
+`group-age': ??"
:group 'gnus-group-visual
:type '(repeat (cons (sexp :tag "Form") face)))
(put 'gnus-group-highlight 'risky-local-variable t)
@@ -401,16 +403,8 @@ gnus-group-icon-list
It is also possible to change and add form fields, but currently that
requires an understanding of Lisp expressions. Hopefully this will
-change in a future release. For now, you can use the following
-variables in the Lisp expression:
-
-group: The name of the group.
-unread: The number of unread articles in the group.
-method: The select method used.
-mailp: Whether it's a mail group or not.
-level: The level of the group.
-score: The score of the group.
-ticked: The number of ticked articles."
+change in a future release. For now, you can use the same
+variables in the Lisp expression as in those of `gnus-group-highlight'."
:group 'gnus-group-icons
:type '(repeat (cons (sexp :tag "Form") file)))
(put 'gnus-group-icon-list 'risky-local-variable t)
@@ -1624,7 +1618,9 @@ gnus-group-update-eval-form
(marked (gnus-info-marks info))
(env
(list
+ (cons 'group group)
(cons 'unread (if (numberp (car entry)) (car entry) 0))
+ (cons 'method method)
(cons 'total (if active (1+ (- (cdr active) (car active))) 0))
(cons 'mailp (apply
#'append
next prev parent reply other threads:[~2021-02-02 2:58 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20210131223952.429.10439@vcs0.savannah.gnu.org>
[not found] ` <20210131223954.A429420DF3@vcs0.savannah.gnu.org>
2021-02-02 0:44 ` master 11abc4a: Merge remote-tracking branch 'origin/scratch/lexical-gnus' into trunk Katsumi Yamaoka
2021-02-02 2:58 ` Stefan Monnier [this message]
2021-02-02 5:41 ` Richard Stallman
2021-02-02 6:38 ` Tassilo Horn
2021-02-02 9:06 ` tomas
2021-02-02 15:23 ` Eli Zaretskii
2021-02-02 16:01 ` tomas
2021-02-02 16:21 ` Eli Zaretskii
2021-02-02 16:34 ` git things [was: master 11abc4a: Merge remote-tracking branch 'origin/scratch/lexical-gnus' into trunk] tomas
2021-02-03 5:51 ` master 11abc4a: Merge remote-tracking branch 'origin/scratch/lexical-gnus' into trunk Richard Stallman
2021-02-02 8:16 ` Andreas Schwab
2021-02-02 15:06 ` Eli Zaretskii
2021-02-03 5:52 ` Richard Stallman
2021-02-03 14:32 ` Eli Zaretskii
2021-02-04 5:47 ` Richard Stallman
2021-02-02 9:05 ` Lars Ingebrigtsen
2021-02-02 14:43 ` Stefan Monnier
2021-02-02 14:53 ` Lars Ingebrigtsen
2021-02-02 22:12 ` Katsumi Yamaoka
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwvv9bbp4ip.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=emacs-devel@gnu.org \
--cc=yamaoka@jpl.org \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.