[vim/vim] Navigating quickfix and location list shouldn't create buffers to files that don't exist (#1377)

21 views
Skip to first unread message

Mathias Stearn

unread,
Jan 13, 2017, 12:16:30 PM1/13/17
to vim/vim, Subscribed

I use the quickfix list pretty heavily, including adding an efm entry for the stack trace format in our log messages so I can use :cexpr @* to quickly navigate. I've ran into a few cases where creating buffers to non-existent files causes problems.

  • The default file:line:message efm matches the ISO8601-formatted timestamps on every line. This creates buffers with Y-M-DTH file names whenever I :cnext over a line that doesn't match other formats.
  • Some tools use ??:?? when they can't figure out the file and line info (eg no debug symbols for the library) and I don't want a file named ??.
  • Windows paths use \ which isn't converted to / on linux.

I think the ideal solution would be to make the efm parser not match %f for files that don't exist (or add a new specifier for this purpose). It could then continue looking for other formats that match. Alternatively, having :cnext skip over entries for files that don't exist would solve this pain point.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub

David M. Lary

unread,
Sep 25, 2022, 11:37:07 AM9/25/22
to vim/vim, Subscribed

came across this issue when running a make test that output ISO8601 timestamps. The workaround is to update errorformat to skip these messages:

" prepend a rule to ignore, but not suppress, lines that start with ISO8601 timestamps
set efm^=%+G%\\d%\\{4}-%\\d%\\d-%\\d%\\dT%\\d%\\d:%\\d%\\d:%\\d%\\d%.%#


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/1377/1257219661@github.com>

David Pape

unread,
Jan 2, 2026, 11:31:12 AM (4 days ago) Jan 2
to vim/vim, Subscribed
zyzzyxdonta left a comment (vim/vim#1377)

Old issue, but for the record, many other formats are also affected.

With a Makefile like this:

default:
	@echo 'x: x:0:x'

Running :make, the quickfix list shows (1 of 1): x, and a new empty buffer called x: x is created.


Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/1377/3705729988@github.com>

Enno

unread,
Jan 3, 2026, 5:57:22 AM (3 days ago) Jan 3
to vim/vim, Subscribed
Konfekt left a comment (vim/vim#1377)

As another example, make --print-directory lists files with path make for the entered directories.

make the efm parser not match %f for files that don't exist (or add a new specifier for this purpose)

This sounds sensible and shouldn't be difficult to implement and hardly something that others historically rely on, or are there any principal blockers (question to the maintainers) ?


Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/1377/3706973284@github.com>

Yegappan Lakshmanan

unread,
Jan 3, 2026, 1:20:16 PM (3 days ago) Jan 3
to vim/vim, Subscribed
yegappan left a comment (vim/vim#1377)

As another example, make --print-directory lists files with path make for the entered directories.

make the efm parser not match %f for files that don't exist (or add a new specifier for this purpose)

This sounds sensible and shouldn't be difficult to implement and hardly something that others historically rely on, or are there any principal blockers (question to the maintainers) ?

The '%D' and '%X' format specifiers are used to handle entering and leaving directories during the
make process. The proper errorformat setting should be used to parse the output.


Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/1377/3707255415@github.com>

Enno

unread,
Jan 3, 2026, 2:37:00 PM (3 days ago) Jan 3
to vim/vim, Subscribed
Konfekt left a comment (vim/vim#1377)

The '%D' and '%X' format specifiers are used to handle entering and leaving directories during the


make process. The proper errorformat setting should be used to parse the output.

Yes, so should compiler/gcc.vim and bd5e882 be adapted accordingly?


Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/1377/3707302530@github.com>

Enno

unread,
Jan 3, 2026, 2:39:11 PM (3 days ago) Jan 3
to vim/vim, Subscribed
Konfekt left a comment (vim/vim#1377)

Mind that this is an aside, I didn't intend to take over this issue's original cause


Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/1377/3707303917@github.com>

Reply all
Reply to author
Forward
0 new messages