emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] Fwd: Mac OS Alias file links


From: Ken Mankoff
Subject: Re: [O] Fwd: Mac OS Alias file links
Date: Mon, 14 Apr 2014 12:48:11 -0400
User-agent: mu4e 0.9.9.5; emacs 24.3.1

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.



reply via email to

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