2

I have checked through similar questions concerning chocolately/choco on windows powershell but I still can't find the answer to this simple one:

How do you open a package after it's been installed via chocolatey? I am attempting to open emacs within powershell. I have installed chocolatey with powershell as administrator rights and installed emacs via choco. Choco recognizes emacs as already installed

Warnings: - emacs - emacs v26.2.0.20190417 already installed. Use --force to reinstall, specify a version to install, or try upgrade.

So far, I have called

>choco emacs
>choco ./emacs
>emacs
>./emacs
2
  • so this is specifically using chocolatety, which doesn't appear to produce an emacs.exe
    – Justin
    Commented Sep 30, 2019 at 20:30
  • Sad and frustrating this has gone unanswered for so long. Why? This is an obvious problem with Chocolatey documentation and the clarity around how it installs and how to run/launch installed packages. You would think this would be basic info included in the basic documentation...
    – skeetastax
    Commented Jun 26, 2023 at 3:02

1 Answer 1

0

I'll split this answer into two halves - first, talking about Chocolatey packages in general:

How to open a given application hugely depends on the package, and what it's installing (if anything).

CLI applications will generally end up with a shim created, which will allow you to call it on the command-line.

Applications that use a more traditional installer may end up with a shortcut on the desktop, in the start menu, or neither of the above. This absolutely depends on the installer, and if any further logic is applied in the specific package.

To be more specific, then:

The package you are specifically asking about, emacs, is now a metapackage that depends on emacs.portable. The version you're talking about (26.2.0.20190417) wasn't, but had similar functionality.

The install script unzips a selection of files to the $env:ChocolateyInstall\lib\emacs\ directory, including a \bin\ folder with emacs.exe etc.

Shows the emacs bin folder

Some shims are then created, pointing to emacs, emacsclient, emacsclientw, and runemacs. You can find these in $env:ChocolateyInstall\bin, which should be on PATH.

Shows shim generation and emacs.exe available in PowerShell

They should launch when you call emacs (or one of the other commands) from any commandline, though if you just installed Chocolatey you may need to refresh your environment variables or restart your session.

The latest version of the package will actually install to your tools directory (C:\tools\emacs by default).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .