[Top][All Lists]

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

Re: Function to find symlink target

From: Jean Louis
Subject: Re: Function to find symlink target
Date: Wed, 1 Jun 2022 10:43:39 +0300
User-agent: Mutt/+ () (2022-05-21)

* Emanuel Berg <> [2022-05-31 15:32]:
> > Symlinks greatly help in that case, and do spare the hard
> > disk space.
> Compared to duplicating all the files physically on the
> local machine?

Yes, symlinks can be in a different file structure than their actual
files on the hard disk.

For example:

~/hyperscope/1/2/3/my-file.pdf may be in a complex structure of other
documents, maybe in the same directory could be other 200 files, and
file could be related to ABC subject.

Same file in the public_html directory:


then may give quite different context, different meaning in a different
file structure. And even file name in WWW structure should may become
more meaningful then the actual file name, that is matter of marketing

Then I use often this command to give me the actual WWW link to the
file provided file is in my public_html directory:

(defun loc ()
  "Locates the files, and if it is in public_html, it constructs the URL"
  (let* ((files (dired-get-marked-files)))
    (kill-new (with-temp-buffer
                (while files
                  (let* ((file (pop files))
                         (uri (if current-prefix-arg file
                                (public-html-rest file))))
                    (insert uri "\n")))

If the file is then located in WWW structure, I would do `M-x loc' on
the file and get a result like:

but if file is not located in WWW structure, I would get result like:



Take action in Free Software Foundation campaigns:

In support of Richard M. Stallman

reply via email to

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