* [rick@laserdoodads.com: occur and next-error-follow-minor-mode]
@ 2005-11-14 4:55 Richard M. Stallman
2005-11-15 2:15 ` Juri Linkov
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Richard M. Stallman @ 2005-11-14 4:55 UTC (permalink / raw)
Can someone please investigate this and ack?
------- Start of forwarded message -------
From: "LaserDoodads" <rick@laserdoodads.com>
To: <emacs-pretest-bug@gnu.org>
Date: Sat, 12 Nov 2005 13:59:50 -0600
X-PopBeforeSMTPSenders: info@laserdoodads.com, rick@laserdoodads.com,
webmaster@laserdoodads.com
X-AntiAbuse: This header was added to track abuse,
please include it with any abuse report
X-AntiAbuse: Primary Hostname - s6.s6avahost.net
X-AntiAbuse: Original Domain - gnu.org
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - laserdoodads.com
X-Source:
X-Source-Args:
X-Source-Dir:
X-Mailman-Approved-At: Sat, 12 Nov 2005 16:15:08 -0500
Subject: occur and next-error-follow-minor-mode
Sender: emacs-pretest-bug-bounces+rms=gnu.org@gnu.org
X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on monty-python
X-Spam-Level:
X-Spam-Status: No, hits=0.0 required=5.0 tests=none autolearn=no version=2.63
I've always used next-error-follow-minor-mode in the *occur* buffer.
Recently I noticed that the buffers switch among the windows when ever the cursor moves to a different line.
While visiting any file with several lines containing some text
M-x occur <ret> {something in your file several times} <ret>
C-x o
M-x next-error-follow-minor-mode <ret>
C-n
C-n
C-n...
In GNU Emacs 22.0.50.1 (i386-msvc-nt5.1.2600)
of 2005-11-11 on LD1
X server distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-msvc (12.00)'
Important settings:
value of $LC_ALL: nil
value of $LC_COLLATE: nil
value of $LC_CTYPE: nil
value of $LC_MESSAGES: nil
value of $LC_MONETARY: nil
value of $LC_NUMERIC: nil
value of $LC_TIME: nil
value of $LANG: ENU
locale-coding-system: cp1252
default-enable-multibyte-characters: t
Recent messages:
(C:\emacs\bin\emacs.exe -Q --no-splash)
Loading encoded-kb...done
For information about the GNU Project and its goals, type C-h C-p.
Searched 1 buffer; 21 matches for `grey'
Next-Error-Follow minor mode enabled
_______________________________________________
Emacs-pretest-bug mailing list
Emacs-pretest-bug@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug
------- End of forwarded message -------
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [rick@laserdoodads.com: occur and next-error-follow-minor-mode]
2005-11-14 4:55 [rick@laserdoodads.com: occur and next-error-follow-minor-mode] Richard M. Stallman
@ 2005-11-15 2:15 ` Juri Linkov
2005-11-15 2:18 ` Juri Linkov
2005-11-28 19:21 ` Chong Yidong
2 siblings, 0 replies; 4+ messages in thread
From: Juri Linkov @ 2005-11-15 2:15 UTC (permalink / raw)
Cc: emacs-devel
> Can someone please investigate this and ack?
>
> From: "LaserDoodads" <rick@laserdoodads.com>
> Subject: occur and next-error-follow-minor-mode
> To: <emacs-pretest-bug@gnu.org>
> Date: Sat, 12 Nov 2005 13:59:50 -0600
>
> I've always used next-error-follow-minor-mode in the *occur* buffer.
> Recently I noticed that the buffers switch among the windows when ever the cursor moves to a different line.
>
> While visiting any file with several lines containing some text
>
> M-x occur <ret> {something in your file several times} <ret>
> C-x o
> M-x next-error-follow-minor-mode <ret>
> C-n
> C-n
> C-n...
This should be fixed with the following patch. It restores the
original functionality of goto-occurrence commands with `pop-to-buffer'.
The *Occur* buffer is like *compilation* and *grep* buffers, so using
`pop-to-buffer' is better in the *Occur* buffer.
Index: lisp/replace.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/replace.el,v
retrieving revision 1.230
diff -c -r1.230 replace.el
*** lisp/replace.el 9 Nov 2005 07:41:48 -0000 1.230
--- lisp/replace.el 15 Nov 2005 02:11:31 -0000
***************
*** 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 ()
--- 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,776 ****
(defun occur-mode-goto-occurrence ()
"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 ()
--- 771,780 ----
(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)))
(defun occur-mode-goto-occurrence-other-window ()
--
Juri Linkov
http://www.jurta.org/emacs/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [rick@laserdoodads.com: occur and next-error-follow-minor-mode]
2005-11-14 4:55 [rick@laserdoodads.com: occur and next-error-follow-minor-mode] Richard M. Stallman
2005-11-15 2:15 ` Juri Linkov
@ 2005-11-15 2:18 ` Juri Linkov
2005-11-28 19:21 ` Chong Yidong
2 siblings, 0 replies; 4+ messages in thread
From: Juri Linkov @ 2005-11-15 2:18 UTC (permalink / raw)
Cc: emacs-devel
> From: "LaserDoodads" <rick@laserdoodads.com>
> Subject: occur and next-error-follow-minor-mode
> To: <emacs-pretest-bug@gnu.org>
> Date: Sat, 12 Nov 2005 13:59:50 -0600
>
> I've always used next-error-follow-minor-mode in the *occur* buffer.
I want also to fix one inconvenience with using
`next-error-follow-minor-mode' in the *Occur* buffer where point always
moves to the end of the line, because n-e-f-m-m uses `next-error'
with the arg 0 to go to the occurrence on the current line.
The following patch doesn't move point for the arg 0.
Index: lisp/replace.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/replace.el,v
retrieving revision 1.230
diff -c -r1.230 replace.el
*** lisp/replace.el 9 Nov 2005 07:41:48 -0000 1.230
--- lisp/replace.el 15 Nov 2005 02:11:31 -0000
***************
*** 832,838 ****
(goto-char (cond (reset (point-min))
((< argp 0) (line-beginning-position))
! ((line-end-position))))
(occur-find-match
(abs argp)
(if (> 0 argp)
--- 836,843 ----
(goto-char (cond (reset (point-min))
((< argp 0) (line-beginning-position))
! ((> argp 0) (line-end-position))
! ((point))))
(occur-find-match
(abs argp)
(if (> 0 argp)
--
Juri Linkov
http://www.jurta.org/emacs/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [rick@laserdoodads.com: occur and next-error-follow-minor-mode]
2005-11-14 4:55 [rick@laserdoodads.com: occur and next-error-follow-minor-mode] Richard M. Stallman
2005-11-15 2:15 ` Juri Linkov
2005-11-15 2:18 ` Juri Linkov
@ 2005-11-28 19:21 ` Chong Yidong
2 siblings, 0 replies; 4+ messages in thread
From: Chong Yidong @ 2005-11-28 19:21 UTC (permalink / raw)
Cc: emacs-devel
"Richard M. Stallman" <rms@gnu.org> writes:
> Can someone please investigate this and ack?
>
> I've always used next-error-follow-minor-mode in the *occur* buffer.
> Recently I noticed that the buffers switch among the windows when
> ever the cursor moves to a different line.
I've checked in a fix.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2005-11-28 19:21 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-14 4:55 [rick@laserdoodads.com: occur and next-error-follow-minor-mode] Richard M. Stallman
2005-11-15 2:15 ` Juri Linkov
2005-11-15 2:18 ` Juri Linkov
2005-11-28 19:21 ` Chong Yidong
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.