Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new versions of vim don't come with 'tags' helpfile #1087

Closed
kevinushey opened this issue May 12, 2016 · 8 comments
Closed

new versions of vim don't come with 'tags' helpfile #1087

kevinushey opened this issue May 12, 2016 · 8 comments

Comments

@kevinushey
Copy link
Contributor

Newer versions of Vim built through Homebrew don't seem to come with a help tags file -- this means that attempting to execute :help after installing vim returns the somewhat nebulous error:

:help
E433: No tags file
E149: Sorry, no help for help.txt

This can be resolved by manually building the tags file, e.g.

:helptags $VIMRUNTIME/doc

but it would be nice if the homebrew formula built these (e.g. as a post-install step). A simple way to accomplish this seems to be with e.g.

vim --cmd 'helptags $VIMRUNTIME/doc' --cmd 'qall'

although I wonder why the tags file is not generated as part of the regular installation step anymore.

@chdiza
Copy link
Contributor

chdiza commented May 12, 2016

Building Vim from head outside of Homebrew doesn't exhibit this. Also, I can see by inspecting the tarball that the tags file is present prior to compilation. If I build from the upstream tarball, but not using Homebrew, I don't see the problem.

@chdiza
Copy link
Contributor

chdiza commented May 12, 2016

I can, however, reproduce by brewing Vim in homebrew.

Inspection of the logs reveals that the tags file installation step is borked in Homebrew:

cp -r ../runtime/pack/* /usr/local/Cellar/vim/7.4.1830/share/vim/vim74/pack
/bin/sh ./installman.sh xxd /usr/local/Cellar/vim/7.4.1830/share/man/it/man1 "-it" /usr/local/Cellar/vim/7.4.1830/share/vim /usr/local/Cellar/vim/7.4.1830/share/vim/vim74 /usr/local/Cellar/vim/7.4.1830/share/vim ../runtime/doc 644 vim vimdiff evim
/usr/local/Cellar/vim/7.4.1830/bin/vim -u NONE -esX -c "helptags ++t ." -c quit
creating /usr/local/Cellar/vim/7.4.1830/share/man/it/man1
make[2]: *** [vimtags] Killed: 9
make[1]: [installrtbase] Error 2 (ignored)

I have no idea why.

@kevinushey
Copy link
Contributor Author

kevinushey commented May 12, 2016

I'm pretty far out of my element, but I wonder if there's some bad interaction with how homebrew handles stdin/stdout, and non-interactive calling of Vim from ruby?

I tried adding my own call to vim to build the helptags, e.g. in the Homebrew recipe:

system "#{prefix}/bin/vim", "--cmd", 'helptags $VIMRUNTIME/doc'", "--cmd", "quit"

but this just hangs as well.

@chdiza
Copy link
Contributor

chdiza commented May 13, 2016

Perhaps it's a sandbox thing.

Vim has messed around with the code for generating and installing helptags files recently, like in the last month I'd say.

@DomT4
Copy link
Member

DomT4 commented May 13, 2016

Perhaps it's a sandbox thing.

Shouldn't be. Install steps are allowed to do whatever they like to inside their own prefix.

@DomT4
Copy link
Member

DomT4 commented Jun 4, 2016

I can no longer reproduce this. Can anyone else?

@DomT4 DomT4 added the needs response Needs a response from the issue/PR author label Jun 4, 2016
@kevinushey
Copy link
Contributor Author

This still reproduces for me, unfortunately. I installed vim with:

$ brew install vim --verbose --with-client-server --with-lua --with-luajit --with-tcl

I see in the logs:

/usr/local/Cellar/vim/7.4.1864_1/bin/vim -u NONE -esX -c "helptags ++t ." -c quit
/bin/sh: /usr/local/Cellar/vim/7.4.1864_1/bin/vim: No such file or directory
make[2]: *** [vimtags] Error 127
make[1]: [installrtbase] Error 2 (ignored)

Which is pretty bizarre (and seems different from the error reported by @chdiza). I even see earlier in the logs:

cp vim /usr/local/Cellar/vim/7.4.1864_1/bin

Which I assume implies vim should be available in the directory it's looking at. Unless someone else can reproduce this, it may just be a local issue?

@ghost ghost removed the needs response Needs a response from the issue/PR author label Jun 4, 2016
@kevinushey
Copy link
Contributor Author

Since nobody else has chimed in, I'm going to close this (I assume that if this were a problem a lot more people would have been affected by this).

If anyone else bumps into this, you can just add this snippet to your .vimrc to automagically generate the helptags file as needed:

" Ensure that helptags are generated for the vim help directory
let g:DocPath = expand("$VIMRUNTIME/doc")
let g:DocTags = join([g:DocPath, "tags"], "/")
if !filereadable(g:DocTags)
    execute join(["helptags", g:DocPath])
endif

@Homebrew Homebrew locked and limited conversation to collaborators May 4, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants