GNU bug report logs - #52092
28.0.60; hs-toggle-hiding does not toggle once folded

Previous Next

Package: emacs;

Reported by: Mohammed Sadiq <sadiq <at> sadiqpk.org>

Date: Thu, 25 Nov 2021 07:42:01 UTC

Severity: normal

Tags: help

Found in version 28.0.60

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

Full log


Message #27 received at 52092-done <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: kobarity <kobarity <at> gmail.com>
Cc: Dan Nicolaescu <dann <at> ics.uci.edu>, Thien-Thi Nguyen <ttn <at> gnu.org>,
 Eli Zaretskii <eliz <at> gnu.org>, 52092-done <at> debbugs.gnu.org,
 Mohammed Sadiq <sadiq <at> sadiqpk.org>
Subject: Re: bug#52092: 28.0.60; hs-toggle-hiding does not toggle once folded
Date: Sat, 24 Sep 2022 11:10:26 -0400
[ Added Thien-Thi and Dan to the Cc since they're listed as maintainers
  of `hideshow.el`.  ]

kobarity [2022-09-24 14:59:56] wrote:
> Stefan Monnier wrote:
>> The patch below should fix it.
> Thanks, I didn't know `last-nonmenu-event'.  I confirmed that the
> patch enables the mouse to hide the clicked block.

I pushed it to the `emacs-28` branch, because it's fixing a stupid regression.

>> I had no idea that (posn-point (posn-at-point POS)) doesn't return POS
>> if POS is within an invisible chunk of text and instead returns the next
>> visible position.
>> 
>> I'll have to think about how best to fix the consequence.
>
> Thank you for consideration.

I pushed to `master` a patch which makes `event-end` return a position
that's always at `point` for keyboard events, even if `point` is hidden.
That should bring back the previous behavior (it's not safe enough for
the `emacs-28` branch, sadly).

But I think your patch is still an improvement since it makes
`hs-toggle-hiding` work even when point is right after the hidden block.
I also like the additional tests you provide.
So I adjusted it to the new code and pushed it to `master`.

Thank you,


        Stefan





This bug report was last modified 2 years and 235 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.