From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 08 05:58:51 2023 Received: (at submit) by debbugs.gnu.org; 8 Oct 2023 09:58:51 +0000 Received: from localhost ([127.0.0.1]:56279 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qpQYk-0007dq-Q7 for submit@debbugs.gnu.org; Sun, 08 Oct 2023 05:58:51 -0400 Received: from lists.gnu.org ([2001:470:142::17]:50274) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qpQYj-0007db-9s for submit@debbugs.gnu.org; Sun, 08 Oct 2023 05:58:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qpQYI-0005Ko-Fi for bug-gnu-emacs@gnu.org; Sun, 08 Oct 2023 05:58:23 -0400 Received: from out-193.mta1.migadu.com ([95.215.58.193]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qpQYF-00056I-DF for bug-gnu-emacs@gnu.org; Sun, 08 Oct 2023 05:58:22 -0400 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=breatheoutbreathe.in; s=key1; t=1696759095; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=CyZkrCT5X5PgrgBl1oQn3qvsQLOlEcG5WGLFW3rWNzI=; b=Him/mL7phIlMft5Fm8dfkOHic2rfT1bkIWyDDctBSovms+2BGitZrgekh2kirSz1zKZJnH kNfbP5/jx8+pP4FcJnHYr4r+vJDutUJk+P98JaaIGYKcEfc6IRupen1Qxq7CjaI3Y2FcXp VocEd6ZlHcoK4Bj62xQchzo2YwvlsGY= From: Joseph Turner To: bug-gnu-emacs@gnu.org Subject: [PATCH] Use delete-all-overlays in clean-mode Date: Sun, 08 Oct 2023 02:57:25 -0700 Message-ID: <87r0m5tp00.fsf@breatheoutbreathe.in> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Migadu-Flow: FLOW_OUT Received-SPF: pass client-ip=95.215.58.193; envelope-from=joseph@breatheoutbreathe.in; helo=out-193.mta1.migadu.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.9 (/) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.1 (/) --=-=-= Content-Type: text/plain Tags: patch Is there a reason to use dolist instead of delete-all-overlays? --=-=-= Content-Type: text/patch Content-Disposition: attachment; filename=0001-Use-delete-all-overlays-in-clean-mode.patch >From d47e0cbe9ecaeb0cd4da12ab70f03d4c138f9265 Mon Sep 17 00:00:00 2001 From: Joseph Turner Date: Sun, 8 Oct 2023 02:54:10 -0700 Subject: [PATCH] Use delete-all-overlays in clean-mode * lisp/simple.el (clean-mode): Replace dolist --- lisp/simple.el | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lisp/simple.el b/lisp/simple.el index b770d9d7d33..8f2bd84d805 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -549,8 +549,7 @@ Other major modes are defined by comparison with this one." "A mode that removes all overlays and text properties." (kill-all-local-variables t) (let ((inhibit-read-only t)) - (dolist (overlay (overlays-in (point-min) (point-max))) - (delete-overlay overlay)) + (delete-all-overlays) (set-text-properties (point-min) (point-max) nil) (setq-local yank-excluded-properties t))) -- 2.41.0 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 08 06:26:20 2023 Received: (at 66403) by debbugs.gnu.org; 8 Oct 2023 10:26:20 +0000 Received: from localhost ([127.0.0.1]:56321 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qpQzL-0000E3-NQ for submit@debbugs.gnu.org; Sun, 08 Oct 2023 06:26:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45276) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qpQzG-0000Dk-4A for 66403@debbugs.gnu.org; Sun, 08 Oct 2023 06:26:18 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qpQyp-0002Vj-BY; Sun, 08 Oct 2023 06:25:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=DytWbH/LYBVsHSp5/nAFPz0PUF+gkH9QU6zVrmlEC6Q=; b=Ok1OF91jw1O5 yVVIbu1ylC7wV/DTid26ITtXuoo2SI49CgjRqh39d+T4IELFKNV7FVYXelaE/XEcSGnLHSNqPa6xD cFaARAKrZ2wjAIZUBD33E45nsZ97dHBEuR3JWEKCT361UJLOCufP/5RUfXTvHjkSpXPw5EKpLPvIK RWJxYq2VJpa31TM29WLpOxXD2YxIZ6J8Vm0ARADhU60ImrzkdARTLpJTtlFuuyMnoePEiNbig1iMf GkJ7dYUo7zb7dd/MVsdp8UfTI/dgdhLMe4NKdcKP/AFybrrFQVqZ/KjF8Wri3MA5GeRqu48lUIjNU wohOTkmz8Yv9nH+m57GLxw==; Date: Sun, 08 Oct 2023 13:25:33 +0300 Message-Id: <83v8bhxvfm.fsf@gnu.org> From: Eli Zaretskii To: Joseph Turner In-Reply-To: <87r0m5tp00.fsf@breatheoutbreathe.in> (bug-gnu-emacs@gnu.org) Subject: Re: bug#66403: [PATCH] Use delete-all-overlays in clean-mode References: <87r0m5tp00.fsf@breatheoutbreathe.in> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 66403 Cc: 66403@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > 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" > > Is there a reason to use dolist instead of delete-all-overlays? Can the buffer be narrowed? From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 08 06:31:52 2023 Received: (at control) by debbugs.gnu.org; 8 Oct 2023 10:31:52 +0000 Received: from localhost ([127.0.0.1]:56345 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qpR4h-0000ae-Oe for submit@debbugs.gnu.org; Sun, 08 Oct 2023 06:31:51 -0400 Received: from mail-lf1-x132.google.com ([2a00:1450:4864:20::132]:44058) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qpR4f-0000aP-GD for control@debbugs.gnu.org; Sun, 08 Oct 2023 06:31:50 -0400 Received: by mail-lf1-x132.google.com with SMTP id 2adb3069b0e04-50433d8385cso4801288e87.0 for ; Sun, 08 Oct 2023 03:31:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1696761083; x=1697365883; darn=debbugs.gnu.org; h=to:subject:message-id:date:mime-version:from:from:to:cc:subject :date:message-id:reply-to; bh=+NZ+T+NE8ybQDqCGMXKy2gkh99Hjm7a253Enj30vvCQ=; b=U9yyDy5U/2UsRnL8bLeXF9FVzaJqyJunjELt4gyqxcmxnzwCuBy/PnCOtJ+GDiB4mi 2AcwZHZFwzMfE3s0wCFfS/U9Swo/kQX7ncKNFBOJ2ge9bNr5RfUh4et43Z+KtpyjbfGw 1BcYJQD/sC1+lojXTovPY2/ByiTdfgFHCQ8tlKdjJOYO1B7PobbKHUy3r83XXl+GydEB ctTHJIVVip+33Klt2DMJCIJqfD4FBWjN6pzaOLsIQ66aqbkVuODC+sO1QjsAlCNzQWVm scmYy8PKisxP9fHKpvPFU8c7D7f7bDRIGDx0rAELPUYEHNdxLHHyHjGgtl7LWbEEQwM/ AemA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696761083; x=1697365883; h=to:subject:message-id:date:mime-version:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=+NZ+T+NE8ybQDqCGMXKy2gkh99Hjm7a253Enj30vvCQ=; b=UoTpVvyOPvrjIcyYt+4Xf2NhcelTg31Y4OETHs6vZHAcflsXvVitkQwxXp8SEi+DXn e1hVUwJSC/CiOpmimUdroouPlAOvbWpE2RhKZ09pyOTFmF5o4lTg+K31nQlG0QgcWOi6 K48lwZaQtGT7htENlW7VLR+iXscvGVGdU3s7qU2AARkUxIiXexMiJtqs3/1B+JuHFbej 6nKwWU2IAF8dwgE+N0TTfYBR+Kcv+w//YVIASjZx4KeedpC6ttRdoMYlHW4Ae0dJqY5F JrEcrvRXrX3czgYSz8xxp4jz5KSq+1Iv8ab/ZXQc/SHa8KdngZXc9XuvyQvNvdSBu0sk AkHw== X-Gm-Message-State: AOJu0YxxAtExEQ2pxthnWWrpx5jIEShDD0HpRxiTwF5vGUQnFYy9/RQ4 zMXD8zsB1lbqbT7X1Dj/7eb149pFe940V3IDG+rg3CAH X-Google-Smtp-Source: AGHT+IFxBOq9YRTsBKBERivmxKhDsb7ROLUrjyyLNh4t6kbjUUqHF/11ah6q702eXQzSLFk+13i5NwwESXfS8qiNsKA= X-Received: by 2002:a05:6512:3d8f:b0:500:a6c1:36f7 with SMTP id k15-20020a0565123d8f00b00500a6c136f7mr14950473lfv.3.1696761082818; Sun, 08 Oct 2023 03:31:22 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Sun, 8 Oct 2023 10:31:22 +0000 From: Stefan Kangas MIME-Version: 1.0 Date: Sun, 8 Oct 2023 10:31:22 +0000 Message-ID: Subject: To: control@debbugs.gnu.org Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 2.0 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: forcemerge 66403 66404 thanks Content analysis details: (2.0 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (stefankangas[at]gmail.com) -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:132 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 UNPARSEABLE_RELAY Informational: message has unparseable relay lines 2.0 BLANK_SUBJECT Subject is present but empty X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) forcemerge 66403 66404 thanks From unknown Sat Jun 21 05:10:40 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: Did not alter fixed versions and reopened. Date: Sun, 08 Oct 2023 13:45:02 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # Did not alter fixed versions and reopened. thanks # This fakemail brought to you by your local debbugs # administrator From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 08 17:24:06 2023 Received: (at 66403) by debbugs.gnu.org; 8 Oct 2023 21:24:07 +0000 Received: from localhost ([127.0.0.1]:58774 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qpbFu-0004fj-Kd for submit@debbugs.gnu.org; Sun, 08 Oct 2023 17:24:06 -0400 Received: from out-206.mta1.migadu.com ([95.215.58.206]:61101) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qpbFr-0004fa-Tx for 66403@debbugs.gnu.org; Sun, 08 Oct 2023 17:24:05 -0400 References: <87r0m5tp00.fsf@breatheoutbreathe.in> <83v8bhxvfm.fsf@gnu.org> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=breatheoutbreathe.in; s=key1; t=1696800222; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=h12br24xDplyyss3zVdod+SDi6uD8p0/LFQ07jKpBhg=; b=N071DYZWRDjngTxnEWNUSGii7VElTRim+D3wPEZuR8UrvWhem2y0QaomiSdW83PeMCbNKl Iv8BdLQC2S/+buZg7MG5ijNd1A0Xfc0WVNmItxjf28FXS3pNp6RVW2x1PskUX3e+vYDXfR mlJQhIWIwVQBm6wzV21PwX101BuButw= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Joseph Turner To: Eli Zaretskii Subject: Re: bug#66403: [PATCH] Use delete-all-overlays in clean-mode Date: Sun, 08 Oct 2023 14:21:13 -0700 In-reply-to: <83v8bhxvfm.fsf@gnu.org> Message-ID: <871qe4u7tx.fsf@breatheoutbreathe.in> MIME-Version: 1.0 Content-Type: text/plain X-Migadu-Flow: FLOW_OUT X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 66403 Cc: 66403@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli Zaretskii 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" >> >> 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 From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 08 17:26:32 2023 Received: (at 66403-done) by debbugs.gnu.org; 8 Oct 2023 21:26:32 +0000 Received: from localhost ([127.0.0.1]:58778 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qpbIG-0004o3-5T for submit@debbugs.gnu.org; Sun, 08 Oct 2023 17:26:32 -0400 Received: from out-209.mta0.migadu.com ([91.218.175.209]:30105) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qpbIE-0004nv-Ru for 66403-done@debbugs.gnu.org; Sun, 08 Oct 2023 17:26:31 -0400 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=breatheoutbreathe.in; s=key1; t=1696800369; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=PsbYtJFdz7cmnFPd83cYW/zj15x+1SsPH2EhV+Ly4i0=; b=cFjCUQl1ynO0pdc0AGG6cN80NBbyZp720jCn0g6iR1zYvWGuxSKBTC9aCL5SIebfXOCpF0 m0zZc3MemXTSo8MfNJaU4Jw3575UOiU+1cT38g9fTHWO9tOVB3NIhVdne+kveDkgXV3OaC /B8xcPQugivgxEc2pdn7aBvmTSBk35U= From: Joseph Turner To: 66403-done@debbugs.gnu.org Subject: Re: bug#66403: [PATCH] Use delete-all-overlays in clean-mode Date: Sun, 08 Oct 2023 14:24:19 -0700 Message-ID: <87wmvwst5e.fsf@breatheoutbreathe.in> MIME-Version: 1.0 Content-Type: text/plain X-Migadu-Flow: FLOW_OUT X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 66403-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) delete-all-overlays deletes all overlays regardless of narrowing. From unknown Sat Jun 21 05:10:40 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 06 Nov 2023 12:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator