Not all files displayed in directory listing

classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|

Not all files displayed in directory listing

bsamek
If I do 'M-x shell' and type 'dir', it doesn't display every file. The java executables are missing (http://i.imgur.com/7JwyDED.png). I also can't invoke 'java' from the Emacs shell. What's going on?

Thanks,

Brian
Reply | Threaded
Open this post in threaded view
|

Re: Not all files displayed in directory listing

Sivaram Neelakantan
On Sat, Apr 20 2013,bsamek  wrote:

> If I do 'M-x shell' and type 'dir', it doesn't display every file. The java
> executables are missing (http://i.imgur.com/7JwyDED.png). I also can't
> invoke 'java' from the Emacs shell. What's going on?
>
> Thanks,
>
> Brian
>

[snipped 7 lines]

what is your M-x getenv RET PATH value?

 sivaram
 --


Reply | Threaded
Open this post in threaded view
|

Re: Not all files displayed in directory listing

Eli Zaretskii
In reply to this post by bsamek
> Date: Fri, 19 Apr 2013 19:02:23 -0700 (PDT)
> From: bsamek <[hidden email]>
>
> If I do 'M-x shell' and type 'dir', it doesn't display every file. The java
> executables are missing (http://i.imgur.com/7JwyDED.png). I also can't
> invoke 'java' from the Emacs shell. What's going on?

My crystal ball says you are in a different directory when you type
"M-x shell".  You didn't show full listings in both cases, but the few
files that appear in both have different sizes and different time
stamps.  E.g., compare jscript.dll, jscript9.dll, and jsproxy.dll.

Reply | Threaded
Open this post in threaded view
|

Re: Not all files displayed in directory listing

bsamek
In reply to this post by Sivaram Neelakantan
My M-x getenv RET PATH is:

C:\Program Files (x86)\AMD APP\bin\x86_64;C:\Program Files (x86)\AMD APP\bin\x86;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;C:\Windows\System32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files (x86)\ctags;C:\python27;C:\Program Files (x86)\Git\cmd;C:\MinGW\bin;C:\Program Files (x86)\GnuWin32\bin;C:\Program Files (x86)\GNU\GnuPG\pub


On Fri, Apr 19, 2013 at 11:50 PM, Sivaram Neelakantan [via Emacs] <[hidden email]> wrote:
On Sat, Apr 20 2013,bsamek  wrote:

> If I do 'M-x shell' and type 'dir', it doesn't display every file. The java
> executables are missing (http://i.imgur.com/7JwyDED.png). I also can't
> invoke 'java' from the Emacs shell. What's going on?
>
> Thanks,
>
> Brian
>

[snipped 7 lines]

what is your M-x getenv RET PATH value?

 sivaram
 --





If you reply to this email, your message will be added to the discussion below:
http://emacs.1067599.n5.nabble.com/Not-all-files-displayed-in-directory-listing-tp284073p284075.html
To unsubscribe from Not all files displayed in directory listing, click here.
NAML

Reply | Threaded
Open this post in threaded view
|

Re: Not all files displayed in directory listing

bsamek
In reply to this post by Eli Zaretskii
I wish that were true! Here's a fuller listing http://i.imgur.com/EGaK3bx.png. It is odd that the time/size don't match. But I made sure to 'dir c:\Windows\System32' in both shells before requesting a directory listing.

Brian


On Sat, Apr 20, 2013 at 2:53 AM, Eli Zaretskii [via Emacs] <[hidden email]> wrote:
> Date: Fri, 19 Apr 2013 19:02:23 -0700 (PDT)
> From: bsamek <[hidden email]>
>
> If I do 'M-x shell' and type 'dir', it doesn't display every file. The java
> executables are missing (http://i.imgur.com/7JwyDED.png). I also can't
> invoke 'java' from the Emacs shell. What's going on?

My crystal ball says you are in a different directory when you type
"M-x shell".  You didn't show full listings in both cases, but the few
files that appear in both have different sizes and different time
stamps.  E.g., compare jscript.dll, jscript9.dll, and jsproxy.dll.




If you reply to this email, your message will be added to the discussion below:
http://emacs.1067599.n5.nabble.com/Not-all-files-displayed-in-directory-listing-tp284073p284089.html
To unsubscribe from Not all files displayed in directory listing, click here.
NAML

Reply | Threaded
Open this post in threaded view
|

Re: Not all files displayed in directory listing

Eli Zaretskii
> Date: Sat, 20 Apr 2013 07:53:33 -0700 (PDT)
> From: bsamek <[hidden email]>
>
> I wish that were true! Here's a fuller listing
> http://i.imgur.com/EGaK3bx.png. It is odd that the time/size don't match.
> But I made sure to 'dir c:\Windows\System32' in both shells before
> requesting a directory listing.

You'd have to investigate what's going on on your system.  Some
directions to look into:

  . do you have some dir.exe or dir.bat somewhere, and could it be
    that it gets invoked in one of the two cases, but not the other?

  . which shell is running in each case? can they be different shells?

  . do you have a DIRCMD variable defined in the environment, and if
    so, could it be affecting only one of the cases?

Reply | Threaded
Open this post in threaded view
|

Re: Not all files displayed in directory listing

bsamek
I think your second question may have led me in the right direction. As far as I can tell there is no dir.exe or dir.bat anywhere, and DIRCMD is not set. There seems to be a problem with cmdproxy.exe. The 'shell-file-name' variable is set to emacs-24.2/bin/cmdproxy.exe. Running cmdproxy.exe from the Windows command line drops me into a shell with the same problem, i.e., it won't list some files in C:\Windows\System32. I can't find any docs for cmdproxy.exe. I tried evaluating (setq explicit-shell-file-name "C:/Windows/System32/cmd.exe"), which switched the shell to cmd.exe instead of cmdproxy.exe, but this did not fix the problem.

Brian


On Sat, Apr 20, 2013 at 12:02 PM, Eli Zaretskii [via Emacs] <[hidden email]> wrote:
> Date: Sat, 20 Apr 2013 07:53:33 -0700 (PDT)
> From: bsamek <[hidden email]>
>
> I wish that were true! Here's a fuller listing
> http://i.imgur.com/EGaK3bx.png. It is odd that the time/size don't match.
> But I made sure to 'dir c:\Windows\System32' in both shells before
> requesting a directory listing.

You'd have to investigate what's going on on your system.  Some
directions to look into:

  . do you have some dir.exe or dir.bat somewhere, and could it be
    that it gets invoked in one of the two cases, but not the other?

  . which shell is running in each case? can they be different shells?

  . do you have a DIRCMD variable defined in the environment, and if
    so, could it be affecting only one of the cases?




If you reply to this email, your message will be added to the discussion below:
http://emacs.1067599.n5.nabble.com/Not-all-files-displayed-in-directory-listing-tp284073p284131.html
To unsubscribe from Not all files displayed in directory listing, click here.
NAML

Reply | Threaded
Open this post in threaded view
|

Re: Not all files displayed in directory listing

Eli Zaretskii
> Date: Sun, 21 Apr 2013 09:48:04 -0700 (PDT)
> From: bsamek <[hidden email]>
>
> I think your second question may have led me in the right direction. As far
> as I can tell there is no dir.exe or dir.bat anywhere, and DIRCMD is not
> set. There seems to be a problem with cmdproxy.exe. The 'shell-file-name'
> variable is set to emacs-24.2/bin/cmdproxy.exe. Running cmdproxy.exe from
> the Windows command line drops me into a shell with the same problem, i.e.,
> it won't list some files in C:\Windows\System32.

It is normal that 'shell-file-name' is set to cmdproxy.  This happens
on my machine as well, and yet I don't see your problem.

Can you find out which cmd.exe is being run by cmdproxy.exe?  You can
use some utility like Process Explorer (from SysInternals) to display
the process tree, so that you could see which shell is running as the
child process of cmdproxy.exe, and what is its full path.

> I can't find any docs for cmdproxy.exe.

See README.W32 in the distribution.  But that doesn't tell much.  And
I don't think it's your problem, at least not directly: cmdproxy.exe
simply invokes cmd.exe in this case.  But it might be the wrong
cmd.exe for some reason.

Reply | Threaded
Open this post in threaded view
|

Re: Not all files displayed in directory listing

Michel de Ruiter
In reply to this post by bsamek
Hi Brian,

I think Eli is right. As always.
One of your System32 directories probably is SysWOW64 in disguise.
Is the program you compare with, a 32-bit one agnostic to your 64-bits Windows? Then it shows C:\Windows\SysWOW64\ as C:\Windows\System32\ (check http://msdn.microsoft.com/library/aa384187.aspx).

Groente, Michel.

> -----Original Message-----
> From: help-emacs-windows-bounces+michel=[hidden email] [mailto:help-
> emacs-windows-bounces+michel=[hidden email]] On Behalf Of bsamek
> Sent: Saturday, April 20, 2013 4:54 PM
> To: [hidden email]
> Subject: Re: [h-e-w] Not all files displayed in directory listing
>
> I wish that were true! Here's a fuller listing
> http://i.imgur.com/EGaK3bx.png. It is odd that the time/size don't match.
> But I made sure to 'dir c:\Windows\System32' in both shells before
> requesting a directory listing.
>
> Brian
>
>
> On Sat, Apr 20, 2013 at 2:53 AM, Eli Zaretskii [via Emacs] <[hidden email]>
> wrote:
> > Date: Fri, 19 Apr 2013 19:02:23 -0700 (PDT)
> > From: bsamek <[hidden email]
> <http://user/SendEmail.jtp?type=node&node=284089&i=0> >
>
> > If I do 'M-x shell' and type 'dir', it doesn't display every file. The java
> > executables are missing (http://i.imgur.com/7JwyDED.png). I also can't
> > invoke 'java' from the Emacs shell. What's going on?
>
> My crystal ball says you are in a different directory when you type
> "M-x shell".  You didn't show full listings in both cases, but the few
> files that appear in both have different sizes and different time
> stamps.  E.g., compare jscript.dll, jscript9.dll, and jsproxy.dll.
Reply | Threaded
Open this post in threaded view
|

Re: Not all files displayed in directory listing

bsamek
Hey Michel and Eli,

You're absolutely right. When I cd to C:\Windows\System32 in Emacs, I'm actually in SysWOW64. It lists the SysWOW64 files. Process Explorer confirms it. The command line invoking cmd.exe is C:\Windows\system32\cmd.exe, but the path is C:\Windows\SysWOW64\cmd.exe.

I downloaded the latest Emacs and ran it with no custom configurations, and the problem remained, so the problem is not in my .emacs.

Do you know why this is happening? I would have assumed this happened to everyone since the Windows docs say that 32-bit programs are automatically redirected by SysWoW to the SysWOW64 directory. Can I somehow tell Emacs to use the path to the 64-bit cmd.exe? Or is there a Windows setting for this?
Reply | Threaded
Open this post in threaded view
|

Re: Not all files displayed in directory listing

Eli Zaretskii
> Date: Sat, 11 May 2013 09:55:47 -0700 (PDT)
> From: bsamek <[hidden email]>
>
> You're absolutely right. When I cd to C:\Windows\System32 in Emacs, I'm
> actually in SysWOW64. It lists the SysWOW64 files. Process Explorer confirms
> it. The command line invoking cmd.exe is C:\Windows\system32\cmd.exe, but
> the path is C:\Windows\SysWOW64\cmd.exe.
>
> I downloaded the latest Emacs and ran it with no custom configurations, and
> the problem remained, so the problem is not in my .emacs.

This is actually not a problem at all, if it happens only with
c:\Windows\System32.  Is that the only directory where you see this?

> Do you know why this is happening?

That's how 64-bit Windows behaves with all 32-bit programs.  Why does
it bother you?

> Can I somehow tell Emacs to use the path to the 64-bit cmd.exe?

What do you need that for?

Reply | Threaded
Open this post in threaded view
|

Re: Not all files displayed in directory listing

bsamek
>> Can I somehow tell Emacs to use the path to the 64-bit cmd.exe? >What do you need that for? Maybe I don't. My problem is that I can't access C:\Windows\System32 from Emacs. For instance, I can't invoke java from the Emacs shell, I assume because it's looking in C:\Windows\SysWOW64 and not C:\Windows\System32.
Reply | Threaded
Open this post in threaded view
|

Re: Not all files displayed in directory listing

Eli Zaretskii
> Date: Sat, 11 May 2013 10:27:51 -0700 (PDT)
> From: bsamek <[hidden email]>
>
> My problem is that I can't access C:\Windows\System32 from
> Emacs. For instance, I can't invoke java from the Emacs shell, I
> assume because it's looking in C:\Windows\SysWOW64 and not
> C:\Windows\System32.

Try running Java via a batch file, which you should put somewhere
outside the c:\Windows\System32 tree.

Reply | Threaded
Open this post in threaded view
|

Re: Not all files displayed in directory listing

bsamek
Eli Zaretskii wrote
> Date: Sat, 11 May 2013 10:27:51 -0700 (PDT)
> From: bsamek <[hidden email]>
>
> My problem is that I can't access C:\Windows\System32 from
> Emacs. For instance, I can't invoke java from the Emacs shell, I
> assume because it's looking in C:\Windows\SysWOW64 and not
> C:\Windows\System32.

Try running Java via a batch file, which you should put somewhere
outside the c:\Windows\System32 tree.
That worked! I found that you can specify the non-WoW64 directory with %windir%\Sysnative.