Hi,

On Sat, Jan 11, 2020 at 10:08 PM Linwei <[email protected]> wrote:

> @yegappan <https://github.com/yegappan> , just one more step, provide a
> way to leave the original output as what it is. Let me explain why.
>

I understand the need for showing the raw output in the quickfix window
without any formatting.
But note that Vim still needs to process the output using 'efm' and extract
the location
information. A user can jump to a location from some lines in the quickfix
window and from some
lines he cannot jump to a location. We need to somehow distinctly highlight
the lines which
are active.


> Compilers and linters are continually evolving, ten years ago, the output
> of compilers are still simply enough, just take *gcc 4.2* (released in
> 2008) for example:
>
> test3.cpp:4: error: invalid conversion from 'const char*' to 'int'
>
>
> They are simply enough and you can interpret them line by line, each line
> represents a single message, not relevant to the previous or next lines. So
> you can format them into what ever you like.
>
> But things got changed, let's see the *gcc 9.4* output:
>
> test.cpp: In function ‘int main()’:
>
> test.cpp:4:9: error: invalid conversion from ‘const char*’ to ‘int’ 
> [-fpermissive]
>
>     4 |     x = "hello";
>
>       |         ^~~~~~~
>
>       |         |
>
>       |         const char*
>
>
> In these days, modern compilers and linters trend to use multiple
> well-formated lines to represent one error. The adjacent lines are relevant
> to each other. *If you change one of them, you will hurt their
> readabilities* and make them hard to understand.
>

Note that Vim can still properly parse the multi-line error messages using
'efm' and display the
caret symbol at the proper location.

I will look into a way to support displaying the raw text in the quickfix
window.

Regards,
Yegappan


> What if another compiler output like this:
>
> [image: quickfix1]
> <https://user-images.githubusercontent.com/3035071/72207040-b8b58580-34cf-11ea-9951-8b15b480a3db.png>
>
> After some so called *clever* conversion, it will look like this in
> quickfix:
>
> [image: quickfix2]
> <https://user-images.githubusercontent.com/3035071/72207059-df73bc00-34cf-11ea-82d6-baa363340d78.png>
>
> I would rather wish you to keep text untouched in the quickfix window. Any
> conversion would be unnecessary and will make the result confusion in this
> simple situation.
>
> I believe the purpose of quickfix is to make information more
> understandable, not to confuse people. If we agree so, why are we still
> insist to reformat texts in quickfix ?
>
> And if you think this is still not convincing enough, I'd like show you
> another example:
>
>
> <https://user-images.githubusercontent.com/3035071/71560565-d8e44e00-2aa6-11ea-963b-e9442550ec67.png>
>
> The output of rspec is well-formated, beautiful and easy to understand in
> the shell. But if you notice what neomake/asyncrun/dispatch.vim make out of
> it in the quickfix window:
>
> [image: 图片]
> <https://user-images.githubusercontent.com/3035071/72207190-7725da00-34d1-11ea-9b76-30637db815d3.png>
>
> Do you still consider the converted text is more understandable than the
> original text ??
>
> Maybe someone would suggest we should run this compilers or linters
> directly in a built-in terminal, or output them in another buffer instead
> of putting them in the quickfix window.
>
> I suppose quickfix is the most brilliant infrastructure in vim. Plugins
> using quickfix can collaborate with each other:
>
>    - neomake/asyncrun/dispatch can generate outputs in quickfix
>    - errormarker can retrive information from qf and set error markers
>    for lines with compile errors.
>    - vim-preview can preview errors in the preview window when you press
>    a p in the quickfix.
>
> If every plugin invent their own quickfix window, that would be a
> disarster.
>
> So, please give us an option to keep the original text in the quickfix
> window, errors and warnings can still be highlighted and remain selectable.
>
> @brammool <https://github.com/brammool> & @yegappan
> <https://github.com/yegappan> , do you think it is a reasonable
> suggestion ??
>
>
>

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/CAAW7x7%3DT_nUOJNFtUn7CQ_q47SBfTbSTNC9XULzzy_heaHufHg%40mail.gmail.com.

Raspunde prin e-mail lui