GNU bug report logs -
#70622
[PATCH] New window parameter 'cursor-type'
Previous Next
Reported by: Eshel Yaron <me <at> eshelyaron.com>
Date: Sun, 28 Apr 2024 06:29:01 UTC
Severity: normal
Tags: patch
Fixed in version 30.1
Done: Eshel Yaron <me <at> eshelyaron.com>
Bug is archived. No further changes may be made.
Full log
Message #77 received at 70622 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hi,
Eli Zaretskii <eliz <at> gnu.org> writes:
>> Date: Sun, 12 May 2024 10:29:24 +0200
>> Cc: me <at> eshelyaron.com, 70622 <at> debbugs.gnu.org
>> From: martin rudalics <rudalics <at> gmx.at>
>>
>> > The ANYTHING ELSE clause is simply defensive programming, something we
>> > do in many other places. It can easily hide mistakes, and I see no
>> > reason not to help users find those mistakes.
>>
>> I'm not a fan of strong typing but I agree with you. The problem I see
>> is that we don't care about catching mistakes when setting the variable
>> or the corresponding frame parameter. If we want to help users finding
>> mistakes, we should care everywhere in a consistent fashion.
>>
>> > But if you are still unconvinced, I won't argue, although I still
>> > don't understand your and Eshel's objections.
>>
>> I only stated my personal view and will leave it to Eshel and you how
>> serve users best.
>
> Thanks. Let's see what Eshel takes from this.
I think that given there are no strictly invalid cursor-type values,
designating some (most) values as invalid for set-window-cursor-type
reduces consistency for little practical gain. OTOH, I don't think
there's any real harm to it either, so I added such a check in the
update patch below.
I've also extended the documentation of set-window-cursor-type to note
that this setting persists when you change the buffer of the window, as
Martin suggested.
I've added a FIXME comment about extending window-cursor-type with an
optional argument that asks for the effective cursor type, but I did not
implement it at this point. I looked into it, but the implementation is
quite involved, it basically requires duplicating many of the careful
considerations of get_window_cursor_type, or refactoring it for reuse.
Since we do provide all the needed information for computing the
effective cursor in Lisp, and there's no concrete use case for doing
that ATM, I think we can leave it at for now.
Here's the updated patch:
[v5-0001-New-functions-set-window-cursor-type.patch (text/x-patch, attachment)]
This bug report was last modified 1 year and 96 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.