overtone / emacs-live

M-x start-hacking
http://overtone.github.com/emacs-live/
Other
1.51k stars 241 forks source link

`insert-flash-boilerplate` in `find-file-not-found-hooks` #198

Closed rothmichaels closed 8 years ago

rothmichaels commented 9 years ago

actionscript-mode adds insert-flash-boilerplate to find-file-not-found-hooks. Not only is this being global unnecessary, but it was also introducing bugs.

insert-flash-boilerplate expects a filename variable to be set which is not always the case when running functions in find-file-not-found-hooks (e.g. when calling org-odt-export-to-odt).

FIX: Either remove this function from the hook list, or do this and add a replacement to the actionscript-mode-hook.

rothmichaels commented 9 years ago

I discovered this issue while trying to run org-odt-export-to-odt. My quick workaround to reset find-file-not-found-hooks after loading actionscript-config.el is available at rothmichaels/as-boilerplate-bug. (EDIT: removed branch as updated action script mode, austinhaas/actionscript-mode@f7dd1d77322b49d259919d58ffcdf64073ba6c09, fixes this bug)

After adding this fix, I noticed some other bugs I was having (e.g. correct mode not being set when creating new files in directories other than $PWD) where the message "Wrong type argument: stringp, nil" was displayed. If I remember from my debugging last year, this most likely was what was causing me extra confusion trying to deal with my magic issue at #153. This might also be related to #122, #135, and #144.

I have worked on a better fix for actionscript-mode and opened a pull request: austinhaas/actionscript-mode#9; if it is not accepted, and you'd like my changes as a submodule you can find them here: rothmichaels/actionscript-mode.

rothmichaels commented 8 years ago

This was fixed in #200