GNU bug report logs -
#78120
31.0.50; Calendar is not reliable with its marking
Previous Next
Full log
View this message in rfc822 format
Eli Zaretskii <eliz <at> gnu.org> writes:
>> From: Michael Heerdegen <michael_heerdegen <at> web.de>
>> Cc: Eli Zaretskii <eliz <at> gnu.org>, 78120 <at> debbugs.gnu.org
>> Date: Sun, 04 May 2025 04:03:41 +0200
>>
>> Manuel Giraud <manuel <at> ledu-giraud.fr> writes:
>>
>> > >> 1) emacs -Q
>> > >>
>> > >> 2) Open the file "/tmp/diary", fill it with the following
>> > >> contents and save:
>> > >> --8<---------------cut here---------------start------------->8---
>> > >> %%(diary-block 5 4 2025 5 4 2025 'success) Success
>> > >> May 4 2025 Good day
>> > >> --8<---------------cut here---------------end--------------->8---
>> > >>
>> > >> 3) M-: (use-package diary-lib :custom (diary-file "/tmp/diary"))
>> > >>
>> > >> 4) M-x calendar
>> > >>
>> > >> 5) Hit 'm' (diary-mark-entries) a few times. Observe that the
>> > >> fourth of May has not always the same color.
>>
>> I tried your recipe but were not able to reproduce what you describe.
>> C-u C-x = always reports exactly one overlay at a marked date, no
>> matter how often I hit m. I don't know why you see this in emacs -Q.
>
> I can reproduce this. I think the reason is simple: the above
> scenario places 2 overlays on that date, each one of them specifying a
> different face. Type "M-x describe-text-properties" on that date, and
> you will see it: one face is 'diary', the other 'success'. One of
> these overlays comes from diary-mark-sexp-entries, the other from
> calendar-mark-visible-date. Both overlays have the same (unspecified)
> priority, so which one of them "wins" depends on many factors,
> including the exact memory layout of the Emacs session. The latter
> changes each time you press 'm', so you sometimes see one or the other
> face.
Ok, thanks for this explanation.
> The solution is to decide which overlay should "win" in this case, and
> give one of them higher or lower priority, as appropriate.
So I think we should have a way, with diary date, to set this priority.
--
Manuel Giraud
This bug report was last modified 37 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.