From: Kevin Rodgers <ihs_4664@yahoo.com>
Subject: Re: compile.el, using grep-find when find-program is not "find"
Date: Thu, 06 Nov 2003 10:59:00 -0700 [thread overview]
Message-ID: <3FAA8BE4.9090805@yahoo.com> (raw)
In-Reply-To: mailman.3276.1068070939.21628.bug-gnu-emacs@gnu.org
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
next parent reply other threads:[~2003-11-06 17:59 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.3276.1068070939.21628.bug-gnu-emacs@gnu.org>
2003-11-06 17:59 ` Kevin Rodgers [this message]
2003-11-05 22:21 compile.el, using grep-find when find-program is not "find" Marcus Picasso
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3FAA8BE4.9090805@yahoo.com \
--to=ihs_4664@yahoo.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).