hi, i originally started this thread on vim_use but think it might have been better on vim_dev.
in short, is there any way i can get an x11/motif gvim-7.3.706+ not to emit a large, ugly E250 message and continue prompt everytime it starts? i include a little patch that i can resort to loocally but it completely eradicates the E250 message which others presumably want so it doesn't seem like a good idea in general. cheers, raf ----- Forwarded message from raf <[email protected]> ----- Subject: Re: macosx x11/motif gvim-7.3.706+ E250 dialog on startup From: raf <[email protected]> To: [email protected] Date: Wed, 17 Apr 2013 12:05:31 +1000 Delivered-To: [email protected] Mail-Followup-To: [email protected] Reply-To: [email protected] Tony Mechelynck wrote: > On 16/04/13 06:47, raf wrote: > >hi, > > > >i just installed an x11/motif version of vim-7.3.905 from source > >on macosx-10.6.8 and, every time it starts, i get an error dialog > >that says: > > > > E250: Fonts for the following charsets are missing in fontset > > -misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso10646-1: > > [...lots of charsets elided...] > > > >my font is: > > set > > guifont=-misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso10646-1 > > > >it works fine up to patch 7.3.696. > >the motif version doesn't compile between patches 7.3.697 and 7.3.705. > >the error message appears as of patch 7.3.706 which got the motif version > >to compile again. > 7.3.697 is about "leaking resources when setting GUI font" which > means at least some font routines were changed. A quick search > through ftp://ftp.vim.org/pub/vim/patches/7.3/README shows some other > font-related patchlevels after that, but all concerning either > MS-Windows or 'guifontwide'. > > Have you set the 'guifontset' and/or 'guifontwide' options? Doing > :verbose set gfs? gfw? > will tell you. I recommend to leave them at their empty default > unless (a) you know what you do, and (b) you have > ÜBER-extra-super-hyper-duper-important reasons not to leave them > empty. no. i only set guifont. and, as i said, the problem happens even when guifont is not set to anything (i.e. its default value) and with gvim -u NONE -U NONE. > What happens if you use > :set gfs= gfw= gfn=-*-courier-medium-r-normal-*-*-120-*-*-m-*-* > ? This is a pretty common font, and (I hope) should not give errors. fixed is also a very common font in X11. it's in every installation and always has been. but to answer the question, setting guifont interactively is not an issue. there's no error there whether i use fixed or courier. the problem is setting guifont in ~/.gvimrc (or just starting the gui without setting the font) which causes the error message and the need to "Press ENTER or type command to continue" before i can see the file content. the error message i get for -*-courier-medium-r-normal-*-*-120-*-*-m-*-* is very similar: E250: Fonts for the following charsets are missing in fontset -*-courier-medium-r-normal-*-*-120-*-*-m-*-*-*: ISO8859-5 KOI8-R ISO8859-7 JISX0208.1983-0 KSC5601.1987-0 GB2312.1980-0 JISX0201.1976-0 E250: Fonts for the following charsets are missing in fontset -*-courier-medium-r-normal-*-*-120-*-*-m-*-*-*: ISO8859-5 KOI8-R ISO8859-7 JISX0208.1983-0 KSC5601.1987-0 GB2312.1980-0 JISX0201.1976-0 so it's not the choice of font that is the problem. it is the fact that vim thinks that it needs to warn me about the fact that certain obscure character sets that i don't use are not supported by the chosen (or default) font. > OTOH, if even the above generalized Courier font gives you similar > errors, then maybe there are needed X11 fonts which haven't been > installed on your system. In that case, check the optional packages > available for your OS, and see if some of them aren't about fonts, or > maybe about language packs. the font is working fine. i shouldn't have to install extra versions of a font for character sets that i am never going to use just to suppress this error message. > See also http://vim.wikia.com/wiki/Setting_the_font_in_the_GUI thanks but that doesn't mention anything about suppressing this error message. > Best regards, > Tony. thanks for the attempt. it's appreciated. what would "fix" the problem is the following patch: --- src/syntax.c.orig 2013-04-17 10:49:07.000000000 +1000 +++ src/syntax.c 2013-04-17 10:49:21.000000000 +1000 @@ -8054,7 +8054,7 @@ fontset_name2handle(name, fixed_width) if (STRCMP(name, "NONE") == 0) return NOFONTSET; - return gui_mch_get_fontset(name, TRUE, fixed_width); + return gui_mch_get_fontset(name, FALSE, fixed_width); } # endif the FALSE disables the warning but that seems a bit harsh. presumably someone else wants this error message to appear. alternatively, passing --disable-fontset to configure should make it go away but it doesn't. src/feature.h contains the following which turns it back on: # if !defined(FEAT_XFONTSET) && defined(HAVE_X11) && !defined(FEAT_GUI_GTK) # define FEAT_XFONTSET /* Hangul input requires xfontset */ # endif but the comment and the code don't seem to agree. it's as if the absence of FEAT_GUI_GTK implies a desire for hangul input. shouldn't this look like the following instead (assuming that the comment is right rather than the code)?: # if !defined(FEAT_XFONTSET) && defined(HAVE_X11) && defined(FEAT_HANGULIN) # define FEAT_XFONTSET /* Hangul input requires xfontset */ # endif but that doesn't help. there are two other places in src/feature.h that turn on FEAT_XFONTSET. it seems unavoidable if you want multibyte in X11 without gtk (which i do). putting "silent! " before the "set guifont" command doesn't have any effect. the error message and the prompt to continue still appear. i guess it's not the setting of the font that is generating the error, but rather the "getting" of the fontset in gui_mch_get_fontset() which seems to happen when the gui is activated. yes, running "vim -u NONE -U NONE" and then entering ":silent! gui" starts the gui without the error messages but that's no use when i run gvim itself. it's a pity there isn't a command to disable an error message by number. i guess i'll have to resort to the above patch unless someone has a good solution. cheers, raf ----- End forwarded message ----- -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
