Loading ...
Sorry, an error occurred while loading the content.

Fwd: Re: macosx x11/motif gvim-7.3.706+ E250 dialog on startup

Expand Messages
  • raf
    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+
    Message 1 of 8 , Apr 17 11:58 PM
    • 0 Attachment
      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 <raf@...> -----

      Subject: Re: macosx x11/motif gvim-7.3.706+ E250 dialog on startup
      From: raf <raf@...>
      To: vim_use@...
      Date: Wed, 17 Apr 2013 12:05:31 +1000
      Delivered-To: raf@...
      Mail-Followup-To: vim_use@...
      Reply-To: vim_use@...

      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 vim_dev+unsubscribe@....
      For more options, visit https://groups.google.com/groups/opt_out.
    • Roland Eggner
      Hi ! ... Maybe your problem is caused by a discrepancy between locale configuration and installed fonts. Suggestion (should work on Gentoo Linux,
      Message 2 of 8 , Apr 26 3:52 AM
      • 0 Attachment
        Hi <raf@...>!

        On 2013-04-18 Thursday at 13:28 +1000 <raf@...> in another thread wrote:
        > Roland Eggner wrote:
        > > :!locale
        >
        > LANG="en_AU.UTF-8"
        > LC_COLLATE="en_AU.UTF-8"
        > LC_CTYPE="en_AU.UTF-8"
        > LC_MESSAGES="en_AU.UTF-8"
        > LC_MONETARY="en_AU.UTF-8"
        > LC_NUMERIC="en_AU.UTF-8"
        > LC_TIME="en_AU.UTF-8"
        > LC_ALL=
        >
        > > :!locale -a
        >
        > i've skipped all of the non-english ones.
        > there are many.
        >
        > en_AU
        > en_AU.ISO8859-1
        > en_AU.ISO8859-15
        > en_AU.US-ASCII
        > en_AU.UTF-8
        > en_CA
        > en_CA.ISO8859-1
        > en_CA.ISO8859-15
        > en_CA.US-ASCII
        > en_CA.UTF-8
        > en_GB
        > en_GB.ISO8859-1
        > en_GB.ISO8859-15
        > en_GB.US-ASCII
        > en_GB.UTF-8
        > en_IE
        > en_IE.UTF-8
        > en_NZ
        > en_NZ.ISO8859-1
        > en_NZ.ISO8859-15
        > en_NZ.US-ASCII
        > en_NZ.UTF-8
        > en_US
        > en_US.ISO8859-1
        > en_US.ISO8859-15
        > en_US.US-ASCII
        > en_US.UTF-8
        > C
        > POSIX

        On 2013-04-18 Thursday at 16:58 +1000 <raf@...> wrote:
        > ----- Forwarded message from raf <raf@...> -----
        > Subject: Re: macosx x11/motif gvim-7.3.706+ E250 dialog on startup
        > From: raf <raf@...>
        > To: vim_use@...
        > Date: Wed, 17 Apr 2013 12:05:31 +1000
        > Mail-Followup-To: vim_use@...
        > Reply-To: vim_use@...
        >
        > … …
        >
        > 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.

        Maybe your problem is caused by a discrepancy between locale configuration and
        installed fonts.

        Suggestion (should work on Gentoo Linux, please tune to your macosx system):

        (1) Uninstall locales, which you do not use, e.g.
        su vim /etc/locale.gen
        :v/\v^(#|en_(AU|NZ|US)| … )/s/^/# /
        :wq
        su /usr/sbin/locale-gen
        To take effect your GUI (X-server?) probably needs to be restarted.
        Theoretically your system should become slightly faster, consume slightly less
        disk space, and become slightly less vulnerable in terms of security … all
        3 should not hurt, or what would you say?

        (2) “locale -a” should list ONLY locales, which you want to use. Install fonts
        for ANY of the listed locales.

        Documentation:
        man locale-gen locale.gen
        :h xfontset


        --
        Regards
        Roland Eggner
      • raf
        ... hi roland, thanks. that sounds like a good plan but there doesn t seem to be a system-supported way to uninstall locales from macosx. /etc/locale.gen etc.
        Message 3 of 8 , Apr 29 6:57 PM
        • 0 Attachment
          Roland Eggner wrote:

          > Maybe your problem is caused by a discrepancy between locale configuration and
          > installed fonts.
          >
          > Suggestion (should work on Gentoo Linux, please tune to your macosx system):
          >
          > (1) Uninstall locales, which you do not use, e.g.
          > su vim /etc/locale.gen
          > :v/\v^(#|en_(AU|NZ|US)| … )/s/^/# /
          > :wq
          > su /usr/sbin/locale-gen
          > To take effect your GUI (X-server?) probably needs to be restarted.
          > Theoretically your system should become slightly faster, consume slightly less
          > disk space, and become slightly less vulnerable in terms of security … all
          > 3 should not hurt, or what would you say?
          >
          > (2) “locale -a” should list ONLY locales, which you want to use. Install fonts
          > for ANY of the listed locales.
          >
          > Documentation:
          > man locale-gen locale.gen
          > :h xfontset
          >
          > --
          > Regards
          > Roland Eggner

          hi roland,

          thanks. that sounds like a good plan but there doesn't seem to be a system-supported
          way to uninstall locales from macosx. /etc/locale.gen etc. don't exist.

          however, there is a program on sourceforge called monolingual that should do the trick.
          it uninstalls language localisations but i don't like that it permanently deletes them
          with no option to restore them if you change your mind later. i'll think about it.

          cheers,
          raf

          --
          --
          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 vim_dev+unsubscribe@....
          For more options, visit https://groups.google.com/groups/opt_out.
        • raf
          ... monolingual doesn t work on macosx-10.6.8. it requires 10.7+ so that s not an option. i guess i ll have to keep my little patch to disable E250 messages in
          Message 4 of 8 , Apr 29 7:02 PM
          • 0 Attachment
            raf wrote:

            > Roland Eggner wrote:
            >
            > > Maybe your problem is caused by a discrepancy between locale configuration and
            > > installed fonts.
            > >
            > > Suggestion (should work on Gentoo Linux, please tune to your macosx system):
            > >
            > > (1) Uninstall locales, which you do not use, e.g.
            > > su vim /etc/locale.gen
            > > :v/\v^(#|en_(AU|NZ|US)| … )/s/^/# /
            > > :wq
            > > su /usr/sbin/locale-gen
            > > To take effect your GUI (X-server?) probably needs to be restarted.
            > > Theoretically your system should become slightly faster, consume slightly less
            > > disk space, and become slightly less vulnerable in terms of security … all
            > > 3 should not hurt, or what would you say?
            > >
            > > (2) “locale -a” should list ONLY locales, which you want to use. Install fonts
            > > for ANY of the listed locales.
            > >
            > > Documentation:
            > > man locale-gen locale.gen
            > > :h xfontset
            > >
            > > --
            > > Regards
            > > Roland Eggner
            >
            > hi roland,
            >
            > thanks. that sounds like a good plan but there doesn't seem to be a system-supported
            > way to uninstall locales from macosx. /etc/locale.gen etc. don't exist.
            >
            > however, there is a program on sourceforge called monolingual that should do the trick.
            > it uninstalls language localisations but i don't like that it permanently deletes them
            > with no option to restore them if you change your mind later. i'll think about it.

            monolingual doesn't work on macosx-10.6.8. it requires 10.7+ so that's not an option.
            i guess i'll have to keep my little patch to disable E250 messages in place.

            cheers,
            raf

            --
            --
            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 vim_dev+unsubscribe@....
            For more options, visit https://groups.google.com/groups/opt_out.
          • raf
            ... there s an older version that does work on macosx-10.6.8. -- -- You received this message from the vim_dev maillist. Do not top-post! Type your reply
            Message 5 of 8 , Apr 29 7:33 PM
            • 0 Attachment
              raf wrote:

              > monolingual doesn't work on macosx-10.6.8. it requires 10.7+ so that's not an option.
              > i guess i'll have to keep my little patch to disable E250 messages in place.

              there's an older version that does work on macosx-10.6.8.

              --
              --
              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 vim_dev+unsubscribe@....
              For more options, visit https://groups.google.com/groups/opt_out.
            • Max Kirillov
              Hi. I also experienced this problem for some time. I dicovered there was some editing mistakes in recent which caused showing this message even if fontset is
              Message 6 of 8 , Apr 29 8:11 PM
              • 0 Attachment
                Hi. I also experienced this problem for some time.

                I dicovered there was some editing mistakes in recent which
                caused showing this message even if fontset is not used.

                Patch which corrects the mistake is after the signature. It
                soppressed the message for me.

                The root cause is still unclear to me. Why would
                XCreateFontSet report anything about KOI8-R or GB2312.1980-0
                if I have utf-8 locale? I don't also have others installed.
                I am not familiar to libx11 to answer this question.

                Thanks,
                --
                Max

                patch:
                -------------------------
                diff -r 26fdbbc9927a -r 63f18a56fb20 src/syntax.c
                --- a/src/syntax.c Sun Apr 28 08:25:08 2013 +0300
                +++ b/src/syntax.c Mon Apr 29 06:23:22 2013 +0300
                @@ -8082,6 +8082,7 @@
                || do_tooltip
                # endif
                )
                + {
                if (free_font)
                gui_mch_free_fontset(HL_TABLE()[idx].sg_fontset);
                HL_TABLE()[idx].sg_fontset = fontset_name2handle(arg, 0
                @@ -8092,6 +8093,7 @@
                || do_tooltip
                # endif
                );
                + }
                if (HL_TABLE()[idx].sg_fontset != NOFONTSET)
                {
                /* If it worked and it's the Normal group, use it as the normal
                -------------------------

                --
                --
                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 vim_dev+unsubscribe@....
                For more options, visit https://groups.google.com/groups/opt_out.
              • Max Kirillov
                Hi. I also experienced this problem for some time. I dicovered there was some editing mistakes in recent which caused showing this message even if fontset is
                Message 7 of 8 , Apr 29 9:01 PM
                • 0 Attachment
                  Hi. I also experienced this problem for some time.

                  I dicovered there was some editing mistakes in recent which
                  caused showing this message even if fontset is not used.

                  Patch which corrects the mistake is after the signature. It
                  soppressed the message for me.

                  The root cause is still unclear to me. Why would
                  XCreateFontSet report anything about KOI8-R or GB2312.1980-0
                  if I have utf-8 locale? I don't also have others installed.
                  I am not familiar to libx11 to answer this question.

                  Thanks,
                  --
                  Max

                  patch:
                  -------------------------
                  diff -r 26fdbbc9927a -r 63f18a56fb20 src/syntax.c
                  --- a/src/syntax.c Sun Apr 28 08:25:08 2013 +0300
                  +++ b/src/syntax.c Mon Apr 29 06:23:22 2013 +0300
                  @@ -8082,6 +8082,7 @@
                  || do_tooltip
                  # endif
                  )
                  + {
                  if (free_font)
                  gui_mch_free_fontset(HL_TABLE()[idx].sg_fontset);
                  HL_TABLE()[idx].sg_fontset = fontset_name2handle(arg, 0
                  @@ -8092,6 +8093,7 @@
                  || do_tooltip
                  # endif
                  );
                  + }
                  if (HL_TABLE()[idx].sg_fontset != NOFONTSET)
                  {
                  /* If it worked and it's the Normal group, use it as the normal
                  -------------------------

                  --
                  --
                  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 vim_dev+unsubscribe@....
                  For more options, visit https://groups.google.com/groups/opt_out.
                • Bram Moolenaar
                  ... Thanks for the patch! -- hundred-and-one symptoms of being an internet addict: 261. You find diskettes in your pockets when doing laundry. /// Bram
                  Message 8 of 8 , May 1, 2013
                  • 0 Attachment
                    Max Kirillov wrote:

                    > Hi. I also experienced this problem for some time.
                    >
                    > I dicovered there was some editing mistakes in recent which
                    > caused showing this message even if fontset is not used.
                    >
                    > Patch which corrects the mistake is after the signature. It
                    > soppressed the message for me.
                    >
                    > The root cause is still unclear to me. Why would
                    > XCreateFontSet report anything about KOI8-R or GB2312.1980-0
                    > if I have utf-8 locale? I don't also have others installed.
                    > I am not familiar to libx11 to answer this question.

                    Thanks for the patch!

                    --
                    hundred-and-one symptoms of being an internet addict:
                    261. You find diskettes in your pockets when doing laundry.

                    /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
                    /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
                    \\\ an exciting new programming language -- http://www.Zimbu.org ///
                    \\\ help me help AIDS victims -- http://ICCF-Holland.org ///

                    --
                    --
                    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 vim_dev+unsubscribe@....
                    For more options, visit https://groups.google.com/groups/opt_out.
                  Your message has been successfully submitted and would be delivered to recipients shortly.