From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Alex Newsgroups: gmane.emacs.bugs Subject: bug#16752: 24.3.50; pp-to-string deactivates mark Date: Sun, 18 Sep 2016 17:55:25 -0600 Message-ID: <87fuowvk42.fsf@gmail.com> References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1474242989 6428 195.159.176.226 (18 Sep 2016 23:56:29 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 18 Sep 2016 23:56:29 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) Cc: 16728@debbugs.gnu.org, 16752@debbugs.gnu.org, Helmut Eller To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Sep 19 01:56:25 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bllwY-0000Lv-DT for geb-bug-gnu-emacs@m.gmane.org; Mon, 19 Sep 2016 01:56:18 +0200 Original-Received: from localhost ([::1]:51933 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bllwW-00016u-NP for geb-bug-gnu-emacs@m.gmane.org; Sun, 18 Sep 2016 19:56:16 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43072) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bllwL-00016T-Ga for bug-gnu-emacs@gnu.org; Sun, 18 Sep 2016 19:56:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bllwI-0000Qj-Kp for bug-gnu-emacs@gnu.org; Sun, 18 Sep 2016 19:56:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:36919) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bllwI-0000Qf-I8 for bug-gnu-emacs@gnu.org; Sun, 18 Sep 2016 19:56:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bllwI-0004Fq-D5 for bug-gnu-emacs@gnu.org; Sun, 18 Sep 2016 19:56:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alex Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 18 Sep 2016 23:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16752 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 16752-submit@debbugs.gnu.org id=B16752.147424295816329 (code B ref 16752); Sun, 18 Sep 2016 23:56:02 +0000 Original-Received: (at 16752) by debbugs.gnu.org; 18 Sep 2016 23:55:58 +0000 Original-Received: from localhost ([127.0.0.1]:34628 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bllwD-0004FD-Vn for submit@debbugs.gnu.org; Sun, 18 Sep 2016 19:55:58 -0400 Original-Received: from mail-it0-f48.google.com ([209.85.214.48]:35796) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bllwB-0004Er-ON; Sun, 18 Sep 2016 19:55:56 -0400 Original-Received: by mail-it0-f48.google.com with SMTP id r192so55790221ita.0; Sun, 18 Sep 2016 16:55:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=tewn7VjXGsPL8CtDLk8IHNKR9z2GPb94dOL5ePv1es8=; b=F99q/jehzR9xVVRF3ALUMNtxwfXtM4iSgT29zJ/oQQEoJPwdUna+Y9uvyojITS+lC8 +zhEkh7QecoWb32CqT7cre9JdRRBKyaBJ/kyHBJZU0ye267WL1n6AnzOvfMu7180dDg6 JxKPTblnD8PM4F0LpcGZNQa2CTK36Zom7PxoZMp5xj0XEv0sHxjO1AFr6eem6TzLtdDx WhZEcs8pkO1Hq7A83WTtx1E/zWG3Igkyy/LkxPCiv7Rm+BiqyYx6ZI4ZqfYm7KnqrX6B q3gWUp+TD3FX0lT1AvvNldCritRLihoVgPB9+4HUcxplYGXUnWrxdkH4G4h+zr+d597v 86dA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=tewn7VjXGsPL8CtDLk8IHNKR9z2GPb94dOL5ePv1es8=; b=fABFRKBxPMLHhWylwnQYkveRvcl/Y6xYPDMADcHmTB1aC6/7UP8/GTKXwbC2mC95hD fC/EI2g0PN5Mx33PoYhpdBKr96BNaofN1b7DKIQgv7EaV8Nxt0MSZNxvFQKjTNnZItBa hyDwqJ5aymyIOFKa2iO3yFR7cTFh3dEnjf3MobgZxybpoNVGmjNlNaevx/ZkHqeXPcBI DLKyfYnrgxlP/OB9q4afU+lwvkq3pEeCvdyZmYcsMki/ILVdUcU1yxOh0b70U3OmnVl5 IdgbnaVY4QzkzZ5OPX8nNDl/4GKiLaDSFr964tNMAaFT6XHciuWxS2+5V1A2hlJyosuN m64Q== X-Gm-Message-State: AE9vXwMHJ4fYCLu9ZGrV5/LiPuKEXvqlzByeJZFil4NPbP6SCJtZTtDKrHSFkUBZPP8seA== X-Received: by 10.36.208.19 with SMTP id m19mr8030348itg.105.1474242949880; Sun, 18 Sep 2016 16:55:49 -0700 (PDT) Original-Received: from lylat (S01061859339e9903.ss.shawcable.net. [174.2.107.88]) by smtp.gmail.com with ESMTPSA id y76sm5884445ioi.5.2016.09.18.16.55.48 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 18 Sep 2016 16:55:49 -0700 (PDT) In-Reply-To: (Stefan Monnier's message of "Fri, 14 Feb 2014 12:42:25 -0500") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:123432 Archived-At: close 16728 25.1 quit Stefan Monnier writes: > forcemerge 16728 16752 > thanks > >> Evaluating this expression returns: >> (list deactivate-mark >> (pp-to-string '1) >> deactivate-mark) > > deactivate-mark is a global variable and lots of functions happen to > work on internal buffers, which ends up "unwittingly" setting > deactivate-mark to t. > > There are 2 directions to try and fix it: > 1- let-bind deactivate-mark in functions like pp-to-string so as to > eliminate those spurious deactivations. But there can be many of > them, and it doesn't solve the problem where the buffer-modification > is done in a non-temporary buffer. > 2- make deactivate-mark buffer-local. This is "The Right Way" but > might introduce new problems. > E.g. we really should deactivate the mark in all the buffers that > have their deactivate-mark set. > > > Stefan Looks like option 2 was chosen, and the test cases in both bugs now work as expected, so I believe this is done. Please re-open if I'm wrong.