#972950 ncal: cal fails to highlight current date (and rejects -h flag)

Package:
ncal
Source:
bsdmainutils
Description:
display a calendar and the date of Easter
Submitter:
Daniel Kahn Gillmor
Date:
2024-07-14 17:21:04 UTC
Severity:
normal
#972950#5
Date:
2020-10-26 14:37:34 UTC
From:
To:
Earlier versions of ncal used to highlight the current day when
invoked as "cal", i believe.

now, the current day is highlighted when invoked as "ncal" but it is
not highlighted when invoked as "cal".

#972950#10
Date:
2021-01-10 23:34:58 UTC
From:
To:
notfound 972950 11.1.2+b1
#972950#15
Date:
2021-01-10 23:34:31 UTC
From:
To:
Dear Maintainer,
I have also been harmed by this regression in 'ncal' binary.

This feature was removed in #904839 due to compatibility concerns.
All systems I used in the last 5 years highlighted the current day,
so I believe those compatibility concerns are very questionable.


Also #833226, #867995 and #898463 all seem relevant to this issue.


Cheers,
n-b-f

#972950#20
Date:
2021-01-11 01:09:49 UTC
From:
To:
The version of cal in debian buster currently highlights the current
day. If anything, I would hope Debian would strive to maintain
compatibility with previous versions of Debian - instead of whatever
system the user #904839 may have been using.

Not only does cal in testing/sid no longer highlight today by default,
it doesn't highlight at all. It doesn't really make sense for Debian to
be the only major Linux distribution to nerf the cal binary in this way.

#972950#25
Date:
2021-10-21 19:06:26 UTC
From:
To:
Dear Maintainer,

The regression is annoying, but if absolute compatibility with original `cal` must be maintained, I can live with that.  However, in that case the man page needs to be corrected.

Note to other users: using `ncal -b` provides the classic display, but with highlighting.

#972950#30
Date:
2021-10-25 00:29:46 UTC
From:
To:
Yet another person who has noticed this.  Highlighting the current date
is rather handy for interactive use.

The basis of #904839 is incorrect.  Without that change `cal` uses
isatty() to determine whether output is a terminal.  If not a terminal,
highlighting is disabled (compare `ncal -b` and `ncal -b | cat`).  As
such, if the reporter for #904839 really was attempting to parse the
output, that wouldn't have been effected by highlighting.

There was only a single reporter for #904839 (after the feature had been
in place for 5 years), there are now 5 complaints after it has been
absent for less than a year.  That seems like rather overwhelming support
for keeping highlighting.

#972950#35
Date:
2023-03-16 10:16:13 UTC
From:
To:
Hi,

I'd like to agree - can we have the traditional-in-Debian behaviour of
"cal" back (i.e. highlighting the current data), please?

As others have pointed out if you want to parse cal's output, then it
automatically didn't highlight when piped elsewhere, and there was -h to
suppress it.

I think for a command like this we should prioritise the interactive
use-case - so "cal" highlighting on a terminal should be the default.

[bumping the severity, because missing this feature since I upgraded to
bookworm is breaking the main thing I ever use cal for...]

Thanks,

Matthew

#972950#44
Date:
2024-07-14 17:18:57 UTC
From:
To:
Dear Maintainer,


This issue still exists, it would be nice to have cal highlight the current date.


Dale Harris