* compile.el, using grep-find when find-program is not "find"
@ 2003-11-05 22:21 Marcus Picasso
2003-11-09 2:05 ` Richard Stallman
0 siblings, 1 reply; 3+ messages in thread
From: Marcus Picasso @ 2003-11-05 22:21 UTC (permalink / raw)
In GNU Emacs 21.3.1 (i386-msvc-nt5.0.2195) of 2003-03-28 on buffy:
Changing the lisp variable "find-program" to something else than "find"
makes compile.el position the point at wrong place, when doing "M-x
grep-find".
Hint:
Compile.el has in "grep-compute-defaults" a line which I think takes care of
point-positioning, and it handles different lenghts of grep-command right,
but not find-command. The line is:
(+ 22 (length grep-command))))))))
Best regards,
-Marcus.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: compile.el, using grep-find when find-program is not "find"
2003-11-05 22:21 compile.el, using grep-find when find-program is not "find" Marcus Picasso
@ 2003-11-09 2:05 ` Richard Stallman
0 siblings, 0 replies; 3+ messages in thread
From: Richard Stallman @ 2003-11-09 2:05 UTC (permalink / raw)
Cc: emacs-devel
Does this patch give correct behavior?
*** compile.el.~1.281.~ Fri Oct 10 00:22:02 2003
--- compile.el Sat Nov 8 16:53:54 2003
***************
*** 752,760 ****
(grep-find-use-xargs
(format "%s . -type f -print | xargs %s"
find-program grep-command))
! (t (cons (format "%s . -type f -exec %s {} %s \\;"
! find-program grep-command null-device)
! (+ 22 (length grep-command)))))))
(unless grep-tree-command
(setq grep-tree-command
(let* ((glen (length grep-program))
--- 752,765 ----
(grep-find-use-xargs
(format "%s . -type f -print | xargs %s"
find-program grep-command))
! (t (let ((beginning
! (format "%s . -type f -exec " find-program))
! (end
! (format "%s {} %s \\;"
! grep-command null-device)))
! (cons
! (concat beginning end)
! (length beginning)))))))
(unless grep-tree-command
(setq grep-tree-command
(let* ((glen (length grep-program))
^ permalink raw reply [flat|nested] 3+ messages in thread
[parent not found: <mailman.3276.1068070939.21628.bug-gnu-emacs@gnu.org>]
* Re: compile.el, using grep-find when find-program is not "find"
[not found] <mailman.3276.1068070939.21628.bug-gnu-emacs@gnu.org>
@ 2003-11-06 17:59 ` Kevin Rodgers
0 siblings, 0 replies; 3+ messages in thread
From: Kevin Rodgers @ 2003-11-06 17:59 UTC (permalink / raw)
Marcus Picasso wrote:
> In GNU Emacs 21.3.1 (i386-msvc-nt5.0.2195) of 2003-03-28 on buffy:
>
> Changing the lisp variable "find-program" to something else than "find"
> makes compile.el position the point at wrong place, when doing "M-x
> grep-find".
>
> Hint:
>
> Compile.el has in "grep-compute-defaults" a line which I think takes care of
> point-positioning, and it handles different lenghts of grep-command right,
> but not find-command. The line is:
>
> (+ 22 (length grep-command))))))))
22 is the position of grep-command in grep-find-command if find-program has its
default value of "find" (and grep-find-use-args is null). Here's a patch:
2003-11-06 Kevin Rodgers <ihs_4664@yahoo.com>
* progmodes/compile.el (grep-compute-defaults): Don't guess the position
of grep-command by assuming find-program has its default value.
*** emacs-21.3/lisp/progmodes/compile.el.orig Fri Jan 17 06:45:11 2003
--- emacs-21.3/lisp/progmodes/compile.el Thu Nov 6 10:54:56 2003
***************
*** 94,103 ****
(grep-find-use-xargs
(format "%s . -type f -print | xargs %s"
find-program grep-command))
! (t (cons (format "%s . -type f -exec %s {} %s \\;"
!
find-program grep-command null-device)
!
(+ 22 (length grep-command))))))))
(defcustom grep-command nil
"The default grep command for \\[grep].
The default value of this variable is set up by `grep-compute-defaults';
--- 94,107 ----
(grep-find-use-xargs
(format "%s . -type f -print | xargs %s"
find-program grep-command))
! (t (let ((command
! (format "%s . -type f -exec %s {} %s \\;"
! find-program grep-command null-device)))
+ (cons command
+ (1+ (string-match (regexp-quote grep-command)
+ command)))))))))
+
(defcustom grep-command nil
"The default grep command for \\[grep].
The default value of this variable is set up by `grep-compute-defaults';
--
Kevin Rodgers
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2003-11-09 2:05 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-11-05 22:21 compile.el, using grep-find when find-program is not "find" Marcus Picasso
2003-11-09 2:05 ` Richard Stallman
[not found] <mailman.3276.1068070939.21628.bug-gnu-emacs@gnu.org>
2003-11-06 17:59 ` Kevin Rodgers
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.