From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#16438: 24.3.50; `C-x TAB right right' fails with error (mark-inactive) Date: Tue, 14 Jan 2014 10:14:07 +0200 Organization: JURTA Message-ID: <87txd756b4.fsf@mail.jurta.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1389687498 29269 80.91.229.3 (14 Jan 2014 08:18:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 14 Jan 2014 08:18:18 +0000 (UTC) To: 16438@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jan 14 09:18:24 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 1W2zCY-0006VR-Bd for geb-bug-gnu-emacs@m.gmane.org; Tue, 14 Jan 2014 09:18:22 +0100 Original-Received: from localhost ([::1]:47010 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W2zCX-0003ty-Tq for geb-bug-gnu-emacs@m.gmane.org; Tue, 14 Jan 2014 03:18:21 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49699) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W2zCM-0003tn-Ho for bug-gnu-emacs@gnu.org; Tue, 14 Jan 2014 03:18:18 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W2zCE-0003TG-3t for bug-gnu-emacs@gnu.org; Tue, 14 Jan 2014 03:18:10 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:35676) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W2zCE-0003TB-0v for bug-gnu-emacs@gnu.org; Tue, 14 Jan 2014 03:18:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1W2zCD-0004Xc-LS for bug-gnu-emacs@gnu.org; Tue, 14 Jan 2014 03:18:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 14 Jan 2014 08:18:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 16438 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.138968743717370 (code B ref -1); Tue, 14 Jan 2014 08:18:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 14 Jan 2014 08:17:17 +0000 Original-Received: from localhost ([127.0.0.1]:49695 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W2zBV-0004W5-3q for submit@debbugs.gnu.org; Tue, 14 Jan 2014 03:17:17 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:47787) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W2zBS-0004Vw-Kk for submit@debbugs.gnu.org; Tue, 14 Jan 2014 03:17:15 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W2zBJ-0003Dj-Nh for submit@debbugs.gnu.org; Tue, 14 Jan 2014 03:17:14 -0500 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:46914) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W2zBJ-0003Df-Kc for submit@debbugs.gnu.org; Tue, 14 Jan 2014 03:17:05 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49478) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W2zBD-0003ju-KX for bug-gnu-emacs@gnu.org; Tue, 14 Jan 2014 03:17:05 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W2zB5-0003C8-Qg for bug-gnu-emacs@gnu.org; Tue, 14 Jan 2014 03:16:59 -0500 Original-Received: from [69.163.184.122] (port=45751 helo=ps18281.dreamhostps.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W2zB5-0003C1-KR for bug-gnu-emacs@gnu.org; Tue, 14 Jan 2014 03:16:51 -0500 Original-Received: from localhost.jurta.org (ps18281.dreamhostps.com [69.163.184.122]) by ps18281.dreamhostps.com (Postfix) with ESMTP id 9BA9033EA3B6C6 for ; Tue, 14 Jan 2014 00:16:49 -0800 (PST) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). 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:83445 Archived-At: 1. emacs -Q 2. Paste to *scratch*: (custom-set-variables '(mark-even-if-inactive nil)) 3. Eval it. 4. Put point at its opening paren and type: C-M-SPC - selects the whole expression C-x TAB - activates a transient indentation mode right - adjusts indentation 1 position to the right right - fails with the error "The mark is not active now" because the previous `right' key deactivated the region One way to fix this is not to deactivate the mark in this transient mode: === modified file 'lisp/indent.el' --- lisp/indent.el 2014-01-13 05:03:31 +0000 +++ lisp/indent.el 2014-01-14 08:07:55 +0000 @@ -214,7 +214,9 @@ (defun indent-rigidly (start end arg &op (indent-to (max 0 (+ indent (prefix-numeric-value arg))) 0)) (delete-region (point) (progn (skip-chars-forward " \t") (point)))) (forward-line 1)) - (move-marker end nil)))) + (move-marker end nil) + (when (eq overriding-terminal-local-map indent-rigidly-map) + (setq deactivate-mark nil))))) But the condition of checking for the transient mode doesn't work because overriding-terminal-local-map never equals to indent-rigidly-map. indent-rigidly-map: (keymap (S-right . indent-rigidly-right-to-tab-stop) (S-left . indent-rigidly-left-to-tab-stop) (right . indent-rigidly-right) (left . indent-rigidly-left)) overriding-terminal-local-map: (keymap (keymap (S-right . indent-rigidly-right-to-tab-stop) (S-left . indent-rigidly-left-to-tab-stop) (right . indent-rigidly-right) (left . indent-rigidly-left)) add-keymap-witness) There is some `add-keymap-witness' at the end of `overriding-terminal-local-map' when the transient indentation mode is active. And I don't know another way to check if `overriding-terminal-local-map' is active.