GNU bug report logs - #53419
27.1; Occur edit mode should also handle RET properly before the line number

Previous Next

Package: emacs;

Reported by: ndame <laszlomail <at> protonmail.com>

Date: Fri, 21 Jan 2022 18:25:02 UTC

Severity: normal

Tags: moreinfo

Found in version 27.1

Fixed in version 29.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

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 53419 in the body.
You can then email your comments to 53419 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#53419; Package emacs. (Fri, 21 Jan 2022 18:25:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to ndame <laszlomail <at> protonmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 21 Jan 2022 18:25:02 GMT) Full text and rfc822 format available.

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

From: ndame <laszlomail <at> protonmail.com>
To: "Bug reports for GNU Emacs,
 the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
Subject: 27.1; Occur edit mode should also handle RET properly before the line
 number
Date: Fri, 21 Jan 2022 18:24:19 +0000
After the line number pressing RET jumps to the location even
in occur edit mode which is good behavior.

But if you press RET on the line number or before it in edit
mode then it inserts a newline, messing up the occur buffer.

RET should always jump to the location when pressed anywhere
on the line.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#53419; Package emacs. (Sat, 22 Jan 2022 11:58:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: ndame <laszlomail <at> protonmail.com>
Cc: 53419 <at> debbugs.gnu.org
Subject: Re: bug#53419: 27.1; Occur edit mode should also handle RET
 properly before the line number
Date: Sat, 22 Jan 2022 12:57:04 +0100
ndame <laszlomail <at> protonmail.com> writes:

> After the line number pressing RET jumps to the location even
> in occur edit mode which is good behavior.
>
> But if you press RET on the line number or before it in edit
> mode then it inserts a newline, messing up the occur buffer.
>
> RET should always jump to the location when pressed anywhere
> on the line.

I'm not sure I understand the issue.  Could you give a recipe to
reproduce the problem, starting from "emacs -Q"?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Added tag(s) moreinfo. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sat, 22 Jan 2022 11:58:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#53419; Package emacs. (Sat, 22 Jan 2022 16:45:01 GMT) Full text and rfc822 format available.

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

From: ndame <laszlomail <at> protonmail.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 53419 <at> debbugs.gnu.org
Subject: Re: bug#53419: 27.1;
 Occur edit mode should also handle RET properly before the line number
Date: Sat, 22 Jan 2022 16:44:15 +0000
> I'm not sure I understand the issue. Could you give a recipe to
> reproduce the problem, starting from "emacs -Q"?

1. start Emacs with -Q, you are in scratch
2. M-x occur  and type the word "file" for the regexp
3. you have one match from the initial scratch message
4. switch to the occur window and press e for edit mode,
   then go to before the line number on the line (2:) and
   press RET
6. RET inserts a newline character which does not make sense
   for occur edit, because the matches are line based

RET should always go the the match location like in non-edit
mode, wherever the cursor is on the matching line, because
adding newlines does not really make sense, not even in edit
mode.





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#53419; Package emacs. (Sun, 23 Jan 2022 12:55:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: ndame <laszlomail <at> protonmail.com>
Cc: 53419 <at> debbugs.gnu.org
Subject: Re: bug#53419: 27.1; Occur edit mode should also handle RET
 properly before the line number
Date: Sun, 23 Jan 2022 13:54:33 +0100
ndame <laszlomail <at> protonmail.com> writes:

> 1. start Emacs with -Q, you are in scratch
> 2. M-x occur  and type the word "file" for the regexp
> 3. you have one match from the initial scratch message
> 4. switch to the occur window and press e for edit mode,
>    then go to before the line number on the line (2:) and
>    press RET
> 6. RET inserts a newline character which does not make sense
>    for occur edit, because the matches are line based

Thanks; I've now fixed this in Emacs 29.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




bug marked as fixed in version 29.1, send any further explanations to 53419 <at> debbugs.gnu.org and ndame <laszlomail <at> protonmail.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sun, 23 Jan 2022 12:55:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#53419; Package emacs. (Sun, 23 Jan 2022 13:06:02 GMT) Full text and rfc822 format available.

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

From: ndame <laszlomail <at> protonmail.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 53419 <at> debbugs.gnu.org
Subject: Re: bug#53419: 27.1;
 Occur edit mode should also handle RET properly before the line number
Date: Sun, 23 Jan 2022 13:05:25 +0000
>
> Thanks; I've now fixed this in Emacs 29.
>

Thanks.

BTW, in the meantime I noticed that the occur buffer is also
modified  incorrectly if you press RET on the matched
line in occur edit mode (so not on the line number, but
somewhere on the text after it).






bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 21 Feb 2022 12:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 65 days ago.

Previous Next


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