Patch 8.1.2242

63 views
Skip to first unread message

Bram Moolenaar

unread,
Nov 2, 2019, 5:46:16 PM11/2/19
to vim...@googlegroups.com

Patch 8.1.2242
Problem: Creating docs tags uses user preferences. (Tony Mechelynck)
Solution: Add "--clean".
Files: runtime/doc/Makefile


*** ../vim-8.1.2241/runtime/doc/Makefile 2019-11-02 18:22:04.479206505 +0100
--- runtime/doc/Makefile 2019-11-02 22:44:10.731528371 +0100
***************
*** 323,329 ****
# Use Vim to generate the tags file. Can only be used when Vim has been
# compiled and installed. Supports multiple languages.
vimtags: $(DOCS)
! @if test -x $(VIMEXE); then $(VIMEXE) -eX -u doctags.vim; \
else echo "vim executable $(VIMEXE) not found"; fi

# Use "doctags" to generate the tags file. Only works for English!
--- 323,329 ----
# Use Vim to generate the tags file. Can only be used when Vim has been
# compiled and installed. Supports multiple languages.
vimtags: $(DOCS)
! @if test -x $(VIMEXE); then $(VIMEXE) --clean -eX -u doctags.vim; \
else echo "vim executable $(VIMEXE) not found"; fi

# Use "doctags" to generate the tags file. Only works for English!
*** ../vim-8.1.2241/src/version.c 2019-11-02 22:00:10.774005213 +0100
--- src/version.c 2019-11-02 22:45:15.571290904 +0100
***************
*** 743,744 ****
--- 743,746 ----
{ /* Add new patch number below this line */
+ /**/
+ 2242,
/**/

--
If they don't keep on exercising their lips, he thought, their brains
start working.
-- Douglas Adams, "The Hitchhiker's Guide to the Galaxy"

/// Bram Moolenaar -- Br...@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 ///

Tony Mechelynck

unread,
Nov 2, 2019, 7:05:37 PM11/2/19
to vim_dev
On Sat, Nov 2, 2019 at 10:46 PM Bram Moolenaar <Br...@moolenaar.net> wrote:
>
>
> Patch 8.1.2242
> Problem: Creating docs tags uses user preferences. (Tony Mechelynck)
> Solution: Add "--clean".
> Files: runtime/doc/Makefile

After applying this patch, as well as 2243 and 2244, one of which
recompiles everything starting at arabic.c, the problem has not
reappeared. (In Bugzilla terminology, I consider it VERIFIED FIXED.)
However, I notice that --clean removes ~/.vim(/after) but not
$VIM/vimfiles(/after) from 'runtimepath' and 'packpath', IOW it
removes "user" preferences but not "system" preferences, no matter how
misguided the sysadmin may have been. Is this intended?

Best regards,
Tony.

Bram Moolenaar

unread,
Nov 3, 2019, 9:47:24 AM11/3/19
to vim...@googlegroups.com, Tony Mechelynck
Yes, --clean avoids any user preferences (viminfo, plugins). But it
still uses Vim's preferences. Thus syntax highlighting still works.
If a sysadmin messes things up, that is his choice.

--
How To Keep A Healthy Level Of Insanity:
2. Page yourself over the intercom. Don't disguise your voice.

Tony Mechelynck

unread,
Nov 3, 2019, 10:50:37 AM11/3/19
to Bram Moolenaar, vim_dev
After recompiling just 8.1.2245 there were no changes to the docs, so
when running "make install" after that, runtime/doc/Makefile target
"vimtags" did nothing; yet at that point (runtime/doc/Makefile line
325 or src/Makefile line 2373) 25 or so empty lines were written on
the console. I'm baffled. (I'm compiling in a konsole 18.12.3 terminal
maximized to 244 columns by 73 lines.)

I checked that the --clean argument is still found at that point in
the src/Makefile; but in this case Vim seems not to have been invoked
anyway.

Best regards,
Tony.

P.S. Here's the relevant part of the console output:

generating help tags
make[1]: Entering directory '/root/.build/vim/vim-hg/runtime/doc'


























make[1]: Leaving directory '/root/.build/vim/vim-hg/runtime/doc'

Ken Takata

unread,
Nov 3, 2019, 11:42:06 AM11/3/19
to vim_dev
Hi,
...

make[1]: Leaving directory '/root/.build/vim/vim-hg/runtime/doc'
 
How about just redirecting stdout to null?

--- a/runtime/doc/Makefile
+++ b/runtime/doc/Makefile
@@ -323,7 +323,7 @@ all: tags vim.man evim.man vimdiff.man v

 # Use Vim to generate the tags file.  Can only be used when Vim has been
 # compiled and installed.  Supports multiple languages.
 vimtags: $(DOCS)
-    @if test -x $(VIMEXE); then $(VIMEXE) --clean -eX -u doctags.vim; \
+    @if test -x $(VIMEXE); then $(VIMEXE) -eX -u doctags.vim > /dev/null; \

         else echo "vim executable $(VIMEXE) not found"; fi
 
 # Use "doctags" to generate the tags file.  Only works for English!


I'm not sure whether --clean is really needed.
I'm also wandering `type $(VIMEXE) > /dev/null` might be better than `test -x $(VIMEXE)`.
`test -x` doesn't allow to use vim in $PATH.

--- a/runtime/doc/Makefile
+++ b/runtime/doc/Makefile
@@ -323,7 +323,7 @@ all: tags vim.man evim.man vimdiff.man v

 # Use Vim to generate the tags file.  Can only be used when Vim has been
 # compiled and installed.  Supports multiple languages.
 vimtags: $(DOCS)
-    @if test -x $(VIMEXE); then $(VIMEXE) --clean -eX -u doctags.vim; \
+    @if type $(VIMEXE) > /dev/null; then $(VIMEXE) -eX -u doctags.vim > /dev/null; \

         else echo "vim executable $(VIMEXE) not found"; fi
 
 # Use "doctags" to generate the tags file.  Only works for English!


Regards,
Ken Takata

Tony Mechelynck

unread,
Nov 3, 2019, 11:47:22 AM11/3/19
to vim_dev
On Sun, Nov 3, 2019 at 5:42 PM Ken Takata <ktakat...@gmail.com> wrote:
>
> Hi,
>
> 2019/11/4 Mon 0:50:37 UTC+9 Tony Mechelynck wrote:
>>
>> After recompiling just 8.1.2245 there were no changes to the docs, so
>> when running "make install" after that, runtime/doc/Makefile target
>> "vimtags" did nothing; yet at that point (runtime/doc/Makefile line
>> 325 or src/Makefile line 2373) 25 or so empty lines were written on
>> the console. I'm baffled. (I'm compiling in a konsole 18.12.3 terminal
>> maximized to 244 columns by 73 lines.)
>>
>> I checked that the --clean argument is still found at that point in
>> the src/Makefile; but in this case Vim seems not to have been invoked
>> anyway.
>>
>> Best regards,
>> Tony.
>>
>> P.S. Here's the relevant part of the console output:
>>
>> generating help tags
>> make[1]: Entering directory '/root/.build/vim/vim-hg/runtime/doc'
>>
> ...
>>
>>
>> make[1]: Leaving directory '/root/.build/vim/vim-hg/runtime/doc'
>
>
> How about just redirecting stdout to null?

IIRC, the whole idea of _not_ redirecting stdout to /dev/null was in
order to get a message if there were duplicate helptags (as there was
for *gm* at motion.txt line 230 until the latest runtime files
update).

Best regards,
Tony.

Ken Takata

unread,
Nov 3, 2019, 11:55:36 AM11/3/19
to vim_dev
Hi,
The error message for duplicate tags goes to stderr, so it will be shown on the terminal.

Regards,
Ken Takata

Bram Moolenaar

unread,
Nov 3, 2019, 12:39:21 PM11/3/19
to vim...@googlegroups.com, Ken Takata
One never knows what mappings and autocommands a user has, better avoid
them.

> I'm also wandering `type $(VIMEXE) > /dev/null` might be better than `test
> -x $(VIMEXE)`.
> `test -x` doesn't allow to use vim in $PATH.

Right, "make vimtags" doesn't work. I'm not sure how widespread "type"
is, I think "which" should be safer.


--
How To Keep A Healthy Level Of Insanity:
7. Finish all your sentences with "in accordance with the prophecy".

Christian Brabandt

unread,
Nov 3, 2019, 2:48:04 PM11/3/19
to vim...@googlegroups.com

On So, 03 Nov 2019, Bram Moolenaar wrote:

> Right, "make vimtags" doesn't work. I'm not sure how widespread "type"
> is, I think "which" should be safer.

type or command -v is the command one should use nowadays. For a really
deep dive into what to use, I suggest this great article:

https://unix.stackexchange.com/a/85250/303213

Best,
Christian
--
Tief und ernstlich denkende Menschen haben gegen das Publikum
einen bösen Stand.
-- Goethe, Maximen und Reflektionen, Nr. 61

Bram Moolenaar

unread,
Nov 3, 2019, 3:20:31 PM11/3/19
to vim...@googlegroups.com, Christian Brabandt

Christian wrote:

> On So, 03 Nov 2019, Bram Moolenaar wrote:
>
> > Right, "make vimtags" doesn't work. I'm not sure how widespread "type"
> > is, I think "which" should be safer.
>
> type or command -v is the command one should use nowadays. For a really
> deep dive into what to use, I suggest this great article:
>
> https://unix.stackexchange.com/a/85250/303213

Hmm, not that great. It doesn't list what command is available in which
version of a shell. It does mention that "which" is widely available,
while "type" is not. Although in a Makefile using csh or tcsh is
probably not working anyway.

--
How To Keep A Healthy Level Of Insanity:
12. Sing along at the opera.

James McCoy

unread,
Nov 3, 2019, 8:38:05 PM11/3/19
to vim...@googlegroups.com
On Sun, Nov 03, 2019 at 09:20:20PM +0100, Bram Moolenaar wrote:
>
> Christian wrote:
>
> > On So, 03 Nov 2019, Bram Moolenaar wrote:
> >
> > > Right, "make vimtags" doesn't work. I'm not sure how widespread "type"
> > > is, I think "which" should be safer.
> >
> > type or command -v is the command one should use nowadays. For a really
> > deep dive into what to use, I suggest this great article:
> >
> > https://unix.stackexchange.com/a/85250/303213
>
> Hmm, not that great. It doesn't list what command is available in which
> version of a shell. It does mention that "which" is widely available,
> while "type" is not.

FWIW, "command -v ..." is specified in POSIX. "type" is as well, but as
an XSI extension.

Cheers,
--
James
GPG Key: 4096R/91BF BF4D 6956 BD5D F7B7 2D23 DFE6 91AE 331B A3DB

Bram Moolenaar

unread,
Nov 4, 2019, 5:28:59 AM11/4/19
to vim...@googlegroups.com, James McCoy

> On Sun, Nov 03, 2019 at 09:20:20PM +0100, Bram Moolenaar wrote:
> >
> > Christian wrote:
> >
> > > On So, 03 Nov 2019, Bram Moolenaar wrote:
> > >
> > > > Right, "make vimtags" doesn't work. I'm not sure how widespread "type"
> > > > is, I think "which" should be safer.
> > >
> > > type or command -v is the command one should use nowadays. For a really
> > > deep dive into what to use, I suggest this great article:
> > >
> > > https://unix.stackexchange.com/a/85250/303213
> >
> > Hmm, not that great. It doesn't list what command is available in which
> > version of a shell. It does mention that "which" is widely available,
> > while "type" is not.
>
> FWIW, "command -v ..." is specified in POSIX. "type" is as well, but as
> an XSI extension.

In tcsh:

$ command -v vim
command: Command not found.

Perfect error message :-).


--
In many of the more relaxed civilizations on the Outer Eastern Rim of the
Galaxy, "The Hitchhiker's Guide to the Galaxy" has already supplanted the
great "Encyclopedia Galactica" as the standard repository of all knowledge
and wisdom, for though it has many omissions and contains much that is
apocryphal, or at least wildly inaccurate, it scores over the older, more
pedestrian work in two important respects.
First, it is slightly cheaper; and second, it has the words "DON'T PANIC"
inscribed in large friendly letters on its cover.
-- Douglas Adams, "The Hitchhiker's Guide to the Galaxy"

James McCoy

unread,
Nov 4, 2019, 6:37:24 AM11/4/19
to Bram Moolenaar, vim_dev
On Mon, Nov 4, 2019, 05:28 Bram Moolenaar <Br...@moolenaar.net> wrote:

> On Sun, Nov 03, 2019 at 09:20:20PM +0100, Bram Moolenaar wrote:
> >
> > Christian wrote:
> >
> > > On So, 03 Nov 2019, Bram Moolenaar wrote:
> > >
> > > > Right, "make vimtags" doesn't work.  I'm not sure how widespread "type"
> > > > is, I think "which" should be safer.
> > >
> > > type or command -v  is the command one should use nowadays. For a really
> > > deep dive into what to use, I suggest this great article:
> > >
> > > https://unix.stackexchange.com/a/85250/303213
> >
> > Hmm, not that great.  It doesn't list what command is available in which
> > version of a shell.  It does mention that "which" is widely available,
> > while "type" is not.
>
> FWIW, "command -v ..." is specified in POSIX.  "type" is as well, but as
> an XSI extension.

In tcsh:

$ command -v vim
command: Command not found.

Perfect error message :-).

Tcsh isn't /bin/sh, so I'm not sure why that's relevant.  This is in the context of a Makefile, which uses /bin/sh.

Cheers,
James

Ken Takata

unread,
Nov 4, 2019, 7:06:03 AM11/4/19
to vim_dev
Hi,
We already use "command -v" in src/po/Makefile.
I think it can be also safely used in runtime/doc/Makefile.

Regards,
Ken Takata

Christian Brabandt

unread,
Nov 4, 2019, 7:12:24 AM11/4/19
to vim_dev

On Mo, 04 Nov 2019, Ken Takata wrote:

> We already use "command -v" in src/po/Makefile.
> I think it can be also safely used in runtime/doc/Makefile.

And I think we even had a similar discussion back then ;)

Best,
Christian
--
Auf jede Frage eine Antwort wissen nur Dummköpfe.
-- John Ernst Steinbeck

Bram Moolenaar

unread,
Nov 4, 2019, 12:48:58 PM11/4/19
to vim...@googlegroups.com, Ken Takata
I suppose any kind of csh wouldn't work.

> We already use "command -v" in src/po/Makefile.
> I think it can be also safely used in runtime/doc/Makefile.

I was wondering how widely supported "command -v" is. Perhaps it's OK,
since that existing use hasn't triggered complaints. It's in a bit of a
far corner of the build rules though.

--
Now it is such a bizarrely improbable coincidence that anything as
mind-bogglingly useful as the Babel fish could have evolved purely by chance
that some thinkers have chosen to see it as a final and clinching proof of the
NON-existence of God.
The argument goes something like this: 'I refuse to prove that I exist,' says
God, 'for proof denies faith, and without faith I am nothing.'
'But,' says Man, 'the Babel fish is a dead giveaway, isn't it? It could not
have evolved by chance. It proves you exist, and so therefore, by your own
arguments, you don't. QED.'
'Oh dear,' says God, 'I hadn't thought of that,' and promptly vanishes in a
puff of logic.
'Oh, that was easy,' says Man, and for an encore goes on to prove that black
is white and gets himself killed on the next pedestrian crossing.
Reply all
Reply to author
Forward
0 new messages