all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Invalid tags table
@ 2012-11-20 20:47 Thorsten Jolitz
  2012-11-20 21:39 ` Drew Adams
  0 siblings, 1 reply; 7+ messages in thread
From: Thorsten Jolitz @ 2012-11-20 20:47 UTC (permalink / raw)
  To: help-gnu-emacs


Hi List, 

I have a tags table (etags format) that works before I load my init.el
file. After I load it, M-. (find-tag) gives me an error-message:

,----------------------------------------------------------------------
| visit-tags-table-buffer: File /my/dir/TAGS is not a valid tags table.
`----------------------------------------------------------------------

Now I looked through my customisation files and did not find anything
suspicious. Can somebody give me hint what could be the possible cause
of this problem? The file must be valid, since it does work. Which
settings could be responsable for the error-message then?

-- 
cheers,
Thorsten





^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: Invalid tags table
  2012-11-20 20:47 Invalid tags table Thorsten Jolitz
@ 2012-11-20 21:39 ` Drew Adams
  2012-11-20 22:09   ` Thorsten Jolitz
  0 siblings, 1 reply; 7+ messages in thread
From: Drew Adams @ 2012-11-20 21:39 UTC (permalink / raw)
  To: 'Thorsten Jolitz', help-gnu-emacs

> I have a tags table (etags format) that works before I load my init.el
> file. After I load it, M-. (find-tag) gives me an error-message:
> 
> visit-tags-table-buffer: File /my/dir/TAGS is not a valid 
> tags table.
> 
> Now I looked through my customisation files and did not find anything
> suspicious. Can somebody give me hint what could be the possible cause
> of this problem? The file must be valid, since it does work. Which
> settings could be responsable for the error-message then?

Here are two approaches.  Since you mention your init file, I recommend starting
with the first one.

1. Recursively bisect your init file (half, quarter, eighth...) until you find
exactly which code leads to the problem.

2. `M-x debug-on-entry visit-tags-table-buffer', then step through the debugger
looking for what goes wrong: what it expects to see in the file vs what it
thinks it really does see.

At this point, you don't know whether the file is bad or not.  But you do say
that in some senses the file works, and you do implicate your init file.  So I'd
say start with #1.

HTH.  Hopefully someone else will be able to give you a more targeted solution.




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Invalid tags table
  2012-11-20 21:39 ` Drew Adams
@ 2012-11-20 22:09   ` Thorsten Jolitz
  2012-11-20 22:25     ` Drew Adams
  2012-11-22 16:50     ` Stefan Monnier
  0 siblings, 2 replies; 7+ messages in thread
From: Thorsten Jolitz @ 2012-11-20 22:09 UTC (permalink / raw)
  To: help-gnu-emacs

"Drew Adams" <drew.adams@oracle.com> writes:

>> I have a tags table (etags format) that works before I load my init.el
>> file. After I load it, M-. (find-tag) gives me an error-message:
>> 
>> visit-tags-table-buffer: File /my/dir/TAGS is not a valid 
>> tags table.

> 2. `M-x debug-on-entry visit-tags-table-buffer', then step through the
> debugger looking for what goes wrong: what it expects to see in the
> file vs what it thinks it really does see.

I tried this first, since I have quite a lot of customisation files.

That was a great tip, I wasn't even aware of this option, and it helped
me to figure out quickly that (file-exists-p) returned 'nil' on my tags
file, and the reason was actually trivial: a surprising uppercase L in a
directory-name I overlooked, so I mispelled the path in customizable
variable 'tags-table-list'. 

Now it works. Thanks a lot.

-- 
cheers,
Thorsten




^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: Invalid tags table
  2012-11-20 22:09   ` Thorsten Jolitz
@ 2012-11-20 22:25     ` Drew Adams
  2012-11-20 23:01       ` Thorsten Jolitz
  2012-11-22 16:50     ` Stefan Monnier
  1 sibling, 1 reply; 7+ messages in thread
From: Drew Adams @ 2012-11-20 22:25 UTC (permalink / raw)
  To: 'Thorsten Jolitz', help-gnu-emacs

> > 2. `M-x debug-on-entry visit-tags-table-buffer'
> 
> I tried this first, since I have quite a lot of customisation files.
> 
> That was a great tip, I wasn't even aware of this option, and 
> it helped me to figure out...  Now it works. Thanks a lot.

You're welcome, and I'm glad it was so easy.

In general, however, I recommend the other option I mentioned: bisect your init
file - regardless of how big your init file is or how much it loads.

Binary search is your friend.  The difference between handling an init file that
is 32 times bigger (and that's a lot) is only 5 more bisections.  It really
doesn't take long.

We humans tend to entertain multiple possibilities when troubleshooting ('cause
we think we're so smart, I guess, and we like to play detective).  And
especially when you have a big init file, that means trying to juggle lots of
possibilities at the same time.

Sticking blindly to a binary search means not even considering half, then 3/4,
then 7/8,... of those possibilities.  Not even considering.  Not even thinking.
Pure thoughtless magic.

Yeah, sometimes it can help to combine a little thought with blind search.  But
sometimes that can lead you astray as well.




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Invalid tags table
  2012-11-20 22:25     ` Drew Adams
@ 2012-11-20 23:01       ` Thorsten Jolitz
  0 siblings, 0 replies; 7+ messages in thread
From: Thorsten Jolitz @ 2012-11-20 23:01 UTC (permalink / raw)
  To: help-gnu-emacs

"Drew Adams" <drew.adams@oracle.com> writes:

>> > 2. `M-x debug-on-entry visit-tags-table-buffer'
>> 
>> I tried this first, since I have quite a lot of customisation files.
>> 
>> That was a great tip, I wasn't even aware of this option, and 
>> it helped me to figure out...  Now it works. Thanks a lot.
>
> You're welcome, and I'm glad it was so easy.
>
> In general, however, I recommend the other option I mentioned: bisect
> your init file - regardless of how big your init file is or how much
> it loads.

The problem was that I actually looked at the right spot in my custom.el
file before - but could not see the mistake (/.../mylisp/.../ vs.
/.../myLisp/.../ in a long directory name).

So single stepping in the debugger was just the right thing to do, since
it showed me that there must be something wrong with the filename, not
the file format.

Thanks again. 

-- 
cheers,
Thorsten




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Invalid tags table
  2012-11-20 22:09   ` Thorsten Jolitz
  2012-11-20 22:25     ` Drew Adams
@ 2012-11-22 16:50     ` Stefan Monnier
  2012-11-23 12:46       ` Thorsten Jolitz
  1 sibling, 1 reply; 7+ messages in thread
From: Stefan Monnier @ 2012-11-22 16:50 UTC (permalink / raw)
  To: help-gnu-emacs

>>> visit-tags-table-buffer: File /my/dir/TAGS is not a valid 
>>> tags table.
[...]
> That was a great tip, I wasn't even aware of this option, and it helped
> me to figure out quickly that (file-exists-p) returned 'nil' on my tags

Please M-x report-emacs-bug, requesting that the error message
be improved to distinguish "found file, invalid format" from "file not
found".


        Stefan




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Invalid tags table
  2012-11-22 16:50     ` Stefan Monnier
@ 2012-11-23 12:46       ` Thorsten Jolitz
  0 siblings, 0 replies; 7+ messages in thread
From: Thorsten Jolitz @ 2012-11-23 12:46 UTC (permalink / raw)
  To: help-gnu-emacs

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>>>> visit-tags-table-buffer: File /my/dir/TAGS is not a valid 
>>>> tags table.
> [...]
>> That was a great tip, I wasn't even aware of this option, and it helped
>> me to figure out quickly that (file-exists-p) returned 'nil' on my tags
>
> Please M-x report-emacs-bug, requesting that the error message
> be improved to distinguish "found file, invalid format" from "file not
> found".

Done

-- 
cheers,
Thorsten




^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-11-23 12:46 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-20 20:47 Invalid tags table Thorsten Jolitz
2012-11-20 21:39 ` Drew Adams
2012-11-20 22:09   ` Thorsten Jolitz
2012-11-20 22:25     ` Drew Adams
2012-11-20 23:01       ` Thorsten Jolitz
2012-11-22 16:50     ` Stefan Monnier
2012-11-23 12:46       ` Thorsten Jolitz

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.