GNU bug report logs - #66403
[PATCH] Use delete-all-overlays in clean-mode

Previous Next

Package: emacs;

Reported by: Joseph Turner <joseph <at> breatheoutbreathe.in>

Date: Sun, 8 Oct 2023 09:59:02 UTC

Severity: normal

Tags: patch

Merged with 66404

Done: Joseph Turner <joseph <at> breatheoutbreathe.in>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 66403 in the body.
You can then email your comments to 66403 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#66403; Package emacs. (Sun, 08 Oct 2023 09:59:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Joseph Turner <joseph <at> breatheoutbreathe.in>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 08 Oct 2023 09:59:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Joseph Turner <joseph <at> breatheoutbreathe.in>
To: bug-gnu-emacs <at> gnu.org
Subject: [PATCH] Use delete-all-overlays in clean-mode
Date: Sun, 08 Oct 2023 02:57:25 -0700
[Message part 1 (text/plain, inline)]
Tags: patch

Is there a reason to use dolist instead of delete-all-overlays?

[0001-Use-delete-all-overlays-in-clean-mode.patch (text/patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#66403; Package emacs. (Sun, 08 Oct 2023 10:27:02 GMT) Full text and rfc822 format available.

Message #8 received at 66403 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Joseph Turner <joseph <at> breatheoutbreathe.in>
Cc: 66403 <at> debbugs.gnu.org
Subject: Re: bug#66403: [PATCH] Use delete-all-overlays in clean-mode
Date: Sun, 08 Oct 2023 13:25:33 +0300
> Date: Sun, 08 Oct 2023 02:57:25 -0700
> From:  Joseph Turner via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
> 
> Is there a reason to use dolist instead of delete-all-overlays?

Can the buffer be narrowed?




Forcibly Merged 66403 66404. Request was from Stefan Kangas <stefankangas <at> gmail.com> to control <at> debbugs.gnu.org. (Sun, 08 Oct 2023 10:32:02 GMT) Full text and rfc822 format available.

Did not alter fixed versions and reopened. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 08 Oct 2023 13:45:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#66403; Package emacs. (Sun, 08 Oct 2023 21:25:02 GMT) Full text and rfc822 format available.

Message #15 received at 66403 <at> debbugs.gnu.org (full text, mbox):

From: Joseph Turner <joseph <at> breatheoutbreathe.in>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 66403 <at> debbugs.gnu.org
Subject: Re: bug#66403: [PATCH] Use delete-all-overlays in clean-mode
Date: Sun, 08 Oct 2023 14:21:13 -0700
Eli Zaretskii <eliz <at> gnu.org> writes:

>> Date: Sun, 08 Oct 2023 02:57:25 -0700
>> From:  Joseph Turner via "Bug reports for GNU Emacs,
>>  the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
>>
>> Is there a reason to use dolist instead of delete-all-overlays?
>
> Can the buffer be narrowed?

Ah, good catch. The following snippet only deletes ov1, whereas if you
replace the dolist with delete-all-overlays, both are deleted.

(with-current-buffer (generate-new-buffer "test-overlay-deletion")
  (insert "hello\n\nworld")
  (let ((ov1 (make-overlay 0 6))
        (ov2 (make-overlay 8 13)))
    (overlay-put ov1 'display "aaaaa")
    (overlay-put ov2 'display "bbbbb"))
  (narrow-to-region 1 6)
  ;; (delete-all-overlays)
  (dolist (overlay (overlays-in (point-min) (point-max)))
    (delete-overlay overlay))
  (widen)
  (pop-to-buffer (current-buffer)))

Joseph




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#66403; Package emacs. (Sun, 08 Oct 2023 21:27:01 GMT) Full text and rfc822 format available.

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

From: Joseph Turner <joseph <at> breatheoutbreathe.in>
To: 66403-done <at> debbugs.gnu.org
Subject: Re: bug#66403: [PATCH] Use delete-all-overlays in clean-mode
Date: Sun, 08 Oct 2023 14:24:19 -0700
delete-all-overlays deletes all overlays regardless of narrowing.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 06 Nov 2023 12:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 226 days ago.

Previous Next


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