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: window-configurations and marks Date: Thu, 24 Apr 2014 09:15:33 -0400 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1398396147 25585 80.91.229.3 (25 Apr 2014 03:22:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 25 Apr 2014 03:22:27 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Apr 25 05:22:20 2014 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 1WdWiQ-0001ZD-7i for ged-emacs-devel@m.gmane.org; Fri, 25 Apr 2014 05:22:18 +0200 Original-Received: from localhost ([::1]:54975 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WdWiP-0006xS-LS for ged-emacs-devel@m.gmane.org; Thu, 24 Apr 2014 23:22:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49442) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WdUoe-0004Nu-6j for emacs-devel@gnu.org; Thu, 24 Apr 2014 21:21:48 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WdJV0-0007u0-PW for emacs-devel@gnu.org; Thu, 24 Apr 2014 09:15:42 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:1818) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WdJV0-0007tw-FR for emacs-devel@gnu.org; Thu, 24 Apr 2014 09:15:34 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Au8GAIDvNVNMCqOU/2dsb2JhbABZgwYBg0m5A4hRF3SDAnImGA2IMJ9/shoXjxeEIgSpGYFqg0wh X-IPAS-Result: Au8GAIDvNVNMCqOU/2dsb2JhbABZgwYBg0m5A4hRF3SDAnImGA2IMJ9/shoXjxeEIgSpGYFqg0wh X-IronPort-AV: E=Sophos;i="4.97,753,1389762000"; d="scan'208";a="58830743" Original-Received: from 76-10-163-148.dsl.teksavvy.com (HELO pastel.home) ([76.10.163.148]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 24 Apr 2014 09:15:33 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 8B8B8600FB; Thu, 24 Apr 2014 09:15:33 -0400 (EDT) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.181 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:171617 Archived-At: A lot of code assumes that "mark-active non-nil implies that (mark) points somewhere", and I think it's a reasonable assumption. But occasionally this property is invalid. One place I found where it can be invalidated is in set-window-configuration because window-configurations keep a copy of the mark, which is hence reset by set-window-configuration without paying attention to its connection to mark-active. I just installed a patch which changes set-window-configuration so as to call deactivate-mark when mark-active is non-nil and we set the mark to point nowhere. But I don't like this patch: - I don't like to idea of running arbitrary Elisp code from the middle of set-window-configuration. - It calls for calling activate-mark in the reverse case. - It's done "per-window" whereas the mark is "per-buffer". So, I'm really thinking that the better fix is to change set-window-configuration such that it does not touch the mark (which really doesn't have anything to do with windows or window-configurations, and indeed window-state doesn't include information about the mark). Any objection? Stefan