Closed cameronmcefee closed 10 years ago
@cameronmcefee I just merged this PR, and published 0.1.1. Can you try fetching that and try again?
The problem still persists. I'm getting this in the log:
Failed to activate package named 'emmet' TypeError: Cannot call method 'eachEditorView' of undefined
at Object.module.exports.activate (/Users/cameronmcefee/.atom/packages/emmet/lib/emmet.coffee:36:63)
at AtomPackage.module.exports.AtomPackage.activateNow (/Applications/Atom.app/Contents/Resources/app/src/atom-package.js:129:27)
at /Applications/Atom.app/Contents/Resources/app/src/atom-package.js:118:24
at AtomPackage.module.exports.Package.measure (/Applications/Atom.app/Contents/Resources/app/src/package.js:91:7)
at AtomPackage.module.exports.AtomPackage.activate (/Applications/Atom.app/Contents/Resources/app/src/atom-package.js:113:19)
at PackageManager.module.exports.PackageManager.activatePackage (/Applications/Atom.app/Contents/Resources/app/src/package-manager.js:99:14)
at PackageManager.module.exports.PackageManager.activatePackages (/Applications/Atom.app/Contents/Resources/app/src/package-manager.js:87:14)
at PackageManager.module.exports.PackageManager.activate (/Applications/Atom.app/Contents/Resources/app/src/package-manager.js:74:19)
at Atom.module.exports.Atom.startEditorWindow (/Applications/Atom.app/Contents/Resources/app/src/atom.js:208:21)
at Object.<anonymous> (/Applications/Atom.app/Contents/Resources/app/src/window-bootstrap.js:14:8)
at Object.<anonymous> (/Applications/Atom.app/Contents/Resources/app/src/window-bootstrap.js:18:4)
at Module._compile (module.js:471:26)
at Object.Module._extensions..js (module.js:489:10)
at Module.load (/Applications/Atom.app/Contents/Resources/app/node_modules/coffee-script/lib/coffee-script/coffee-script.js:211:36)
at Function.Module._load (module.js:327:12)
at Module.require (module.js:379:17)
at require (module.js:395:17)
at window.onload (file:///Applications/Atom.app/Contents/Resources/app/static/index.html:12:9)
I think some of the exposed API names changed. I'll take a look at it. What version of Atom are you on? It might be that you're not on the latest Atom, since it's complaining about atom.workspaceView.
cc @kevinsawicki in case he knows what name changed.
@gjtorikian the changes I think you're looking for are here https://github.com/atom/atom/pull/1169, sorry we haven't gotten around to adding it to the release notes yet.
@cameronmcefee what version of atom are you on and what version of emmet?
Atom is 39.0. Emmet is whatever version comes down when I run apm install emmet
So it looks like emmet@0.1.2 was published with fixes for unreleased atom changes causing this incompatibility.
Can you try running apm install emmet@0.1.1
?
Doing that removed the console error, but the expansion still does not work. Looking at the keymap logger, cmmd + E
is being recognized correctly as emmet:expand-abbreviation
but no action is happening. tab
is also being being recognized correctly as emmet:expand-abbreviation-with-tab
, with no emmet related action happening. Atom does insert a tab though.
cmmd + E
expansion started working again this evening. Tab expansion is still being overridden by snippets.
Tab expansion seems to be a mixed bag. h1<tab>
will expand to <h1 id="${1/[[:alpha:]]+|( )/(?1:_:\L)/g}">$TM_SELECTED_TEXT</h1>
while h2<tab>
expands to <h2></h2>
I thought the fix for this would just be a quick revert of the earlier change for Atom 40.0 but yeah man, this is really funked up. The specs are failing for no discernible reason (i.e. they work in real life, but fail when running). I can also reproduce the h1
craziness. Note that h1
with the keybinding (cmd-E
) does work for some reason.
I'm looking into it but it's turning into something longer than I expected for right now.
If I'm judging the key binding logger correctly, I think snippets:expand
overrides emmet:expand-abbreviation-with-tab
. I wonder if there's a snippet for h1
but not for h2
, so in the h2 case, the emmet expand wins since there's nothing for snippets to expand.
@cameronmcefee Good idea, and bingo: https://github.com/atom/language-html/blob/master/snippets/XHTML-h1-.json
I wonder if this problem has always been the case.
Well, I fixed a majority of the tab bugs (except the fact that h1
and other snippets fall back to the Atom defaults, not the Emmet one): https://github.com/atom/emmet/pull/18
Unfortunately it looks like publishing packages is busted! https://github.com/atom/apm/issues/38
@cameronmcefee emmet's been udpated to 0.1.4. That should fix a majority of the expansion issues. I'll take a look at the snippet overriding later this week.
Yesssss thank you!
I'm convinced the HTML expansion issues are from Atom-core: https://github.com/atom/language-html/issues/1
Turning off Emmet yields the same error(s).
Somewhere in the middle of the day
tab
expansion stopped working. As far as I know, I didn't change anything. If you look at the keymap logger it's still catching the binding, it just doesn't expand.meta
+E
does still work.