[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#61460: 30.0.50; Calendar shows eclipse for quarter moon
From: |
Andreas Schwab |
Subject: |
bug#61460: 30.0.50; Calendar shows eclipse for quarter moon |
Date: |
Wed, 22 Feb 2023 10:45:22 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) |
On Feb 22 2023, Ulrich Mueller wrote:
>>>>>> On Tue, 21 Feb 2023, Michael Heerdegen wrote:
>
>>> That remark made me think about whether we want a `diary-eclipses' - or
>>> teach `diary-lunar-phases' to report eclipses (at the moment the latter
>>> doesn't report eclipses, I just tried).
>
>> Seems getting the latter is quite simple:
>
>> - (cons mark (concat (lunar-phase-name (nth 2 phase)) " "
>> - (cadr phase))))))
>> + (cons mark
>> + (let ((eclipse (nth 3 phase)))
>> + (concat (lunar-phase-name (nth 2 phase)) " "
>> + (cadr phase)
>> + (if (string-empty-p eclipse)
>> + ""
>> + (concat " " eclipse))))))))
>
> It is probably a matter of personal taste, but I dislike the nested
> concats. This seems simpler (not tested, though):
>
> - (cons mark (concat (lunar-phase-name (nth 2 phase)) " "
> - (cadr phase))))))
> + (cons mark
> + (let ((eclipse (nth 3 phase)))
> + (concat (lunar-phase-name (nth 2 phase)) " "
> + (cadr phase)
> + (if (string-empty-p eclipse) "" " ")
> + eclipse))))))
concat also accepts lists, so nil is pefectly fine as an argument.
--
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."
- bug#61460: 30.0.50; Calendar shows eclipse for quarter moon, (continued)
- bug#61460: 30.0.50; Calendar shows eclipse for quarter moon, Michael Heerdegen, 2023/02/14
- bug#61460: 30.0.50; Calendar shows eclipse for quarter moon, Ulrich Müller, 2023/02/16
- bug#61460: 30.0.50; Calendar shows eclipse for quarter moon, Michael Heerdegen, 2023/02/17
- bug#61460: 30.0.50; Calendar shows eclipse for quarter moon, Ulrich Müller, 2023/02/17
- bug#61460: 30.0.50; Calendar shows eclipse for quarter moon, Michael Heerdegen, 2023/02/17
- bug#61460: 30.0.50; Calendar shows eclipse for quarter moon, Michael Heerdegen, 2023/02/18
- bug#61460: 30.0.50; Calendar shows eclipse for quarter moon, Ulrich Mueller, 2023/02/18
- bug#61460: 30.0.50; Calendar shows eclipse for quarter moon, Michael Heerdegen, 2023/02/18
- bug#61460: 30.0.50; Calendar shows eclipse for quarter moon, Michael Heerdegen, 2023/02/21
- bug#61460: 30.0.50; Calendar shows eclipse for quarter moon, Ulrich Mueller, 2023/02/22
- bug#61460: 30.0.50; Calendar shows eclipse for quarter moon,
Andreas Schwab <=
- bug#61460: 30.0.50; Calendar shows eclipse for quarter moon, Michael Heerdegen, 2023/02/22
- bug#61460: 30.0.50; Calendar shows eclipse for quarter moon, Ulrich Mueller, 2023/02/22
- bug#61460: 30.0.50; Calendar shows eclipse for quarter moon, Michael Heerdegen, 2023/02/22
- bug#61460: 30.0.50; Calendar shows eclipse for quarter moon, Ulrich Mueller, 2023/02/22
- bug#61460: 30.0.50; Calendar shows eclipse for quarter moon, Michael Heerdegen, 2023/02/22
- bug#61460: 30.0.50; Calendar shows eclipse for quarter moon, Michael Heerdegen, 2023/02/25
- bug#61460: 30.0.50; Calendar shows eclipse for quarter moon, Eli Zaretskii, 2023/02/14
- bug#61460: 30.0.50; Calendar shows eclipse for quarter moon, Ulrich Mueller, 2023/02/14
- bug#61460: 30.0.50; Calendar shows eclipse for quarter moon, Ulrich Mueller, 2023/02/13
- bug#61460: 30.0.50; Calendar shows eclipse for quarter moon, Michael Heerdegen, 2023/02/13