Skip to content

add atom to possible editors - #356

Merged
RobinDaugherty merged 2 commits into
BetterErrors:masterfrom
nplusp:master
Jun 24, 2018
Merged

RobinDaugherty merged 2 commits into
BetterErrors:masterfrom
nplusp:master

Conversation

@nplusp

@nplusp nplusp commented Oct 20, 2016 •

Copy link
Copy Markdown
Contributor

No description provided.

@WizardOfOgz

Copy link
Copy Markdown

@nplusp What are using to handle URLs with the atom:// protocol and have files opened in Atom?

RobinDaugherty added a commit to RobinDaugherty/better_errors that referenced this pull request Jul 27, 2017
@RobinDaugherty RobinDaugherty added this to the v2.2 milestone Jul 29, 2017
@RobinDaugherty

RobinDaugherty commented Jul 29, 2017 •

Copy link
Copy Markdown
Member

This is an attempt at implementing #314. Unfortunately Atom doesn't handle atom:// URLs correctly so until that's fixed, this change seems to be the wrong idea. We could instead implement the atm:// scheme, but that's only supported with a plugin, and then what will we do once Atom fixes their issue?

@RobinDaugherty RobinDaugherty removed this from the v2.2 milestone Jul 29, 2017
@RobinDaugherty

Copy link
Copy Markdown
Member

Instructions for the interim solution are in the wiki for now.

@shanept

shanept commented Aug 17, 2017

Copy link
Copy Markdown

Hi guys,

I'm currently working on this feature for Atom. See atom/atom#14243

Thanks

@BinaryMuse BinaryMuse mentioned this pull request Oct 19, 2017
2 tasks done
@UziTech

UziTech commented Nov 8, 2017 •

Copy link
Copy Markdown

This pull request should work in Atom v1.23.0 (which is in beta right now) with the open package

https://github.com/charliesome/better_errors/wiki/Link-to-your-editor#atom

Comment thread lib/better_errors.rb Outdated

module BetterErrors
POSSIBLE_EDITOR_PRESETS = [
{ symbols: [:atom], sniff: /atom/i, url: "atom://open?url=file://%{file}&line=%{line}" }

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

needs a comma at the end

@nplusp

nplusp commented Nov 10, 2017

Copy link
Copy Markdown
Contributor Author

@UziTech rebased on master and added comma

@nplusp
nplusp force-pushed the master branch 3 times, most recently from 7f2e556 to c01e66f Compare November 10, 2017 09:40
@BinaryMuse

Copy link
Copy Markdown

Starting in Atom 1.23, this will be supported in Atom core via atom/atom#15935. The URL format is atom://core/open/file?filename=urlEncodedFileName&line=n&column=n. The primary benefit of using the core handler instead of a third-party package is that the core handler will attempt to search all windows to try to find the one that most likely contains the file in question.

@nplusp

nplusp commented Nov 15, 2017

Copy link
Copy Markdown
Contributor Author

@BinaryMuse thanks! I've updated my PR respectively. ❤️🎉

@RobinDaugherty

Copy link
Copy Markdown
Member

Since this version of Atom is still in beta (and there's a minor inconsistency with line number handling) I've updated the wiki page to include instructions for the current beta.

@BinaryMuse

Copy link
Copy Markdown

@RobinDaugherty I've merged a fix to the off-by-one issue into Atom master and into the current beta branch, and it will ship with the next beta hotfix (or the next stable release, whichever comes first).

One quick note: URI handling for the atom:// protocol doesn't work prior to Atom 1.23, even with third-party packages installed (as opposed to what the current wiki article states).

@RobinDaugherty

Copy link
Copy Markdown
Member

Thanks @BinaryMuse! I've updated the wiki page to reflect that.

@RobinDaugherty
RobinDaugherty merged commit 267297b into BetterErrors:master Jun 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants