Symbolic links and macOS

6 views
Skip to first unread message

Jean-Christophe Helary

unread,
Jan 1, 2023, 10:54:43 AM1/1/23
to mac-for-t...@googlegroups.com
It's easy to create aliases from the Finder, but macOS aliases are not recognized in lots of applications, including OmegaT and Emacs.

The solution is to create symbolic links.

Here is a simple explanation of the difference between macOS aliases, symbolic links, and their "cousins": hard links.

https://www.lifewire.com/aliases-symbolic-links-hard-links-mac-2260189

The problem with links is that they require using Terminal for creation.

There is probably a way to script that but I'm not going to scratch that itch today. I'm just telling you today that I found a nice utility that uses the GUI to create a symbolic link:

https://apps.apple.com/fr/app/symbolic-link-maker/id1534297180?l=en&mt=12

The application requires you to allow its Finder extension in System preferences and when that is done, you just right-click on the folder/file that you want to create a symlink to, you select the location where you want to create that symlink, you click OK and you're done.

Now, in Emacs (dired) I have this:

-rw-r--r--@ 1 suzume staff 880 Dec 20 01:51 omegat.org
lrwxr-xr-x@ 1 suzume staff 51 Jan 2 00:37 omegat.website -> /Users/suzume/Documents/Repositories/omegat.website

where omegat.org is a macOS alias that is nothing but a file containing gibberish for Emacs, while omegat.website is identified as a link to /Users/suzume/Documents/Repositories/omegat.website and when I click on it, I move there.

There are 2 inexpensive applications that do the same (search for "symbolic link" in the App Store), so it's up to you to decide whether it's OK to be annoyed by commercials in the application UI or not.


I can see how I would script that:

- store the selection in Finder
(consider that selected items end up in the same place after being linked)
- select a location
- use a Terminal tell block with "do script" to create the links at the location.
- wrap that as an Automator Quick Action and you can even access it from the Services menu


--
Jean-Christophe Helary @jche...@emacs.ch
https://traductaire-libre.org
https://mac4translators.blogspot.com
https://sr.ht/~brandelune/omegat-as-a-book/

Reply all
Reply to author
Forward
0 new messages