* Re: find-tag and partial completion mode -- Francisco, urgent!
2007-05-02 11:02 find-tag and partial completion mode A Soare
@ 2007-05-02 17:44 ` Richard Stallman
2007-05-02 20:13 ` Glenn Morris
0 siblings, 1 reply; 12+ messages in thread
From: Richard Stallman @ 2007-05-02 17:44 UTC (permalink / raw)
To: alinsoar; +Cc: rgm, pot, emacs-devel
Francisco, what do you think of this issue?
in TAGS there is a line
../lwlib//TAGS,include
and from here the error was born.
Please try changing that line to
../lwlib/TAGS,include
Does that make it work?
Remember that in Emacs // has a special meaning.
Perhaps etags.el should remove the duplicate / to prevent
that Emacs meaning from being applied.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: find-tag and partial completion mode -- Francisco, urgent!
2007-05-02 20:13 ` Glenn Morris
@ 2007-05-02 20:02 ` Tom Tromey
0 siblings, 0 replies; 12+ messages in thread
From: Tom Tromey @ 2007-05-02 20:02 UTC (permalink / raw)
To: Glenn Morris; +Cc: alinsoar, pot, rms, emacs-devel
>>>>> "GM" == Glenn Morris <rgm@gnu.org> writes:
>> in TAGS there is a line
>> ../lwlib//TAGS,include
>> and from here the error was born.
GM> The "issue" is just that if you have a file which contains a line
GM> like:
GM> include ../foo
GM> and you access the file through a symlink from a different directory,
GM> then ../foo (probably) does not exist.
GM> The solution is just to not access the TAGS file through a symlink
GM> (something which there is no need to do).
The original poster's problem can be solved by using the etags -i
feature instead of making a symlink. I.e., rather than:
ln -s src/TAGS TAGS
use
etags -i src/TAGS
Tom
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: find-tag and partial completion mode -- Francisco, urgent!
2007-05-02 17:44 ` find-tag and partial completion mode -- Francisco, urgent! Richard Stallman
@ 2007-05-02 20:13 ` Glenn Morris
2007-05-02 20:02 ` Tom Tromey
0 siblings, 1 reply; 12+ messages in thread
From: Glenn Morris @ 2007-05-02 20:13 UTC (permalink / raw)
To: rms; +Cc: alinsoar, pot, emacs-devel
> in TAGS there is a line
>
> ../lwlib//TAGS,include
>
> and from here the error was born.
The "issue" is just that if you have a file which contains a line
like:
include ../foo
and you access the file through a symlink from a different directory,
then ../foo (probably) does not exist.
The solution is just to not access the TAGS file through a symlink
(something which there is no need to do). Or put the absolute path in
the TAGS file (which is then fragile if you want to move the sources
somewhere else). That means changing the TAGS target in src/Makefile
to specify an absolute path to lwlib rather than a relative one. No
point, IMO.
For some reason, this has turned back into Alin's previous "lwlib"
thread, but now disguised as a partial-completion issue.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: find-tag and partial completion mode -- Francisco, urgent!
@ 2007-05-02 20:26 A Soare
0 siblings, 0 replies; 12+ messages in thread
From: A Soare @ 2007-05-02 20:26 UTC (permalink / raw)
To: tromey; +Cc: Emacs Dev [emacs-devel]
> >>>>> "GM" == Glenn Morris <rgm@gnu.org> writes:
>
> >> in TAGS there is a line
> >> ../lwlib//TAGS,include
> >> and from here the error was born.
>
> GM> The "issue" is just that if you have a file which contains a line
> GM> like:
> GM> include ../foo
> GM> and you access the file through a symlink from a different directory,
> GM> then ../foo (probably) does not exist.
That is. True.
>
> GM> The solution is just to not access the TAGS file through a symlink
> GM> (something which there is no need to do).
Or to write in TAGS file the complete path, not a relative path.
>
> The original poster's problem can be solved by using the etags -i
> feature instead of making a symlink. I.e., rather than:
>
> ln -s src/TAGS TAGS
>
> use
>
> etags -i src/TAGS
>
ok.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: find-tag and partial completion mode -- Francisco, urgent!
@ 2007-05-02 20:26 A Soare
2007-05-03 1:46 ` Stefan Monnier
2007-05-04 13:14 ` Francesco Potorti`
0 siblings, 2 replies; 12+ messages in thread
From: A Soare @ 2007-05-02 20:26 UTC (permalink / raw)
To: Emacs Dev [emacs-devel]
> Francisco, what do you think of this issue?
>
>
> in TAGS there is a line
>
> ../lwlib//TAGS,include
>
> and from here the error was born.
>
> Please try changing that line to
>
> ../lwlib/TAGS,include
>
> Does that make it work?
It does not.
I repeat.
I use a LINK to TAGS file from src/TAGS.
More precisely, look ls -al in ./emacs directory
lrwxrwxrwx 1 root root 8 2007-04-18 05:56 TAGS -> src/TAGS
lrwxrwxrwx 1 root root 13 2007-04-18 05:56 TAGS-LISP -> src/TAGS-LISP
I do so:
M-. re-fr-st <TAB> insert here the path to TAGS file FROM EMACS DIRECTORY, NOT FROM ./EMACS/SRC.
In this case it does not work.
If I complete the path to the TAGS file from ./emacs/src/TAGS , it works.
So the only problem is that etags does not work if we work to a sym-link to the TAGS file. We must use the path to the original TAGS file. This is the but. This is the same bug as that one reported by me here:
<<lwlib>>.
http://lists.gnu.org/archive/html/emacs-devel/2007-04/msg01293.html
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: find-tag and partial completion mode -- Francisco, urgent!
@ 2007-05-02 20:27 A Soare
0 siblings, 0 replies; 12+ messages in thread
From: A Soare @ 2007-05-02 20:27 UTC (permalink / raw)
To: Emacs Dev [emacs-devel]
> > in TAGS there is a line
> >
> > ../lwlib//TAGS,include
> >
> > and from here the error was born.
>
> The "issue" is just that if you have a file which contains a line
> like:
>
> include ../foo
>
> and you access the file through a symlink from a different directory,
> then ../foo (probably) does not exist.
You did understand. That's it.
>
> The solution is just to not access the TAGS file through a symlink
> (something which there is no need to do). Or put the absolute path in
> the TAGS file (which is then fragile if you want to move the sources
> somewhere else). That means changing the TAGS target in src/Makefile
> to specify an absolute path to lwlib rather than a relative one. No
> point, IMO.
>
> For some reason, this has turned back into Alin's previous "lwlib"
> thread, but now disguised as a partial-completion issue.
>
Yes, today's find-tags bug is due to the fact that in case of error the TAGS file is not used at all.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: find-tag and partial completion mode -- Francisco, urgent!
2007-05-02 20:26 A Soare
@ 2007-05-03 1:46 ` Stefan Monnier
2007-05-04 13:14 ` Francesco Potorti`
1 sibling, 0 replies; 12+ messages in thread
From: Stefan Monnier @ 2007-05-03 1:46 UTC (permalink / raw)
To: alinsoar; +Cc: Emacs Dev [emacs-devel]
> I use a LINK to TAGS file from src/TAGS.
And that's the bug. If it hurts, why do it?
Stefan
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: find-tag and partial completion mode -- Francisco, urgent!
@ 2007-05-03 9:41 A Soare
0 siblings, 0 replies; 12+ messages in thread
From: A Soare @ 2007-05-03 9:41 UTC (permalink / raw)
To: Emacs Dev [emacs-devel]
>
> > I use a LINK to TAGS file from src/TAGS.
>
> And that's the bug. If it hurts, why do it?
>
Now I do not use any more a soft link.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: find-tag and partial completion mode -- Francisco, urgent!
2007-05-02 20:26 A Soare
2007-05-03 1:46 ` Stefan Monnier
@ 2007-05-04 13:14 ` Francesco Potorti`
2007-05-04 14:10 ` Stefan Monnier
2007-05-04 21:17 ` Richard Stallman
1 sibling, 2 replies; 12+ messages in thread
From: Francesco Potorti` @ 2007-05-04 13:14 UTC (permalink / raw)
To: alinsoar; +Cc: Emacs Dev [emacs-devel]
>So the only problem is that etags does not work if we work to a
>sym-link to the TAGS file. We must use the path to the original TAGS
>file.
The problem is that the TAGS file is built using relative file names
(the usual way to do it), like this:
etags *.[ch]
Consequently, if you make a link to TAGS from a different dir, the
relative names break.
Solutions have been mentioned:
- create one more TAGS file in your preferred dir and include the
src/TAGS file with option -i
- create a TAGS file using absolute file names
However, in principle one could change etags.el so that, when the TAGS
file is in fact a symbolic link, it resolves relative file names with
respect to the base directory of the file, rather than the link. I am
not sure that this is in fact a good idea but, if it is, it should be
eay to implement.
So: either we implement the change to etags.el that I suggest above, or
else I can add a couple of lines in the manual such as:
Notice that, in the usual case of using relative file names, you should
not use a symbolic link to a tags file in a different directory.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: find-tag and partial completion mode -- Francisco, urgent!
2007-05-04 13:14 ` Francesco Potorti`
@ 2007-05-04 14:10 ` Stefan Monnier
2007-05-04 21:17 ` Richard Stallman
1 sibling, 0 replies; 12+ messages in thread
From: Stefan Monnier @ 2007-05-04 14:10 UTC (permalink / raw)
To: Francesco Potorti`; +Cc: alinsoar, Emacs Dev [emacs-devel]
> So: either we implement the change to etags.el that I suggest above, or
> else I can add a couple of lines in the manual such as:
> Notice that, in the usual case of using relative file names, you should
> not use a symbolic link to a tags file in a different directory.
That seems like the better option. After all, it's very unusual to make
such symlinks to TAGS files, and it's not clear exactly what is the
motivation for such a thing: depending on the motivation the current
behavior can be wrong or right, and if we change it as you suggest, it will
still be sometimes right and sometimes wrong. Better keep things dumber, so
it's easier for the user to predict.
Stefan
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: find-tag and partial completion mode -- Francisco, urgent!
2007-05-04 13:14 ` Francesco Potorti`
2007-05-04 14:10 ` Stefan Monnier
@ 2007-05-04 21:17 ` Richard Stallman
2007-05-05 0:37 ` Francesco Potorti`
1 sibling, 1 reply; 12+ messages in thread
From: Richard Stallman @ 2007-05-04 21:17 UTC (permalink / raw)
To: Francesco Potorti`; +Cc: alinsoar, karl, emacs-devel
However, in principle one could change etags.el so that, when the TAGS
file is in fact a symbolic link, it resolves relative file names with
respect to the base directory of the file, rather than the link. I am
not sure that this is in fact a good idea but, if it is, it should be
eay to implement.
So: either we implement the change to etags.el that I suggest above, or
else I can add a couple of lines in the manual such as:
Notice that, in the usual case of using relative file names, you should
not use a symbolic link to a tags file in a different directory.
Please update the manual. I am not sure which behavior is better,
and if it isn't clear, we may as well leave it unchanged.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: find-tag and partial completion mode -- Francisco, urgent!
2007-05-04 21:17 ` Richard Stallman
@ 2007-05-05 0:37 ` Francesco Potorti`
0 siblings, 0 replies; 12+ messages in thread
From: Francesco Potorti` @ 2007-05-05 0:37 UTC (permalink / raw)
To: rms; +Cc: alinsoar, karl, emacs-devel
>Please update the manual. I am not sure which behavior is better,
>and if it isn't clear, we may as well leave it unchanged.
Done. I added this to maintaining.texi:
================================================================
Notice that, in the usual case of using relative file names, you
should not use a symbolic link pointing to a tags file in a different
directory, because this would generally render the file names invalid.
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2007-05-05 0:37 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-03 9:41 find-tag and partial completion mode -- Francisco, urgent! A Soare
-- strict thread matches above, loose matches on Subject: below --
2007-05-02 20:27 A Soare
2007-05-02 20:26 A Soare
2007-05-03 1:46 ` Stefan Monnier
2007-05-04 13:14 ` Francesco Potorti`
2007-05-04 14:10 ` Stefan Monnier
2007-05-04 21:17 ` Richard Stallman
2007-05-05 0:37 ` Francesco Potorti`
2007-05-02 20:26 A Soare
2007-05-02 11:02 find-tag and partial completion mode A Soare
2007-05-02 17:44 ` find-tag and partial completion mode -- Francisco, urgent! Richard Stallman
2007-05-02 20:13 ` Glenn Morris
2007-05-02 20:02 ` Tom Tromey
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).