unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#53419: 27.1; Occur edit mode should also handle RET properly before the line number
@ 2022-01-21 18:24 ndame via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2022-01-22 11:57 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 5+ messages in thread
From: ndame via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-01-21 18:24 UTC (permalink / raw)
  To: 53419

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.





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#53419: 27.1; Occur edit mode should also handle RET properly before the line number
  2022-01-21 18:24 bug#53419: 27.1; Occur edit mode should also handle RET properly before the line number ndame via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-01-22 11:57 ` Lars Ingebrigtsen
  2022-01-22 16:44   ` ndame via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 5+ messages in thread
From: Lars Ingebrigtsen @ 2022-01-22 11:57 UTC (permalink / raw)
  To: ndame; +Cc: 53419

ndame <laszlomail@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





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#53419: 27.1; Occur edit mode should also handle RET properly before the line number
  2022-01-22 11:57 ` Lars Ingebrigtsen
@ 2022-01-22 16:44   ` ndame via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2022-01-23 12:54     ` Lars Ingebrigtsen
  0 siblings, 1 reply; 5+ messages in thread
From: ndame via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-01-22 16:44 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 53419

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






^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#53419: 27.1; Occur edit mode should also handle RET properly before the line number
  2022-01-22 16:44   ` ndame via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-01-23 12:54     ` Lars Ingebrigtsen
  2022-01-23 13:05       ` ndame via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 5+ messages in thread
From: Lars Ingebrigtsen @ 2022-01-23 12:54 UTC (permalink / raw)
  To: ndame; +Cc: 53419

ndame <laszlomail@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





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#53419: 27.1; Occur edit mode should also handle RET properly before the line number
  2022-01-23 12:54     ` Lars Ingebrigtsen
@ 2022-01-23 13:05       ` ndame via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 0 replies; 5+ messages in thread
From: ndame via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-01-23 13:05 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 53419

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







^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-01-23 13:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-21 18:24 bug#53419: 27.1; Occur edit mode should also handle RET properly before the line number ndame via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-01-22 11:57 ` Lars Ingebrigtsen
2022-01-22 16:44   ` ndame via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-01-23 12:54     ` Lars Ingebrigtsen
2022-01-23 13:05       ` ndame via Bug reports for GNU Emacs, the Swiss army knife of text editors

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).