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.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 35021 in the body.
You can then email your comments to 35021 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#35021; Package emacs. (Wed, 27 Mar 2019 14:20:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jon Irving <j <at> lollyshouse.ca>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 27 Mar 2019 14:20:02 GMT) Full text and rfc822 format available.

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

From: Jon Irving <j <at> lollyshouse.ca>
To: bug-gnu-emacs <at> gnu.org
Subject: M-^ (delete-indentation) doesn't work without a mark present
Date: Wed, 27 Mar 2019 10:19:17 -0400
I believe this is related to the following commits:

b515edb985 Fix bug in delete-indentation when region is inactive
09c220a5cf Minor fixes for the last change
8fa94a1ecc If the region is active, join all the lines it spans

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

In GNU Emacs 27.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.7)
 of 2019-03-26 built on odo
Repository revision: c8ec3108a3d0bd1955d21f40b3c0c3b36d55b20d
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12004000
System Description: Arch Linux

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.

Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS GLIB
NOTIFY INOTIFY ACL GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB
TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM THREADS LIBSYSTEMD JSON PDUMPER
LCMS2 GMP

Important settings:
  value of $LC_MESSAGES: 
  value of $LC_MONETARY: en_CA.UTF-8
  value of $LC_NUMERIC: en_CA.UTF-8
  value of $LC_TIME: en_CA.UTF-8
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message rmc puny seq byte-opt gv
bytecomp byte-compile cconv dired dired-loaddefs format-spec rfc822 mml
easymenu mml-sec password-cache epa derived epg epg-config gnus-util
rmail rmail-loaddefs text-property-search time-date mm-decode mm-bodies
mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader cl-loaddefs
cl-lib sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils
elec-pair mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar
dnd fontset image regexp-opt fringe tabulated-list replace newcomment
text-mode elisp-mode lisp-mode prog-mode register page menu-bar
rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock
syntax facemenu font-core term/tty-colors frame cl-generic cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese composite charscript charprop
case-table epa-hook jka-cmpr-hook help simple abbrev obarray minibuffer
cl-preloaded nadvice loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote threads dbusbind
inotify lcms2 dynamic-setting system-font-setting font-render-setting
move-toolbar gtk x-toolkit x multi-tty make-network-process emacs)

Memory information:
((conses 16 44928 6804)
 (symbols 48 5888 1)
 (strings 32 15000 1709)
 (string-bytes 1 494536)
 (vectors 16 9510)
 (vector-slots 8 117542 10312)
 (floats 8 17 47)
 (intervals 56 189 0)
 (buffers 992 11))





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#35021; Package emacs. (Wed, 27 Mar 2019 16:10:02 GMT) Full text and rfc822 format available.

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

From: "Basil L. Contovounesios" <contovob <at> tcd.ie>
To: Jon Irving <j <at> lollyshouse.ca>
Cc: Stephen Leake <stephen_leake <at> stephe-leake.org>, 35021 <at> debbugs.gnu.org,
 Łukasz Stelmach <stlman <at> poczta.fm>
Subject: Re: bug#35021: M-^ (delete-indentation) doesn't work without a mark
 present
Date: Wed, 27 Mar 2019 16:09:14 +0000
[0001-Fix-delete-indentation-when-region-is-inactive.patch (text/x-diff, attachment)]
[Message part 2 (text/plain, inline)]
Jon Irving <j <at> lollyshouse.ca> writes:

> I believe this is related to the following commits:
>
> b515edb985 Fix bug in delete-indentation when region is inactive
> 09c220a5cf Minor fixes for the last change
> 8fa94a1ecc If the region is active, join all the lines it spans
>
> 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?

Stephen, what is the difference between the two tests
simple-delete-indentation-no-region and
simple-delete-indentation-inactive-region?  Can they be merged?

Thanks,

-- 
Basil

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#35021; Package emacs. (Wed, 27 Mar 2019 17:33:01 GMT) Full text and rfc822 format available.

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

From: Jon Irving <j <at> lollyshouse.ca>
To: "Basil L. Contovounesios" <contovob <at> tcd.ie>
Cc: 35021 <at> debbugs.gnu.org
Subject: Re: bug#35021: M-^ (delete-indentation) doesn't work without a mark
 present
Date: Wed, 27 Mar 2019 13:32:45 -0400
Hi Basil

>>>>>> Basil L. Contovounesios <contovob <at> tcd.ie> at 2019-03-27T12:09:14-0400:

  > I attach a patch which fixes this and also updates the entry for
  > delete-indentation in the Elisp manual.  Is it acceptable?

I just installed this patch on a freshly updated clone of master, and
can confirm the bug is no longer evident. So from my perspective this is
definitely acceptable.

Thanks for taking care of this so quickly!

cheers,
Jon
-- 
Jonathan Irving
https://j0ni.ca
https://keybase.io/j0ni




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#35021; Package emacs. (Wed, 27 Mar 2019 18:50:03 GMT) Full text and rfc822 format available.

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

From: "Basil L. Contovounesios" <contovob <at> tcd.ie>
To: Jon Irving <j <at> lollyshouse.ca>
Cc: 35021 <at> debbugs.gnu.org
Subject: Re: bug#35021: M-^ (delete-indentation) doesn't work without a mark
 present
Date: Wed, 27 Mar 2019 18:49:38 +0000
Jon Irving <j <at> lollyshouse.ca> writes:

>>>>>>> Basil L. Contovounesios <contovob <at> tcd.ie> at 2019-03-27T12:09:14-0400:
>
>   > I attach a patch which fixes this and also updates the entry for
>   > delete-indentation in the Elisp manual.  Is it acceptable?
>
> I just installed this patch on a freshly updated clone of master, and
> can confirm the bug is no longer evident. So from my perspective this is
> definitely acceptable.
>
> Thanks for taking care of this so quickly!

No worries, thanks for the report and confirming the fix!

-- 
Basil




Merged 35021 35036. Request was from Eli Zaretskii <eliz <at> gnu.org> to control <at> debbugs.gnu.org. (Fri, 29 Mar 2019 08:57:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#35021; Package emacs. (Sat, 30 Mar 2019 10:16:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: "Basil L. Contovounesios" <contovob <at> tcd.ie>,
 Alex Branham <alex.branham <at> gmail.com>
Cc: stephen_leake <at> stephe-leake.org, 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: Sat, 30 Mar 2019 13:15:07 +0300
> 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.  Alex, this will also solve your bug
report, right?  If now, why not?

Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#35021; Package emacs. (Sun, 31 Mar 2019 02:43:01 GMT) Full text and rfc822 format available.

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

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#35021; Package emacs. (Sun, 31 Mar 2019 14:24:03 GMT) Full text and rfc822 format available.

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

From: Alex Branham <alex.branham <at> gmail.com>
To: "Basil L. Contovounesios" <contovob <at> tcd.ie>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 35021 <at> debbugs.gnu.org
Subject: Re: bug#35021: M-^ (delete-indentation) doesn't work without a mark
 present
Date: Sun, 31 Mar 2019 09:23:36 -0500
On Sat 30 Mar 2019 at 21:41, Basil L. Contovounesios <contovob <at> tcd.ie> wrote:

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

This does indeed seem to fix my issue, thanks for working on it!

Alex




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#35021; Package emacs. (Sun, 31 Mar 2019 15:06:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: "Basil L. Contovounesios" <contovob <at> tcd.ie>
Cc: stephen_leake <at> stephe-leake.org, 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 18:05:36 +0300
> From: "Basil L. Contovounesios" <contovob <at> tcd.ie>
> Cc: Alex Branham <alex.branham <at> gmail.com>,  <j <at> lollyshouse.ca>,  <35021 <at> debbugs.gnu.org>,  <stephen_leake <at> stephe-leake.org>,  <stlman <at> poczta.fm>
> Date: Sun, 31 Mar 2019 03:41:47 +0100
> 
> > 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?

Yes, this LGTM as well.

> > 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.




Reply sent to "Basil L. Contovounesios" <contovob <at> tcd.ie>:
You have taken responsibility. (Sun, 31 Mar 2019 16:43:01 GMT) Full text and rfc822 format available.

Notification sent to Jon Irving <j <at> lollyshouse.ca>:
bug acknowledged by developer. (Sun, 31 Mar 2019 16:43:02 GMT) Full text and rfc822 format available.

Message #33 received at 35021-done <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 <at> gmail.com, stlman <at> poczta.fm,
 35021-done <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 17:42:43 +0100
Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: "Basil L. Contovounesios" <contovob <at> tcd.ie>
>> Cc: Alex Branham <alex.branham <at> gmail.com>,  <j <at> lollyshouse.ca>,  <35021 <at> debbugs.gnu.org>,  <stephen_leake <at> stephe-leake.org>,  <stlman <at> poczta.fm>
>> Date: Sun, 31 Mar 2019 03:41:47 +0100
>> 
>> > 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?
>
> Yes, this LGTM as well.

Thanks, I pushed to master and am thus closing this report.

-- 
Basil




Reply sent to "Basil L. Contovounesios" <contovob <at> tcd.ie>:
You have taken responsibility. (Sun, 31 Mar 2019 16:43:02 GMT) Full text and rfc822 format available.

Notification sent to Alex Branham <alex.branham <at> gmail.com>:
bug acknowledged by developer. (Sun, 31 Mar 2019 16:43:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#35021; Package emacs. (Sun, 31 Mar 2019 16:44:02 GMT) Full text and rfc822 format available.

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

From: "Basil L. Contovounesios" <contovob <at> tcd.ie>
To: Alex Branham <alex.branham <at> gmail.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 35021 <at> debbugs.gnu.org
Subject: Re: bug#35021: M-^ (delete-indentation) doesn't work without a mark
 present
Date: Sun, 31 Mar 2019 17:43:44 +0100
Alex Branham <alex.branham <at> gmail.com> writes:

> On Sat 30 Mar 2019 at 21:41, Basil L. Contovounesios <contovob <at> tcd.ie> wrote:
>
>> The attached patch should fix both issues (and a couple more).
>
> This does indeed seem to fix my issue, thanks for working on it!

Thanks for reporting and testing!

-- 
Basil




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 29 Apr 2019 11:24:05 GMT) Full text and rfc822 format available.

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.