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: [PATCH] window.el: Improve mark management Date: Fri, 20 Jan 2012 13:25:49 -0500 Message-ID: References: <87zkdjtr4v.fsf@Apollo.jerryland.fr> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1327083966 24307 80.91.229.12 (20 Jan 2012 18:26:06 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 20 Jan 2012 18:26:06 +0000 (UTC) Cc: emacs-devel@gnu.org To: =?iso-8859-1?Q?J=E9r=E9my?= Compostella Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jan 20 19:26:02 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RoJ9z-00023t-SL for ged-emacs-devel@m.gmane.org; Fri, 20 Jan 2012 19:26:00 +0100 Original-Received: from localhost ([::1]:46248 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RoJ9z-000678-AI for ged-emacs-devel@m.gmane.org; Fri, 20 Jan 2012 13:25:59 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:39542) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RoJ9s-00064t-30 for emacs-devel@gnu.org; Fri, 20 Jan 2012 13:25:57 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RoJ9q-0005tk-Uj for emacs-devel@gnu.org; Fri, 20 Jan 2012 13:25:52 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:40263) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RoJ9q-0005tg-SF for emacs-devel@gnu.org; Fri, 20 Jan 2012 13:25:50 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av0EAGuwGU9MCos2/2dsb2JhbABDrgiBBoFyAQEEAVYjEAs0EhQYDSSID7hbjCYEiDyacIRW X-IronPort-AV: E=Sophos;i="4.71,544,1320642000"; d="scan'208";a="157798927" Original-Received: from 76-10-139-54.dsl.teksavvy.com (HELO pastel.home) ([76.10.139.54]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 20 Jan 2012 13:25:49 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id 5CA9F5946E; Fri, 20 Jan 2012 13:25:49 -0500 (EST) In-Reply-To: (=?iso-8859-1?Q?=22J=E9r=E9my?= Compostella"'s message of "Fri, 20 Jan 2012 17:52:51 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (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:147787 Archived-At: >> I'm not completely sure. The current code doesn't seem that bad since, >> as you say, it basically reproduces the behavior of >> window-configurations. >> So I'd like to first hear of what are concrete cases where the current >> behavior is a problem. > It's very simple : with the current code, when you call the > `window-state-put' function, the mark is restored as active. That's easy to fix: use (set-marker (mark-marker)) instead of set-mark. > - Either, remove all the mark stuff from `window-state-get' and > `window-state-put' functions. That's not a bad idea, actually. Stefan PS: BTW, the "multiple push-mark" issue can be solved by saving the mark only once per buffer rather than once per window (i.e. the window-state object would have a separate list of affected buffers with their corresponding state, including the mark, not sure what else could be there).