* Problems due to grep.el introduction
@ 2004-06-23 19:55 Eli Zaretskii
2004-06-24 8:51 ` Andreas Schwab
2004-06-24 11:26 ` Kim F. Storm
0 siblings, 2 replies; 9+ messages in thread
From: Eli Zaretskii @ 2004-06-23 19:55 UTC (permalink / raw)
Since the `grep' command and related functions are now on a separate
file grep.el, unbundled Lisp packages that used `grep'-related
features will become broken if they require `compile' and rely on
`grep'-related variables and functions to become defined as a result.
Moreover, the fact that grep.el was added is not even mentioned in
NEWS, AFAICS.
(I bumped into this when I installed ID-utils on a machine with a
relatively recent CVS snapshot of Emacs, and found that "M-x gid"
barfs becaise grep-regex-alist is not defined.)
We definitely should mention grep.el in NEWS, but beyond that, I
wonder whether we should add to compile.el a series of calls to
`autoload' that would cause grep.el to be autoloaded whenever some
program that requires only compile references a `grep'-related
variable or function. Like this, for example:
(autoload 'grep-regex-alist "grep")
Comments?
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Problems due to grep.el introduction
2004-06-23 19:55 Problems due to grep.el introduction Eli Zaretskii
@ 2004-06-24 8:51 ` Andreas Schwab
2004-06-24 19:26 ` Eli Zaretskii
2004-06-24 11:26 ` Kim F. Storm
1 sibling, 1 reply; 9+ messages in thread
From: Andreas Schwab @ 2004-06-24 8:51 UTC (permalink / raw)
Cc: emacs-devel
"Eli Zaretskii" <eliz@gnu.org> writes:
> We definitely should mention grep.el in NEWS, but beyond that, I
> wonder whether we should add to compile.el a series of calls to
> `autoload' that would cause grep.el to be autoloaded whenever some
> program that requires only compile references a `grep'-related
> variable or function. Like this, for example:
>
> (autoload 'grep-regex-alist "grep")
>
> Comments?
autoload doesn't work with variables.
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Problems due to grep.el introduction
2004-06-24 8:51 ` Andreas Schwab
@ 2004-06-24 19:26 ` Eli Zaretskii
2004-06-24 19:14 ` Luc Teirlinck
0 siblings, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2004-06-24 19:26 UTC (permalink / raw)
Cc: emacs-devel
> From: Andreas Schwab <schwab@suse.de>
> Date: Thu, 24 Jun 2004 10:51:03 +0200
>
> > (autoload 'grep-regex-alist "grep")
> >
> > Comments?
>
> autoload doesn't work with variables.
So maybe the example was bad, but the original question still stands:
should we do that for some grep-* functions that were previously in
compile?
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Problems due to grep.el introduction
2004-06-24 19:26 ` Eli Zaretskii
@ 2004-06-24 19:14 ` Luc Teirlinck
2004-06-25 17:08 ` Eli Zaretskii
2004-07-03 11:05 ` Eli Zaretskii
0 siblings, 2 replies; 9+ messages in thread
From: Luc Teirlinck @ 2004-06-24 19:14 UTC (permalink / raw)
Cc: schwab, emacs-devel
Eli Zaretskii wrote:
> From: Andreas Schwab <schwab@suse.de>
> Date: Thu, 24 Jun 2004 10:51:03 +0200
>
> > (autoload 'grep-regex-alist "grep")
> >
> > Comments?
>
> autoload doesn't work with variables.
So maybe the example was bad, but the original question still stands:
should we do that for some grep-* functions that were previously in
compile?
Why not just use autoload cookies in grep.el, rather than adding
autoloads to compile.el? Those _do_ work for variables and many
functions and some user options in grep.el already have autoload
cookies. Otherwise, the autoloads you add to compile.el will
eventually be duplicated in grep.el _anyway_. For instance, that is
what wound up happening to 34 of the 38 similar "dired-aux autoloads"
in dired.el. That caused plenty of trouble because the autoloads in
dired.el never got updated, resulting in obsolete docstrings being
displayed and the like. I recently removed all 38 "dired-aux
autoloads" in dired and added 4 autoload cookies to dired-aux.
Sincerely,
Luc.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Problems due to grep.el introduction
2004-06-23 19:55 Problems due to grep.el introduction Eli Zaretskii
2004-06-24 8:51 ` Andreas Schwab
@ 2004-06-24 11:26 ` Kim F. Storm
2004-06-24 19:27 ` Eli Zaretskii
1 sibling, 1 reply; 9+ messages in thread
From: Kim F. Storm @ 2004-06-24 11:26 UTC (permalink / raw)
Cc: emacs-devel
"Eli Zaretskii" <eliz@gnu.org> writes:
> Since the `grep' command and related functions are now on a separate
> file grep.el, unbundled Lisp packages that used `grep'-related
> features will become broken if they require `compile' and rely on
> `grep'-related variables and functions to become defined as a result.
> Moreover, the fact that grep.el was added is not even mentioned in
> NEWS, AFAICS.
>
> (I bumped into this when I installed ID-utils on a machine with a
> relatively recent CVS snapshot of Emacs, and found that "M-x gid"
> barfs becaise grep-regex-alist is not defined.)
>
> We definitely should mention grep.el in NEWS,
I didn't think it would cause problems which is why I didn't document
it. But it's not that trivial...
If some external package uses grep and does (require 'compile),
it is not sufficient just to change that into (require 'grep),
as that would break compatibility with pre 21.4 emacs which doesn't
have grep.el
For 21.4, the simplest fix would be to add (require 'grep)
at the end of compile.el -- after (provide 'compile).
--
Kim F. Storm <storm@cua.dk> http://www.cua.dk
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Problems due to grep.el introduction
2004-06-24 11:26 ` Kim F. Storm
@ 2004-06-24 19:27 ` Eli Zaretskii
2004-06-24 21:40 ` Kim F. Storm
0 siblings, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2004-06-24 19:27 UTC (permalink / raw)
Cc: emacs-devel
> From: storm@cua.dk (Kim F. Storm)
> Date: 24 Jun 2004 13:26:50 +0200
>
> For 21.4, the simplest fix would be to add (require 'grep)
> at the end of compile.el -- after (provide 'compile).
But that would defeat the reason behind creating grep.el, won't it?
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Problems due to grep.el introduction
2004-06-24 19:27 ` Eli Zaretskii
@ 2004-06-24 21:40 ` Kim F. Storm
0 siblings, 0 replies; 9+ messages in thread
From: Kim F. Storm @ 2004-06-24 21:40 UTC (permalink / raw)
Cc: emacs-devel
"Eli Zaretskii" <eliz@gnu.org> writes:
> > From: storm@cua.dk (Kim F. Storm)
> > Date: 24 Jun 2004 13:26:50 +0200
> >
> > For 21.4, the simplest fix would be to add (require 'grep)
> > at the end of compile.el -- after (provide 'compile).
>
> But that would defeat the reason behind creating grep.el, won't it?
Not really.
In my mind, the primary reason for the split was to clarify the
interface between compile itself and the users of compile (such as
grep). A secondary purpose was to be able to enhance those packages
independently (as have been done subsequently).
--
Kim F. Storm <storm@cua.dk> http://www.cua.dk
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2004-07-03 11:05 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-06-23 19:55 Problems due to grep.el introduction Eli Zaretskii
2004-06-24 8:51 ` Andreas Schwab
2004-06-24 19:26 ` Eli Zaretskii
2004-06-24 19:14 ` Luc Teirlinck
2004-06-25 17:08 ` Eli Zaretskii
2004-07-03 11:05 ` Eli Zaretskii
2004-06-24 11:26 ` Kim F. Storm
2004-06-24 19:27 ` Eli Zaretskii
2004-06-24 21:40 ` Kim F. Storm
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).