GNU bug report logs - #35021
M-^ (delete-indentation) doesn't work without a mark present

Previous Next

Package: emacs;

Reported by: Jon Irving <j <at> lollyshouse.ca>

Date: Wed, 27 Mar 2019 14:20:02 UTC

Severity: normal

Merged with 35036

Found in version 27.0.50

Done: "Basil L. Contovounesios" <contovob <at> tcd.ie>

Bug is archived. No further changes may be made.

Full log


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

From: "Basil L. Contovounesios" <contovob <at> tcd.ie>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: stephen_leake <at> stephe-leake.org, Alex Branham <alex.branham <at> gmail.com>,
 stlman <at> poczta.fm, 35021 <at> debbugs.gnu.org, j <at> lollyshouse.ca
Subject: Re: bug#35021: M-^ (delete-indentation) doesn't work without a mark
 present
Date: Sun, 31 Mar 2019 03:41:47 +0100
[0001-Fix-recently-extended-delete-indentation-behavior.patch (text/x-diff, attachment)]
[Message part 2 (text/plain, inline)]
Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: "Basil L. Contovounesios" <contovob <at> tcd.ie>
>> Date: Wed, 27 Mar 2019 16:09:14 +0000
>> Cc: 35021 <at> debbugs.gnu.org, Stephen Leake <stephen_leake <at> stephe-leake.org>,
>> 	Ɓukasz Stelmach <stlman <at> poczta.fm>
>> 
>> > From a clean `emacs -Q` start:
>> >
>> > 1. Move point up to the bottom line of the *scratch* buffer comments
>> > 2. Type M-^ (or M-x delete-indentation)
>> > 3. Observe the following message in the minibuffer:
>> >      The mark is not set now, so there is no region
>> 
>> This is because delete-indentation is currently using the 'r'
>> interactive code, which barfs if the region is inactive.
>> 
>> I attach a patch which fixes this and also updates the entry for
>> delete-indentation in the Elisp manual.  Is it acceptable?
>
> Looks OK to me, please push.

Thanks, but my last patch only fixed the bug with the interactive spec,
and I have since discovered and fixed a few more edge-cases (including
that reported by Alex in bug#35036).

I attach the updated patch.  Can I push this one instead?

> Alex, this will also solve your bug report, right?  If now, why not?

My last patch didn't address bug#35036.  Whereas bug#35021 is caused by
a wrong interactive spec, bug#35036 is caused by a wrong loop condition.

The attached patch should fix both issues (and a couple more).

Thanks,

-- 
Basil

This bug report was last modified 6 years and 48 days ago.

Previous Next


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