unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#47918: M-x occur should jump to the first match
@ 2021-04-20 20:11 積丹尼 Dan Jacobson
  2021-04-20 20:24 ` Stefan Kangas
  0 siblings, 1 reply; 4+ messages in thread
From: 積丹尼 Dan Jacobson @ 2021-04-20 20:11 UTC (permalink / raw)
  To: 47918

occur is an interactive compiled Lisp function in ‘replace.el’.

Odd that it doesn't jump to the first match like other similar emacs
functions do.

So it should, unless the user disables it via a variable.





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

* bug#47918: M-x occur should jump to the first match
  2021-04-20 20:11 bug#47918: M-x occur should jump to the first match 積丹尼 Dan Jacobson
@ 2021-04-20 20:24 ` Stefan Kangas
  2021-04-21 16:54   ` Juri Linkov
  0 siblings, 1 reply; 4+ messages in thread
From: Stefan Kangas @ 2021-04-20 20:24 UTC (permalink / raw)
  To: 積丹尼 Dan Jacobson; +Cc: 47918

tags 47918 wontfix notabug
close 47918
thanks

積丹尼 Dan Jacobson <jidanni@jidanni.org> writes:

> occur is an interactive compiled Lisp function in ‘replace.el’.
>
> Odd that it doesn't jump to the first match like other similar emacs
> functions do.
>
> So it should, unless the user disables it via a variable.

That would break existing workflows.  Also, `rgrep' and `compile'
doesn't jump to the first match, so I don't see why `occur' should be
different.

If you want to do this, I recommend:

    (add-hook 'occur-hook #'next-error)

Closing as wontfix.





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

* bug#47918: M-x occur should jump to the first match
  2021-04-20 20:24 ` Stefan Kangas
@ 2021-04-21 16:54   ` Juri Linkov
  2021-05-03 14:06     ` 積丹尼 Dan Jacobson
  0 siblings, 1 reply; 4+ messages in thread
From: Juri Linkov @ 2021-04-21 16:54 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: 47918, 積丹尼 Dan Jacobson

> That would break existing workflows.  Also, `rgrep' and `compile'
> doesn't jump to the first match, so I don't see why `occur' should be
> different.

There is 'compilation-auto-jump-to-first-error',
but it doesn't visit matches.

> If you want to do this, I recommend:
>
>     (add-hook 'occur-hook #'next-error)

This is a nice solution to immediately visit matches.





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

* bug#47918: M-x occur should jump to the first match
  2021-04-21 16:54   ` Juri Linkov
@ 2021-05-03 14:06     ` 積丹尼 Dan Jacobson
  0 siblings, 0 replies; 4+ messages in thread
From: 積丹尼 Dan Jacobson @ 2021-05-03 14:06 UTC (permalink / raw)
  To: Juri Linkov; +Cc: Stefan Kangas, 47918

>>>>> "JL" == Juri Linkov <juri@linkov.net> writes:

>> (add-hook 'occur-hook #'next-error)

Nifty! Sure wish the occur docstring in replace.el, and perhaps even
(info "(emacs) Other Repeating Search")
would mention that.





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

end of thread, other threads:[~2021-05-03 14:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-20 20:11 bug#47918: M-x occur should jump to the first match 積丹尼 Dan Jacobson
2021-04-20 20:24 ` Stefan Kangas
2021-04-21 16:54   ` Juri Linkov
2021-05-03 14:06     ` 積丹尼 Dan Jacobson

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