From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ivan Andrus Subject: Re: Fwd: Mac OS Alias file links Date: Mon, 14 Apr 2014 17:19:47 -0600 Message-ID: References: <87ioqcfepi.fsf@bzg.ath.cx> <8738hfswq4.fsf@Rainer.invalid> Mime-Version: 1.0 (Mac OS X Mail 7.2 \(1874\)) Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:33166) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WZqaj-0008Bd-ES for emacs-orgmode@gnu.org; Mon, 14 Apr 2014 19:47:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WZqaa-0004Jk-9r for emacs-orgmode@gnu.org; Mon, 14 Apr 2014 19:47:09 -0400 Received: from mail-ig0-x236.google.com ([2607:f8b0:4001:c05::236]:58099) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WZqaa-0004Je-4j for emacs-orgmode@gnu.org; Mon, 14 Apr 2014 19:47:00 -0400 Received: by mail-ig0-f182.google.com with SMTP id uy17so3989744igb.15 for ; Mon, 14 Apr 2014 16:46:59 -0700 (PDT) In-Reply-To: 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: Ken Mankoff Cc: emacs-orgmode@gnu.org, Charles Berry On Apr 14, 2014, at 12:36 PM, Ken Mankoff wrote: > On 2014-04-14 at 13:42, Charles Berry wrote: >=20 >> For this to work as you fantasize, you would need to enable the = Finder >> application to modify the part of the *.org file that encodes the >> alias when you change the location of the aliased file just as the >> Finder does to the alias when the location of the aliased file is >> modified in the Finder. >=20 > I don't think so. I'm not sure how BibDesk handles it, but my BibTeX > file is not modified when I move the PDF that is linked to an entry = via > that 1200 character field that encodes the alias. Clearly BibDesk does > something neat to encode and decode that field, but once created, the = OS > nor Finder know anything about that line or the file containing it. I > don't think Finder would need to know about a string in an Org file > either. We can look at a BibDesk file to see how it works. It adds a special = field like: Bdsk-File-1 =3D {YnBsaXN0MDDUA...AAAAAAAAAAAAAAAMO} We guess that this base64 encoded, so we decode it (M-x = base64-decode-region) This then gives us a binary plist (it starts with = bplist) which we can turn into a readable form with M-: plutil -convert = xml1 -o - - RET This gives an xml representation of what BibDesk stores. It=92s an = archived object of some kind, but I don=92t know about OS X aliases to = know what is the important part--I presume the NS.data portion. It = probably wouldn=92t be too hard to borrow the code from BibDesk and = extend Emacs to do the same thing, or write an external script. I=92m = not sure whether it would be possible to do it without touching C/Obj-C. = I would be interested in using such a thing (in BibDesk .bib files = actually), though probably not in writing it. :-) -Ivan=