From unknown Sun Jun 22 11:42:30 2025 X-Loop: help-debbugs@gnu.org Subject: bug#20971: 24.4; occur-1 makes my buffer read-only Resent-From: Alex =?UTF-8?Q?Schr=C3=B6der?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 03 Jul 2015 09:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 20971 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 20971@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.143591533918036 (code B ref -1); Fri, 03 Jul 2015 09:23:02 +0000 Received: (at submit) by debbugs.gnu.org; 3 Jul 2015 09:22:19 +0000 Received: from localhost ([127.0.0.1]:38262 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZAxAo-0004gq-Uf for submit@debbugs.gnu.org; Fri, 03 Jul 2015 05:22:19 -0400 Received: from eggs.gnu.org ([208.118.235.92]:52450) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZAxAm-0004gd-EH for submit@debbugs.gnu.org; Fri, 03 Jul 2015 05:22:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZAxAg-000713-Fs for submit@debbugs.gnu.org; Fri, 03 Jul 2015 05:22:11 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, HTML_MESSAGE,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:52603) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZAxAg-00070l-D0 for submit@debbugs.gnu.org; Fri, 03 Jul 2015 05:22:10 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37723) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZAxAf-0004o4-EV for bug-gnu-emacs@gnu.org; Fri, 03 Jul 2015 05:22:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZAxAe-0006z6-Io for bug-gnu-emacs@gnu.org; Fri, 03 Jul 2015 05:22:09 -0400 Received: from mail-wi0-x22e.google.com ([2a00:1450:400c:c05::22e]:38168) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZAxAe-0006xZ-B0 for bug-gnu-emacs@gnu.org; Fri, 03 Jul 2015 05:22:08 -0400 Received: by wibdq8 with SMTP id dq8so94964978wib.1 for ; Fri, 03 Jul 2015 02:22:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=/tXaU5TTuzjK7OPQ+l1kISwAVR47DkQf0NbjxlYo5ss=; b=QTSFRSQT07LgnLl3qv6nkVf0NNmPDVKxXYiECzRpy8f0AgjPqYFQM8bFaTkvsyKHol oKZsm6+KtvTiyBurA3uiQcZGb5L3ZdluyvoQAXysjmEUJMei+HLfP4NeujHayIGb1wbt BfSxkXpsJWeM+fV9+vb+D80Kjy8VEy1UJdot/zw2NGhekBpb74HJFg4E/fRRZeEy7tK2 l0SeEFed3d5rCmvQ5cKfhEABFOiXaeROlZPUbuAJwqw0hnbocaim2yFJdtuE/pRLoYSh DTo7llOXJ12wnGO1VRPzXEexw9xscNPu1TZekfYaJk1+RmFqxVrFRJKD+1eQvKl+V2WM aGrQ== X-Received: by 10.181.29.100 with SMTP id jv4mr24898575wid.4.1435915325928; Fri, 03 Jul 2015 02:22:05 -0700 (PDT) MIME-Version: 1.0 From: Alex =?UTF-8?Q?Schr=C3=B6der?= Date: Fri, 03 Jul 2015 09:21:55 +0000 Message-ID: Content-Type: multipart/mixed; boundary=001a1137f4d8eff0a70519f51657 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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: -4.0 (----) --001a1137f4d8eff0a70519f51657 Content-Type: multipart/alternative; boundary=001a1137f4d8eff0a10519f51655 --001a1137f4d8eff0a10519f51655 Content-Type: text/plain; charset=UTF-8 I'm using isearch to search for something, then I use M-s o to run an occur for my search term. This results in *Occur* being shown and in the buffer I'm searching to be read-only. This is confusing. I think what people intended was to make *Occur* read-only. But occur-mode already inherits from special-mode which already does (setq buffer-read-only t). I therefore propose to simply remove the (setq buffer-read-only t) line from the end of occur-1 in replace.el. See attached patch. --001a1137f4d8eff0a10519f51655 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
I'm using isearch to search for something, then I= use M-s o to run an occur for my search term. This results in *Occur* bein= g shown and in the buffer I'm searching to be read-only. This is confus= ing. I think what people intended was to make *Occur* read-only. But occur-= mode already inherits from special-mode which already does (setq buffer-rea= d-only t).

I therefore propose to simply remove the (setq buff= er-read-only t) line from the end of occur-1 in replace.el. See attached pa= tch.

--001a1137f4d8eff0a10519f51655-- --001a1137f4d8eff0a70519f51657 Content-Type: application/octet-stream; name="fix_occur.patch" Content-Disposition: attachment; filename="fix_occur.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: 14e5338a896d509929c1 RnJvbSBlOTQ1YWEyZWJjMDgyY2ZhZGIyMTljMTM2OTE4ZTVlYzkyNzAyMTdkIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBBbGV4IFNjaHJvZWRlciA8YWxleEBnbnUub3JnPgpEYXRlOiBG cmksIDMgSnVsIDIwMTUgMTE6MTY6NTMgKzAyMDAKU3ViamVjdDogW1BBVENIXSAob2NjdXItMSk6 IERvbid0IHNldCBidWZmZXItcmVhZC1vbmx5LgoKVGhpcyByZXN1bHRlZCBpbiB0aGUgYnVmZmVy IGJlaW5nIHNlYXJjaGVkIGJlaW5nIHNldCByZWFkLW9ubHkuIFRoaXMKaXMgY29uZnVzaW5nLiBX aGF0IHBlb3BsZSBpbnRlbmRlZCB3YXMgdG8gbWFrZSAqT2NjdXIqIHJlYWQtb25seS4gQnV0Cm9j Y3VyLW1vZGUgYWxyZWFkeSBpbmhlcml0cyBmcm9tIHNwZWNpYWwtbW9kZSB3aGljaCBhbHJlYWR5 IGRvZXMgKHNldHEKYnVmZmVyLXJlYWQtb25seSB0KS4gVGhlcmVmb3JlIGJ1ZmZlci1yZWFkLW9u bHkgaXMgbm8gbG9uZ2VyIGJlaW5nCnNldC4KLS0tCiBsaXNwL3JlcGxhY2UuZWwgfCAxIC0KIDEg ZmlsZSBjaGFuZ2VkLCAxIGRlbGV0aW9uKC0pCgpkaWZmIC0tZ2l0IGEvbGlzcC9yZXBsYWNlLmVs IGIvbGlzcC9yZXBsYWNlLmVsCmluZGV4IDQxZGViZGQuLjc5ODUyOGUgMTAwNjQ0Ci0tLSBhL2xp c3AvcmVwbGFjZS5lbAorKysgYi9saXNwL3JlcGxhY2UuZWwKQEAgLTE1MDEsNyArMTUwMSw2IEBA IFNlZSBhbHNvIGBtdWx0aS1vY2N1cicuIgogICAgICAgICAgICAgICAoa2lsbC1idWZmZXIgb2Nj dXItYnVmKQogICAgICAgICAgICAgKGRpc3BsYXktYnVmZmVyIG9jY3VyLWJ1ZikKICAgICAgICAg ICAgIChzZXRxIG5leHQtZXJyb3ItbGFzdC1idWZmZXIgb2NjdXItYnVmKQotICAgICAgICAgICAg KHNldHEgYnVmZmVyLXJlYWQtb25seSB0KQogICAgICAgICAgICAgKHNldC1idWZmZXItbW9kaWZp ZWQtcCBuaWwpCiAgICAgICAgICAgICAocnVuLWhvb2tzICdvY2N1ci1ob29rKSkpKSkpKQogCi0t IAoyLjQuMwoK --001a1137f4d8eff0a70519f51657-- From unknown Sun Jun 22 11:42:30 2025 X-Loop: help-debbugs@gnu.org Subject: bug#20971: 24.4; occur-1 makes my buffer read-only Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 03 Jul 2015 12:06:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20971 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Alex =?UTF-8?Q?Schr=C3=B6der?= Cc: 20971@debbugs.gnu.org Reply-To: Eli Zaretskii Received: via spool by 20971-submit@debbugs.gnu.org id=B20971.14359251475803 (code B ref 20971); Fri, 03 Jul 2015 12:06:02 +0000 Received: (at 20971) by debbugs.gnu.org; 3 Jul 2015 12:05:47 +0000 Received: from localhost ([127.0.0.1]:38296 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZAziz-0001VW-Gm for submit@debbugs.gnu.org; Fri, 03 Jul 2015 08:05:45 -0400 Received: from mtaout25.012.net.il ([80.179.55.181]:50652) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZAzix-0001VH-6I for 20971@debbugs.gnu.org; Fri, 03 Jul 2015 08:05:44 -0400 Received: from conversion-daemon.mtaout25.012.net.il by mtaout25.012.net.il (HyperSendmail v2007.08) id <0NQW00B00UCN2100@mtaout25.012.net.il> for 20971@debbugs.gnu.org; Fri, 03 Jul 2015 15:01:28 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout25.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NQW006XSUQG0P80@mtaout25.012.net.il>; Fri, 03 Jul 2015 15:01:28 +0300 (IDT) Date: Fri, 03 Jul 2015 15:05:48 +0300 From: Eli Zaretskii In-reply-to: X-012-Sender: halo1@inter.net.il Message-id: <83twtlzbs3.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-transfer-encoding: 8BIT References: X-Spam-Score: 1.0 (+) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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 (+) > From: Alex Schröder > Date: Fri, 03 Jul 2015 09:21:55 +0000 > > I'm using isearch to search for something, then I use M-s o to run an occur for > my search term. This results in *Occur* being shown and in the buffer I'm > searching to be read-only. I cannot reproduce this. The buffer I was searching doesn't become read-only. Are you sure it's not one of your customizations? Can you see that in "emacs -Q"? From unknown Sun Jun 22 11:42:30 2025 X-Loop: help-debbugs@gnu.org Subject: bug#20971: 24.4; occur-1 makes my buffer read-only Resent-From: Alex =?UTF-8?Q?Schr=C3=B6der?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 03 Jul 2015 13:10:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20971 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 20971@debbugs.gnu.org Received: via spool by 20971-submit@debbugs.gnu.org id=B20971.143592898211479 (code B ref 20971); Fri, 03 Jul 2015 13:10:03 +0000 Received: (at 20971) by debbugs.gnu.org; 3 Jul 2015 13:09:42 +0000 Received: from localhost ([127.0.0.1]:38327 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZB0is-0002z4-2l for submit@debbugs.gnu.org; Fri, 03 Jul 2015 09:09:42 -0400 Received: from mail-wi0-f178.google.com ([209.85.212.178]:36010) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZB0ip-0002yp-Rc for 20971@debbugs.gnu.org; Fri, 03 Jul 2015 09:09:40 -0400 Received: by widjy10 with SMTP id jy10so109720934wid.1 for <20971@debbugs.gnu.org>; Fri, 03 Jul 2015 06:09:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-type; bh=3BH9w80WQySOhpNDXz2ceD8DPRzK4+SWhEtN7oeMdUE=; b=gTpW4zaXWzZgDb2z2mbNEdBji2zQtruju2XnCX4ZI5PLmGYMRFWo1nNWX0c3U+HpLA fHrTr9EE0TDxGGrYWtFyX6zSRGUl3m0ZFiXD2DJxGEias2FK6/POB4mDB9knk9eOJU3k OxcSsynAPJ9vuRqGAa/zbeaYPuU4fmzW5uHy+J5DRfQGZbBt6wK+SCFmHbdANvtC7uhV aUuEjEnDUXsRTlbA4gmGlFydGUOImed8mTgwJIdzvbPpwleNWkgSO0EKiY4Sv2Hy9bwQ nvL9nRUtxvrIsAqPBdIk2Q94vCWwDNz+VASHV72BWIEsWxUEBG+8d9nk2U70hVUaIj2B wuAw== X-Received: by 10.180.77.68 with SMTP id q4mr25543763wiw.22.1435928974281; Fri, 03 Jul 2015 06:09:34 -0700 (PDT) MIME-Version: 1.0 References: <83twtlzbs3.fsf@gnu.org> In-Reply-To: <83twtlzbs3.fsf@gnu.org> From: Alex =?UTF-8?Q?Schr=C3=B6der?= Date: Fri, 03 Jul 2015 13:09:24 +0000 Message-ID: Content-Type: multipart/alternative; boundary=f46d043893bd6f52720519f84466 X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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.7 (/) --f46d043893bd6f52720519f84466 Content-Type: text/plain; charset=UTF-8 Indeed, the problem goes away with emacs -Q. I investigated further and found that the culprit is display-buffer-function being set to popwin:display-buffer. Thus, I can load my current config and evaluate (setq display-buffer-function nil). The problem will disappear. I still think that my patch is the right solution. The current code expects display-buffer to behave in a certain way and Emacs gives us a ton of ways to change that. Thus, we either need to explicitly set the current buffer, or we can do away with trying to make *Occur* read-only. And really, who needs that? Even if we don't set buffer-read-only, the buffer has no self-insert-command bindings, and if you try to C-k the header, it will still say "Text is read-only: #" because there is a read-only text-property. And why shouldn't you delete matches? Thus, as far as I can tell, my change makes the code more robust (no longer depending on display-buffer to work in a particular way) and it has practically no drawbacks. --f46d043893bd6f52720519f84466 Content-Type: text/html; charset=UTF-8
Indeed, the problem goes away with emacs -Q. I investigated further and found that the culprit is display-buffer-function being set to popwin:display-buffer. Thus, I can load my current config and evaluate (setq display-buffer-function nil). The problem will disappear.

I still think that my patch is the right solution. The current code expects display-buffer to behave in a certain way and Emacs gives us a ton of ways to change that. Thus, we either need to explicitly set the current buffer, or we can do away with trying to make *Occur* read-only. And really, who needs that? Even if we don't set buffer-read-only, the buffer has no self-insert-command bindings, and if you try to C-k the header, it will still say "Text is read-only: #<buffer *Occur*>" because there is a read-only text-property. And why shouldn't you delete matches?

Thus, as far as I can tell, my change makes the code more robust (no longer depending on display-buffer to work in a particular way) and it has practically no drawbacks.
--f46d043893bd6f52720519f84466-- From unknown Sun Jun 22 11:42:30 2025 X-Loop: help-debbugs@gnu.org Subject: bug#20971: 24.4; occur-1 makes my buffer read-only References: In-Reply-To: Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 29 Sep 2019 23:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20971 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Alex =?UTF-8?Q?Schr=C3=B6der?= Cc: Eli Zaretskii , 20971@debbugs.gnu.org Received: via spool by 20971-submit@debbugs.gnu.org id=B20971.156979903425074 (code B ref 20971); Sun, 29 Sep 2019 23:18:02 +0000 Received: (at 20971) by debbugs.gnu.org; 29 Sep 2019 23:17:14 +0000 Received: from localhost ([127.0.0.1]:56087 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iEiRG-0006WM-3A for submit@debbugs.gnu.org; Sun, 29 Sep 2019 19:17:14 -0400 Received: from mail-pf1-f178.google.com ([209.85.210.178]:40867) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iEiRE-0006W6-Rz for 20971@debbugs.gnu.org; Sun, 29 Sep 2019 19:17:13 -0400 Received: by mail-pf1-f178.google.com with SMTP id x127so4467075pfb.7 for <20971@debbugs.gnu.org>; Sun, 29 Sep 2019 16:17:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc :content-transfer-encoding; bh=eA7f5voKH0GuOj5+iWyrYhW7RJNSVnxgImQ2dn4Z0FQ=; b=gNd/d8JcFQj5VH88N6CK1oltgYIMbBkiBUctqd/JK15chB/Bwn8UehHlQsLk4i3JmX jWRqr51ehy4QoChYWsi85hInzhPDWH38fnE8SdL8BgSj1vvlNi9UZYsLD+NezsvA/FzC jz39NsIAhOWLnOY2sLo62i7lGepJkyS+OR98QX37cLc86ukfT01pz7M3/5/UoFe2e38e w5kEuMvV5JT64QszKYSyvKfmd7GYSgB3EpeddplyFSZVIGR5XzO8qGObdG74s9DVA2V/ WVuyOY7prGSxRhgnvqc1ws1sseK2AW2AQ9ufpc3Vl9vxxYtKE59dMZZ7zN9sZdEMF3iZ 5ZMQ== X-Gm-Message-State: APjAAAXPHAzbHASwQQaYe72Rh2gwlxBD7r6mygiW6a+lnhyPkUxI39XZ 1ZpXVdph5xDdsFyZeQrRZaP1YJODxdcKhYTIzbE= X-Google-Smtp-Source: APXvYqwXprq6RMiPHFV1XZSSygNuWsP6eQQmwNaEi00RMOR1kpQ3WXNRyhOeAWimATA2KotFWLylIE+vGw82pT5uukU= X-Received: by 2002:a63:1310:: with SMTP id i16mr19724763pgl.200.1569799026990; Sun, 29 Sep 2019 16:17:06 -0700 (PDT) MIME-Version: 1.0 From: Stefan Kangas Date: Mon, 30 Sep 2019 01:16:55 +0200 Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) 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 (-) Alex Schr=C3=B6der writes: > Indeed, the problem goes away with emacs -Q. I investigated further and f= ound that the culprit is display-buffer-function > being set to popwin:display-buffer. Thus, I can load my current config an= d evaluate (setq display-buffer-function nil). The > problem will disappear. > > I still think that my patch is the right solution. The current code expec= ts display-buffer to behave in a certain way and > Emacs gives us a ton of ways to change that. Thus, we either need to expl= icitly set the current buffer, or we can do away > with trying to make *Occur* read-only. And really, who needs that? Even i= f we don't set buffer-read-only, the buffer has no > self-insert-command bindings, and if you try to C-k the header, it will s= till say "Text is read-only: #" > because there is a read-only text-property. And why shouldn't you delete = matches? > > Thus, as far as I can tell, my change makes the code more robust (no long= er depending on display-buffer to work in a > particular way) and it has practically no drawbacks. I think *Occur* should definitely be read-only, so your first patch is the wrong solution in my opinion. On the other hand, I see no drawbacks with wrapping the relevant calls in: (with-current-buffer occur-buf ...) At the very least, that would make the intention of that code a bit more clear. But that entire part of the code is already wrapped in (with-current-buffer occur-buf ...). So why are we not in occur-buf already? Best regards, Stefan Kangas From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 29 19:23:23 2019 Received: (at control) by debbugs.gnu.org; 29 Sep 2019 23:23:23 +0000 Received: from localhost ([127.0.0.1]:56111 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iEiXC-0006lv-UN for submit@debbugs.gnu.org; Sun, 29 Sep 2019 19:23:23 -0400 Received: from mail-pf1-f175.google.com ([209.85.210.175]:44248) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iEiXB-0006lb-2k for control@debbugs.gnu.org; Sun, 29 Sep 2019 19:23:21 -0400 Received: by mail-pf1-f175.google.com with SMTP id q21so4455690pfn.11 for ; Sun, 29 Sep 2019 16:23:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=yACI8KxTRarF6443YD1nd6BdPzmLKiro3Xu/5UsDlVs=; b=cYWSUwf8LcJNT8SgPCxlzyo1m3Sxd7wRqrt2aSqLZbvHWtZEDqWMDl14GgNgJbDb+X MV9gCDj+yUvf9EdpGtIZXM553KH9n2boBXKgbPTESKBOBJWHHf2Owkevc0/5AiKuyuZ/ c2rmwJzo3AMWMOpnDjueCMmg2zd8LoAFyTc9Nmv72BUQMzl863Mi1pxNvjerk5YGKBHT St8AOHzUAEFH2T+Y37EDfhC08w24t/kUO8/gjfsBGMN73ubqmtoVU7odXSfLyMbCMurt pXhiTkNje6iGcHUBOvbkNH7ioxWcMPQarC80C6cF+9YpO7e/gmO3HFjLKljhgsyaBWN/ op/A== X-Gm-Message-State: APjAAAXs9g80vObLqVgWFJnBsueoGsIc6HuBinL4k4DfpQ7cR2TQ0uzv 8ICGaduJHOk01KP0nQGP7hu0YAL+ilCwLO2Vf4ds7TMZzgw= X-Google-Smtp-Source: APXvYqy0hvH6cA4OJve2gUp19zJjpUT5Rkl3K4ovslLeoiVUoTRcXTOYJf+GW9UMwr/5UoXvC/ZXHUTCmL2Xt+8/DfU= X-Received: by 2002:aa7:8009:: with SMTP id j9mr17731318pfi.107.1569799395275; Sun, 29 Sep 2019 16:23:15 -0700 (PDT) MIME-Version: 1.0 From: Stefan Kangas Date: Mon, 30 Sep 2019 01:23:04 +0200 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: severity 20971 wishlist quit Content analysis details: (2.0 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different -0.0 SPF_PASS SPF: sender matches SPF record 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 [209.85.210.175 listed in list.dnswl.org] 0.0 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different 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 (+) severity 20971 wishlist quit From unknown Sun Jun 22 11:42:30 2025 X-Loop: help-debbugs@gnu.org Subject: bug#20971: 24.4; occur-1 makes my buffer read-only Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 25 Sep 2020 14:05:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20971 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Kangas Cc: 20971@debbugs.gnu.org, Eli Zaretskii , Alex =?UTF-8?Q?Schr=C3=B6der?= Received: via spool by 20971-submit@debbugs.gnu.org id=B20971.160104269415171 (code B ref 20971); Fri, 25 Sep 2020 14:05:01 +0000 Received: (at 20971) by debbugs.gnu.org; 25 Sep 2020 14:04:54 +0000 Received: from localhost ([127.0.0.1]:44997 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kLoLG-0003wd-2d for submit@debbugs.gnu.org; Fri, 25 Sep 2020 10:04:54 -0400 Received: from quimby.gnus.org ([95.216.78.240]:40602) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kLoLC-0003wG-L1 for 20971@debbugs.gnu.org; Fri, 25 Sep 2020 10:04:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=XyFw8ji/P2ehfW1Ka5+X2mNUUDOq3SjpQBI9rnbjUI0=; b=d718WEGvPCUYqulNkOEqKgrEgZ fk6NNKej++oFSwxP20+xYb7UCUMgF0Mu5B1/7MeAFSW5Suj5ofArDN0uZTfKIlqLDU8biHFAZz/qG UarsKntmfTTHbCIHzqy2TaY4HCGXzjYuqTOvYBAhZksQmqOb3O2M6QNqmQn4nvXg/5LU=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kLoL0-00032P-Lh; Fri, 25 Sep 2020 16:04:43 +0200 From: Lars Ingebrigtsen References: X-Now-Playing: Stephan Mathieu's _FrequencyLib_: "Happy Glow" Date: Fri, 25 Sep 2020 16:04:37 +0200 In-Reply-To: (Stefan Kangas's message of "Mon, 30 Sep 2019 01:16:55 +0200") Message-ID: <87pn6anea2.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.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 @@CONTACT_ADDRESS@@ for details. Content preview: Stefan Kangas writes: > I think *Occur* should definitely be read-only, so your first patch is > the wrong solution in my opinion. > > On the other hand, I see no drawbacks with wrapping the relevant calls > in: > > (with- [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) 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 (-) Stefan Kangas writes: > I think *Occur* should definitely be read-only, so your first patch is > the wrong solution in my opinion. > > On the other hand, I see no drawbacks with wrapping the relevant calls > in: > > (with-current-buffer occur-buf > ...) > > At the very least, that would make the intention of that code a bit more > clear. > > But that entire part of the code is already wrapped in > (with-current-buffer occur-buf ...). So why are we not in occur-buf > already? I am guessing the reporter had some misbehaving code running off of `display-buffer' that changed the current buffer: (display-buffer occur-buf) (when occur--final-pos (set-window-point (get-buffer-window occur-buf 'all-frames) occur--final-pos)) (setq next-error-last-buffer occur-buf) (setq buffer-read-only t) (set-buffer-modified-p nil) (run-hooks 'occur-hook))))))) So everything after displaying the buffer runs somewhere else. We could defensively re-wrap the rest in a with-current-buffer, but... I think the bug is in the code that changed the current buffer, really. So I'm closing this bug report. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 25 10:04:58 2020 Received: (at control) by debbugs.gnu.org; 25 Sep 2020 14:04:58 +0000 Received: from localhost ([127.0.0.1]:45000 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kLoLJ-0003ww-Ag for submit@debbugs.gnu.org; Fri, 25 Sep 2020 10:04:58 -0400 Received: from quimby.gnus.org ([95.216.78.240]:40630) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kLoLH-0003wP-IT for control@debbugs.gnu.org; Fri, 25 Sep 2020 10:04:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=6ZFnZjDZDpiW6o+aOVV7M+XQkP/09c1DuFjsauprvCU=; b=bPHeiOXSsnG84BQDJDZu0zjYKf 98zM3SWBn1U3VJttwVhUPXQqb0Kd9XU68UL4apaT06I5TbCSzA2hsNrSLd0+jMA5L4LHvefL6jHCE sl/f7FKmS37Q9np9XPO/VvazV2Od8LaZsqfhDW/yYy6S0nJqhiuRg8mRib6+seWMb8DU=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kLoL9-00032Z-Sg for control@debbugs.gnu.org; Fri, 25 Sep 2020 16:04:50 +0200 Date: Fri, 25 Sep 2020 16:04:46 +0200 Message-Id: <87o8lune9t.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #20971 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.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 @@CONTACT_ADDRESS@@ for details. Content preview: close 20971 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) 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 (-) close 20971 quit