From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ken Mankoff Subject: Re: Fwd: Mac OS Alias file links Date: Mon, 14 Apr 2014 12:48:11 -0400 Message-ID: References: <87ioqcfepi.fsf@bzg.ath.cx> <8738hfswq4.fsf@Rainer.invalid> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:49614) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WZk3X-0001dv-4p for emacs-orgmode@gnu.org; Mon, 14 Apr 2014 12:48:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WZk3L-0004CU-7Y for emacs-orgmode@gnu.org; Mon, 14 Apr 2014 12:48:27 -0400 Received: from mail-qg0-x22f.google.com ([2607:f8b0:400d:c04::22f]:63950) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WZk3L-0004CK-1M for emacs-orgmode@gnu.org; Mon, 14 Apr 2014 12:48:15 -0400 Received: by mail-qg0-f47.google.com with SMTP id i50so1079559qgf.34 for ; Mon, 14 Apr 2014 09:48:14 -0700 (PDT) In-reply-to: <8738hfswq4.fsf@Rainer.invalid> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Achim Gratz Cc: emacs-orgmode@gnu.org On 2014-04-14 at 12:26, Achim Gratz wrote: > Ken Mankoff writes: >> Aliases are a type of links ("ln" on linux, "shortcut" on Windows >> "alias" on OS X (OS X of course also supports "ln")). The difference >> between an OS X alias and "ln" is that if the target is moved, the OS >> X alias still points to it, and double-clicking on an alias (or >> issuing the "open" command in a terminal) will open the target, >> wherever it is. > > If I understand correctly, this only works through Finder and not from > a shell and POSIXfile access functions. Whether or not Emacs could > use aliases therefore depends on what interface it is using to access > files on MacOS (I have no idea). When you say "this only works" I'm not sure what you are referring to. I assume creation and/or access. * Creation Yes creating Aliases is a Finder function, although creation can be scripted from the shell through the "osascript" CLI utility provided on OSX. * Access Some access works through the shell. If I make a link to an alias in Org, opening the link works and is handled by the system for all the different types of files I can create an alias to. But an alias is not like an "ln"-like link. It presents to the OS as its own file, so if you try to edit an alias to a plain text file, you get a bunch of garbage (the alias), not the plain text file. In my fantasy, the link wouldn't be to an alias file, it would *contain the alias* the way the BibDesk field does. Therefore C-o on an "alias:" link would require extra code: Decode the alias, then pass it off to the system. >> I just checked in a VM and Windows Shortcuts also behave this way. > > No, they don't. Explorer does find the file if you move it into a > subfolder and will ask you to tell it where it went if it doesn't find > it, but any direct access through that shortcut will fail as if the > file didn't exist. Also, WIndows shortcuts and Windows links are two > totally different things and links don't follow moving targets either. My system is different. I'm not sure why. I have an XP VM. I created a "New Text Document" file on the desktop. I right-click, and select "Create Shortcut". I have a new shortcut on the desktop. I moved the original file elsewhere (C:\, "My Documents", etc. not just subfolders), double-clicked on the shortcut (still on Desktop), and the original file opened. I could edit and save it and saves were placed into the relocated file. If "direct access" you mean POSIX-level access, then perhaps. I don't know. But I think emacs can operate on files at a higher level. -k.