Skip to content

improve detection of programs that can open/edit files in Desktop #5411

Open

Description

@shiftkey

Extracted from #4753

Please describe the problem you think should be solved
GitHub Desktop relies on the Electron APIs shell.openInExternal for opening a file in a chosen program. This covers a lot of cases, but as I outlined here some programs will use the edit verb when registering themselves. Electron is hard-coded to look for the open at the verb on Windows, and I'm not aware of whether there's a similar convention in macOS.

The other thing that's unclear is the context menu entry for this: Open with Default Program

Examples:

  • why do i have this option alongside my chosen external editor?
  • it's not clear which program will open this file extension if I click on it
  • if no program exists, should we disable the button?

[Optional] Do you have any potential solutions in mind?

Two ideas:

  • add APIs to Electron to support locating the program associated with a given extension (and optional verb depending on the OS) as well as passing a different verb to openInExternal
  • use a different method to find the program associated with a given extension

These require experience with how each OS that Desktops supports should work, and careful implementation to not introduce any security problems.

Activity

  1. added
    user-research
    on Aug 15, 2018
  2. tom-n-pdx commented on Sep 20, 2018

    @tom-n-pdx

    On both MacOS & Windows my editor is not deteted. And there is no method to provide a path to the editor I'd like to use.

    On Windows I'm using NotePad++ installed with standard configuration - it's not detected.

    Om MacOS I'm using Aquamacs installed with standard configuration - it's not detected.

    Please improve your editor detection - or more reliable - just let provide a path to a editor.

  3. shiftkey commented on Sep 21, 2018

    @shiftkey
    MemberAuthor

    @tom-n-pdx this issue is related to opening specific files and the OS integration there, but it seems like you're talking about the Repository | Open in [Editor] feature? If that's the case, here's some extra context:

    On Windows I'm using NotePad++ installed with standard configuration - it's not detected.

    We tried to add support for that in #4120 but we are unable to pass it a folder to open so that support is on hold (see #4120 (comment)).

    Om MacOS I'm using Aquamacs installed with standard configuration - it's not detected.

    I'm not familiar with this editor. Please check out the macOS editor integration to see what's involved with adding support.

    Please improve your editor detection - or more reliable - just let provide a path to a editor.

    I've outlined my concerns about path-based config here: #2487 (comment)

  4. added
    integrations
    on May 24, 2019
  5. merriam commented on Aug 28, 2019

    @merriam

    So, it sounds like the answer into the near future is that it is not possible to support using most editors? Teams using a variety of editors, e.g., PyCharm, AquaMacs (emacs), Vi, etc., need to move to GitLab? There's no work around of "just launch out to the named editor"?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    integrationsuser-research

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions