Skip to content
This repository was archived by the owner on Mar 3, 2023. It is now read-only.

Allows atom to open local files by URL scheme - #14243

Closed
shanept wants to merge 10 commits into
atom:masterfrom
shanept:master
Closed

shanept wants to merge 10 commits into
atom:masterfrom
shanept:master

Conversation

@shanept

@shanept shanept commented Apr 18, 2017 •

Copy link
Copy Markdown

Description of the Change

The change allows the editor to open local files based on a URL handler. This functionality is common in other editors, such as sublime and emacs

Alternate Designs

No alternates. Some people have suggested using the 'atom:' scheme, however that is already in use for packages. WizardOfOgz has made a script to act like a wrapper around atom, essentially translating a URI scheme to a file and passing it to atom.

Some notable discussions requesting such a feature:
https://discuss.atom.io/t/atom-protocol-handler/13336
Also see issue #2037

Why Should This Be In Core?

This can not be implemented in a package as it is, by design, core behaviour.

Benefits

This shall allow files to be opened by URL.

Possible Drawbacks

None.

Applicable Issues

In my personal use-case, I will be using the PHP Whoops package to handle exceptions in web-development. It will present me with a page with a URL to the file/line/column which I can then click and it will open it straight in the atom editor at the exact point at which the error occured.

Still to be done

  • Register atm handler with windows - UNTESTED

  • Register atm handler with OSX

@shanept

shanept commented Apr 24, 2017

Copy link
Copy Markdown
Author

I am currently unable to create an installer on Windows to test a registry insertion that this PR introduces. Issue is at #14264
This is the only thing stopping this PR being completed.

@ericclemmons

Copy link
Copy Markdown

Is this still blocked by Windows support, or is it something that can be split so that the Mac handler can ship first?

@shanept

shanept commented Aug 15, 2017

Copy link
Copy Markdown
Author

Hi Eric,

The handler is fully functional on Mac and Linux. Windows support simply needs testing then it should be ready to go provided testing passes.

I'll get to testing windows again later today. Thanks for the nudge.

@shanept

shanept commented Aug 17, 2017

Copy link
Copy Markdown
Author

Progress update...

I'm so close. The final key to this being done is writing the URL scheme to the registry under HKEY_CLASSES_ROOT (HKCR). HKCR requires administrator privileges to be written to, something that the atom installer specifically disallows.

So currently, the only thing stopping this being complete is the design of the installer, that which will not change for anything or anyone. They have done this for 'ease of installation', and there are a lot of people up in arms over it, and I tend to agree. However nothing I will say will be able to sway this decision.

The only solution I can think of now is to have atom request these administrator privileges the first time it is run, which is far from the nicest solution but the only solution that I think may work.

Hopefully this will be sorted soon.

@BinaryMuse

Copy link
Copy Markdown
Contributor

Thanks for this PR! ❤️

This functionality is enabled by #11399 and #15935, so I'm going to close this in favor of those. Please let me know if you have questions or comments!

@BinaryMuse BinaryMuse closed this Oct 19, 2017
@shanept

shanept commented Oct 20, 2017

Copy link
Copy Markdown
Author

That's great, I saw the PR yesterday. Awesome stuff

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants