help-emacs-windows
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [h-e-w] Help: NT Emacs and the SendTo menu behaviour...


From: rob . davenport
Subject: Re: [h-e-w] Help: NT Emacs and the SendTo menu behaviour...
Date: Tue, 23 Apr 2002 16:15:40 -0400

[tried sending this earlier, but got a bounce, so I'm retrying.  Sorry if this
is a duplicate.]


This interested me enough to do some digging.  It appears from comments on
various newsgroups that Win98 handles SendTo differently than Win95 or
Win2000/NT.
It probably doesn't handle multiple files, nor command line parameters in the
shortcut.

I wrote a simple app to display the parameters passed on the command line,
put it in the SendTo folder under Win2000, added a parameter to the shortcut
and tried sending multiple selected files to it via SendTo, and lo and behold,
it displayed multiple quoted long filenames and the command-line parameter from
the shortcut.  I don't have Win98 to test this on, perhaps someone could do that
test
and let us know what it does.  That might help us determine what, if anything
can be done.

Maybe wrapping runemacs.exe in a bat file with %1 %2 et al. would work, like
cquirke
suggests below.  But if SendTo does the SHIFT thing as claimed by another person
and if it starts a seperate instance for each filename, then that won't work and
there
may not be anything that can be done under Windows98.  We need more data on how
the Win98 SendTo actually operates.

Rob

Detailed search results:

*** GUI Supports SFN multiple files or a single LFN file parameter ***

From: http://home.online.no/~pethesse/chapter7.html
(a sample chapter from the book Programming Industrial Strength Windows,
 by  address@hidden), the author seems to indicate that the
[Windows] GUI will send to programs EITHER:
- One or more 8.3 file names separated by spaces
- OR A single long file name enclosed in double quotes

[Not true under Windows2000, I got multiple long filenames.  Maybe it's just
Win9x.]


*** SendTo doesn't support parameters or multiple files ***

address@hidden, in comp.os.ms-windows.win95.misc, 1999/04/11 wrote:
>
>1)  You cannot use CLI parameters, e.g. Scan.exe /All /Sub /NoMem, as
>these are not passed to the command.  As a workaround, create a .bat
>that uses the parms you want (e.g. @Scan.exe %1 /All /Sub /NoMem)
>
>2)  If you select multiple items and Send To, you may find only the
>first item is processed - even if you use %1 %2 %3 %4 %5 %6 %7 %8 %9
>in the .bat file example above.

and again (1999/11/16):
>2)  SendTo does not support multiple selected files; only one of these
>will actually be sent to anything
>
>3)  SendTo does not support command line parameters, so if your
>command line needs these, wrap it in a .bat

But some people disagreed:
>
>"but SendTo can support mutliple selections. Many applications will not but
that is not
>necessarily the fault of SendTo." Alan Edwards 1999/11/17

and still later (2000/02/29) in microsoft.public.win98.gen_discussion, cquirke
wrote:
>
>1)  Send To does not pass literal command line parameters
>Whereas an action set up in File Types to do (say) SomeApp.exe
>/Parameter will be run as SomeApp.exe %1 /Parameter, Send To will run
>it as SomeApp.exe %1 - i.e. any command line parameters are ignored.
>
>2)  Multiple selections
>Whereas passing multiple files to a Rt-click action will parse all
>files in the selection, Send To may vary in this regard (?)
>
>3)  LFNs
>Because of (1), you cannot use the explicit "%1" dodge as a workaround
>for apps that parse the first space as a parameter delimiter.  If you
>need to use this fix, or use command line parameters, wrap your app in
>a .bat i.e. SomeApp.bat = SomeApp.exe "%1" /Parameter etc.
>
>4)  User profiles
>Like other shell folders such as Desktop and Start Menu, Send To may
>be instanced on a per-user basis.  If so, then Send To shortcuts you
>create may only apply to the user you are logged in as, or to .Default
>(as in pressing Esc at logon prompt).  To add Send To actions to all
>users, look for an All Users profile, else RegEdit and eyeball Shell
>folders for each user in HKEY_USERS, i.e.
>HKU\{user}\Software\Microsoft\Windows\CurrentVersion\
>Explorer\Shell Folders


*** SendTo operates as a SHIFT command ***

Walter Zackery (address@hidden) in  alt.msdos.batch, 1999/03/13
writes:
>Clay is correct about the behavior of the Sendto directory. It works
>very much in the same fashion that the SHIFT command does. It passes
>each filename sent to it to the executable in question as the %1
>parameter. As each filename is processed, it is shifted one parameter
>to the left and then the next %1 parameter is processed, etc. Because
>of this processing method, it's impossible to retain any parameters to
>the executable beyond %1 without using something analogous to
>environmental variables, which Microsoft didn't bother to do.






reply via email to

[Prev in Thread] Current Thread [Next in Thread]