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

unofficial mirror of bug-gnu-emacs@gnu.org 

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://yhetil.org/emacs-bugs/0 emacs-bugs/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 emacs-bugs emacs-bugs/ https://yhetil.org/emacs-bugs \
		bug-gnu-emacs@gnu.org
	public-inbox-index emacs-bugs

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.yhetil.org/yhetil.emacs.bugs
	nntp://news.gmane.io/gmane.emacs.bugs


code repositories for project(s) associated with this inbox:

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

AGPL code for this site: git clone http://ou63pmih66umazou.onion/public-inbox.git