all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Q about occur buffer/point
@ 2003-05-29  3:12 Mike Ballard
  2003-05-29  8:28 ` Kai Großjohann
  0 siblings, 1 reply; 4+ messages in thread
From: Mike Ballard @ 2003-05-29  3:12 UTC (permalink / raw)



Hi - 

I like to use occur to search large files but don't like that point
switches out of the occur buffer when selecting a line.  Is there a way to
have everything work as it does now but keep point in the occur buffer?

Mike
-- 

mike.ballard--at--earthlink.net

  "Play an accordion, go to jail.  It's the law!"

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

* Re: Q about occur buffer/point
  2003-05-29  3:12 Q about occur buffer/point Mike Ballard
@ 2003-05-29  8:28 ` Kai Großjohann
  2003-05-29 10:44   ` Matthias Meulien
  0 siblings, 1 reply; 4+ messages in thread
From: Kai Großjohann @ 2003-05-29  8:28 UTC (permalink / raw)


Mike Ballard <dont_w@nt_spam.org> writes:

> I like to use occur to search large files but don't like that point
> switches out of the occur buffer when selecting a line.  Is there a way to
> have everything work as it does now but keep point in the occur buffer?

Hit C-h b in the *Occur* buffer for the key bindings.  You'll find
C-o, I guess.
-- 
This line is not blank.

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

* Re: Q about occur buffer/point
  2003-05-29  8:28 ` Kai Großjohann
@ 2003-05-29 10:44   ` Matthias Meulien
  2003-05-29 23:08     ` Mike Ballard
  0 siblings, 1 reply; 4+ messages in thread
From: Matthias Meulien @ 2003-05-29 10:44 UTC (permalink / raw)


kai.grossjohann@gmx.net (Kai Großjohann) wrote:

> (...) Hit C-h b in the *Occur* buffer for the key bindings. You'll
> find C-o, 

Only on recent version of emacs I guess... 

>From my init file :

(defun alt-occur-mode-view-occurrence ()
  "View the occurrence the current line describes."
  (interactive)
  (let ((pos (occur-mode-find-occurrence)))
    (pop-to-buffer occur-buffer)
    (goto-char (marker-position pos))
    (pop-to-buffer "*Occur*")))

(add-hook 'occur-mode-hook
	  '(lambda ()
	     (setq truncate-lines t)
	     (hl-line-mode 1)
	     (define-key occur-mode-map "v" 'alt-occur-mode-view-occurrence)
	     (define-key occur-mode-map "q" 'delete-window)))

Bye,
-- 
Matthias

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

* Re: Q about occur buffer/point
  2003-05-29 10:44   ` Matthias Meulien
@ 2003-05-29 23:08     ` Mike Ballard
  0 siblings, 0 replies; 4+ messages in thread
From: Mike Ballard @ 2003-05-29 23:08 UTC (permalink / raw)



On Thu May 29, Matthias Meulien woke me from a deep sleep when he said:

<snip>

> From my init file :
> 
> (defun alt-occur-mode-view-occurrence ()
>   "View the occurrence the current line describes."
>   (interactive)
>   (let ((pos (occur-mode-find-occurrence)))
>     (pop-to-buffer occur-buffer)
>     (goto-char (marker-position pos))
>     (pop-to-buffer "*Occur*")))
> 
> (add-hook 'occur-mode-hook
> 	  '(lambda ()
> 	     (setq truncate-lines t)
> 	     (hl-line-mode 1)
> 	     (define-key occur-mode-map "v" 'alt-occur-mode-view-occurrence)
> 	     (define-key occur-mode-map "q" 'delete-window)))
> 

Perfect!!  Thanks so much....

Mike
-- 

mike.ballard--at--earthlink.net

  "Play an accordion, go to jail.  It's the law!"

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

end of thread, other threads:[~2003-05-29 23:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-05-29  3:12 Q about occur buffer/point Mike Ballard
2003-05-29  8:28 ` Kai Großjohann
2003-05-29 10:44   ` Matthias Meulien
2003-05-29 23:08     ` Mike Ballard

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.