[Top][All Lists]

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

Re: [h-e-w] Re: [windows Q] `emacs here' like windows power tool `cmd pr

From: Eli Daniel
Subject: Re: [h-e-w] Re: [windows Q] `emacs here' like windows power tool `cmd prompt here'
Date: Tue, 24 Aug 2010 17:56:17 -0400


I think you're putting the entries for files in the wrong place. 

The * in my instructions was meant literally -- open HKEY_CLASSES_ROOT, and find a key called * (it's the first child of HKEY_CLASSES_ROOT on my XP system).  Open that, and find a child called "shell", creating it if it doesn't exist.  Beneath HKEY_CLASSES_ROOT\*\shell, you can create a key whose name is the name of the menu item you want, and beneath that, create a key called "command".

So for me, the structure looks like:

|-- *
  |-- (... various other things are here)
  |-- shell
    |-- Open with Emacs
      |-- command

If you click on the "command" key, you can then enter a default value for that key on the right-hand side.  This should be the command to run.  If you mis-type this command so that it's not a valid path, or the thing that's at the path isn't executable, you get errors like you describe getting for folders.  So double-check your paths.

As far as regedit is concerned, you're just typing text -- it doesn't know that this is path until it tries to execute it.  So I don't think anything in regedit would be editing or truncating the path you enter.  Are you sure you're not hitting some keystroke accidentally?


On Tue, Aug 24, 2010 at 11:37 AM, Harry Putnam <address@hidden> wrote:
Eli Daniel <address@hidden> writes:

> I have two such commands I use -- one for directories to open in dired, and
> another on files.  To get these, you'll need to edit your registry:
> Under HKEY_CLASSES_ROOT\*\shell, create a key whose name is the text you
> want to see in the Windows context menus for files.  Mine says "Open with
> Emacs".
> Beneath that new key, create another key called command.  Set its default
> value to the command line to run when you choose the menu item.  Mine is:
>     C:\tools\emacs-23.1\bin\emacsclient.exe -n -a
> C:\tools\emacs-23.1\bin\runemacs.exe "%1"
> As soon as you edit this in regedit, you should have a working context-menu
> item for files.
> To get this to work on directories, repeat the same exercise, but put it
> under HKEY_CLASSES_ROOT\Folder\shell.


I've tried both on an WinXP pro sp/3 machine and found neither thing

The attempt for the `file' entry doesn't even show up on right click
at a common file. (May be path related... see below)

The attempt for the `folder' entry shows up on the context menu
alright and apparently tries to work, but throws this error:

 `This file does not have a program associated with it for performing
 this action.  Create an association in the Folder Options control

I'm a bit reluctant to pursue that, afraid I may not be able to back
it out so easy if it does harm.  Did you hit this snag?

I've posted small screen shots of the regedit settings for both
`file' and `folder' here:

Note in the `file' shot... there is one more layer of subdirectory
than might be guessed from your `file' instruction.  Of course your
`*' would allow any number of subdirectories.. so I wonder what you
actually see at that point.

I see:

Rather than:

The two levels `shell/shell was like that when I opened that
area... so not sure if it is significant

-------        ---------       ---=---       ---------      --------

Also note that the value string for the `file' entry will not accept
the path I enter.

  The path should be:
         C:\Users\harry\emacs\bin\runemacs.exe "%1"

And as you see, that is what is entered for the folder entry, but when
I enter that same path above for the `file' entry it becomes reduced
 C:\Users\\emacs\bin\runemacs.exe "%1"

with `harry' missing.

I tried it several times... but the tool regedit

 (v.:5.1 (build 2600.xpsp_sp3.100427-1636:Service Pack 3 .. here))

apparently will not accept that full path for the `file' entry, each
time I enter the full path it is reduced by leaving out `harry'

reply via email to

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