From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Markus Triska Newsgroups: gmane.emacs.bugs Subject: bug#35177: 27.0.50; Binding deactivate-mark to nil unexpectedly deactivates the mark Date: Mon, 08 Apr 2019 17:50:10 +0200 Message-ID: <87o95gfqdp.fsf@metalevel.at> References: <831s2dakjz.fsf@gnu.org> <877ec5wid3.fsf@metalevel.at> <83d0lx8bsb.fsf@gnu.org> <87mul0rezk.fsf@metalevel.at> <838swk8rfr.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="126998"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Emacs/24.5 Cc: 35177@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Apr 08 17:51:11 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hDWYB-000Wvp-Kt for geb-bug-gnu-emacs@m.gmane.org; Mon, 08 Apr 2019 17:51:11 +0200 Original-Received: from localhost ([127.0.0.1]:55235 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hDWYA-00081h-LC for geb-bug-gnu-emacs@m.gmane.org; Mon, 08 Apr 2019 11:51:10 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:49539) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hDWY3-00081P-9m for bug-gnu-emacs@gnu.org; Mon, 08 Apr 2019 11:51:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hDWY2-0004VZ-7o for bug-gnu-emacs@gnu.org; Mon, 08 Apr 2019 11:51:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:36587) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hDWY2-0004VL-0U for bug-gnu-emacs@gnu.org; Mon, 08 Apr 2019 11:51:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hDWY1-0004kx-UL for bug-gnu-emacs@gnu.org; Mon, 08 Apr 2019 11:51:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Markus Triska Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 08 Apr 2019 15:51:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 35177 X-GNU-PR-Package: emacs Original-Received: via spool by 35177-submit@debbugs.gnu.org id=B35177.155473861418224 (code B ref 35177); Mon, 08 Apr 2019 15:51:01 +0000 Original-Received: (at 35177) by debbugs.gnu.org; 8 Apr 2019 15:50:14 +0000 Original-Received: from localhost ([127.0.0.1]:50131 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hDWXG-0004js-Dx for submit@debbugs.gnu.org; Mon, 08 Apr 2019 11:50:14 -0400 Original-Received: from metalevel.at ([78.46.218.83]:59888) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hDWXD-0004jj-Rb for 35177@debbugs.gnu.org; Mon, 08 Apr 2019 11:50:13 -0400 Original-Received: by metalevel.at (Postfix, from userid 1000) id 6A42CA2A8E; Mon, 8 Apr 2019 17:50:10 +0200 (CEST) In-Reply-To: <838swk8rfr.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 08 Apr 2019 18:09:12 +0300") 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: 209.51.188.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:157349 Archived-At: Eli Zaretskii writes: > I cannot reproduce your result: the above does show an active mark > after the execution, both in Emacs 26.2 and Emacs 27.0.50. Here is a more complete recipe, could you please try it: 1. download deactivate_mark.el with $ wget https://www.metalevel.at/ei/deactivate_mark.el 2. start Emacs with $ emacs -Q deactivate_mark.el 3. move point at the end of the form and evaluate it with C-x C-e. The result is that "hello" is displayed in buffer "t", and the mark is not active. The content of deactivate_mark.el is: (let (deactivate-mark) (switch-to-buffer (get-buffer-create "t")) (insert "hello") (set-mark-command nil) (move-beginning-of-line nil)) It seems to play a role whether its buffer is modified or not, hence this receipe starting from a fresh file and an unmodified buffer. Can you reproduce this up to here? If so, please proceed as follows: 4. Kill the "t" buffer with C-x C-k RET 5. Add a space to the end of deactivate_mark.el by pressing SPACE. 6. Evaluate the form again with C-x C-e. After these steps, "hello" is highlighted and the mark is active. Also, on all further iterations of (4) to (6), the region is again active. Can you reproduce this? If possible, could you please make it so that the mark is active also on the first run, i.e., after steps (1) to (3)? Thank you and all the best, Markus