unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: kobarity <kobarity@gmail.com>
Cc: Dan Nicolaescu <dann@ics.uci.edu>, Thien-Thi Nguyen <ttn@gnu.org>,
	Eli Zaretskii <eliz@gnu.org>,
	52092-done@debbugs.gnu.org, Mohammed Sadiq <sadiq@sadiqpk.org>
Subject: bug#52092: 28.0.60; hs-toggle-hiding does not toggle once folded
Date: Sat, 24 Sep 2022 11:10:26 -0400	[thread overview]
Message-ID: <jwvpmfk4z2m.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <eke7pmflpb1f.wl-kobarity@gmail.com> (kobarity@gmail.com's message of "Sat, 24 Sep 2022 14:59:56 +0900")

[ 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






  reply	other threads:[~2022-09-24 15:10 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-25  7:40 bug#52092: 28.0.60; hs-toggle-hiding does not toggle once folded Mohammed Sadiq
2021-11-25 10:29 ` Eli Zaretskii
2022-09-19  6:31 ` kobarity
2022-09-23 22:01   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-09-24  5:59     ` kobarity
2022-09-24 15:10       ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2022-09-25  2:26         ` kobarity
2022-09-24  6:17     ` Eli Zaretskii
2022-09-24 15:11       ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvpmfk4z2m.fsf-monnier+emacs@gnu.org \
    --to=bug-gnu-emacs@gnu.org \
    --cc=52092-done@debbugs.gnu.org \
    --cc=dann@ics.uci.edu \
    --cc=eliz@gnu.org \
    --cc=kobarity@gmail.com \
    --cc=monnier@iro.umontreal.ca \
    --cc=sadiq@sadiqpk.org \
    --cc=ttn@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).