* Re: master c3e8381: * lisp/gnus/gnus-sum.el: Use lexical-binding
[not found] ` <20190515175319.ACE4B20537@vcs0.savannah.gnu.org>
@ 2019-05-17 16:06 ` Andy Moreton
2019-05-17 16:45 ` Stefan Monnier
0 siblings, 1 reply; 9+ messages in thread
From: Andy Moreton @ 2019-05-17 16:06 UTC (permalink / raw)
To: emacs-devel
On Wed 15 May 2019, Stefan Monnier wrote:
> branch: master
> commit c3e838166800d5af4be66e80c2be276905a73486
> Author: Stefan Monnier <monnier@iro.umontreal.ca>
> Commit: Stefan Monnier <monnier@iro.umontreal.ca>
>
> * lisp/gnus/gnus-sum.el: Use lexical-binding
This commit causes problems with the display of thread related fields in
summary lines in the summary buffer.
`gnus-summary-line-format-alist' is used to expand the summary line
format string. The ?V, ?t and ?e formats expect `thread' to be bound
dynamically. Now that this file uses lexical binding that no longer
works.
Several entries in the alist also use "(macroexpand (mail-header-..."
which appears to no longer be needed, as the mail header accessors are
now functions not macros.
AndyM
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: master c3e8381: * lisp/gnus/gnus-sum.el: Use lexical-binding
2019-05-17 16:06 ` master c3e8381: * lisp/gnus/gnus-sum.el: Use lexical-binding Andy Moreton
@ 2019-05-17 16:45 ` Stefan Monnier
2019-05-17 16:48 ` Stefan Monnier
0 siblings, 1 reply; 9+ messages in thread
From: Stefan Monnier @ 2019-05-17 16:45 UTC (permalink / raw)
To: emacs-devel; +Cc: monnier
> This commit causes problems with the display of thread related fields in
> summary lines in the summary buffer.
>
> `gnus-summary-line-format-alist' is used to expand the summary line
> format string. The ?V, ?t and ?e formats expect `thread' to be bound
> dynamically. Now that this file uses lexical binding that no longer
> works.
Indeed, thanks. Does the patch below work for you?
> Several entries in the alist also use "(macroexpand (mail-header-..."
> which appears to no longer be needed, as the mail header accessors are
> now functions not macros.
Not sure what's best: get rid of the `macroexpand` calls or replace them
with `macroexpand-all`?
Stefan
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: master c3e8381: * lisp/gnus/gnus-sum.el: Use lexical-binding
2019-05-17 16:45 ` Stefan Monnier
@ 2019-05-17 16:48 ` Stefan Monnier
2019-05-17 18:15 ` Andy Moreton
0 siblings, 1 reply; 9+ messages in thread
From: Stefan Monnier @ 2019-05-17 16:48 UTC (permalink / raw)
To: emacs-devel; +Cc: Stefan Monnier
> Indeed, thanks. Does the patch below work for you?
I meant this one,
Stefan
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el
index f761fdb794..556fb63a07 100644
--- a/lisp/gnus/gnus-sum.el
+++ b/lisp/gnus/gnus-sum.el
@@ -50,6 +50,7 @@ gnus-tmp-score
(defvar gnus-tmp-score-char)
(defvar gnus-tmp-subject)
(defvar gnus-tmp-subject-or-nil)
+(defvar gnus-tmp-thread)
(defvar gnus-tmp-unread)
(defvar gnus-tmp-unread-and-unselected)
(defvar gnus-tmp-unread-and-unticked)
@@ -1443,15 +1444,17 @@ gnus-summary-line-format-alist
(?\< (make-string (max 0 (- 20 gnus-tmp-level)) ? ) ?s)
(?i gnus-tmp-score ?d)
(?z gnus-tmp-score-char ?c)
- (?V (gnus-thread-total-score (and (boundp 'thread) (car thread))) ?d)
+ (?V (gnus-thread-total-score
+ (and (boundp 'gnus-tmp-thread) (car gnus-tmp-thread)))
+ ?d)
(?U gnus-tmp-unread ?c)
(?f (gnus-summary-from-or-to-or-newsgroups gnus-tmp-header gnus-tmp-from)
?s)
(?t (gnus-summary-number-of-articles-in-thread
- (and (boundp 'thread) (car thread)) gnus-tmp-level)
+ (and (boundp 'gnus-tmp-thread) (car gnus-tmp-thread)) gnus-tmp-level)
?d)
(?e (gnus-summary-number-of-articles-in-thread
- (and (boundp 'thread) (car thread)) gnus-tmp-level t)
+ (and (boundp 'gnus-tmp-thread) (car gnus-tmp-thread)) gnus-tmp-level t)
?c)
(?u gnus-tmp-user-defined ?s)
(?P (gnus-pick-line-number) ?d)
@@ -3786,9 +3789,9 @@ gnus-summary-insert-line
(setq gnus-tmp-name gnus-tmp-from))
(unless (numberp gnus-tmp-lines)
(setq gnus-tmp-lines -1))
- (if (= gnus-tmp-lines -1)
- (setq gnus-tmp-lines "?")
- (setq gnus-tmp-lines (number-to-string gnus-tmp-lines)))
+ (setq gnus-tmp-lines (if (= gnus-tmp-lines -1)
+ "?"
+ (number-to-string gnus-tmp-lines)))
(condition-case ()
(put-text-property
(point)
@@ -5265,7 +5268,7 @@ gnus-summary-prepare-threads
gnus-tmp-header gnus-tmp-unread gnus-tmp-downloaded
gnus-tmp-replied gnus-tmp-subject-or-nil
gnus-tmp-dummy gnus-tmp-indentation gnus-tmp-lines gnus-tmp-score
- gnus-tmp-score-char gnus-tmp-from gnus-tmp-name
+ gnus-tmp-score-char gnus-tmp-from gnus-tmp-name gnus-tmp-thread
gnus-tmp-number gnus-tmp-opening-bracket gnus-tmp-closing-bracket
tree-stack)
@@ -5516,9 +5519,10 @@ gnus-summary-prepare-threads
(setq gnus-tmp-name gnus-tmp-from))
(unless (numberp gnus-tmp-lines)
(setq gnus-tmp-lines -1))
- (if (= gnus-tmp-lines -1)
- (setq gnus-tmp-lines "?")
- (setq gnus-tmp-lines (number-to-string gnus-tmp-lines)))
+ (setq gnus-tmp-lines (if (= gnus-tmp-lines -1)
+ "?"
+ (number-to-string gnus-tmp-lines)))
+ (setq gnus-tmp-thread thread)
(put-text-property
(point)
(progn (eval gnus-summary-line-format-spec) (point))
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: master c3e8381: * lisp/gnus/gnus-sum.el: Use lexical-binding
2019-05-17 16:48 ` Stefan Monnier
@ 2019-05-17 18:15 ` Andy Moreton
2019-05-17 18:43 ` Stefan Monnier
2019-05-18 8:10 ` Bastien
0 siblings, 2 replies; 9+ messages in thread
From: Andy Moreton @ 2019-05-17 18:15 UTC (permalink / raw)
To: emacs-devel
On Fri 17 May 2019, Stefan Monnier wrote:
>> Indeed, thanks. Does the patch below work for you?
>
> I meant this one,
>
> Stefan
That works in my setup, which uses the ?V format (I haven't
tested the others).
Thanks,
AndyM
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: master c3e8381: * lisp/gnus/gnus-sum.el: Use lexical-binding
2019-05-17 18:15 ` Andy Moreton
@ 2019-05-17 18:43 ` Stefan Monnier
2019-05-18 8:10 ` Bastien
1 sibling, 0 replies; 9+ messages in thread
From: Stefan Monnier @ 2019-05-17 18:43 UTC (permalink / raw)
To: emacs-devel
> That works in my setup, which uses the ?V format (I haven't
> tested the others).
Thanks, pushed,
Stefan
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: master c3e8381: * lisp/gnus/gnus-sum.el: Use lexical-binding
2019-05-17 18:15 ` Andy Moreton
2019-05-17 18:43 ` Stefan Monnier
@ 2019-05-18 8:10 ` Bastien
2019-05-18 13:00 ` Stefan Monnier
2019-05-18 13:13 ` Andy Moreton
1 sibling, 2 replies; 9+ messages in thread
From: Bastien @ 2019-05-18 8:10 UTC (permalink / raw)
To: Andy Moreton; +Cc: emacs-devel
Hi Andy and Stefan,
Andy Moreton <andrewjmoreton@gmail.com> writes:
> On Fri 17 May 2019, Stefan Monnier wrote:
>
>>> Indeed, thanks. Does the patch below work for you?
>>
>> I meant this one,
>>
>> Stefan
>
> That works in my setup, which uses the ?V format (I haven't
> tested the others).
I use %G and there is a missing (defvar gnus-tmp-name) in gnus-sum.el.
Shall I just go ahead an add this?
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el
index 556fb63a07..31958ff7b0 100644
--- a/lisp/gnus/gnus-sum.el
+++ b/lisp/gnus/gnus-sum.el
@@ -42,6 +42,7 @@ gnus-tmp-header
(defvar gnus-tmp-indentation)
(defvar gnus-tmp-level)
(defvar gnus-tmp-lines)
+(defvar gnus-tmp-name)
(defvar gnus-tmp-number)
(defvar gnus-tmp-opening-bracket)
(defvar gnus-tmp-process)
--
Bastien
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: master c3e8381: * lisp/gnus/gnus-sum.el: Use lexical-binding
2019-05-18 8:10 ` Bastien
@ 2019-05-18 13:00 ` Stefan Monnier
2019-05-18 14:45 ` Bastien
2019-05-18 13:13 ` Andy Moreton
1 sibling, 1 reply; 9+ messages in thread
From: Stefan Monnier @ 2019-05-18 13:00 UTC (permalink / raw)
To: emacs-devel
> Shall I just go ahead an add this?
Yes, please, thank you,
Stefan
> diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el
> index 556fb63a07..31958ff7b0 100644
> --- a/lisp/gnus/gnus-sum.el
> +++ b/lisp/gnus/gnus-sum.el
> @@ -42,6 +42,7 @@ gnus-tmp-header
> (defvar gnus-tmp-indentation)
> (defvar gnus-tmp-level)
> (defvar gnus-tmp-lines)
> +(defvar gnus-tmp-name)
> (defvar gnus-tmp-number)
> (defvar gnus-tmp-opening-bracket)
> (defvar gnus-tmp-process)
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: master c3e8381: * lisp/gnus/gnus-sum.el: Use lexical-binding
2019-05-18 8:10 ` Bastien
2019-05-18 13:00 ` Stefan Monnier
@ 2019-05-18 13:13 ` Andy Moreton
1 sibling, 0 replies; 9+ messages in thread
From: Andy Moreton @ 2019-05-18 13:13 UTC (permalink / raw)
To: emacs-devel
On Sat 18 May 2019, Bastien wrote:
> I use %G and there is a missing (defvar gnus-tmp-name) in gnus-sum.el.
>
> Shall I just go ahead an add this?
Yes please - this looks right to me.
AndyM
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: master c3e8381: * lisp/gnus/gnus-sum.el: Use lexical-binding
2019-05-18 13:00 ` Stefan Monnier
@ 2019-05-18 14:45 ` Bastien
0 siblings, 0 replies; 9+ messages in thread
From: Bastien @ 2019-05-18 14:45 UTC (permalink / raw)
To: Stefan Monnier; +Cc: emacs-devel
Stefan Monnier <monnier@iro.umontreal.ca> writes:
>> Shall I just go ahead an add this?
>
> Yes, please, thank you,
Done, thanks!
--
Bastien
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2019-05-18 14:45 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20190515175318.10237.53148@vcs0.savannah.gnu.org>
[not found] ` <20190515175319.ACE4B20537@vcs0.savannah.gnu.org>
2019-05-17 16:06 ` master c3e8381: * lisp/gnus/gnus-sum.el: Use lexical-binding Andy Moreton
2019-05-17 16:45 ` Stefan Monnier
2019-05-17 16:48 ` Stefan Monnier
2019-05-17 18:15 ` Andy Moreton
2019-05-17 18:43 ` Stefan Monnier
2019-05-18 8:10 ` Bastien
2019-05-18 13:00 ` Stefan Monnier
2019-05-18 14:45 ` Bastien
2019-05-18 13:13 ` Andy Moreton
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).