From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: `insert' inside `with-current-buffer' deactivating the mark? Date: Mon, 04 Mar 2013 13:21:58 -0500 Message-ID: References: <87mwujl02o.fsf@web.de> <87vc97jk5k@ch.ristopher.com> <87txoryzwm.fsf@web.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1362421327 28462 80.91.229.3 (4 Mar 2013 18:22:07 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 4 Mar 2013 18:22:07 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Mar 04 19:22:31 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UCa1q-0007lA-0v for ged-emacs-devel@m.gmane.org; Mon, 04 Mar 2013 19:22:26 +0100 Original-Received: from localhost ([::1]:57671 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UCa1U-0001cz-Is for ged-emacs-devel@m.gmane.org; Mon, 04 Mar 2013 13:22:04 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:59020) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UCa1R-0001b6-75 for emacs-devel@gnu.org; Mon, 04 Mar 2013 13:22:02 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UCa1Q-0008Ob-7a for emacs-devel@gnu.org; Mon, 04 Mar 2013 13:22:01 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]:22110) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UCa1Q-0008OR-3A for emacs-devel@gnu.org; Mon, 04 Mar 2013 13:22:00 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EABK/CFFFxLvL/2dsb2JhbABEvw4Xc4IeAQEEAVYoCws0EhQYDYhCBrEkkAmNYYMpA4hhnBmBXoMV X-IPAS-Result: Av4EABK/CFFFxLvL/2dsb2JhbABEvw4Xc4IeAQEEAVYoCws0EhQYDYhCBrEkkAmNYYMpA4hhnBmBXoMV X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="2996875" Original-Received: from 69-196-187-203.dsl.teksavvy.com (HELO pastel.home) ([69.196.187.203]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 04 Mar 2013 13:21:57 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id 022AF6BF75; Mon, 4 Mar 2013 13:21:58 -0500 (EST) In-Reply-To: <87txoryzwm.fsf@web.de> (Michael Heerdegen's message of "Mon, 04 Mar 2013 15:59:05 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.182 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:157510 Archived-At: > Thanks. Yes, I know `deactivate-mark' - but why is it necessary here? > Why does changing another buffer deactivate the mark in the current > buffer? Because deactivate-mark is a global variable. Note also that the mark is not deactivated in some cases where it "should": M-: (progn (insert "a") (set-buffer (other-buffer))) RET IOW the auto-deactivation is just a coarse heuristic, which only covers most cases, but not all. Stefan