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


Message #19 received at 16438 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Juri Linkov <juri <at> jurta.org>
Cc: 16438 <at> debbugs.gnu.org
Subject: Re: bug#16438: 24.3.50;
 `C-x TAB right right' fails with error (mark-inactive)
Date: Thu, 16 Jan 2014 09:00:41 -0500
>>> 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




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.