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#16438: 24.3.50; `C-x TAB right right' fails with error (mark-inactive) Date: Thu, 16 Jan 2014 09:00:41 -0500 Message-ID: References: <87txd756b4.fsf@mail.jurta.org> <87sisp64cw.fsf@mail.jurta.org> <87fvopcfdn.fsf@mail.jurta.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1389880877 6238 80.91.229.3 (16 Jan 2014 14:01:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 16 Jan 2014 14:01:17 +0000 (UTC) Cc: 16438@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jan 16 15:01:23 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1W3nVZ-00066Q-7p for geb-bug-gnu-emacs@m.gmane.org; Thu, 16 Jan 2014 15:01:21 +0100 Original-Received: from localhost ([::1]:60984 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W3nVY-0003rI-T1 for geb-bug-gnu-emacs@m.gmane.org; Thu, 16 Jan 2014 09:01:20 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54628) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W3nVO-0003ql-F7 for bug-gnu-emacs@gnu.org; Thu, 16 Jan 2014 09:01:17 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W3nVG-000176-Mq for bug-gnu-emacs@gnu.org; Thu, 16 Jan 2014 09:01:10 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:39002) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W3nVG-000172-Jz for bug-gnu-emacs@gnu.org; Thu, 16 Jan 2014 09:01:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1W3nVG-0001TA-08 for bug-gnu-emacs@gnu.org; Thu, 16 Jan 2014 09:01:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 16 Jan 2014 14:01:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16438 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 16438-submit@debbugs.gnu.org id=B16438.13898808474697 (code B ref 16438); Thu, 16 Jan 2014 14:01:01 +0000 Original-Received: (at 16438) by debbugs.gnu.org; 16 Jan 2014 14:00:47 +0000 Original-Received: from localhost ([127.0.0.1]:53021 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W3nV0-0001Bw-58 for submit@debbugs.gnu.org; Thu, 16 Jan 2014 09:00:47 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:38129) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W3nUw-00018M-R3 for 16438@debbugs.gnu.org; Thu, 16 Jan 2014 09:00:43 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av8EABK/CFFMCoyj/2dsb2JhbABEuzWDWRdzgh4BAQQBViMFCws0EhQYDSSIHgaxJJAJkQoDiGGcGYFegxU X-IPAS-Result: Av8EABK/CFFMCoyj/2dsb2JhbABEuzWDWRdzgh4BAQQBViMFCws0EhQYDSSIHgaxJJAJkQoDiGGcGYFegxU X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="45099845" Original-Received: from 76-10-140-163.dsl.teksavvy.com (HELO pastel.home) ([76.10.140.163]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 16 Jan 2014 09:00:41 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id 9D72360073; Thu, 16 Jan 2014 09:00:41 -0500 (EST) In-Reply-To: <87fvopcfdn.fsf@mail.jurta.org> (Juri Linkov's message of "Thu, 16 Jan 2014 09:53:12 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x 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:83589 Archived-At: >>> I fixed this by using (eq (cadr overriding-terminal-local-map) indent-rigidly-map) >> That's hideous, tho :-( > I borrowed this condition from > (not (eq map (cadr overriding-terminal-local-map))) I know. But it has problems: - if there's a nested use of set-transient-map (e.g. C-u), your code will deactivate the mark even tho we're not finished with C-x TAB. - it relies on internal details of implementation of set-transient-map. - now C-x TAB does not deactivate the mark any more :-( > Maybe it should be refactored to a separate predicate function. Could be, tho the two tests need to be different. Another option is to move the deactivation into the exit condition. Yet another option is to change C-x TAB so that it uses (mark t) when called repeatedly. I'm not sure exactly how the deactivation should behave, tho: - The current behavior seems wrong: C-x TAB does use the region, so it should "consume it", so C-x TAB right right right up should end with a deactivated region. - But should the region be highlighted *during* C-x TAB? If yes, then we have a conflict with the previous point, since just before hitting `up' the region would still need to be highlighted, so it'd be counter intuitive to deactivate the region right between when the user hits `up' and when we run the corresponding `previous-line' command. So I think that the region should *not* be highlighted during C-x TAB. Which implies using (mark t). Stefan