Comments on DrewAdams

Classic view: click here.

– Alex Schroeder 2018-07-26 07:01 UTC

Hello Drew, Since you are the author of dired+, I have a feature request: to support relative symlinks in Diredp-move-files. Currently the symlinks will be broken after the move.

godblessfq 2019-01-14 13:02 UTC

@godblessfq: I don’t know just what the request is for such rel symlink support. (Also, I can’t test symlink code, as I’m on MS Windows. If you have a patch or more precise info, please suggest it. Thx.

DrewAdams 2019-01-14 14:40 UTC

@drew: The use case is to move files (rel symlinks) around in a git-annex repo without unlocking it, someone told me that git will fix the broken symlinks before commit. I will try to provide a patch.

godblessfq 2019-01-15 01:29 UTC

@Drew I solve this with an advice for rename-file.

    (defun my-rename-file (file newname &optional ok-if-already-exists)
    "fix path for relative symlink"
    (let ((target (expand-file-name (file-symlink-p newname) (file-name-directory file))))
          (if (and target (string-equal system-type "gnu/linux") (not (file-exists-p newname))) 
              (dired-make-relative-symlink target newname t))))
    (advice-add #'rename-file :after #'my-rename-file)

I am quite new to emacs, I am not sure if the above has any side effect. There are some complicated examples of dealing with symlink : I am not sure if windows has relative shortcuts. This link show you can use symlinks in windows:

godblessfq 2019-01-15 09:02 UTC

@godblessfq: Sorry, but I think you should instead file an Emacs bug report (enhancement request) for this, using ‘M-x report-emacs-bug’. Someone knowledgeable will take a look and DTRT. I’ll then update the version in Dired+. You can include your advice in the bug report, as further indication of the problem you see and what might help resolve it. Thx.

DrewAdams 2019-01-15 17:13 UTC

Please make sure you contribute only your own work. IP numbers are made available via the page history. If you want to keep it a secret, you need to use Tor. See TextFormattingRules for how to format text. See StyleGuide for the suggested writing style on this wiki.

To save this page you must answer this question:

What is the greatest editor out there?