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

Re: [patch] allow setting of w:quickfix_title via setqflist()/setloclist() functions

Expand Messages
  • Eric Van Dewoestine
    ... The problem with setting w:quickfix_title directly is that the title is not properly stored with the list and so it s lost when using cnewer/colder. The
    Message 1 of 33 , May 8, 2013
      On 2013-05-08 07:40:06, Christian Brabandt wrote:
      > On Wed, May 8, 2013 00:15, Ben Fritz wrote:
      > > The maintainer of Eclim, Eric Van Dewoestine, sent me a patch to try once
      > > which not only allowed setting the quickfix title but it also made :colder
      > > and :cnewer restore that title.
      > >
      > > I can't tell from looking quickly, does your patch allow this as well?
      >
      > Yes, this automatically happens, if a quickfix list contains a title.
      > Looking at that patch, it seems, it introduces some new functions
      > setqftitle()/getqftitle() I am not sure this is needed, since you can
      > simply set and query the variable w:quickfix_title

      The problem with setting w:quickfix_title directly is that the title
      is not properly stored with the list and so it's lost when using
      cnewer/colder.

      The advantage of having separate functions is that you can set the
      title without having to replace the existing list:

      call setqftitle('something meaningful')
      vs
      call setqflist(getqflist(), 'r', 'something meaningful')

      However, while testing your patch it seems I can't overwrite the
      existing title to make it something more meaningful when using replace
      ('r') or append ('a'). In those cases the argument seems to be
      ignored. So when making use of cexpr to build my quickfix list, I'm
      still stuck with the default title vim generates or setting
      w:quickfix_title directly and losing that title when navigating the
      quickfix lists history.

      I'm not dead set on having separate functions like in my patch, but
      not being able to update the persistent title of an existing list
      makes your patch far less useful in my usage. Can that aspect be
      remedied?

      --
      eric

      --
      --
      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.
    • Yegappan Lakshmanan
      Hi, On Mon, Jul 17, 2017 at 9:59 AM, Jason Franklin ... It is a new feature and is documented in the latest versions of the eval.txt file. - Yegappan -- -- You
      Message 33 of 33 , Jul 17
        Hi,

        On Mon, Jul 17, 2017 at 9:59 AM, Jason Franklin
        <jrfranklin@...> wrote:
        > On Monday, July 17, 2017 at 12:29:44 PM UTC-4, yega...@... wrote:
        >> Hi,
        >>
        >> >> >> > @Bram,
        >> >> >> >
        >> >> >> > what do you think about the patch?
        >> >> >> >
        >> >> >> > I have not checked if it still applies (I have it in my local branch), but came across it being missing a few times recently.
        >> >> >> >
        >> >> >> > It's very useful, so please consider applying it.
        >> >> >>
        >> >> >> It's in the todo list.
        >> >> >>
        >> >> >
        >> >> > Hi Everyone,
        >> >> >
        >> >> > This is just a friendly ping concerning this patch.
        >> >> >
        >> >> > I recently came across the documentation for patch 7.4.378, which appears to
        >> >> > have been overwritten by later work. There is a lot of information here, and
        >> >> > I can't go through all of it at the moment.
        >> >> >
        >> >> > However, since I've been prototyping a plugin that helps users manipulate the
        >> >> > quickfix/location lists, I wanted to ask for the status of this new feature.
        >> >> > It is critical to the functioning of my plugin, so I hope it gets added! By
        >> >> > the way, Bram, I can't find this item in "todo.txt", so I don't know if the
        >> >> > idea has been abandoned.
        >> >> >
        >> >>
        >> >> You can set the quickfix list title using the setqflist() function:
        >> >>
        >> >> :call setqflist([], 'a', {'title' : 'My title'})
        >> >>
        >> >> If the quickfix window is opened, the w:quickfix_title variable is also updated
        >> >> with the new title.
        >> >>
        >> >> - Yegappan
        >> >
        >> > Thank you very much!
        >> >
        >>
        >> BTW, your plugin can also store a context with every quickfix list using
        >>
        >> :call setqflist([], 'a', {'context' : <any vim variable>})
        >>
        >> and retrieve the context using
        >>
        >> :let ctx = getqflist({'context' : 1})
        >>
        >> - Yegappan
        >
        > That's interesting! I don't actually see that anywhere in the documentation.
        > Is that an undocumented feature?
        >

        It is a new feature and is documented in the latest versions of the
        eval.txt file.

        - Yegappan

        --
        --
        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/d/optout.
      Your message has been successfully submitted and would be delivered to recipients shortly.