all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#8035: Processing of .. in a file path after going thru symlink
@ 2011-02-14  3:05 spucci
  2011-02-19 21:37 ` Glenn Morris
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: spucci @ 2011-02-14  3:05 UTC (permalink / raw)
  To: 8035


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.  I couldn't find an option to
disable this behavior; it seems like there should be one even if the default
continues to be as it is today.

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/Processing-of-..-in-a-file-path-after-going-thru-symlink-tp30918394p30918394.html
Sent from the Emacs - Bugs mailing list archive at Nabble.com.






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

end of thread, other threads:[~2021-08-26 17:30 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-14  3:05 bug#8035: Processing of .. in a file path after going thru symlink spucci
2011-02-19 21:37 ` Glenn Morris
2011-02-20  2:35   ` Steve Pucci
2011-02-20  2:41     ` Steve Pucci
2021-08-26 16:29 ` Lars Ingebrigtsen
2021-08-26 16:44   ` Eli Zaretskii
2021-08-26 17:03     ` Lars Ingebrigtsen
2021-08-26 17:08       ` Eli Zaretskii
2021-08-26 17:24         ` Lars Ingebrigtsen
2021-08-26 17:30           ` Eli Zaretskii
2021-08-26 16:53   ` Andreas Schwab
2021-08-26 17:04     ` Lars Ingebrigtsen
2021-08-26 17:19       ` Andreas Schwab
2021-08-26 17:30 ` Lars Ingebrigtsen

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.