oh-my-fish / plugin-emacs

Wrapper for daemon functionality of Emacs.
MIT License
19 stars 10 forks source link

Error on OMF loading when Emacs plugin is installed using Fish 2.7.1 #7

Open Bounga opened 6 years ago

Bounga commented 6 years ago

Hello, I've just upgraded Fish to 2.7.1 (from 2.6 I think) and now I have the following error message every time I open a new term (or when I omf reload):

omf reload  
test returned eval errors:
    invalid integer ''

If I remove the emacs plugin then the error disappears. Debug mode gives me:

<5> fish: intern /Users/nico/.local/share/omf/pkg/emacs/init.fish
<3> fish: path_get_path( 'sed' )
<4> fish: Exec job 'echo $full_version | sed  "s/\..*//"' with id 10
<4> fish: Created pipe using fds 7 and 8
<2> fish: Fork #16, pid 12628: internal builtin for 'echo'
<5> fish: universal log sync
<5> fish: universal log sync elided based on fast stat()
<5> fish: universal log no modifications
<2> fish: Fork #17, pid 12629: spawn external command '/usr/bin/sed' from '/Users/nico/.local/share/omf/pkg/emacs/init.fish'
<3> fish: Job is constructed
<4> fish: Continue job 10, gid 12612 (echo $full_version | sed  "s/\..*//"), UNCOMPLETED, NON-INTERACTIVE
<3> fish: select_try on 5
<3> fish: proc::read_try('echo $full_version | sed  "s/\..*//"')
<3> fish: select_try on 5
<3> fish: proc::read_try('echo $full_version | sed  "s/\..*//"')
<4> fish: io_buffer_t::read: blocking read on fd 5
<4> fish: Exec job 'set -l major_version (echo $full_version | sed  "s/\..*//")' with id 11
<3> fish: Skipping fork: no output for internal builtin 'set'
<3> fish: Set status of set -l major_version (echo $full_version | sed  "s/\..*//") to 0 using short circuit
<3> fish: Job is constructed
<4> fish: Continue job 11, gid -2 (set -l major_version (echo $full_version | sed  "s/\..*//")), COMPLETED, NON-INTERACTIVE
<3> fish: proc::read_try('set -l major_version (echo $full_version | sed  "s/\..*//")')
<4> fish: Exec job 'echo $major_version' with id 10
<3> fish: Skipping fork: buffered output for internal builtin 'echo'
<3> fish: Set status of echo $major_version to 0 using short circuit
<3> fish: Job is constructed
<4> fish: Continue job 10, gid -2 (echo $major_version), COMPLETED, NON-INTERACTIVE
<3> fish: proc::read_try('echo $major_version')
<3> fish: Job is constructed
<4> fish: Continue job 6, gid -2 (__major_version $__emacs), COMPLETED, NON-INTERACTIVE
<3> fish: proc::read_try('__major_version $__emacs')
<4> fish: io_buffer_t::read: blocking read on fd 3
<4> fish: Exec job 'set __emacs_version (__major_version $__emacs)' with id 9
<5> fish: universal log sync
<5> fish: universal log sync elided based on fast stat()
<5> fish: universal log no modifications
<3> fish: Skipping fork: no output for internal builtin 'set'
<3> fish: Set status of set __emacs_version (__major_version $__emacs) to 0 using short circuit
<3> fish: Job is constructed
<4> fish: Continue job 9, gid -2 (set __emacs_version (__major_version $__emacs)), COMPLETED, NON-INTERACTIVE
<5> fish: intern /Users/nico/.local/share/omf/pkg/emacs/init.fish
<4> fish: Exec job 'test "$__emacs_version" -gt 23' with id 6
<3> fish: Skipping fork: ordinary output for internal builtin 'test'
test returned eval errors:
    invalid integer ''
<3> fish: Set status of test "$__emacs_version" -gt 23 to 1 using short circuit

I do think that some internals of Fish have changes and that integer comparison done in this plugin to check Emacs version breaks plugin init.

Hope you can fix it. Feel free to ask me if I can be of any help.

Bounga commented 6 years ago

Any idea or clue about this issue so I can try to fix it and submit a PR? @cap10morgan @bobthecow

tasmo commented 6 years ago

Opened an PR: https://github.com/oh-my-fish/plugin-emacs/pull/8

Bounga commented 6 years ago

@tasmo That's great! Thanks a lot. Hope it will be merged soon.

tasmo commented 6 years ago

@Bounga Meanwhile you can use

omf repositories add https://github.com/tasmo/plugin-emacs.git oh-my-fish
omf rm emacs
omf install https://github.com/tasmo/plugin-emacs.git

and when the PR is merged

omf repositories rm https://github.com/tasmo/plugin-emacs.git oh-my-fish
omf rm emacs
omf install emacs
Bounga commented 6 years ago

That’s what I’m gonna do. Thanks a lot!