emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ivan Andrus <darthandrus@gmail.com>
To: Ken Mankoff <mankoff@gmail.com>
Cc: emacs-orgmode@gnu.org, Charles Berry <ccberry@ucsd.edu>
Subject: Re: Fwd: Mac OS Alias file links
Date: Mon, 14 Apr 2014 17:19:47 -0600	[thread overview]
Message-ID: <AA689F40-7205-470B-B04C-6CEE0F481803@gmail.com> (raw)
In-Reply-To: <m2ha5vzrkx.fsf@gmail.com>

On Apr 14, 2014, at 12:36 PM, Ken Mankoff <mankoff@gmail.com> wrote:

> On 2014-04-14 at 13:42, Charles Berry wrote:
> 
>> 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.
> 
> 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 = {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’s an archived object of some kind, but I don’t know about OS X aliases to know what is the important part--I presume the NS.data portion.  It probably wouldn’t be too hard to borrow the code from BibDesk and extend Emacs to do the same thing, or write an external script.  I’m 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

  reply	other threads:[~2014-04-14 23:47 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
2014-04-14 17:42           ` Charles Berry
2014-04-14 18:36             ` Ken Mankoff
2014-04-14 23:19               ` Ivan Andrus [this message]
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=AA689F40-7205-470B-B04C-6CEE0F481803@gmail.com \
    --to=darthandrus@gmail.com \
    --cc=ccberry@ucsd.edu \
    --cc=emacs-orgmode@gnu.org \
    --cc=mankoff@gmail.com \
    /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).