[PATCH] Sync of occur-mode with GNU Emacs CVS.

Jeff Mincy jeff at delphioutpost.com
Sat Dec 3 16:13:17 EST 2005


On Sat, 03 Dec 2005, adrian at xemacs.org wrote:

> Malcolm Purvis <malcolmp at xemacs.org> writes:
> 
>>>>>>> "Adrian" == Adrian Aichner <adrian at xemacs.org> writes:
>>
>> Adrian> Any news on this one, Malcolm?
>>
>> I've ready committed what I thin is the necessary change (see 
>> http://list-archive.xemacs.org/xemacs-patches/200511/msg00186.html)
>>
>> Is the problem still occuring?
> 
> Hi Malcolm, I already confirmed the fix for the issue above.
> 
> The remaining problem is with M-x next-error functionality.
> 
> Does
> C-x `           next-error
> work for you after
> M-x compile
> M-x grep
> M-x igrep-find
> ?
> 
> It's broken for me, after I use
> M-x list-matching-lines
> once.
> 
> I better this is due to redefinition of next-error, which is also in
> compile.el.
> 
> Also, I lack traceability of the decision (and consencus) to have
> occur.el in core (I realize it used to be, being contained in
> replace.el) and to even move next-error.el into core (functionality
> that used to be in xemacs-base/compile.el, at least partially).
> 
> I'm surprised I'm the only one reporting these problems.

I've noticed a different problem with igrep.  I switch into the
*igrep* buffer and next/previous line looking at interesting lines.

Right after doing M-x igrep, the point in the *igrep* buffer is on the
last line that says (default igrep finished at ...).  If you switch
into the *igrep* buffer (Eg C-x o) with the point on the last line,
the function compilation-find-file is very insistent on getting an
answer to some question.

    Find this error in (default igrep finished at ...): 

The line 'default igrep finished' is not an error that can be found.
When you C-g out of the question, you get thrown out of the *igrep*
buffer.  You have to use scroll other window or some other similar
command to get the point in the *igrep* window away from the last
line.

The cause of this behavior is the (or buffer ...) code in compilation-find-file.

(defun compilation-find-file (marker filename dir &rest formats)

	  (or buffer
	      ;; The file doesn't exist.
	      ;; Ask the user where to find it.
	      ;; If he hits C-g, then the next time he does
	      ;; next-error, he'll skip past it.
              (let* ((pop-up-windows t)
		     (w (display-buffer (marker-buffer marker))))
		(set-window-point w marker)
		(set-window-start w marker)
		(let ((name (expand-file-name
			     (read-file-name
			      (format "Find this error in: (default %s) "
				      filename)
			      dir filename t))))
		  (if (file-directory-p name)
		    (setq name (expand-file-name filename name)))
		  (and (file-exists-p name)
		       (progn
			 (push-file-name-history name)
			 (find-file-noselect name))))))
-jeff




More information about the XEmacs-Beta mailing list