{"action":"created","issue":{"url":"https://api.github.com/repos/atom/atom/issues/18314","repository_url":"https://api.github.com/repos/atom/atom","labels_url":"https://api.github.com/repos/atom/atom/issues/18314/labels{/name}","comments_url":"https://api.github.com/repos/atom/atom/issues/18314/comments","events_url":"https://api.github.com/repos/atom/atom/issues/18314/events","html_url":"https://github.com/atom/atom/issues/18314","id":373577160,"node_id":"MDU6SXNzdWUzNzM1NzcxNjA=","number":18314,"title":"External scripting interface","user":{"login":"edahlseng","id":6352776,"node_id":"MDQ6VXNlcjYzNTI3NzY=","avatar_url":"https://avatars3.githubusercontent.com/u/6352776?v=4","gravatar_id":"","url":"https://api.github.com/users/edahlseng","html_url":"https://github.com/edahlseng","followers_url":"https://api.github.com/users/edahlseng/followers","following_url":"https://api.github.com/users/edahlseng/following{/other_user}","gists_url":"https://api.github.com/users/edahlseng/gists{/gist_id}","starred_url":"https://api.github.com/users/edahlseng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edahlseng/subscriptions","organizations_url":"https://api.github.com/users/edahlseng/orgs","repos_url":"https://api.github.com/users/edahlseng/repos","events_url":"https://api.github.com/users/edahlseng/events{/privacy}","received_events_url":"https://api.github.com/users/edahlseng/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-10-24T16:47:46Z","updated_at":"2018-10-24T18:44:07Z","closed_at":"2018-10-24T18:44:07Z","author_association":"NONE","body":"<!--\r\n\r\nHave you read Atom's Code of Conduct? By filing an Issue, you are expected to comply with it, including treating everyone with respect: https://github.com/atom/atom/blob/master/CODE_OF_CONDUCT.md\r\n\r\nDo you want to ask a question? Are you looking for support? The Atom message board is the best place for getting support: https://discuss.atom.io\r\n\r\n---\r\n\r\nKeep in mind that Atom is highly customizable in a number of ways and we strongly prefer that you consider these options before filing this issue:\r\n\r\n* https://flight-manual.atom.io/using-atom/sections/basic-customization/: tweak Atom's configuration, styles, and keybindings.\r\n* https://flight-manual.atom.io/using-atom/sections/atom-packages/: install a community package.\r\n* https://flight-manual.atom.io/hacking-atom/: use the Atom API in your init script, to create a package, or to enhance an existing package.\r\n\r\nIf you're convinced that none of these options are appropriate for the feature you want, please explain why that's the case by completely filling out the issue template below.\r\n\r\nAlso note that the Atom team has finite resources so it's unlikely that we'll work on feature requests. If we're interested in a particular feature however, we'll follow up and ask you to submit an RFC to talk about it in more detail.\r\n\r\n-->\r\n\r\n## Summary\r\n\r\nDoes Atom have a scripting interface for other processes to control it? (I cannot find any information about this, so my guess is not.)\r\n\r\nI'm imagining something similar to an AppleScript interface, whereby other applications and scripts could control Atom to do things like close tabs/panes, collapse or expand items in the tree view, etc.\r\n\r\n## Motivation\r\n\r\nMany times a day I switch between different tasks. Almost every time the first thing I do is close all open tabs within Atom to refocus on the next task at hand. I already have scripts for setting up my git repos when beginning a new task, and thought it would be fun to set up Atom at the same time.\r\n\r\n## Describe alternatives you've considered\r\n\r\nI'm wondering if this could be handled by a package instead, but I'm not familiar enough with the internals of Atom or IPC mechanisms in general to properly weigh the tradeoffs of this approach. Any input or thoughts would be greatly appreciated!\r\n\r\n## Additional context\r\n\r\nN/A\r\n"},"comment":{"url":"https://api.github.com/repos/atom/atom/issues/comments/432780783","html_url":"https://github.com/atom/atom/issues/18314#issuecomment-432780783","issue_url":"https://api.github.com/repos/atom/atom/issues/18314","id":432780783,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMjc4MDc4Mw==","user":{"login":"rsese","id":734194,"node_id":"MDQ6VXNlcjczNDE5NA==","avatar_url":"https://avatars1.githubusercontent.com/u/734194?v=4","gravatar_id":"","url":"https://api.github.com/users/rsese","html_url":"https://github.com/rsese","followers_url":"https://api.github.com/users/rsese/followers","following_url":"https://api.github.com/users/rsese/following{/other_user}","gists_url":"https://api.github.com/users/rsese/gists{/gist_id}","starred_url":"https://api.github.com/users/rsese/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rsese/subscriptions","organizations_url":"https://api.github.com/users/rsese/orgs","repos_url":"https://api.github.com/users/rsese/repos","events_url":"https://api.github.com/users/rsese/events{/privacy}","received_events_url":"https://api.github.com/users/rsese/received_events","type":"User","site_admin":true},"created_at":"2018-10-24T18:44:07Z","updated_at":"2018-10-24T18:44:07Z","author_association":"MEMBER","body":"Thanks for reaching out!\r\n\r\nIf I understand you correctly, yes there's no scripting interface per se, but the Atom API is what people use to customize what they can do with Atom in [packages](https://flight-manual.atom.io/using-atom/sections/atom-packages/) or your [init script](https://flight-manual.atom.io/hacking-atom/sections/the-init-file/):\r\n\r\nhttps://atom.io/docs/api/latest\r\n\r\nParticular packages can also expose a [service API](https://flight-manual.atom.io/behind-atom/sections/interacting-with-other-packages-via-services/) to allow other packages to interact with them in specific ways.\r\n\r\n> Many times a day I switch between different tasks.  Almost every time the first thing I do is close all open tabs within Atom to refocus on the next task at hand. I already have scripts for setting up my git repos when beginning a new task, and thought it would be fun to set up Atom at the same time.\r\n\r\nThere's already a command for closing all tabs (`Tabs: Close All Tabs`) but additionally, commands and composed commands might be something that can help you with some of the customizations you want to do:\r\n\r\n* https://flight-manual.atom.io/behind-atom/sections/keymaps-in-depth/#commands\r\n* http://blog.atom.io/2018/10/09/automate-repetitive-tasks-with-composed-commands.html\r\n\r\nTaking a look at how existing packages work could be helpful too, e.g. around tab closing there's quite a few:\r\n\r\nhttps://atom.io/packages/search?q=close+tabs\r\n\r\nI hope these notes are helpful but in any case, the best place to have discussions like this would be the [Atom Slack](http://atom-slack.herokuapp.com/)) or the [message board](https://discuss.atom.io), especially if you want to get into more lower level detail.\r\n\r\n---\r\n\r\nBecause we treat our issues list as [the Atom team's backlog](https://en.wikipedia.org/wiki/Scrum_(software_development)#Product_backlog), we close issues that are questions since [they don't represent a task needing to be completed](http://blog.atom.io/2016/04/19/managing-the-deluge-of-atom-issues.html). For most questions about Atom there are a lot of options, check out:\r\n\r\n* User Documentation &mdash; [The Atom Flight Manual](http://flight-manual.atom.io)\r\n* Developer Documentation &mdash; [Atom API Documentation](https://atom.io/docs/api/latest)\r\n* FAQ &mdash; [The Atom FAQ on Discuss](https://discuss.atom.io/c/faq)\r\n* Message Board &mdash; [Discuss, the official Atom and Electron message board](https://discuss.atom.io)\r\n* Chat &mdash; [Join the Atom Slack team](http://atom-slack.herokuapp.com/)\r\n\r\nOn Discuss and in the Atom Slack team, there are a bunch of helpful community members that should be willing to point you in the right direction."}}
{"actor":{"display_login":"rsese"}}