GNOME Bugzilla – Bug 627223
gtkdoc-fixxref vim highlight fails on xhtml suffix
Last modified: 2010-08-19 14:55:46 UTC
There's following call in fixxref: system "echo 'let html_number_lines=0|let html_use_css=1|let use_xhtml=1|syn on|e $temp_source_file|run! syntax/2html.vim|wa!|qa!' | /usr/bin/vim -n -e -u NONE -T xterm > /dev/null"; use_xhtml=1 causes destination file to be called $temp_source_file.xhtml but fixxref expects .html suffix: open (NEWFILE, "<$temp_source_file.html"); Tested with gtk-doc 1.15 and vim 7.2/7.3 on gentoo linux. I'm not sure what fix would be sufficient - maybe fixxref should force the destination filename?
david, any suggestions?
A simple fix is to write the modified vim buffer with a specified filename. Replace: |wa! with |w! $temp_source_file.html
Also note that the "-u NONE" in the original post comes from a Gentoo patch. The Gnome project's gtk-doc still has "-u /dev/null" here, I think (it certainly does in gtk-doc-1.15). See bug #612028 regarding that.
(In reply to comment #2) > |w! $temp_source_file.html I tested above change and it seems to work ok (libgnome build finished successfully). Vim 7.3
Regarding -u my vim manpage says: -u {vimrc} Use the commands in the file {vimrc} for initializations. All the other initializations are skipped. Use this to edit a special kind of files. It can also be used to skip all initializations by giving the name "NONE". See ":help initialization" within vim for more details. I can certainly change that too. Does it matter. David, should I. Seems to work both ways for me. Ian, is there any comment attached to that change on the gentoo side?
(In reply to comment #5) > Regarding -u my vim manpage says: > -u {vimrc} Use the commands in the file {vimrc} for initializations. > All the other initializations are skipped. Use this to edit a special kind of > files. It can also be used to > skip all initializations by giving the name "NONE". See > ":help initialization" within vim for more details. > > I can certainly change that too. Does it matter. David, should I. Seems to work > both ways for me. Ian, is there any comment attached to that change on the > gentoo side? Yes, see bug #612028 for the link to the downstream Gentoo bug <http://bugs.gentoo.org/show_bug.cgi?id=306569>, where -u /dev/null caused vim to create swapfiles in some weird circumstances, despite the -n option.
commit 2bffebcf9c125f5610b8fb660d42c3c5b9dfd4f0 Author: Stefan Kost <ensonic@users.sf.net> Date: Thu Aug 19 17:45:54 2010 +0300 fixxref: tweak the vim invocation Use specific output-filename to ensure we get what we'll late use. Use "-u NONE" instead of -u /dev/null. Fixes #627223