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

Re: vim7: location list

Expand Messages
  • Yegappan Lakshmanan
    Hi Tony, ... No. The local prefix can be used to specify that the location list should be used instead of the quickfix list. ... The local prefix can be
    Message 1 of 27 , Jan 27, 2006
    • 0 Attachment
      Hi Tony,

      On 1/27/06, A. J. Mechelynck <antoine.mechelynck@...> wrote:
      > Yegappan Lakshmanan wrote:
      > >
      > > On 1/27/06, A. J. Mechelynck <antoine.mechelynck@...> wrote:
      > >>>> How to create location list and what are relations to quickfix list?
      > >>>>
      > >>>>
      > >>> Location list maintains a list of file locations similar to a quickfix
      > >>> list. You can have a separate location list for every Vim window.
      > >>>
      > >>> The location list commands are similar to the quickfix commands
      > >>> (except replace the c prefix in the quickfix commands with l).
      > >>> The location list is independent of the quickfix list. The quickfix list
      > >>> is global to all the windows.
      > >>>
      > > <snip>
      > >>>
      > >> Well, yes, but there are no local-list equivalents of the ":make"
      > >> ":grep" ":vimgrep" and ":helpgrep" commands which produce a (global)
      > >> quickfix list, are there?
      > >>
      > >
      > > No. The commands :make, :grep, :vimgrep and :helpgrep will use the
      > > global quickfix list (for backward compatibility). But new commands
      > > that produce a list of file locations can use the window-local location
      > > list. For example, the ":ltag" command (not in Vim7 yet) will jump to
      > > a tag and add all the matching tags to the location list. This will make
      > > it easier to select a tag from the multiple matching tags.
      > >
      >
      > Well, what about (say) a command prefix like
      >
      > :local vimgrep /pattern/ **/*.foo
      >
      > to make a command act on a local list instead? Would it be too hard to
      > implement?
      >

      No. The "local" prefix can be used to specify that the location list
      should be used instead of the quickfix list.

      >
      > Or would it be simpler to duplicate :make, :grep, :vimgrep
      > and :helpgrep as :lmake, :lgrep, :lvimgrep and :lhelpgrep ?
      >

      The "local" prefix can be used instead of adding more new
      commands.

      - Yegappan
    • Mikolaj Machowski
      ... Interesting problem. According to idea :local will show location list for *single* file. With *.foo wildcards should it create multiple location lists for
      Message 2 of 27 , Jan 28, 2006
      • 0 Attachment
        Dnia sobota, 28 stycznia 2006 03:28, A. J. Mechelynck napisał:
        >
        > Well, what about (say) a command prefix like
        >
        > :local vimgrep /pattern/ **/*.foo
        >
        > to make a command act on a local list instead? Would it be too hard to
        > implement?

        Interesting problem. According to idea :local will show location list
        for *single* file. With *.foo wildcards should it create multiple
        location lists for all files matching *.foo. What about files not
        already in buffers?

        I was thinking about something simpler(?). When quickfix list exists
        after local command open only part of big list regarding to the current
        file.

        m.
      • Mikolaj Machowski
        ... OK. I think it shouldn t be hard to make getqflist()-setloclist() combination to set location list. Although it would be nice if such thing could be done
        Message 3 of 27 , Jan 28, 2006
        • 0 Attachment
          Dnia sobota, 28 stycznia 2006 02:47, Yegappan Lakshmanan napisał:
          > Location list maintains a list of file locations similar to a quickfix
          > list. You can have a separate location list for every Vim window.
          >
          > The location list commands are similar to the quickfix commands
          > (except replace the c prefix in the quickfix commands with l).
          > The location list is independent of the quickfix list. The quickfix list
          > is global to all the windows.

          OK. I think it shouldn't be hard to make getqflist()-setloclist()
          combination to set location list. Although it would be nice if such
          thing could be done automatically :)

          m.
        • A. J. Mechelynck
          ... A location list applies to a _window_, not to a buffer. I don t see an objection to :ln loading a different file into its window. For instance, on one
          Message 4 of 27 , Jan 28, 2006
          • 0 Attachment
            Mikolaj Machowski wrote:
            > Dnia sobota, 28 stycznia 2006 03:28, A. J. Mechelynck napisał:
            >> Well, what about (say) a command prefix like
            >>
            >> :local vimgrep /pattern/ **/*.foo
            >>
            >> to make a command act on a local list instead? Would it be too hard to
            >> implement?
            >
            > Interesting problem. According to idea :local will show location list
            > for *single* file. With *.foo wildcards should it create multiple
            > location lists for all files matching *.foo. What about files not
            > already in buffers?
            >
            > I was thinking about something simpler(?). When quickfix list exists
            > after local command open only part of big list regarding to the current
            > file.
            >
            > m.
            >
            >
            >
            >

            A location list applies to a _window_, not to a buffer. I don't see an
            objection to :ln loading a different file into its window. For instance,
            on one project I have 4 different windows with different :lcd, each of
            which can hold any file from its own directory. So if I go to one window
            and do ":vimgrep /\<Stuart\>/ *.htm" I'll get all entries from various
            HTML files in that directory, about one particular English dynasty.
            Hitting :cn repeatedly (or, with :local, :ln) would bring each of these
            entries into focus, loading the file if necessary (and I wouldn't get
            errors if the current file is 'modified' because I have 'autowriteall' set).


            Best regards,
            Tony.
          • Bram Moolenaar
            ... The word local is very generic, thus using it to specify using the location list is probably not a good idea. Someone would expect :local set to set
            Message 5 of 27 , Jan 28, 2006
            • 0 Attachment
              Yegappan Lakshmanan wrote:

              > > Well, what about (say) a command prefix like
              > >
              > > :local vimgrep /pattern/ **/*.foo
              > >
              > > to make a command act on a local list instead? Would it be too hard to
              > > implement?
              >
              > No. The "local" prefix can be used to specify that the location list
              > should be used instead of the quickfix list.
              >
              > >
              > > Or would it be simpler to duplicate :make, :grep, :vimgrep
              > > and :helpgrep as :lmake, :lgrep, :lvimgrep and :lhelpgrep ?
              > >
              >
              > The "local" prefix can be used instead of adding more new
              > commands.

              The word "local" is very generic, thus using it to specify using the
              location list is probably not a good idea. Someone would expect ":local
              set" to set an option locally.

              Since there are only a limited number of commands that use the quickfix
              or location list, and most of them already have names with ":c.." and
              ":l..", it's probably simpler to do this for the rest too. Thus I think
              ":lmake", ":lgrep" and ":lvimgrep" are not a bad idea. How many other
              comands are there?

              --
              hundred-and-one symptoms of being an internet addict:
              192. Your boss asks you to "go fer" coffee and you come up with 235 FTP sites.

              /// 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://www.ICCF.nl ///
            • A. J. Mechelynck
              ... As noted above, there is at least :helpgrep (:lhelpgrep). Other than that, I don t see anything that isn t covered already -- but maybe I have forgotten
              Message 6 of 27 , Jan 28, 2006
              • 0 Attachment
                Bram Moolenaar wrote:
                > Yegappan Lakshmanan wrote:
                >
                >>> Well, what about (say) a command prefix like
                >>>
                >>> :local vimgrep /pattern/ **/*.foo
                >>>
                >>> to make a command act on a local list instead? Would it be too hard to
                >>> implement?
                >> No. The "local" prefix can be used to specify that the location list
                >> should be used instead of the quickfix list.
                >>
                >>> Or would it be simpler to duplicate :make, :grep, :vimgrep
                >>> and :helpgrep as :lmake, :lgrep, :lvimgrep and :lhelpgrep ?
                >>>
                >> The "local" prefix can be used instead of adding more new
                >> commands.
                >
                > The word "local" is very generic, thus using it to specify using the
                > location list is probably not a good idea. Someone would expect ":local
                > set" to set an option locally.
                >
                > Since there are only a limited number of commands that use the quickfix
                > or location list, and most of them already have names with ":c.." and
                > ":l..", it's probably simpler to do this for the rest too. Thus I think
                > ":lmake", ":lgrep" and ":lvimgrep" are not a bad idea. How many other
                > comands are there?
                >

                As noted above, there is at least ":helpgrep" (:lhelpgrep). Other than
                that, I don't see anything that isn't covered already -- but maybe I
                have forgotten something?


                Best regards,
                Tony.
              • A. J. Mechelynck
                ... [...] ... P.S.: :lhelpgrep would of course use the local list for the help window, which would usually not be the window it was started from. Best
                Message 7 of 27 , Jan 28, 2006
                • 0 Attachment
                  A. J. Mechelynck wrote:
                  > Bram Moolenaar wrote:
                  [...]
                  >> Since there are only a limited number of commands that use the quickfix
                  >> or location list, and most of them already have names with ":c.." and
                  >> ":l..", it's probably simpler to do this for the rest too. Thus I think
                  >> ":lmake", ":lgrep" and ":lvimgrep" are not a bad idea. How many other
                  >> comands are there?
                  >>
                  >
                  > As noted above, there is at least ":helpgrep" (:lhelpgrep). Other than
                  > that, I don't see anything that isn't covered already -- but maybe I
                  > have forgotten something?
                  >
                  >
                  > Best regards,
                  > Tony.


                  P.S.: ":lhelpgrep" would of course use the local list for the help
                  window, which would usually not be the window it was started from.


                  Best regards,
                  Tony.
                • Yegappan Lakshmanan
                  Hi Mikolaj, ... Note that the location list is local to a window and is not local to a file or a buffer. A location list can contain locations from multiple
                  Message 8 of 27 , Jan 28, 2006
                  • 0 Attachment
                    Hi Mikolaj,

                    On 1/28/06, Mikolaj Machowski <mikmach@...> wrote:
                    > Dnia sobota, 28 stycznia 2006 03:28, A. J. Mechelynck napisał:
                    > >
                    > > Well, what about (say) a command prefix like
                    > >
                    > > :local vimgrep /pattern/ **/*.foo
                    > >
                    > > to make a command act on a local list instead? Would it be too hard to
                    > > implement?
                    >
                    > Interesting problem. According to idea :local will show location list
                    > for *single* file. With *.foo wildcards should it create multiple
                    > location lists for all files matching *.foo. What about files not
                    > already in buffers?
                    >
                    > I was thinking about something simpler(?). When quickfix list exists
                    > after local command open only part of big list regarding to the current
                    > file.
                    >

                    Note that the location list is local to a window and is not local to a file
                    or a buffer. A location list can contain locations from multiple files.
                    When you select an entry from the location list, the selected file is
                    edited in the window associated with that location list.

                    - Yegappan
                  • Yegappan Lakshmanan
                    Hi Mikolaj, ... Yes. You can use the getqflist() function to retrieve the current quickfix list. You can then modify the list and set the location list for the
                    Message 9 of 27 , Jan 28, 2006
                    • 0 Attachment
                      Hi Mikolaj,

                      On 1/28/06, Mikolaj Machowski <mikmach@...> wrote:
                      > Dnia sobota, 28 stycznia 2006 02:47, Yegappan Lakshmanan napisał:
                      > > Location list maintains a list of file locations similar to a quickfix
                      > > list. You can have a separate location list for every Vim window.
                      > >
                      > > The location list commands are similar to the quickfix commands
                      > > (except replace the c prefix in the quickfix commands with l).
                      > > The location list is independent of the quickfix list. The quickfix list
                      > > is global to all the windows.
                      >
                      > OK. I think it shouldn't be hard to make getqflist()-setloclist()
                      > combination to set location list. Although it would be nice if such
                      > thing could be done automatically :)
                      >

                      Yes. You can use the getqflist() function to retrieve the current quickfix
                      list. You can then modify the list and set the location list for the
                      current window using the setloclist() function.

                      Note that you can use the setqflist() and setloclist() functions to
                      set the quickfix/location list without modifying the current 'erroformat'
                      option setting.

                      - Yegappan
                    • Yegappan Lakshmanan
                      Hi, ... When you use the lnext, lprev, lfirst, llast, etc. commands to select an entry from the location list for the current window, the selected file is
                      Message 10 of 27 , Jan 28, 2006
                      • 0 Attachment
                        Hi,

                        On 1/28/06, A. J. Mechelynck <antoine.mechelynck@...> wrote:
                        > A. J. Mechelynck wrote:
                        > > Bram Moolenaar wrote:
                        > [...]
                        > >> Since there are only a limited number of commands that use the quickfix
                        > >> or location list, and most of them already have names with ":c.." and
                        > >> ":l..", it's probably simpler to do this for the rest too. Thus I think
                        > >> ":lmake", ":lgrep" and ":lvimgrep" are not a bad idea. How many other
                        > >> comands are there?
                        > >>
                        > >
                        > > As noted above, there is at least ":helpgrep" (:lhelpgrep). Other than
                        > > that, I don't see anything that isn't covered already -- but maybe I
                        > > have forgotten something?
                        > >
                        >
                        > P.S.: ":lhelpgrep" would of course use the local list for the help
                        > window, which would usually not be the window it was started from.
                        >

                        When you use the lnext, lprev, lfirst, llast, etc. commands to select
                        an entry from the location list for the current window, the selected file
                        is opened in the current window. Even if the selected file is already
                        opened in another window, the file is opened in the current window.

                        When you select a file from the location list window, the following
                        steps are used to find a window to edit the file:

                        1. If a window with the location list displayed in the location list window
                        is present, then the file is opened in that window.
                        2. If the above step fails and if the file is already opened in another window,
                        then that window is used.
                        3. If the above step fails then an existing window showing a buffer with
                        'buftype' not set is used.
                        4. If the above step fails, then the file is edited in a new window.

                        In all of the above cases, if the location list for the selected window is
                        not yet set, then it is set to the location list displayed in the location
                        list window.

                        - Yegappan
                      • A. J. Mechelynck
                        ... I was thinking in line of the fact that :helpgrep displays its results (not the error list I mean, but what :cn and :cN display) in a help window -- an
                        Message 11 of 27 , Jan 28, 2006
                        • 0 Attachment
                          Yegappan Lakshmanan wrote:
                          > Hi,
                          >
                          > On 1/28/06, A. J. Mechelynck <antoine.mechelynck@...> wrote:
                          >> A. J. Mechelynck wrote:
                          >>> Bram Moolenaar wrote:
                          >> [...]
                          >>>> Since there are only a limited number of commands that use the quickfix
                          >>>> or location list, and most of them already have names with ":c.." and
                          >>>> ":l..", it's probably simpler to do this for the rest too. Thus I think
                          >>>> ":lmake", ":lgrep" and ":lvimgrep" are not a bad idea. How many other
                          >>>> comands are there?
                          >>>>
                          >>> As noted above, there is at least ":helpgrep" (:lhelpgrep). Other than
                          >>> that, I don't see anything that isn't covered already -- but maybe I
                          >>> have forgotten something?
                          >>>
                          >> P.S.: ":lhelpgrep" would of course use the local list for the help
                          >> window, which would usually not be the window it was started from.
                          >>
                          >
                          > When you use the lnext, lprev, lfirst, llast, etc. commands to select
                          > an entry from the location list for the current window, the selected file
                          > is opened in the current window. Even if the selected file is already
                          > opened in another window, the file is opened in the current window.
                          >
                          > When you select a file from the location list window, the following
                          > steps are used to find a window to edit the file:
                          >
                          > 1. If a window with the location list displayed in the location list window
                          > is present, then the file is opened in that window.
                          > 2. If the above step fails and if the file is already opened in another window,
                          > then that window is used.
                          > 3. If the above step fails then an existing window showing a buffer with
                          > 'buftype' not set is used.
                          > 4. If the above step fails, then the file is edited in a new window.
                          >
                          > In all of the above cases, if the location list for the selected window is
                          > not yet set, then it is set to the location list displayed in the location
                          > list window.
                          >
                          > - Yegappan
                          >
                          >
                          >

                          I was thinking in line of the fact that ":helpgrep" displays its results
                          (not the error list I mean, but what :cn and :cN display) in a help
                          window -- an existing help window if there is one, otherwise a newly
                          opened help window. That behaviour seems rational to me, and not to be
                          altered. So if we create an ":lhelpgrep" command, it should also display
                          its results in a help window -- an existing one if there is one,
                          otherwise a new one. After :[l]helpgrep, the first result will be
                          displayed, so "some help window" should always exist at that point. In
                          the case of ":lhelpgrep", that help window's local-list will have the
                          list of matches. If the command was issued from a non-help window (a
                          frequent case I presume), that non-help window's local-list would not be
                          altered, and if it didn't yet own a local-list it wouldn't get one.


                          Best regards,
                          Tony.
                        • Mikolaj Machowski
                          ... m.
                          Message 12 of 27 , Feb 3, 2006
                          • 0 Attachment
                            Dnia sobota, 28 stycznia 2006 13:25, Bram Moolenaar napisał:
                            > Since there are only a limited number of commands that use the quickfix
                            > or location list, and most of them already have names with ":c.." and
                            > ":l..", it's probably simpler to do this for the rest too. Thus I think
                            > ":lmake", ":lgrep" and ":lvimgrep" are not a bad idea. How many other
                            > comands are there?

                            :lmarks
                            :ljumps

                            m.
                          • Bram Moolenaar
                            ... These don t use the quickfix list. What would these do with the location list? -- hundred-and-one symptoms of being an internet addict: 255. You work for
                            Message 13 of 27 , Feb 4, 2006
                            • 0 Attachment
                              Mikolaj Machowski wrote:

                              > Dnia sobota, 28 stycznia 2006 13:25, Bram Moolenaar napisa³:
                              > > Since there are only a limited number of commands that use the quickfix
                              > > or location list, and most of them already have names with ":c.." and
                              > > ":l..", it's probably simpler to do this for the rest too. Thus I think
                              > > ":lmake", ":lgrep" and ":lvimgrep" are not a bad idea. How many other
                              > > comands are there?
                              >
                              > :lmarks
                              > :ljumps

                              These don't use the quickfix list. What would these do with the
                              location list?

                              --
                              hundred-and-one symptoms of being an internet addict:
                              255. You work for a newspaper and your editor asks you to write an
                              article about Internet addiction...in the "first person."

                              /// 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://www.ICCF.nl ///
                            • Mikolaj Machowski
                              ... Easier moving between locations defined in marks and jumps list. m.
                              Message 14 of 27 , Feb 4, 2006
                              • 0 Attachment
                                > > :lmarks
                                > > :ljumps
                                >
                                > These don't use the quickfix list. What would these do with the
                                > location list?

                                Easier moving between locations defined in marks and jumps list.

                                m.
                              • Bram Moolenaar
                                ... Do you mean that these commands would take the list of marks or jumps and turn them into a location list? -- hundred-and-one symptoms of being an internet
                                Message 15 of 27 , Feb 4, 2006
                                • 0 Attachment
                                  Mikolaj Machowski wrote:

                                  > > > :lmarks
                                  > > > :ljumps
                                  > >
                                  > > These don't use the quickfix list. What would these do with the
                                  > > location list?
                                  >
                                  > Easier moving between locations defined in marks and jumps list.

                                  Do you mean that these commands would take the list of marks or jumps
                                  and turn them into a location list?

                                  --
                                  hundred-and-one symptoms of being an internet addict:
                                  259. When you enter your name in the AltaVista search engine, the top ten
                                  matches do indeed refer to you.

                                  /// 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://www.ICCF.nl ///
                                • Mikolaj Machowski
                                  ... Yes. m.
                                  Message 16 of 27 , Feb 4, 2006
                                  • 0 Attachment
                                    Dnia sobota, 4 lutego 2006 20:03, Bram Moolenaar napisał:
                                    > Do you mean that these commands would take the list of marks or jumps
                                    > and turn them into a location list?

                                    Yes.

                                    m.
                                  • Yegappan Lakshmanan
                                    Hi all, ... The :lgrep/:lgrepadd, :lvimgrep/:lvimgrepadd, :lmake and :lhelpgrep commands that use the location list instead of the global quickfix list are now
                                    Message 17 of 27 , Feb 9, 2006
                                    • 0 Attachment
                                      Hi all,

                                      On 1/27/06, A. J. Mechelynck <antoine.mechelynck@...> wrote:
                                      >
                                      > Well, yes, but there are no local-list equivalents of the ":make"
                                      > ":grep" ":vimgrep" and ":helpgrep" commands which produce a (global)
                                      > quickfix list, are there?
                                      >

                                      The :lgrep/:lgrepadd, :lvimgrep/:lvimgrepadd, :lmake and :lhelpgrep commands
                                      that use the location list instead of the global quickfix list are now
                                      supported.

                                      - Yegappan
                                    • Gary Johnson
                                      ... I m not sure where to join this discussion, so I ll just start from the top. I use the quickfix commands a lot when learning unfamiliar code. Often I will
                                      Message 18 of 27 , Feb 9, 2006
                                      • 0 Attachment
                                        On 2006-01-28, Mikolaj Machowski <mikmach@...> wrote:

                                        > How to create location list and what are relations to quickfix list?

                                        I'm not sure where to join this discussion, so I'll just start from
                                        the top.

                                        I use the quickfix commands a lot when learning unfamiliar code.
                                        Often I will be trying to find out what some C function does and how
                                        it is used in the system. I'll use ":cs find c" to get a quickfix
                                        list of places the function is called and jump to the first one.
                                        From there, I'll use :cscope and/or :grep commands to learn about
                                        that section of code. I usually open each new file in a new window.
                                        When I'm done following one path, I want to go back to the window
                                        where I started that path and jump to the next location in the list
                                        that was active at that point. With the current global quickfix
                                        list, however, I have to either repeat the :cscope or :grep command
                                        that got me to that location, find that location again and proceed
                                        from there, or I have to repeat :col until I'm back to the desired
                                        quickfix list. This is a pain.

                                        Location lists, as I understand them, would be a perfect solution to
                                        this problem. I can create new quickfix/location lists to my hearts
                                        content without worrying about losing my place in the stack or
                                        overwriting lists. I just go back to the window I jumped from and I
                                        automatically have the desired "quickfix" context.

                                        In my case, I would be quite happy if quickfix lists always worked
                                        this way, and I would prefer not to have to learn and use a whole
                                        new set of "quickfix" commands starting with 'l' to use this
                                        feature. I would really like it if an option could be added to
                                        direct all the quickfix commands (e.g., :cscope find, :grep, :cn) to
                                        use location lists instead of the global quickfix list.

                                        My $0.02,
                                        Gary

                                        --
                                        Gary Johnson | Agilent Technologies
                                        garyjohn@... | Wireless Division
                                        | Spokane, Washington, USA
                                      • Bram Moolenaar
                                        ... It makes sense to me. We already have several cscope... options. cscopelocationlist is a bit too long though... Yegappan, do you see a problem in
                                        Message 19 of 27 , Feb 9, 2006
                                        • 0 Attachment
                                          Gary Johnson wrote:

                                          > On 2006-01-28, Mikolaj Machowski <mikmach@...> wrote:
                                          >
                                          > > How to create location list and what are relations to quickfix list?
                                          >
                                          > I'm not sure where to join this discussion, so I'll just start from
                                          > the top.
                                          >
                                          > I use the quickfix commands a lot when learning unfamiliar code.
                                          > Often I will be trying to find out what some C function does and how
                                          > it is used in the system. I'll use ":cs find c" to get a quickfix
                                          > list of places the function is called and jump to the first one.
                                          > From there, I'll use :cscope and/or :grep commands to learn about
                                          > that section of code. I usually open each new file in a new window.
                                          > When I'm done following one path, I want to go back to the window
                                          > where I started that path and jump to the next location in the list
                                          > that was active at that point. With the current global quickfix
                                          > list, however, I have to either repeat the :cscope or :grep command
                                          > that got me to that location, find that location again and proceed
                                          > from there, or I have to repeat :col until I'm back to the desired
                                          > quickfix list. This is a pain.
                                          >
                                          > Location lists, as I understand them, would be a perfect solution to
                                          > this problem. I can create new quickfix/location lists to my hearts
                                          > content without worrying about losing my place in the stack or
                                          > overwriting lists. I just go back to the window I jumped from and I
                                          > automatically have the desired "quickfix" context.
                                          >
                                          > In my case, I would be quite happy if quickfix lists always worked
                                          > this way, and I would prefer not to have to learn and use a whole
                                          > new set of "quickfix" commands starting with 'l' to use this
                                          > feature. I would really like it if an option could be added to
                                          > direct all the quickfix commands (e.g., :cscope find, :grep, :cn) to
                                          > use location lists instead of the global quickfix list.

                                          It makes sense to me. We already have several 'cscope...' options.
                                          'cscopelocationlist' is a bit too long though...

                                          Yegappan, do you see a problem in implementing this?

                                          --
                                          A vacation is a period of travel during which you find that you
                                          took twice as many clothes and half as much money as you needed.

                                          /// 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://www.ICCF.nl ///
                                        • Yegappan Lakshmanan
                                          Hi Bram, ... ... Note that setting the cscopelocationlist option will only populate the location list with the matches from the cscope query commands.
                                          Message 20 of 27 , Feb 9, 2006
                                          • 0 Attachment
                                            Hi Bram,

                                            On 2/9/06, Bram Moolenaar <Bram@...> wrote:
                                            >
                                            > Gary Johnson wrote:
                                            > >
                                            > > > How to create location list and what are relations to quickfix list?
                                            > >
                                            <snip>
                                            > >
                                            > > Location lists, as I understand them, would be a perfect solution to
                                            > > this problem. I can create new quickfix/location lists to my hearts
                                            > > content without worrying about losing my place in the stack or
                                            > > overwriting lists. I just go back to the window I jumped from and I
                                            > > automatically have the desired "quickfix" context.
                                            > >
                                            > > In my case, I would be quite happy if quickfix lists always worked
                                            > > this way, and I would prefer not to have to learn and use a whole
                                            > > new set of "quickfix" commands starting with 'l' to use this
                                            > > feature. I would really like it if an option could be added to
                                            > > direct all the quickfix commands (e.g., :cscope find, :grep, :cn) to
                                            > > use location lists instead of the global quickfix list.
                                            >
                                            > It makes sense to me. We already have several 'cscope...' options.
                                            > 'cscopelocationlist' is a bit too long though...
                                            >

                                            Note that setting the 'cscopelocationlist' option will only populate
                                            the location list with the matches from the cscope query commands.
                                            To navigate the location list you still have to use the new location
                                            list commands. You cannot use the quickfix commands to browse
                                            the location list.

                                            >
                                            > Yegappan, do you see a problem in implementing this?
                                            >

                                            Should this be applied only to the cscope commands or to other
                                            quickfix commands (like grep, make, vimgrep, helpgrep, cexpr,
                                            cfile, cbuffer, etc.) also?

                                            What about introducing a 'quickfixlocal' option? When this option
                                            is set, the quickfix commands will use the window-local quickfix
                                            list (aka location list). When this option is not set (default), the
                                            quickfix commands will use the global quickfix list.

                                            - Yegappan
                                          • Gary Johnson
                                            ... Yes, that s really more what I had in mind. Gary -- Gary Johnson | Agilent Technologies garyjohn@spk.agilent.com | Wireless Division
                                            Message 21 of 27 , Feb 9, 2006
                                            • 0 Attachment
                                              On 2006-02-09, Yegappan Lakshmanan <yegappanl@...> wrote:

                                              > On 2/9/06, Bram Moolenaar <Bram@...> wrote:

                                              > > Yegappan, do you see a problem in implementing this?
                                              > >
                                              >
                                              > Should this be applied only to the cscope commands or to other
                                              > quickfix commands (like grep, make, vimgrep, helpgrep, cexpr,
                                              > cfile, cbuffer, etc.) also?
                                              >
                                              > What about introducing a 'quickfixlocal' option? When this option
                                              > is set, the quickfix commands will use the window-local quickfix
                                              > list (aka location list). When this option is not set (default), the
                                              > quickfix commands will use the global quickfix list.

                                              Yes, that's really more what I had in mind.

                                              Gary

                                              --
                                              Gary Johnson | Agilent Technologies
                                              garyjohn@... | Wireless Division
                                              | Spokane, Washington, USA
                                            • Bram Moolenaar
                                              ... I don t want an option that changes what :make , :grep etc. do. This makes the commands unpredictable, you don t know what happens unless you know the
                                              Message 22 of 27 , Feb 10, 2006
                                              • 0 Attachment
                                                Yegappan Lakshmanan wrote:

                                                > Hi Bram,
                                                >
                                                > On 2/9/06, Bram Moolenaar <Bram@...> wrote:
                                                > >
                                                > > Gary Johnson wrote:
                                                > > >
                                                > > > > How to create location list and what are relations to quickfix list?
                                                > > >
                                                > <snip>
                                                > > >
                                                > > > Location lists, as I understand them, would be a perfect solution to
                                                > > > this problem. I can create new quickfix/location lists to my hearts
                                                > > > content without worrying about losing my place in the stack or
                                                > > > overwriting lists. I just go back to the window I jumped from and I
                                                > > > automatically have the desired "quickfix" context.
                                                > > >
                                                > > > In my case, I would be quite happy if quickfix lists always worked
                                                > > > this way, and I would prefer not to have to learn and use a whole
                                                > > > new set of "quickfix" commands starting with 'l' to use this
                                                > > > feature. I would really like it if an option could be added to
                                                > > > direct all the quickfix commands (e.g., :cscope find, :grep, :cn) to
                                                > > > use location lists instead of the global quickfix list.
                                                > >
                                                > > It makes sense to me. We already have several 'cscope...' options.
                                                > > 'cscopelocationlist' is a bit too long though...
                                                >
                                                > Note that setting the 'cscopelocationlist' option will only populate
                                                > the location list with the matches from the cscope query commands.
                                                > To navigate the location list you still have to use the new location
                                                > list commands. You cannot use the quickfix commands to browse
                                                > the location list.
                                                >
                                                > > Yegappan, do you see a problem in implementing this?
                                                >
                                                > Should this be applied only to the cscope commands or to other
                                                > quickfix commands (like grep, make, vimgrep, helpgrep, cexpr,
                                                > cfile, cbuffer, etc.) also?
                                                >
                                                > What about introducing a 'quickfixlocal' option? When this option
                                                > is set, the quickfix commands will use the window-local quickfix
                                                > list (aka location list). When this option is not set (default), the
                                                > quickfix commands will use the global quickfix list.

                                                I don't want an option that changes what ":make", ":grep" etc. do. This
                                                makes the commands unpredictable, you don't know what happens unless you
                                                know the value of the option. Vim is already difficult enough to use,
                                                we don't want it to become more complicated.

                                                If you have that option sometimes on, sometimes off then it becomes a
                                                kind of "mode" and you will need a notification somewhere (statusline
                                                perhaps) to know what your current mode is.

                                                If you always have it on or off you might as well leave out that option
                                                and make it a habit to use other commands. E.g., ":lmake" instead of
                                                ":make".

                                                --
                                                Proverb: A nightingale that forgets the lyrics is a hummingbird.

                                                /// 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://www.ICCF.nl ///
                                              Your message has been successfully submitted and would be delivered to recipients shortly.