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

Re: BUG: Vim doesn't find single-letter help tags even though they are in $VIMRUNTIME/doc/tags

Expand Messages
  • Tony Mechelynck
    On 04/08/08 22:08, Bram Moolenaar wrote: [...] ... [...] Single-letter help tags are found again; and my computer is faster than me by a big enough margin that
    Message 1 of 9 , Aug 4, 2008
    • 0 Attachment
      On 04/08/08 22:08, Bram Moolenaar wrote:
      [...]
      > Yeah, the problem is that the number of tags is restricted before
      > sorting them on relevance. Try the patch below.
      >
      >
      > *** ../vim-7.2b.026/src/ex_cmds.c Thu Jul 24 21:30:10 2008
      > --- src/ex_cmds.c Mon Aug 4 21:15:00 2008
      [...]

      Single-letter help tags are found again; and my computer is faster than
      me by a big enough margin that I don't notice any delay on ":h A" etc.
      ;-) On ":h A<Ctrl-D>" I wait about one second (which is acceptable) then
      I get one full screen plus one line of matches (with lines=48
      columns=142). As expected, the "full match" is now first.

      With the "tiny" console-only version Ctrl-D seems to go slightly faster
      but of course there are fewer matches per screen (lines=43 columns=80).

      Here are the "version" listings and the executable sizes (before and
      after strip) for both builds:

      ========================================================================
      VIM - Vi IMproved 7.2b BETA (2008 Jul 13, compiled Aug 4 2008 23:59:06)
      Included patches: 1-26
      Modified by Bill McCarthy (float), Bram Moolenaar (helptags)
      Compiled by antoine.mechelynck@...
      Huge version with GTK2-GNOME GUI. Features included (+) or not (-):
      +arabic +autocmd +balloon_eval +browse ++builtin_terms +byte_offset
      +cindent +clientserver +clipboard +cmdline_compl +cmdline_hist
      +cmdline_info +comments +cryptv +cscope +cursorshape +dialog_con_gui
      +diff +digraphs +dnd -ebcdic +emacs_tags +eval +ex_extra +extra_search
      +farsi +file_in_path +find_in_path +float +folding -footer +fork()
      +gettext -hangul_input +iconv +insert_expand +jumplist +keymap +langmap
      +libcall +linebreak +lispindent +listcmds +localmap +menu +mksession
      +modify_fname +mouse +mouseshape +mouse_dec +mouse_gpm -mouse_jsbterm
      +mouse_netterm -mouse_sysmouse +mouse_xterm +multi_byte +multi_lang
      -mzscheme +netbeans_intg -osfiletype +path_extra +perl +postscript
      +printer +profile +python +quickfix +reltime +rightleft +ruby
      +scrollbind +signs +smartindent -sniff +statusline -sun_workshop +syntax
      +tag_binary -tag_old_static -tag_any_white +tcl +terminfo +termresponse
      +textobjects +title +toolbar +user_commands +vertsplit +virtualedit
      +visual +visualextra +viminfo +vreplace +wildignore +wildmenu +windows
      +writebackup +X11 -xfontset +xim +xsmp_interact +xterm_clipboard
      +xterm_save
      system vimrc file: "$VIM/vimrc"
      user vimrc file: "$HOME/.vimrc"
      user exrc file: "$HOME/.exrc"
      system gvimrc file: "$VIM/gvimrc"
      user gvimrc file: "$HOME/.gvimrc"
      system menu file: "$VIMRUNTIME/menu.vim"
      fall-back for $VIM: "/usr/local/share/vim"
      Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK
      -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0
      -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0
      -I/usr/lib/glib-2.0/include -I/usr/include/freetype2
      -I/usr/include/libpng12 -DORBIT2=1 -pthread
      -I/usr/include/libgnomeui-2.0 -I/usr/include/libart-2.0
      -I/usr/include/gconf/2 -I/usr/include/gnome-keyring-1
      -I/usr/include/libgnome-2.0 -I/usr/include/libbonoboui-2.0
      -I/usr/include/libgnomecanvas-2.0 -I/usr/include/gtk-2.0
      -I/usr/include/gnome-vfs-2.0 -I/usr/lib/gnome-vfs-2.0/include
      -I/usr/include/orbit-2.0 -I/usr/include/glib-2.0
      -I/usr/lib/glib-2.0/include -I/usr/include/libbonobo-2.0
      -I/usr/include/bonobo-activation-2.0 -I/usr/include/libxml2
      -I/usr/include/pango-1.0 -I/usr/include/gail-1.0
      -I/usr/include/freetype2 -I/usr/include/atk-1.0
      -I/usr/lib/gtk-2.0/include -I/usr/include/cairo -I/usr/include/libpng12
      -O2 -fno-strength-reduce -Wall -D_REENTRANT -D_GNU_SOURCE
      -DPERL_USE_SAFE_PUTENV -DDEBUGGING -D_LARGEFILE_SOURCE
      -D_FILE_OFFSET_BITS=64
      -I/usr/lib/perl5/5.10.0/i586-linux-thread-multi/CORE
      -I/usr/include/python2.5 -pthread -I/usr/include
      -D_LARGEFILE64_SOURCE=1 -I/usr/lib/ruby/1.8/i586-linux
      Linking: gcc -L. -rdynamic -Wl,-export-dynamic -Wl,-E
      -Wl,-rpath,/usr/lib/perl5/5.10.0/i586-linux-thread-multi/CORE
      -L/usr/local/lib -o vim -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0
      -lgdk_pixbuf-2.0 -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0
      -lgmodule-2.0 -lglib-2.0 -lgnomeui-2 -lbonoboui-2 -lgnomevfs-2
      -lgnomecanvas-2 -lgnome-2 -lpopt -lbonobo-2 -lbonobo-activation
      -lORBit-2 -lart_lgpl_2 -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0
      -lgdk_pixbuf-2.0 -lpangocairo-1.0 -lpango-1.0 -lcairo -lgconf-2
      -lgthread-2.0 -lrt -lgmodule-2.0 -lgobject-2.0 -lglib-2.0 -lXt
      -lncurses -lacl -lgpm -Wl,-E
      -Wl,-rpath,/usr/lib/perl5/5.10.0/i586-linux-thread-multi/CORE
      -L/usr/lib/perl5/5.10.0/i586-linux-thread-multi/CORE -lperl -lutil -lc
      -L/usr/lib/python2.5/config -lpython2.5 -lutil -Xlinker -export-dynamic
      -L/usr/lib -ltcl8.5 -lieee -Wl,-R -Wl,/usr/lib -L/usr/lib -lruby -lm
      ========================================================================
      VIM - Vi IMproved 7.2b BETA (2008 Jul 13, compiled Aug 4 2008 23:52:51)
      Included patches: 1-26
      Modified by Bram Moolenaar (helptags)
      Compiled by antoine.mechelynck@...
      Tiny version without GUI. Features included (+) or not (-):
      -arabic -autocmd -balloon_eval -browse +builtin_terms -byte_offset -cindent
      -clientserver -clipboard -cmdline_compl -cmdline_hist -cmdline_info
      -comments
      -cryptv -cscope -cursorshape -dialog -diff -digraphs -dnd -ebcdic
      -emacs_tags
      -eval -ex_extra -extra_search -farsi -file_in_path -find_in_path -float
      -folding -footer +fork() -gettext -hangul_input -iconv -insert_expand
      -jumplist
      -keymap -langmap -libcall -linebreak -lispindent -listcmds -localmap -menu
      -mksession -modify_fname -mouse -mouse_dec -mouse_gpm -mouse_jsbterm
      -mouse_netterm -mouse_sysmouse -mouse_xterm -multi_byte -multi_lang
      -mzscheme
      -netbeans_intg -osfiletype -path_extra -perl -printer -profile -python
      -quickfix -reltime -rightleft -ruby -scrollbind -signs -smartindent -sniff
      -statusline -sun_workshop -syntax -tag_binary -tag_old_static -tag_any_white
      -tcl +terminfo -termresponse -textobjects -title -toolbar -user_commands
      -vertsplit -virtualedit -visual -viminfo -vreplace +wildignore -wildmenu
      -windows +writebackup -X11 -xfontset -xim -xsmp -xterm_clipboard -xterm_save
      system vimrc file: "$VIM/vimrc"
      user vimrc file: "$HOME/.vimrc"
      user exrc file: "$HOME/.exrc"
      fall-back for $VIM: "/usr/local/share/vim"
      Compilation:
      gcc -c -I. -Iproto -DHAVE_CONFIG_H -O2 -fno-strength-reduce -Wall
      Linking: gcc -L/usr/local/lib -o vi -lm -lncurses
      ========================================================================
      linux:~/.build/vim/vim72b # ls -l src/vim src/tiny/vi `which vim` `which vi`
      -rwxr-xr-x 1 root root 504960 Aug 4 23:58 /usr/local/bin/vi*
      -rwxr-xr-x 1 root root 3114216 Aug 5 00:11 /usr/local/bin/vim*
      -rwxr-xr-x 1 root root 567673 Aug 4 23:53 src/tiny/vi*
      -rwxr-xr-x 1 root root 3471156 Aug 5 00:02 src/vim*


      Best regards,
      Tony.
      --
      All wars are civil wars, because all men are brothers ... Each one owes
      infinitely more to the human race than to the particular country in
      which he was born.
      -- Francois Fenelon

      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_dev" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    • Ben Schmidt
      ... I question the usefulness of this behaviour, actually. What s the point of having a list of completions if there s only a 30% chance or something that it
      Message 2 of 9 , Aug 5, 2008
      • 0 Attachment
        Ian Kelling wrote:
        > I wrote the patch that introduced the bug and I will be happy to fix
        > it. It was written to solve the problem that doing :h <ctrl-d> would
        > take a long time to show every help tag. It could be changed so that
        > it only limits it in that specific case. Do you have any other ideas?
        > If not, I will do that one.
        >
        > - Ian Kelling

        I question the usefulness of this behaviour, actually. What's the point
        of having a list of completions if there's only a 30% chance or
        something that it will contain the entry you actually want, because it's
        a random selection of the possible completions? If anything, this will
        lead you to deduce that Vim doesn't have help on a particular topic
        because CTRL-D presents you with a list that doesn't include that topic.
        Why would you do :he CTRL-D anyway? The only reason I can think of is if
        you have no idea what tag you are looking for, and so you want to look
        through the entire list in the hope that you will recognise it. Deleting
        items from the list makes this impossible.

        If you think people absent-mindedly type CTRL-D (or whatever completion
        key) so often that speed really is an issue for this, I'd sooner have
        completion completely disabled for short words, or common words (that
        produce a list above a certain size) rather than an incomplete and
        therefore misleading list. But I'd sooner just have the old behaviour:
        some operations do take a long time; we might not like to wait, but
        breaking the feature isn't a good fix, and sometimes the wait is worth
        it.

        Ben.



        --~--~---------~--~----~------------~-------~--~----~
        You received this message from the "vim_dev" maillist.
        For more information, visit http://www.vim.org/maillist.php
        -~----------~----~----~----~------~----~------~--~---
      • Bram Moolenaar
        ... It s not a random selection, the results are sorted by some kind of scoring. Currently that s based on match length and ignoring case. It doesn t make
        Message 3 of 9 , Aug 5, 2008
        • 0 Attachment
          Ben Schmidt wrote:

          > Ian Kelling wrote:
          > > I wrote the patch that introduced the bug and I will be happy to fix
          > > it. It was written to solve the problem that doing :h <ctrl-d> would
          > > take a long time to show every help tag. It could be changed so that
          > > it only limits it in that specific case. Do you have any other ideas?
          > > If not, I will do that one.
          > >
          > > - Ian Kelling
          >
          > I question the usefulness of this behaviour, actually. What's the point
          > of having a list of completions if there's only a 30% chance or
          > something that it will contain the entry you actually want, because it's
          > a random selection of the possible completions?

          It's not a random selection, the results are sorted by some kind of
          scoring. Currently that's based on match length and ignoring case. It
          doesn't make sense to show all matches that contain an "a" somewhere.
          It's sufficient to show the user there are very many matches, and he'll
          add a letter and try again.

          > If anything, this will
          > lead you to deduce that Vim doesn't have help on a particular topic
          > because CTRL-D presents you with a list that doesn't include that topic.
          > Why would you do :he CTRL-D anyway? The only reason I can think of is if
          > you have no idea what tag you are looking for, and so you want to look
          > through the entire list in the hope that you will recognise it. Deleting
          > items from the list makes this impossible.

          This mostly applies to single letter searches. Try finding a two
          character combination that has more than 300 matches.

          > If you think people absent-mindedly type CTRL-D (or whatever completion
          > key) so often that speed really is an issue for this, I'd sooner have
          > completion completely disabled for short words, or common words (that
          > produce a list above a certain size) rather than an incomplete and
          > therefore misleading list. But I'd sooner just have the old behaviour:
          > some operations do take a long time; we might not like to wait, but
          > breaking the feature isn't a good fix, and sometimes the wait is worth
          > it.

          How about ":he <Tab>", should it list all possible tags? I don't think
          that is useful. Anyway, this is still slow, so that needs to be fixed.

          --
          The Law of VIM:
          For each member b of the possible behaviour space B of program P, there exists
          a finite time t before which at least one user u in the total user space U of
          program P will request b becomes a member of the allowed behaviour space B'
          (B' <= B).
          In other words: Sooner or later everyone wants everything as an option.
          -- Vince Negri

          /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
          /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
          \\\ download, build and distribute -- http://www.A-A-P.org ///
          \\\ help me help AIDS victims -- http://ICCF-Holland.org ///

          --~--~---------~--~----~------------~-------~--~----~
          You received this message from the "vim_dev" maillist.
          For more information, visit http://www.vim.org/maillist.php
          -~----------~----~----~----~------~----~------~--~---
        • Tony Mechelynck
          ... As long as the full match comes first, I don t mind pruning some less relevant matches, especially when completing for one or two letters. It might be
          Message 4 of 9 , Aug 5, 2008
          • 0 Attachment
            On 05/08/08 22:45, Bram Moolenaar wrote:
            >
            > Ben Schmidt wrote:
            >
            >> Ian Kelling wrote:
            >>> I wrote the patch that introduced the bug and I will be happy to fix
            >>> it. It was written to solve the problem that doing :h<ctrl-d> would
            >>> take a long time to show every help tag. It could be changed so that
            >>> it only limits it in that specific case. Do you have any other ideas?
            >>> If not, I will do that one.
            >>>
            >>> - Ian Kelling
            >> I question the usefulness of this behaviour, actually. What's the point
            >> of having a list of completions if there's only a 30% chance or
            >> something that it will contain the entry you actually want, because it's
            >> a random selection of the possible completions?
            >
            > It's not a random selection, the results are sorted by some kind of
            > scoring. Currently that's based on match length and ignoring case. It
            > doesn't make sense to show all matches that contain an "a" somewhere.
            > It's sufficient to show the user there are very many matches, and he'll
            > add a letter and try again.
            >
            >> If anything, this will
            >> lead you to deduce that Vim doesn't have help on a particular topic
            >> because CTRL-D presents you with a list that doesn't include that topic.
            >> Why would you do :he CTRL-D anyway? The only reason I can think of is if
            >> you have no idea what tag you are looking for, and so you want to look
            >> through the entire list in the hope that you will recognise it. Deleting
            >> items from the list makes this impossible.
            >
            > This mostly applies to single letter searches. Try finding a two
            > character combination that has more than 300 matches.
            >
            >> If you think people absent-mindedly type CTRL-D (or whatever completion
            >> key) so often that speed really is an issue for this, I'd sooner have
            >> completion completely disabled for short words, or common words (that
            >> produce a list above a certain size) rather than an incomplete and
            >> therefore misleading list. But I'd sooner just have the old behaviour:
            >> some operations do take a long time; we might not like to wait, but
            >> breaking the feature isn't a good fix, and sometimes the wait is worth
            >> it.
            >
            > How about ":he<Tab>", should it list all possible tags? I don't think
            > that is useful. Anyway, this is still slow, so that needs to be fixed.
            >

            As long as the full match comes first, I don't mind pruning some "less
            relevant" matches, especially when completing for one or two letters. It
            might be better to do the pruning after the sorting, as, I think, your
            "experimental" patch does, in order to keep all the "best" matches.


            Best regards,
            Tony.
            --
            Boston State House is the hub of the Solar System. You couldn't pry
            that out of a Boston man if you had the tire of all creation
            straightened out for a crowbar.
            -- O. W. Holmes

            --~--~---------~--~----~------------~-------~--~----~
            You received this message from the "vim_dev" maillist.
            For more information, visit http://www.vim.org/maillist.php
            -~----------~----~----~----~------~----~------~--~---
          Your message has been successfully submitted and would be delivered to recipients shortly.