From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#10738: insert before setting the mark means the mark wont be set Date: Mon, 06 Feb 2012 16:24:37 -0500 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1328563519 27922 80.91.229.3 (6 Feb 2012 21:25:19 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 6 Feb 2012 21:25:19 +0000 (UTC) Cc: 10738@debbugs.gnu.org To: Christopher Monsanto Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Feb 06 22:25:18 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RuW3n-0002ZI-Pt for geb-bug-gnu-emacs@m.gmane.org; Mon, 06 Feb 2012 22:25:15 +0100 Original-Received: from localhost ([::1]:45550 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RuW3n-0002ik-0l for geb-bug-gnu-emacs@m.gmane.org; Mon, 06 Feb 2012 16:25:15 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:50508) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RuW3j-0002iT-Ok for bug-gnu-emacs@gnu.org; Mon, 06 Feb 2012 16:25:12 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RuW3i-0000V9-3S for bug-gnu-emacs@gnu.org; Mon, 06 Feb 2012 16:25:11 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:54061) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RuW3h-0000V3-TH for bug-gnu-emacs@gnu.org; Mon, 06 Feb 2012 16:25:10 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1RuW4X-0000VH-KK for bug-gnu-emacs@gnu.org; Mon, 06 Feb 2012 16:26:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 06 Feb 2012 21:26:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10738 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 10738-submit@debbugs.gnu.org id=B10738.13285635341900 (code B ref 10738); Mon, 06 Feb 2012 21:26:01 +0000 Original-Received: (at 10738) by debbugs.gnu.org; 6 Feb 2012 21:25:34 +0000 Original-Received: from localhost ([127.0.0.1]:57684 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RuW45-0000Ua-FL for submit@debbugs.gnu.org; Mon, 06 Feb 2012 16:25:34 -0500 Original-Received: from pruche.dit.umontreal.ca ([132.204.246.22]:36321) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RuW42-0000US-M5 for 10738@debbugs.gnu.org; Mon, 06 Feb 2012 16:25:32 -0500 Original-Received: from faina.iro.umontreal.ca (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id q16LObgS024414; Mon, 6 Feb 2012 16:24:37 -0500 Original-Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id 418B213037A; Mon, 6 Feb 2012 16:24:37 -0500 (EST) In-Reply-To: (Christopher Monsanto's message of "Mon, 6 Feb 2012 12:57:36 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux) X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV4124=0 X-NAI-Spam-Version: 2.2.0.9309 : core <4124> : streams <726302> : uri <1061096> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:56596 Archived-At: >> From emacs -q, consider the following program: > (defun foo () > =A0 (interactive) > =A0 (insert "bar") > =A0 (push-mark) > =A0 (forward-line) > =A0 (activate-mark)) > M-x foo, bar appears, but the mark is not set. > (defun baz () > =A0 =A0(interactive) > =A0 =A0(push-mark) > =A0 =A0(forward-line) > =A0 =A0(activate-mark)) > I wouldn't expect a command *before* setting the mark to affect if the > mark was actually set. Is this a concurrency bug? The mark gets deactivated after a command that modifies the buffer. `foo' above is a command that modifies the buffer, so the mark is deactivated afterwards. This is done via the `deactivate-mark' variable. You can let-bind it around the call to `insert' to prevent that variable from being set. Stefan