unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* next-error processing of .. after going thru symlink
@ 2011-02-07  2:18 spucci
  0 siblings, 0 replies; only message in thread
From: spucci @ 2011-02-07  2:18 UTC (permalink / raw)
  To: Help-gnu-emacs


The behavior is general, but it's a particular problem with next-error:

When emacs attempts to find a file with "../" as a path component, it
appears to be "smart" about it and simply remove the previous directory path
(e.g., "foo/bar/../x" gets converted to "foo/x").  But if bar is a symlink,
then it doesn't properly find the file.  So in compiler output, which
references such files, the next-error function fails to find the file with
the given name.

mkdir dest
mkdir dest/subdir
mkdir src
ln -s ../dest/subdir src/subdir
echo "#error This is an error" > dest/foo.c

Now M-x compile, and give it cc -c src/subdir/../foo.c

*compilation* buffer has:
cc -c src/subdir/../foo.c
src/subdir/../foo.c:1:2: error: #error This is an error

and do a next-error: Emacs complains it can't find the file.  And if you try
to find-file that file path (src/subdir/../foo.c) it doesn't work either. 
Nor does "emacsclient src/subdir/../foo.c.  Is there any way to disable this
behavior?  If not it seems like a bug to me.

This is Gnu Emacs 23.2.1 I built myself on MacOS X 10.6.6.

Thanks,
  Steve

-- 
View this message in context: http://old.nabble.com/next-error-processing-of-..-after-going-thru-symlink-tp30860316p30860316.html
Sent from the Emacs - Help mailing list archive at Nabble.com.




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-02-07  2:18 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-07  2:18 next-error processing of .. after going thru symlink spucci

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).