E431

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

E431

Steve
Hi there,

Trying to lean how to use tags.

So downloaded a project and

cd projet/
ctags -R .
vim file.php
:set tags=absolute path to tags file
position cursor on a function
Ctrl-]

which triggers the error

E431 format error in tags file tags
before byte 62

A search on the Internet shows a lot of pages but none that helped me.

I'm using Debian 10.3
ctags --version
Exuberant Ctags 5.9~svn20110310, Copyright (C) 1996-2009 Darren Hiebert
  Addresses: <[hidden email]>, http://ctags.sourceforge.net
  Optional compiled features: +wildcards, +regex

vim --version
VIM - Vi IMproved 8.2 (2019 Dec 12, compilé Apr 22 2020 13:35:06)
Rustines incluses : 1-616

Thanks for any help.

Have a nice Sunday
Steve

--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20200503081931.GA27692%40paros.maison.mrs.
Reply | Threaded
Open this post in threaded view
|

Re: E431

Rajarajan Rajamani-2
Open the tags file itself and see if it kinda ok. Maybe there is a malformed line. Tags files are text files with every line showing a search pattern and file location. Just verify if the tagfile if ok.

On Sun, May 3, 2020, 4:19 AM Steve <[hidden email]> wrote:
Hi there,

Trying to lean how to use tags.

So downloaded a project and

cd projet/
ctags -R .
vim file.php
:set tags=absolute path to tags file
position cursor on a function
Ctrl-]

which triggers the error

E431 format error in tags file tags
before byte 62

A search on the Internet shows a lot of pages but none that helped me.

I'm using Debian 10.3
ctags --version
Exuberant Ctags 5.9~svn20110310, Copyright (C) 1996-2009 Darren Hiebert
  Addresses: <[hidden email]>, http://ctags.sourceforge.net
  Optional compiled features: +wildcards, +regex

vim --version
VIM - Vi IMproved 8.2 (2019 Dec 12, compilé Apr 22 2020 13:35:06)
Rustines incluses : 1-616

Thanks for any help.

Have a nice Sunday
Steve

--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20200503081931.GA27692%40paros.maison.mrs.

--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CADbyKk6uTyf6MO7_Lh0puZ6AX%3D9xVBHeF9ELnRDLfyAQ8mjzwA%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: E431

Steve
Hi,

Le 03-05-2020, à 07:03:31 -0400, Rajarajan Rajamani a écrit :

>   Open the tags file itself and see if it kinda ok. Maybe there is a
>   malformed line. Tags files are text files with every line showing a
>   search pattern and file location. Just verify if the tagfile if ok.

Ok, but what is an ok tag file? As I said, I'm a totally newcomer is
this field.

--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20200503153559.GA4356%40paros.maison.mrs.
Reply | Threaded
Open this post in threaded view
|

Re: E431

Steve
Seems that the *.js files were causing the problem. I reran ctags like
this and it now works as expected:

ctags -R --exclude='*.js' .

But don't understand why js files were the culprit.

Thanks
Steve

--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20200503154419.GA5362%40paros.maison.mrs.
Reply | Threaded
Open this post in threaded view
|

Re: E431

Gary Johnson-4
On 2020-05-03, Steve wrote:
> Seems that the *.js files were causing the problem. I reran ctags like
> this and it now works as expected:
>
> ctags -R --exclude='*.js' .
>
> But don't understand why js files were the culprit.

You wrote that you got this error message:

    E431 format error in tags file tags before byte 62

The format of a tags file is pretty simple.  You can read about it
at

    :help E431

Try opening the tags file with the error using Vim and execute this
normal-mode command:

    62go

That will put the cursor on byte 62.  The error should be apparent.
Since Vim expects to see tabs between fields of the tags lines, it
might help to execute

    :set list

to make the tabs visible.

If the error is still not apparent, post the first few lines of the
tags file here and maybe someone here can see the problem.

It could be something like the coding of the .js file that causes
ctags to create a line that Vim can't understand, but that's just
a guess.

Regards,
Gary

--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20200503184721.GC390%40phoenix.
Reply | Threaded
Open this post in threaded view
|

Re: E431

Steve
Hi Gary,


Le 03-05-2020, à 11:47:21 -0700, Gary Johnson a écrit :

>If the error is still not apparent, post the first few lines of the
>tags file here and maybe someone here can see the problem.


                token : .lparen..................blockComment
            }, {
!_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/
!_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/
!_TAG_PROGRAM_AUTHOR Darren Hiebert /[hidden email]/
!_TAG_PROGRAM_NAME Exuberant Ctags //
!_TAG_PROGRAM_URL http://ctags.sourceforge.net        /official site/
!_TAG_PROGRAM_VERSION 5.9~svn20110310 //
" includes/ace/src/mode-slim.js /^    this.$quotes = {'"': '"', "'": "'", "`": "`"};$/;" p class:$quotes
" includes/restler/framework/Luracast/Restler/explorer/lib/underscore-min.js


I guess the first line doesn't look good.

Thanks for the help.

Steve

--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20200504071212.GA10331%40paros.maison.mrs.
Reply | Threaded
Open this post in threaded view
|

Re: E431

Gary Johnson-4
On 2020-05-04, Steve wrote:

> Hi Gary,
>
>
> Le 03-05-2020, à 11:47:21 -0700, Gary Johnson a écrit :
>
> >If the error is still not apparent, post the first few lines of the
> >tags file here and maybe someone here can see the problem.
>
>
>                token : .lparen..................blockComment
>            }, {
> !_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/
> !_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/
> !_TAG_PROGRAM_AUTHOR Darren Hiebert /[hidden email]/
> !_TAG_PROGRAM_NAME Exuberant Ctags //
> !_TAG_PROGRAM_URL http://ctags.sourceforge.net        /official site/
> !_TAG_PROGRAM_VERSION 5.9~svn20110310 //
> " includes/ace/src/mode-slim.js /^    this.$quotes = {'"': '"', "'": "'", "`": "`"};$/;" p class:$quotes
> " includes/restler/framework/Luracast/Restler/explorer/lib/underscore-min.js
>
>
> I guess the first line doesn't look good.

Hi Steve,

No, it doesn't.  This looks like a bug in Exuberant Ctags that was
reported in August of 2009:

    https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=541316

Since development of Exuberant Ctags stopped sometime in 2009, it
may never have been fixed.

Workarounds proposed in that report include editing the tags file
and deleting any suspicious lines before the !_TAG_FILE_FORMAT line,
or filtering the tags file with an awk script (although I think
using sed or grep would be simpler).

If this happens only occasionally, I would just edit the tags file
with Vim.  If it's a continual problem, then running ctags like this
should fix it:

    $ ctags -R -f - | grep $'\t' > tags

You could also try using Universal Ctags instead of Exuberant Ctags.
It might not have the bug, if this is indeed a bug in Exuberant
Ctags.

> Thanks for the help.

You're welcome.  I hope we can find a good solution.

Regards,
Gary

--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20200504192147.GD390%40phoenix.
Reply | Threaded
Open this post in threaded view
|

Re: E431

Steve
Le 04-05-2020, à 12:21:47 -0700, Gary Johnson a écrit :

>>
>> I guess the first line doesn't look good.
>
>Hi Steve,
>
>No, it doesn't.  This looks like a bug in Exuberant Ctags that was
>reported in August of 2009:
>
>    https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=541316
>
>Since development of Exuberant Ctags stopped sometime in 2009, it
>may never have been fixed.

2009, amazing.

>Workarounds proposed in that report include editing the tags file
>and deleting any suspicious lines before the !_TAG_FILE_FORMAT line,

which I did, and it works.

>or filtering the tags file with an awk script (although I think
>using sed or grep would be simpler).
>
>If this happens only occasionally, I would just edit the tags file
>with Vim.  If it's a continual problem, then running ctags like this
>should fix it:
>
>    $ ctags -R -f - | grep $'\t' > tags

This also helps, even if it spits out lines like:

ctags: Warning: ignoring null tag in includes/jquery/js/jquery.min.js

>You could also try using Universal Ctags instead of Exuberant Ctags.
>It might not have the bug, if this is indeed a bug in Exuberant
>Ctags.

With Universal Ctags,

ctags -R .

throws out lines like

ctags: Warning: ignoring null tag in includes/jquery/plugins/flot/jquery.flot.pie.min.js(line: 7)

(but less than with Exuberant Ctags)

but works (no E431 error).

Don't know what are those "null tags" though.


>> Thanks for the help.
>
>You're welcome.  I hope we can find a good solution.

Changing from Exuberant to Universal is a solution, thanks a lot.

I can now continue my learnings.

Have a nice day

Steve

--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20200505072602.GA14864%40paros.maison.mrs.