Is there a way to fix symbolic links in dired?

Is there a way to fix symbolic links in dired?

Post by Aaron Gin » Sat, 15 Jul 2000 04:00:00



Running XEmacs 19.34 on Solaris...

I suppose some people like the way dired treats symbolic links.  I
don't and I want a way to fix it so symbolic links are treated the
same way they are on at a shell.  Here's the problem: when I select a
symbolic link in dired, it moves me into that directory.  However, if
I select the .. directory in that directory, it takes me back to the
directory where the symbolic link is, and not up one directory from
the directory that the symbolic link points to, the way a shell would
react.  Is there a variable I can set to change this functionality?

Thanks,
Aaron

--
Aaron J. Ginn                     Motorola SPS
Phone: (480) 814-4463             SemiCustom Solutions
Fax:   (480) 814-4058             1300 N. Alma School Rd.

 
 
 

Is there a way to fix symbolic links in dired?

Post by Aaron Gin » Sat, 15 Jul 2000 04:00:00



> Running XEmacs 19.34 on Solaris...

Sorry, make that 19.15.

--
Aaron J. Ginn                     Motorola SPS
Phone: (480) 814-4463             SemiCustom Solutions
Fax:   (480) 814-4058             1300 N. Alma School Rd.


 
 
 

Is there a way to fix symbolic links in dired?

Post by stromlun » Sat, 15 Jul 2000 04:00:00



>... I want a way to fix it so symbolic links are treated the
>same way they are on at a shell. Here's the problem: when I
>select a symbolic link in dired, it moves me into that
>directory.  However, if I select the .. directory in that
>directory, it takes me back to the directory where the
>symbolic link is, and not up one directory from the directory
>that the symbolic link points to, the way a shell would

Actually, as you describe it, dired *does* act like a shell.  All
shells I've worked w/any way, which is Korn shell on HP-UX and
bash/pdksh on GNU/Linux and Cygwin.  The only way to get your
results is to "cd -P lned-directory" RET "cd .." RET.  This will
get the results you described.  This may not be true of csh, I
have not used that shell, but I expect it would work the same
way.

You might check to see if you have cd aliased to "cd -P".

I have a defun that reads a filename from under the point and
opens it.  You could use it to open the full pathname that
follows the link name in the dired buffer.

Have fun...

--
Rodney Stromlund
http://www.libranet.com/petition.html   Sign It!
--

-----------------------------------------------------------

Got questions?  Get answers over the phone at Keen.com.
Up to 100 minutes free!
http://www.keen.com

 
 
 

1. monkey.el symbolic link bug (and fix)


UNIX version 4.3.  Monkey uses the file-symlink-p standard function,
but gives it a relative pathname instead of a full path name.
Unfortunately, file-symlink-p calls readlink(2), which expects a full
path name.  This is probably a gunemacs documentation bug, since the
documentation string for file-symlink-p does not make this
distinction.

Fix: stuff the path name onto the front of the file name before calling
file-symlink-p.  My fix also checks for symbolic links before
directories -- this is a personal preference, making a symbolic link

Context diff follows:
----------------------------------------------------------------------
*** monkey.el   Thu Nov 12 12:53:35 1987
--- monkey.el.fixed     Thu Nov 12 12:47:20 1987
***************
*** 450,457 ****
      (insert
       " "
       (cond (monkey-be-fast ??)
           ((file-directory-p name) ?/)

           ((file-readable-p name) " ")
           (t ??)))
      (insert-char 32 indent-spaces)
--- 450,457 ----
      (insert
       " "
       (cond (monkey-be-fast ??)

           ((file-directory-p name) ?/)
           ((file-readable-p name) " ")
           (t ??)))
      (insert-char 32 indent-spaces)
--
                                        ... Rich Messenger
                                            {cit-vax,trwrb}!wiley!rich

2. problems with PD describe on hpux 8.05 ftpd...

3. efs/dired symbolic link following

4. NTP on an AS5200 running IOS Version 11.3(10)T

5. In Dired, making relative symbolic links?

6. iff save/print library for c

7. Dired, symbolic links, and Solaris 2.2

8. Ping through the application

9. Link lines similar to a symbolic link?

10. dired-links.el - resolves links in GNU Emacs Dired

11. truename "Too many levels of symbolic links"

12. Two many levels of symbolic links problem...Help !

13. Two many levels of symbolic links... problem