unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* is the ls-lisp package switched on or off?
@ 2003-12-01  4:01 leo
  2003-12-01  6:10 ` Eli Zaretskii
       [not found] ` <mailman.835.1070262627.399.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 7+ messages in thread
From: leo @ 2003-12-01  4:01 UTC (permalink / raw)


hi there

how can i (inside emacs) find out wether the ls-lisp package is in use or
not?

i just found out  the hard way, hid the excuteable and dired was still able
to produce a directory.

so i guess it uses ls-lisp (or did it uses ls-lisp only beacuse it couln't
find the ls command?), but is there a switch or so in emacs?

thanks, leo

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: is the ls-lisp package switched on or off?
  2003-12-01  4:01 is the ls-lisp package switched on or off? leo
@ 2003-12-01  6:10 ` Eli Zaretskii
       [not found] ` <mailman.835.1070262627.399.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 7+ messages in thread
From: Eli Zaretskii @ 2003-12-01  6:10 UTC (permalink / raw)


> From: "leo" <halloleo@noospaam.myrealbox.com>
> Newsgroups: gnu.emacs.help
> Date: Mon, 1 Dec 2003 15:01:36 +1100
> 
> how can i (inside emacs) find out wether the ls-lisp package is in use or
> not?

Every ELisp package has a line near its end saying this:

  (provide 'package-name)

This is so you could make a test of whether the package has been
loaded into Emacs, like this:

  (featurep 'package-name)

This expression returns t if the package was loaded, nil otherwise.

So in your case,

  (featurep 'ls-lisp)

will supply the answer.

> i just found out  the hard way, hid the excuteable and dired was still able
> to produce a directory.
> 
> so i guess it uses ls-lisp (or did it uses ls-lisp only beacuse it couln't
> find the ls command?)

I'm guessing that you are running on Windows.  Emacs on Windows uses
ls-lisp by default, since most Windows machines don't have an external
`ls' command.

> but is there a switch or so in emacs?

If you want to turn off the Lisp emulation of `ls', customize the
value of the variable `ls-lisp-use-insert-directory-program': if set
to non-nil, it will cause Emacs to use the external `ls'.  (However, I
don't recommend to do that if your `ls' is a Cygwin program, since
Cygwin programs have compatibility issues with Emacs.)

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: is the ls-lisp package switched on or off?
       [not found] ` <mailman.835.1070262627.399.help-gnu-emacs@gnu.org>
@ 2003-12-01 19:36   ` Stefan Monnier
  2003-12-02  3:45     ` leo
                       ` (2 more replies)
  2003-12-02  3:35   ` leo
  1 sibling, 3 replies; 7+ messages in thread
From: Stefan Monnier @ 2003-12-01 19:36 UTC (permalink / raw)


> Every ELisp package has a line near its end saying this:

>   (provide 'package-name)

> This is so you could make a test of whether the package has been
> loaded into Emacs, like this:

>   (featurep 'package-name)

The package might be loaded for all kinds of reasons and it does not mean
the corresponding code is activated.

> This expression returns t if the package was loaded, nil otherwise.
> So in your case,

>   (featurep 'ls-lisp)

I think he wants the value of ls-lisp-use-insert-directory-program
as well.  BTW, the logic should be reversed: it should be insert-directory
that gets customized to either use `ls' or `ls-lisp'.


        Stefan

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: is the ls-lisp package switched on or off?
       [not found] ` <mailman.835.1070262627.399.help-gnu-emacs@gnu.org>
  2003-12-01 19:36   ` Stefan Monnier
@ 2003-12-02  3:35   ` leo
  1 sibling, 0 replies; 7+ messages in thread
From: leo @ 2003-12-02  3:35 UTC (permalink / raw)


thanks a lot for your detailed reply!

cheers, leo

"Eli Zaretskii" <eliz@elta.co.il> wrote in message
news:mailman.835.1070262627.399.help-gnu-emacs@gnu.org...
> > From: "leo" <halloleo@noospaam.myrealbox.com>
> > Newsgroups: gnu.emacs.help
> > Date: Mon, 1 Dec 2003 15:01:36 +1100
> >
> > how can i (inside emacs) find out wether the ls-lisp package is in use
or
> > not?
>
> Every ELisp package has a line near its end saying this:
>
>   (provide 'package-name)
>
> This is so you could make a test of whether the package has been
> loaded into Emacs, like this:
>
>   (featurep 'package-name)
>
> This expression returns t if the package was loaded, nil otherwise.
>
> So in your case,
>
>   (featurep 'ls-lisp)
>
> will supply the answer.
>
> > i just found out  the hard way, hid the excuteable and dired was still
able
> > to produce a directory.
> >
> > so i guess it uses ls-lisp (or did it uses ls-lisp only beacuse it
couln't
> > find the ls command?)
>
> I'm guessing that you are running on Windows.  Emacs on Windows uses
> ls-lisp by default, since most Windows machines don't have an external
> `ls' command.
>
> > but is there a switch or so in emacs?
>
> If you want to turn off the Lisp emulation of `ls', customize the
> value of the variable `ls-lisp-use-insert-directory-program': if set
> to non-nil, it will cause Emacs to use the external `ls'.  (However, I
> don't recommend to do that if your `ls' is a Cygwin program, since
> Cygwin programs have compatibility issues with Emacs.)
>
>
>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: is the ls-lisp package switched on or off?
  2003-12-01 19:36   ` Stefan Monnier
@ 2003-12-02  3:45     ` leo
  2003-12-02  8:13     ` Eli Zaretskii
  2003-12-02 16:57     ` Eli Zaretskii
  2 siblings, 0 replies; 7+ messages in thread
From: leo @ 2003-12-02  3:45 UTC (permalink / raw)


"Stefan Monnier" <monnier@iro.umontreal.ca> wrote in message
news:jwvekvos56l.fsf-monnier+gnu.emacs.help@vor.iro.umontreal.ca...
>
> I think he wants the value of ls-lisp-use-insert-directory-program
> as well.  BTW, the logic should be reversed: it should be insert-directory
> that gets customized to either use `ls' or `ls-lisp'.

aaaaah, now everything comes into place:

using emacs on mac osx and windows-nt i had strange errors on macos after
copying my .emacs file from the nt-box.

i had customized ls-lisp on windows-nt because it just showed up in the
custoimiation but on mac osx it is, iguess, NOT preinstalled.

i guess i'll use ls-lisp on both machines, any caveats i have to think of?

cheers, leo

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: is the ls-lisp package switched on or off?
  2003-12-01 19:36   ` Stefan Monnier
  2003-12-02  3:45     ` leo
@ 2003-12-02  8:13     ` Eli Zaretskii
  2003-12-02 16:57     ` Eli Zaretskii
  2 siblings, 0 replies; 7+ messages in thread
From: Eli Zaretskii @ 2003-12-02  8:13 UTC (permalink / raw)


> Newsgroups: gnu.emacs.help
> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Date: Mon, 01 Dec 2003 19:36:50 GMT
> 
> I think he wants the value of ls-lisp-use-insert-directory-program
> as well.

I mentioned that, didn't I?

> BTW, the logic should be reversed: it should be insert-directory
> that gets customized to either use `ls' or `ls-lisp'.

Currently, ls-lisp redefines insert-directory itself, perhaps for
histerical reasons.  I'm not against the change you propose, provided
that it doesn't cause ls-lisp be loaded on Unix and GNU systems.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: is the ls-lisp package switched on or off?
  2003-12-01 19:36   ` Stefan Monnier
  2003-12-02  3:45     ` leo
  2003-12-02  8:13     ` Eli Zaretskii
@ 2003-12-02 16:57     ` Eli Zaretskii
  2 siblings, 0 replies; 7+ messages in thread
From: Eli Zaretskii @ 2003-12-02 16:57 UTC (permalink / raw)


> Newsgroups: gnu.emacs.help
> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Date: Mon, 01 Dec 2003 19:36:50 GMT
> 
> >   (featurep 'package-name)
> 
> The package might be loaded for all kinds of reasons and it does not mean
> the corresponding code is activated.

Right, but in this particular case, ls-lisp auto-activates when
loaded.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2003-12-02 16:57 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-12-01  4:01 is the ls-lisp package switched on or off? leo
2003-12-01  6:10 ` Eli Zaretskii
     [not found] ` <mailman.835.1070262627.399.help-gnu-emacs@gnu.org>
2003-12-01 19:36   ` Stefan Monnier
2003-12-02  3:45     ` leo
2003-12-02  8:13     ` Eli Zaretskii
2003-12-02 16:57     ` Eli Zaretskii
2003-12-02  3:35   ` leo

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).