emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [BUG] Not following symlinks by default


From: Ramkumar Ramachandra
Subject: Re: [BUG] Not following symlinks by default
Date: Sun, 28 Jul 2013 17:32:46 +0530

Ramkumar Ramachandra wrote:
>   #!/bin/sh
>
>   cd /tmp
>   rm -rf z b
>   mkdir z z/a z/b
>   echo ha >z/a/file
>   ln -s z/b
>   cd b
>   cat ../a/file
>   emacs -Q ../a/file # buffer-file-name = /tmp/a/file
>
> Why doesn't emacs behave like cat or vim?  Isn't this behavior a bad default?

Okay, so expand-file-name defined in src/fileio.c is buggy:

  #!/bin/sh

  cd /tmp
  rm -rf z b
  mkdir z z/a z/b
  ln -s z/b
  cd b
  emacs -Q --batch --eval='(error (expand-file-name "../a"))'
  realpath "../a"

Why such horribly convoluted logic? What could be more straightforward?

https://github.com/git/git/blob/master/abspath.c#L34



reply via email to

[Prev in Thread] Current Thread [Next in Thread]