Re: Patch 7.4.2231

2016-08-24 Fir de Conversatie Bram Moolenaar

Christian Brabandt wrote:

> Am 2016-08-22 20:29, schrieb Bram Moolenaar:
> > Perhaps we better add a generic way to filter the output.  
> > Unfortunately
> > we can't use "command | grep /pattern/".  Not all commands accept
> > another command following.
> 
> True, but this is already documented at :h :bar and the obvious 
> workaround
> for that case would be to use :exe 'cmd' | grep /pattern/

But then you have to take care of escaping quotes.

> > We could put it in front:
> > 
> > filter /pattern/ command
> > 
> > It's like a command modifier then.  But one with an argument.
> > Note that the filtering would happen line-by-line, thus if there is an
> > item that takes several lines only matching ones would show up.
> 
> I am sorry, but this is ugly.

It's not perfect and may need to get used to, but at least you can type
it without any escaping and it works for all commands.

-- 
Time is money.  Especially if you make clocks.

 /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net   \\\
///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org///
 \\\help me help AIDS victims -- http://ICCF-Holland.org///

-- 
-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Patch 7.4.2231

2016-08-24 Fir de Conversatie Marcin Szamotulski
On 08:04 Wed 24 Aug , Christian Brabandt wrote:
> Am 2016-08-22 20:29, schrieb Bram Moolenaar:
> > Perhaps we better add a generic way to filter the output.  
> > Unfortunately
> > we can't use "command | grep /pattern/".  Not all commands accept
> > another command following.
> 
> True, but this is already documented at :h :bar and the obvious 
> workaround
> for that case would be to use :exe 'cmd' | grep /pattern/
> 
> > We could put it in front:
> > 
> > filter /pattern/ command
> > 
> > It's like a command modifier then.  But one with an argument.
> > Note that the filtering would happen line-by-line, thus if there is an
> > item that takes several lines only matching ones would show up.
> 
> I am sorry, but this is ugly.

I agree.  Can I use `filter /{pat}/ browse oldfiles`?

Best Marcin

> 
> Best,
> Christian
> 
> -- 
> -- 
> 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+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


signature.asc
Description: Digital signature


Re: Patch 7.4.2231

2016-08-24 Fir de Conversatie Christian Brabandt

Am 2016-08-22 20:29, schrieb Bram Moolenaar:
Perhaps we better add a generic way to filter the output.  
Unfortunately

we can't use "command | grep /pattern/".  Not all commands accept
another command following.


True, but this is already documented at :h :bar and the obvious 
workaround

for that case would be to use :exe 'cmd' | grep /pattern/


We could put it in front:

filter /pattern/ command

It's like a command modifier then.  But one with an argument.
Note that the filtering would happen line-by-line, thus if there is an
item that takes several lines only matching ones would show up.


I am sorry, but this is ugly.

Best,
Christian

--
--
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Patch 7.4.2231

2016-08-22 Fir de Conversatie Nicola

On 2016-08-20 16:37:08 +, Bram Moolenaar said:


Patch 7.4.2231
Problem:":oldfiles" output is a very long list.
Solution:   Add a pattern argument. (Coot, closes #575)


Upon reading the manual, I was (naively) thinking that it is not
necessary to enclose the pattern between delimiters unless the
pattern contains a bar. In fact, if I try something like:

   :oldfiles cpp$

it works as expected.

However, when I try

   :oldfiles ^vim

or

   :oldfiles .cpp

I get

   E682: Invalid search pattern or delimiter

I guess that if the first character is a non-ID character, it is
always interpreted as a pattern delimiter.

Two things:

1. Maybe the help could be made clearer by explicitly saying that
 "Without the enclosing character the pattern cannot include the bar
  character *and it cannot start with a non-ID character*.

2. The asymmetry between xxx$ and ^xxx is a bit counterintuitive:
  wouldn't it be better to assume that the first character is a
  pattern delimiter if it is a non-ID *and* it is equal to the last
  character?

Nicola


--
--
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Patch 7.4.2231

2016-08-22 Fir de Conversatie Justin M. Keyes
On Mon, Aug 22, 2016 at 2:29 PM, Bram Moolenaar  wrote:
>
> David Fishburn wrote:
>
>> On Sat, Aug 20, 2016 at 12:37 PM, Bram Moolenaar  wrote:
>>
>> >
>> > Patch 7.4.2231
>> > Problem:":oldfiles" output is a very long list.
>> > Solution:   Add a pattern argument. (Coot, closes #575)
>> >
>> >
>> I was wondering if something similar to this could be added to the :let
>> command (though it has a lot of permutations).
>>
>> I can do the following:
>> :let g:
>>
>> I would love to do the following:
>> :let g:loaded_db\w\+
>>
>> And return only those matching variables.
>
> Are we going to get this request for any command with a long output
> list?
>
> Perhaps we better add a generic way to filter the output.  Unfortunately
> we can't use "command | grep /pattern/".  Not all commands accept
> another command following.  We could put it in front:
>
> filter /pattern/ command
>
> It's like a command modifier then.  But one with an argument.
> Note that the filtering would happen line-by-line, thus if there is an
> item that takes several lines only matching ones would show up.

Why not use the conventions already built-in to Vim, i.e., ":global"?
If :read was enhanced to take a colon-prefixed Vim command:

:read :let
:g!/foo/d

all of these requests would be satisfied implicitly, as well as fix a
long-standing omission of :read. And it also re-uses existing Vim
concepts (":global" + buffer manipulation) instead of inventing new
workarounds like :filter.

Enhancing :read to treat colon-prefixed commands as Vim commands is
analogous to the way read treats !-prefixed commands.


---
Justin M. Keyes

-- 
-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Patch 7.4.2231

2016-08-22 Fir de Conversatie Bram Moolenaar

David Fishburn wrote:

> On Sat, Aug 20, 2016 at 12:37 PM, Bram Moolenaar  wrote:
> 
> >
> > Patch 7.4.2231
> > Problem:":oldfiles" output is a very long list.
> > Solution:   Add a pattern argument. (Coot, closes #575)
> >
> >
> I was wondering if something similar to this could be added to the :let
> command (though it has a lot of permutations).
> 
> I can do the following:
> :let g:
> 
> I would love to do the following:
> :let g:loaded_db\w\+
> 
> And return only those matching variables.

Are we going to get this request for any command with a long output
list?

Perhaps we better add a generic way to filter the output.  Unfortunately
we can't use "command | grep /pattern/".  Not all commands accept
another command following.  We could put it in front:

filter /pattern/ command

It's like a command modifier then.  But one with an argument.
Note that the filtering would happen line-by-line, thus if there is an
item that takes several lines only matching ones would show up.

-- 
Never go to the toilet in a paperless office.

 /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net   \\\
///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org///
 \\\help me help AIDS victims -- http://ICCF-Holland.org///

-- 
-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Patch 7.4.2231

2016-08-22 Fir de Conversatie Matthew Desjardins
On Monday, August 22, 2016 at 10:43:46 AM UTC-4, Marcin Szamotulski wrote:
> On 07:52 Mon 22 Aug , David Fishburn wrote:
> > On Sat, Aug 20, 2016 at 12:37 PM, Bram Moolenaar  wrote:
> > 
> > >
> > > Patch 7.4.2231
> > > Problem:":oldfiles" output is a very long list.
> > > Solution:   Add a pattern argument. (Coot, closes #575)
> > >
> > >
> > I was wondering if something similar to this could be added to the :let
> > command (though it has a lot of permutations).
> > 
> > I can do the following:
> > :let g:
> > 
> > I would love to do the following:
> > :let g:loaded_db\w\+
> > 
> > And return only those matching variables.
> > 
> > David
> 
> Indeed this might be useful.  You can do
> 
> :let g:loaded_db
> 
> But this will not show the values.
> 
> Cheers,
> Marcin

You can still use c_CTRL-A to insert all matches, and :let will display them 
all.

-- 
-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Patch 7.4.2231

2016-08-22 Fir de Conversatie Marcin Szamotulski
On 07:52 Mon 22 Aug , David Fishburn wrote:
> On Sat, Aug 20, 2016 at 12:37 PM, Bram Moolenaar  wrote:
> 
> >
> > Patch 7.4.2231
> > Problem:":oldfiles" output is a very long list.
> > Solution:   Add a pattern argument. (Coot, closes #575)
> >
> >
> I was wondering if something similar to this could be added to the :let
> command (though it has a lot of permutations).
> 
> I can do the following:
> :let g:
> 
> I would love to do the following:
> :let g:loaded_db\w\+
> 
> And return only those matching variables.
> 
> David

Indeed this might be useful.  You can do

:let g:loaded_db

But this will not show the values.

Cheers,
Marcin

-- 
-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


signature.asc
Description: Digital signature


Re: Patch 7.4.2231

2016-08-22 Fir de Conversatie David Fishburn
On Sat, Aug 20, 2016 at 12:37 PM, Bram Moolenaar  wrote:

>
> Patch 7.4.2231
> Problem:":oldfiles" output is a very long list.
> Solution:   Add a pattern argument. (Coot, closes #575)
>
>
I was wondering if something similar to this could be added to the :let
command (though it has a lot of permutations).

I can do the following:
:let g:

I would love to do the following:
:let g:loaded_db\w\+

And return only those matching variables.

David

-- 
-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Patch 7.4.2231

2016-08-21 Fir de Conversatie John Marriott

On 21-Aug-2016 23:00, Bram Moolenaar wrote:

John Marriott wrote:


On 21-Aug-2016 02:37, Bram Moolenaar wrote:

Patch 7.4.2231
Problem:":oldfiles" output is a very long list.
Solution:   Add a pattern argument. (Coot, closes #575)
Files:  runtime/doc/starting.txt, src/ex_cmds.h, src/eval.c,
  src/ex_cmds.c, src/proto/eval.pro, src/proto/ex_cmds.pro,
  src/testdir/test_viminfo.vim



After this patch I get the following warning (on mingw64) if
FEAT_QUICKFIX is not defined:
gcc -c -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603
-DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -DFEAT_GUI_W32
   -DFEAT_CLIPBOARD -pipe -march=native -Wall -O3 -fomit-frame-pointer
-freg-struct-return -s ex_cmds.c -o gobjnative/ex_cmds.o
ex_cmds.c: In function 'ex_oldfiles':
ex_cmds.c:8415:10: warning: implicit declaration of function
'skip_vimgrep_pat' [-Wimplicit-function-declaration]
if (skip_vimgrep_pat(eap->arg, _pat, NULL) == NULL)
^~~~
ex_cmds.c:8415:53: warning: comparison between pointer and integer
if (skip_vimgrep_pat(eap->arg, _pat, NULL) == NULL)
   ^~



I'll move it to a separte #ifdef block.  It's unusual that +eval is
included but +quickfix isn't.


After patch 2234 the linker error has gone but the warning remains.

The prototype for skip_vimgrep_pat() lives in quickfix.pro which is 
included in proto.h if FEAT_QUICKFIX is defined, but the function itself 
is called from ex_cmds.c (above) if either FEAT_EVAL or PROTO are defined.


So, given that skip_vimgrep_pat() has become useful for more than just 
the quickfix feature, should it be moved out of quickfix.c altogether 
(along with it's prototype)? If so, is there a preference? Perhaps one 
of the misc[12].c files?


--
--
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Patch 7.4.2231

2016-08-21 Fir de Conversatie Bram Moolenaar

John Marriott wrote:

> On 21-Aug-2016 02:37, Bram Moolenaar wrote:
> > Patch 7.4.2231
> > Problem:":oldfiles" output is a very long list.
> > Solution:   Add a pattern argument. (Coot, closes #575)
> > Files:  runtime/doc/starting.txt, src/ex_cmds.h, src/eval.c,
> >  src/ex_cmds.c, src/proto/eval.pro, src/proto/ex_cmds.pro,
> >  src/testdir/test_viminfo.vim
> >
> >
> After this patch I get the following warning (on mingw64) if 
> FEAT_QUICKFIX is not defined:
> gcc -c -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603 
> -DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -DFEAT_GUI_W32
>   -DFEAT_CLIPBOARD -pipe -march=native -Wall -O3 -fomit-frame-pointer 
> -freg-struct-return -s ex_cmds.c -o gobjnative/ex_cmds.o
> ex_cmds.c: In function 'ex_oldfiles':
> ex_cmds.c:8415:10: warning: implicit declaration of function 
> 'skip_vimgrep_pat' [-Wimplicit-function-declaration]
>if (skip_vimgrep_pat(eap->arg, _pat, NULL) == NULL)
>^~~~
> ex_cmds.c:8415:53: warning: comparison between pointer and integer
>if (skip_vimgrep_pat(eap->arg, _pat, NULL) == NULL)
>   ^~
> 
> Followed by this linker error:
> gcc -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603 -DHAVE_PATHDEF 
> -DFEAT_NORMAL -DHAVE_STDINT_H -DFEAT_GUI_W32 -D
> FEAT_CLIPBOARD -pipe -march=native -Wall -O3 -fomit-frame-pointer 
> -freg-struct-return -s -Wl,-nxcompat,-dynamicbase -mwindows -o gvim.exe 
> gobjnative/arabic.o gobjnative/blowfish.o gobjnative/buffer.o 
> gobjnative/charset.o gobjnative/crypt.o gobjnative/crypt_zip.o 
> gobjnative/dict.o gobjnative/diff.o gobjnative/digraph.o 
> gobjnative/edit.o gobjnative/eval.o gobjnative/evalfunc.o 
> gobjnative/ex_cmds.o gobjnative/ex_cmds2.o gobjnative/ex_docmd.o 
> gobjnative/ex_eval.o gobjnative/ex_getln.o gobjnative/farsi.o 
> gobjnative/fileio.o gobjnative/fold.o gobjnative/getchar.o 
> gobjnative/hardcopy.o gobjnative/hashtab.o gobjnative/json.o 
> gobjnative/list.o gobjnative/main.o gobjnative/mark.o 
> gobjnative/memfile.o gobjnative/memline.o gobjnative/menu.o 
> gobjnative/message.o gobjnative/misc1.o gobjnative/misc2.o 
> gobjnative/move.o gobjnative/mbyte.o gobjnative/normal.o 
> gobjnative/ops.o gobjnative/option.o gobjnative/os_win32.o 
> gobjnative/os_mswin.o gobjnative/winclip.o gobjnative/pathdef.o 
> gobjnative/popupmnu.o gobjnative/quickfix.o gobjnative/regexp.o 
> gobjnative/screen.o gobjnative/search.o gobjnative/sha256.o 
> gobjnative/spell.o gobjnative/spellfile.o gobjnative/syntax.o 
> gobjnative/tag.o gobjnative/term.o gobjnative/ui.o gobjnative/undo.o 
> gobjnative/userfunc.o gobjnative/version.o gobjnative/vimrc.o 
> gobjnative/window.o gobjnative/gui.o gobjnative/gui_w32.o 
> gobjnative/gui_beval.o gobjnative/os_w32exe.o -lkernel32 -luser32 
> -lgdi32 -ladvapi32 -lcomdlg32 -lcomctl32 -lversion -lole32 -luuid
> gobjnative/ex_cmds.o:ex_cmds.c:(.text+0xb229): undefined reference to 
> `skip_vimgrep_pat'
> collect2.exe: error: ld returned 1 exit status
> Make_cyg_ming.mak:829: recipe for target 'gvim.exe' failed
> make: *** [gvim.exe] Error 1
> 
> skip_vimgrep_pat() is defined in quickfix.c, but the contents are only 
> included if FEAT_QUICKFIX or PROTO is defined.

I'll move it to a separte #ifdef block.  It's unusual that +eval is
included but +quickfix isn't.

-- 
Don't believe everything you hear or anything you say.

 /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net   \\\
///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org///
 \\\help me help AIDS victims -- http://ICCF-Holland.org///

-- 
-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Patch 7.4.2231

2016-08-21 Fir de Conversatie Marcin Szamotulski
On 05:38 Sun 21 Aug , John Marriott wrote:
> On 21-Aug-2016 02:37, Bram Moolenaar wrote:
> > Patch 7.4.2231
> > Problem:":oldfiles" output is a very long list.
> > Solution:   Add a pattern argument. (Coot, closes #575)
> > Files:  runtime/doc/starting.txt, src/ex_cmds.h, src/eval.c,
> >  src/ex_cmds.c, src/proto/eval.pro, src/proto/ex_cmds.pro,
> >  src/testdir/test_viminfo.vim
> >
> >
> After this patch I get the following warning (on mingw64) if 
> FEAT_QUICKFIX is not defined:
> gcc -c -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603 
> -DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -DFEAT_GUI_W32
>   -DFEAT_CLIPBOARD -pipe -march=native -Wall -O3 -fomit-frame-pointer 
> -freg-struct-return -s ex_cmds.c -o gobjnative/ex_cmds.o
> ex_cmds.c: In function 'ex_oldfiles':
> ex_cmds.c:8415:10: warning: implicit declaration of function 
> 'skip_vimgrep_pat' [-Wimplicit-function-declaration]
>if (skip_vimgrep_pat(eap->arg, _pat, NULL) == NULL)
>^~~~
> ex_cmds.c:8415:53: warning: comparison between pointer and integer
>if (skip_vimgrep_pat(eap->arg, _pat, NULL) == NULL)
>   ^~
> 
> Followed by this linker error:
> gcc -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603 -DHAVE_PATHDEF 
> -DFEAT_NORMAL -DHAVE_STDINT_H -DFEAT_GUI_W32 -D
> FEAT_CLIPBOARD -pipe -march=native -Wall -O3 -fomit-frame-pointer 
> -freg-struct-return -s -Wl,-nxcompat,-dynamicbase -mwindows -o gvim.exe 
> gobjnative/arabic.o gobjnative/blowfish.o gobjnative/buffer.o 
> gobjnative/charset.o gobjnative/crypt.o gobjnative/crypt_zip.o 
> gobjnative/dict.o gobjnative/diff.o gobjnative/digraph.o 
> gobjnative/edit.o gobjnative/eval.o gobjnative/evalfunc.o 
> gobjnative/ex_cmds.o gobjnative/ex_cmds2.o gobjnative/ex_docmd.o 
> gobjnative/ex_eval.o gobjnative/ex_getln.o gobjnative/farsi.o 
> gobjnative/fileio.o gobjnative/fold.o gobjnative/getchar.o 
> gobjnative/hardcopy.o gobjnative/hashtab.o gobjnative/json.o 
> gobjnative/list.o gobjnative/main.o gobjnative/mark.o 
> gobjnative/memfile.o gobjnative/memline.o gobjnative/menu.o 
> gobjnative/message.o gobjnative/misc1.o gobjnative/misc2.o 
> gobjnative/move.o gobjnative/mbyte.o gobjnative/normal.o 
> gobjnative/ops.o gobjnative/option.o gobjnative/os_win32.o 
> gobjnative/os_mswin.o gobjnative/winclip.o gobjnative/pathdef.o 
> gobjnative/popupmnu.o gobjnative/quickfix.o gobjnative/regexp.o 
> gobjnative/screen.o gobjnative/search.o gobjnative/sha256.o 
> gobjnative/spell.o gobjnative/spellfile.o gobjnative/syntax.o 
> gobjnative/tag.o gobjnative/term.o gobjnative/ui.o gobjnative/undo.o 
> gobjnative/userfunc.o gobjnative/version.o gobjnative/vimrc.o 
> gobjnative/window.o gobjnative/gui.o gobjnative/gui_w32.o 
> gobjnative/gui_beval.o gobjnative/os_w32exe.o -lkernel32 -luser32 
> -lgdi32 -ladvapi32 -lcomdlg32 -lcomctl32 -lversion -lole32 -luuid
> gobjnative/ex_cmds.o:ex_cmds.c:(.text+0xb229): undefined reference to 
> `skip_vimgrep_pat'
> collect2.exe: error: ld returned 1 exit status
> Make_cyg_ming.mak:829: recipe for target 'gvim.exe' failed
> make: *** [gvim.exe] Error 1
> 
> skip_vimgrep_pat() is defined in quickfix.c, but the contents are only 
> included if FEAT_QUICKFIX or PROTO is defined.
> 
> Cheers
> John

The attached patch fixes that.

Cheers,
Marcin

-- 
-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
diff --git a/src/quickfix.c b/src/quickfix.c
index 2fa6ed9..d3def61 100644
--- a/src/quickfix.c
+++ b/src/quickfix.c
@@ -4317,6 +4317,7 @@ theend:
 vim_free(target_dir);
 vim_regfree(regmatch.regprog);
 }
+#endif
 
 /*
  * Skip over the pattern argument of ":vimgrep /pat/[g][j]".
@@ -4370,6 +4371,7 @@ skip_vimgrep_pat(char_u *p, char_u **s, int *flags)
 return p;
 }
 
+#if defined(FEAT_QUICKFIX) || defined(PROTO)
 /*
  * Restore current working directory to "dirname_start" if they differ, taking
  * into account whether it is set locally or globally.


signature.asc
Description: Digital signature


Re: Patch 7.4.2231

2016-08-20 Fir de Conversatie John Marriott

On 21-Aug-2016 02:37, Bram Moolenaar wrote:

Patch 7.4.2231
Problem:":oldfiles" output is a very long list.
Solution:   Add a pattern argument. (Coot, closes #575)
Files:  runtime/doc/starting.txt, src/ex_cmds.h, src/eval.c,
 src/ex_cmds.c, src/proto/eval.pro, src/proto/ex_cmds.pro,
 src/testdir/test_viminfo.vim


After this patch I get the following warning (on mingw64) if 
FEAT_QUICKFIX is not defined:
gcc -c -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603 
-DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -DFEAT_GUI_W32
 -DFEAT_CLIPBOARD -pipe -march=native -Wall -O3 -fomit-frame-pointer 
-freg-struct-return -s ex_cmds.c -o gobjnative/ex_cmds.o

ex_cmds.c: In function 'ex_oldfiles':
ex_cmds.c:8415:10: warning: implicit declaration of function 
'skip_vimgrep_pat' [-Wimplicit-function-declaration]

  if (skip_vimgrep_pat(eap->arg, _pat, NULL) == NULL)
  ^~~~
ex_cmds.c:8415:53: warning: comparison between pointer and integer
  if (skip_vimgrep_pat(eap->arg, _pat, NULL) == NULL)
 ^~

Followed by this linker error:
gcc -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603 -DHAVE_PATHDEF 
-DFEAT_NORMAL -DHAVE_STDINT_H -DFEAT_GUI_W32 -D
FEAT_CLIPBOARD -pipe -march=native -Wall -O3 -fomit-frame-pointer 
-freg-struct-return -s -Wl,-nxcompat,-dynamicbase -mwindows -o gvim.exe 
gobjnative/arabic.o gobjnative/blowfish.o gobjnative/buffer.o 
gobjnative/charset.o gobjnative/crypt.o gobjnative/crypt_zip.o 
gobjnative/dict.o gobjnative/diff.o gobjnative/digraph.o 
gobjnative/edit.o gobjnative/eval.o gobjnative/evalfunc.o 
gobjnative/ex_cmds.o gobjnative/ex_cmds2.o gobjnative/ex_docmd.o 
gobjnative/ex_eval.o gobjnative/ex_getln.o gobjnative/farsi.o 
gobjnative/fileio.o gobjnative/fold.o gobjnative/getchar.o 
gobjnative/hardcopy.o gobjnative/hashtab.o gobjnative/json.o 
gobjnative/list.o gobjnative/main.o gobjnative/mark.o 
gobjnative/memfile.o gobjnative/memline.o gobjnative/menu.o 
gobjnative/message.o gobjnative/misc1.o gobjnative/misc2.o 
gobjnative/move.o gobjnative/mbyte.o gobjnative/normal.o 
gobjnative/ops.o gobjnative/option.o gobjnative/os_win32.o 
gobjnative/os_mswin.o gobjnative/winclip.o gobjnative/pathdef.o 
gobjnative/popupmnu.o gobjnative/quickfix.o gobjnative/regexp.o 
gobjnative/screen.o gobjnative/search.o gobjnative/sha256.o 
gobjnative/spell.o gobjnative/spellfile.o gobjnative/syntax.o 
gobjnative/tag.o gobjnative/term.o gobjnative/ui.o gobjnative/undo.o 
gobjnative/userfunc.o gobjnative/version.o gobjnative/vimrc.o 
gobjnative/window.o gobjnative/gui.o gobjnative/gui_w32.o 
gobjnative/gui_beval.o gobjnative/os_w32exe.o -lkernel32 -luser32 
-lgdi32 -ladvapi32 -lcomdlg32 -lcomctl32 -lversion -lole32 -luuid
gobjnative/ex_cmds.o:ex_cmds.c:(.text+0xb229): undefined reference to 
`skip_vimgrep_pat'

collect2.exe: error: ld returned 1 exit status
Make_cyg_ming.mak:829: recipe for target 'gvim.exe' failed
make: *** [gvim.exe] Error 1

skip_vimgrep_pat() is defined in quickfix.c, but the contents are only 
included if FEAT_QUICKFIX or PROTO is defined.


Cheers
John

--
--
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.