From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Disable same window pop-to-buffer in Occur buffers Date: Sat, 29 Oct 2005 01:07:34 +0300 Organization: JURTA Message-ID: <87br19mkru.fsf@jurta.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1130539982 19840 80.91.229.2 (28 Oct 2005 22:53:02 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 28 Oct 2005 22:53:02 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Oct 29 00:52:54 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EVd3U-0001Hn-04 for ged-emacs-devel@m.gmane.org; Sat, 29 Oct 2005 00:50:36 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EVd3T-0006vX-EE for ged-emacs-devel@m.gmane.org; Fri, 28 Oct 2005 18:50:35 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EVd2P-0006aG-87 for emacs-devel@gnu.org; Fri, 28 Oct 2005 18:49:29 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EVd2O-0006a0-J5 for emacs-devel@gnu.org; Fri, 28 Oct 2005 18:49:28 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EVd2O-0006Zt-Ei for emacs-devel@gnu.org; Fri, 28 Oct 2005 18:49:28 -0400 Original-Received: from [194.126.101.111] (helo=mail.neti.ee) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EVd2O-0000U1-9Z for emacs-devel@gnu.org; Fri, 28 Oct 2005 18:49:28 -0400 Original-Received: from mail.neti.ee (80-235-33-231-dsl.mus.estpak.ee [80.235.33.231]) by Relayhost1.neti.ee (Postfix) with ESMTP id 478B91712 for ; Sat, 29 Oct 2005 01:49:41 +0300 (EEST) Original-To: emacs-devel@gnu.org User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux) X-Virus-Scanned: by amavisd-new-2.2.1 (20041222) (Debian) at neti.ee X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:45059 Archived-At: `occur-mode-mouse-goto' and `occur-mode-goto-occurrence' switch the buffer in the same window when the buffer name is matched by `same-window-...' variables. There is a special command `occur-mode-goto-occurrence-other-window' that selects the buffer in another window, so I think these command should disregard the values of `same-window-...': Index: lisp/replace.el =================================================================== RCS file: /cvsroot/emacs/emacs/lisp/replace.el,v retrieving revision 1.227 diff -c -r1.227 replace.el *** lisp/replace.el 27 Oct 2005 18:22:00 -0000 1.227 --- lisp/replace.el 28 Oct 2005 22:05:42 -0000 *************** *** 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,763 ---- (save-excursion (goto-char (posn-point (event-end event))) (setq pos (occur-mode-find-occurrence)))) ! (let (same-window-buffer-names ! same-window-regexps) ! (pop-to-buffer (marker-buffer pos))) (goto-char pos))) (defun occur-mode-find-occurrence () *************** *** 769,775 **** (defun occur-mode-goto-occurrence () "Go to the occurrence the current line describes." (interactive) ! (let ((pos (occur-mode-find-occurrence))) (pop-to-buffer (marker-buffer pos)) (goto-char pos))) --- 771,779 ---- (defun occur-mode-goto-occurrence () "Go to the occurrence the current line describes." (interactive) ! (let ((pos (occur-mode-find-occurrence)) ! same-window-buffer-names ! same-window-regexps) (pop-to-buffer (marker-buffer pos)) (goto-char pos))) -- Juri Linkov http://www.jurta.org/emacs/