From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Oleh Krehel Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] scratch/highlight-n-windows 6da5ca1 2/2: Set `mark-active' to selected window Date: Wed, 01 Apr 2015 09:03:58 +0200 Message-ID: <87d23otjmp.fsf@gmail.com> References: <20150331130427.20388.74881@vcs.savannah.gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1427872165 19619 80.91.229.3 (1 Apr 2015 07:09:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 1 Apr 2015 07:09:25 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Apr 01 09:09:10 2015 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 1YdClw-0006qi-Dz for ged-emacs-devel@m.gmane.org; Wed, 01 Apr 2015 09:09:08 +0200 Original-Received: from localhost ([::1]:41823 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YdClv-0001ys-AZ for ged-emacs-devel@m.gmane.org; Wed, 01 Apr 2015 03:09:07 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47547) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YdClr-0001yn-I6 for emacs-devel@gnu.org; Wed, 01 Apr 2015 03:09:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YdClm-0007mR-JN for emacs-devel@gnu.org; Wed, 01 Apr 2015 03:09:03 -0400 Original-Received: from mail-wi0-x230.google.com ([2a00:1450:400c:c05::230]:38148) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YdClm-0007mD-CM for emacs-devel@gnu.org; Wed, 01 Apr 2015 03:08:58 -0400 Original-Received: by wibgn9 with SMTP id gn9so54249274wib.1 for ; Wed, 01 Apr 2015 00:08:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=Rni9n5gu4lSLPMZEfexqRvTclJjD/YKis8OkTd3JiHs=; b=seXTuu5J2BQWlYDDLwKmu4oE/oLMa+izBY1CJjj9lHZEW8+9+5OwnYW1iqEpg8LlLG at++RR0B/JPNkXnWhyWvcaXH2C05niqeEZXAlj38adnWAyMvCs8UC72bNJdkpoT2Rb9w LrHocse+Q5AMsIY99bglvNn5pbDNYOJbGhKcJobs12JPx9K2BnKLASCCsdkdmoaL1V8p oP4aM8YPJbrNFLQI4BegjPBVLHi/ILaTCQVEuDDyB66Cx7JvvEmCPw0xuX8ySiSeg5Ob 3aXLjgAhhewEaAVCf9g+9XAiQU0pl6IN/h8kFMUpGJcbD6RCHQQDe789z8GbsrOmRK64 0DXQ== X-Received: by 10.180.89.34 with SMTP id bl2mr12268915wib.23.1427872137834; Wed, 01 Apr 2015 00:08:57 -0700 (PDT) Original-Received: from firefly (dyn069045.nbw.tue.nl. [131.155.69.45]) by mx.google.com with ESMTPSA id md2sm24044355wic.19.2015.04.01.00.08.56 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 01 Apr 2015 00:08:57 -0700 (PDT) In-Reply-To: (Stefan Monnier's message of "Tue, 31 Mar 2015 22:53:44 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.91 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:400c:c05::230 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:184692 Archived-At: Stefan Monnier writes: >> + (and (eq w mark-active) >> + w)) > > I think there's a good chance some code out there still sets mark-active > to t, so we should handle this case conservatively (i.e. highlight in all > windows displaying this buffer). OK, updated to check for t as well. > IIUC the problem that annoys you, it comes from the fact that the > region is defined to be "anything between point and mark" but point is > a per-window attribute while mark is a per-buffer attribute. Could we possibly have the mark to be per-window as well? It would automatically solve my problem, as well as allow for some features that users think they might like. For instance, swap two regions in two windows of the same buffer. Oleh