emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Disable same window pop-to-buffer in Occur buffers


From: Richard M. Stallman
Subject: Re: Disable same window pop-to-buffer in Occur buffers
Date: Sat, 29 Oct 2005 01:13:08 -0400

occur-mode-goto-occurrence should always go to the SAME window.  Your
change ought to make it always go to another window, which is not
correct.

So this ought to be the correct fix.  It makes these commands in Occur
buffers work compatibly with Dired buffers.

*** replace.el  27 Oct 2005 16:30:12 -0400      1.227
--- replace.el  28 Oct 2005 21:11:51 -0400      
***************
*** 755,761 ****
        (save-excursion
        (goto-char (posn-point (event-end event)))
        (setq pos (occur-mode-find-occurrence))))
!     (pop-to-buffer (marker-buffer pos))
      (goto-char pos)))
  
  (defun occur-mode-find-occurrence ()
--- 755,761 ----
        (save-excursion
        (goto-char (posn-point (event-end event)))
        (setq pos (occur-mode-find-occurrence))))
!     (switch-to-buffer-other-window (marker-buffer pos))
      (goto-char pos)))
  
  (defun occur-mode-find-occurrence ()
***************
*** 770,776 ****
    "Go to the occurrence the current line describes."
    (interactive)
    (let ((pos (occur-mode-find-occurrence)))
!     (pop-to-buffer (marker-buffer pos))
      (goto-char pos)))
  
  (defun occur-mode-goto-occurrence-other-window ()
--- 770,776 ----
    "Go to the occurrence the current line describes."
    (interactive)
    (let ((pos (occur-mode-find-occurrence)))
!     (switch-to-buffer (marker-buffer pos))
      (goto-char pos)))
  
  (defun occur-mode-goto-occurrence-other-window ()




reply via email to

[Prev in Thread] Current Thread [Next in Thread]