From: Ken Mankoff <mankoff@gmail.com>
To: Achim Gratz <Stromeko@nexgo.de>
Cc: emacs-orgmode@gnu.org
Subject: Re: Fwd: Mac OS Alias file links
Date: Mon, 14 Apr 2014 12:48:11 -0400 [thread overview]
Message-ID: <m2mwfnzwl0.fsf@gmail.com> (raw)
In-Reply-To: <8738hfswq4.fsf@Rainer.invalid>
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.
next prev parent reply other threads:[~2014-04-14 16:48 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-08 7:03 Mac OS Alias file links Ken Mankoff
2014-04-13 22:39 ` Fwd: " Ken Mankoff
2014-04-14 9:22 ` Bastien
2014-04-14 11:32 ` Ken Mankoff
2014-04-14 12:42 ` Nick Dokos
2014-04-14 13:17 ` Ken Mankoff
2014-04-14 16:26 ` Achim Gratz
2014-04-14 16:48 ` Ken Mankoff [this message]
2014-04-14 17:42 ` Charles Berry
2014-04-14 18:36 ` Ken Mankoff
2014-04-14 23:19 ` Ivan Andrus
2014-04-15 0:21 ` Charles C. Berry
2014-04-15 1:58 ` Ken Mankoff
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m2mwfnzwl0.fsf@gmail.com \
--to=mankoff@gmail.com \
--cc=Stromeko@nexgo.de \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).