After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 627223 - gtkdoc-fixxref vim highlight fails on xhtml suffix
gtkdoc-fixxref vim highlight fails on xhtml suffix
Status: RESOLVED FIXED
Product: gtk-doc
Classification: Platform
Component: general
1.15
Other Linux
: Normal normal
: 1.16
Assigned To: gtk-doc maintainers
gtk-doc maintainers
Depends on:
Blocks:
 
 
Reported: 2010-08-18 01:18 UTC by Marcin Gryszkalis
Modified: 2010-08-19 14:55 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Marcin Gryszkalis 2010-08-18 01:18:50 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?
Comment 1 Stefan Sauer (gstreamer, gtkdoc dev) 2010-08-18 09:19:41 UTC
david, any suggestions?
Comment 2 Ian Abbott 2010-08-18 15:28:37 UTC
A simple fix is to write the modified vim buffer with a specified filename. Replace:

|wa!

with

|w! $temp_source_file.html
Comment 3 Ian Abbott 2010-08-18 15:33:43 UTC
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.
Comment 4 Marcin Gryszkalis 2010-08-18 16:07:38 UTC
(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
Comment 5 Stefan Sauer (gstreamer, gtkdoc dev) 2010-08-19 10:51:58 UTC
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?
Comment 6 Ian Abbott 2010-08-19 13:52:40 UTC
(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.
Comment 7 Stefan Sauer (gstreamer, gtkdoc dev) 2010-08-19 14:55:46 UTC
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