GNU bug report logs - #16438
24.3.50; `C-x TAB right right' fails with error (mark-inactive)

Previous Next

Package: emacs;

Reported by: Juri Linkov <juri <at> jurta.org>

Date: Tue, 14 Jan 2014 08:18:01 UTC

Severity: normal

Found in version 24.3.50

Done: Juri Linkov <juri <at> jurta.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Juri Linkov <juri <at> jurta.org>
Subject: bug#16438: closed (Re: bug#16438: 24.3.50; `C-x TAB right right'
 fails with error (mark-inactive))
Date: Wed, 15 Jan 2014 08:29:04 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#16438: 24.3.50; `C-x TAB right right' fails with error (mark-inactive)

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 16438 <at> debbugs.gnu.org.

-- 
16438: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16438
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Juri Linkov <juri <at> jurta.org>
To: 16438-done <at> debbugs.gnu.org
Subject: Re: bug#16438: 24.3.50;
 `C-x TAB right right' fails with error (mark-inactive)
Date: Wed, 15 Jan 2014 10:23:11 +0200
> 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)

I fixed this by using (eq (cadr overriding-terminal-local-map) indent-rigidly-map)

[Message part 3 (message/rfc822, inline)]
From: Juri Linkov <juri <at> jurta.org>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.3.50; `C-x TAB right right' fails with error (mark-inactive)
Date: Tue, 14 Jan 2014 10:14:07 +0200
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.



This bug report was last modified 11 years and 129 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.