How to add RefTeX support
[Worg/babel-doc.git] / org-mac.org
blob19fda5454a0cf4815d4bf0a2536e86b988be44a5
1 #+OPTIONS:    H:3 num:nil toc:t \n:nil @:t ::t |:t ^:t -:t f:t *:t TeX:t LaTeX:t skip:nil d:(HIDE) tags:not-in-toc
2 #+STARTUP:    align fold nodlcheck hidestars oddeven lognotestate
3 #+SEQ_TODO:   TODO(t) INPROGRESS(i) WAITING(w@) | DONE(d) CANCELED(c@)
4 #+TAGS:       Write(w) Update(u) Fix(f) Check(c)
5 #+TITLE:      Org and Mac OS X
6 #+AUTHOR:     Worg people
7 #+EMAIL:      bzg AT altern DOT org
8 #+LANGUAGE:   en
9 #+PRIORITIES: A C B
10 #+CATEGORY:   worg
12 # This file is the default header for new Org files in Worg.  Feel free
13 # to tailor it to your needs.
15 [[file:index.org][{Back to Worg's index}]]
17 Assorted hacks to interact with org-mode whilst working in OS X
18 applications other than Emacs...
20 * [[file:org-contrib/org-mac-maillink.org][org-mac-maillink]] -- linking to messages in OS X Microsoft Entourage app
21   A short Applescript/terminal hack that allows the user to create a link to a
22   message from within the Microsoft Entourage application and
23   paste it directly into an Org-mode file.  The link uses the email's
24   subject line as its description.
25   Written by /Matt Strickland/.
27 * [[file:org-contrib/org-mac-iCal.org][org-mac-iCal]] -- import OS X iCal.app events into Emacs diary
28   Written by /Christopher Suckling/.
30 * [[file:org-contrib/org-mac-message.org][org-mac-message]] -- linking to messages in OS X Mail.app
31   Create links to selected or flagged messages in Mail.app.
32   Written by /John Wiegley/ and /Christopher Suckling/.
34 * org-mac-protocol -- interact with [[file:org-contrib/org-protocol.org][org-protocol]] from OS X applications
35   Written by /Christopher Suckling/.
36   
37   : Version: 0.628
39   A suite of scripts that allow the user to annotate their org-mode
40   buffers without switching focus from other OS X applications
41   to Emacs.
43   The AppleScripts interface with org-protocol.el to extract content
44   from, and link to, documents and applications. 
46   Three modes of interaction are provided:
48   =org-link= creates an org-mode link and adds it to =*Org Links*= and
49   the kill-ring.
51   =org-remember= pops up a small =*Remember*= frame with links and,
52   where possible, extracted content embedded.
54   =org-note= pops up a small =*Remember*= frame for note taking
55   independent of the document being worked on.
57 ** Obtaining
58    A disk image can be downloaded [[http://claviclaws.net/org/org-mac-protocol.dmg][here]].
60    A git repository can be found at =git://github.com/claviclaws/org-mac-protocol.git=
62    The git repository does not contain the [[http://homepage.mac.com/tkurita/scriptfactory/Softwares/OSAX/URIEscape/manual/en/index.html][URI Escape]] scripting addition.
64 ** Included files
65    
66    - org-mac-protocol.pkg (installer package)
67    - sources (including Scripting Additions sources)
68    - org-mac-protocol.org (this manual)
70 ** Requirements
72    - OS X 10.5 (untested on previous versions)
74    - [[http://orgmode.org][Org-Mode]] 6.28 or above (untested on previous versions)
75    - [[https://gna.org/p/remember-el][Remember]]
77 ** Installation and configuration
78 *** Install files
79 **** =org-mac-protocol.pkg= - OS X 10.5 only 
81     - Launch the installer and follow on screen instructions.  You
82       must set a location for org-mac-protocol.el that is on your
83       Emacs load-path.
85 **** Manual installation - OS X 10.4
87     - Copy files from the =sources= directory to their relevant
88       locations.
89       
90       =org-mac-protocol.el= should be placed on your Emacs load-path.
92       The contents of the =Scripts= directory should be placed in
93       =~/Library/Scripts/=.
95       =URI Escape.osax= should be placed in
96       =~/Library/ScriptingAdditions/=, creating the directory if
97       necessary. =URI Escape.osax= is found on the
98       =URIEscape1.1.2.dmg= disk image.
100 *** Edit your .emacs
101 **** Require org-mac-protocol.el
103      : (require 'org-mac-protocol)
105      or
106      
107      : (add-to-list 'org-modules 'org-mac-protocol)
109      Note that =org-modules= must be set before org-mode is loaded.
111 **** Start emacsserver
113      : (server-start)
115 **** Create =*Remember*= templates
117      Two separate =*Remember*= templates are required, one for
118      =org-remember= and one for =org-note=:
119     
120      : ("AppleScript remember" ?y "* %?\n\n  Source: %u, %c\n\n  %i" (concat org-directory "inbox.org") "Remember")
121      
122      : ("AppleScript note" ?z "* %?\n\n  Date: %u\n" (concat org-directory "inbox.org") "Notes")
123      
124      These templates can be fairly flexible. The only essential items
125      are =?y= and =?z= respectively (the template selection
126      characters), and, for =org-remember=, =%c= (the link to the
127      document), and =%i= (the selection within the document).
128      
129      If you choose to alter the template selection characters, you
130      *must* alter =theProtocol= variable in =org-remember.scpt= and
131      =org-note.scpt= to reflect your changes.
133      Please see the [[http://orgmode.org/manual/Remember-templates.html#Remember-templates][org manual]] and the [[http://orgmode.org/worg/org-contrib/org-protocol.php][org-protocol.el manual]] for
134      further details on template customisation.
136 **** Eval .emacs
137 *** Edit orgQSLib/getEmacsClient.scpt
138     
139     - Set =theEmacsClient= to point to emacsclient for your flavour of Emacs.
140       
141       The default setting should work with CVS Emacs and Carbon Emacs.
142       Aquamacs users will have to edit this variable.
144 ** Usage
145    There are three scripts that can be invoked; =org-link=,
146    =org-note=, and =org-remember=. These scripts can be called by
147    various methods, for example, the [[file://Applications/AppleScript/AppleScript%20Utility.app/][Script menu]] in the menu bar,
148    [[http://code.google.com/p/blacktree-alchemy/][Quicksilver]], [[http://www.red-sweater.com/fastscripts/][FastScripts]] etc.
150 *** Currently supported applications
152     |          | org-link           | org-note | org-remember                     |
153     |----------+--------------------+----------+----------------------------------|
154     | Finder   | Link: file         | Yes      | Content: no                      |
155     | Safari   | Link: URL          | Yes      | Content: current selection       |
156     | Mail     | Link: message      | Yes      | Content: entire message          |
157     | Skim     | Link: PDF          | Yes      | Content: current selection       |
158     | BibDesk  | Link: entry        | Yes      | Content: Harvard style citation  |
159     | Terminal | Link: Terminal.app | Yes      | Content: current window contents |
162     - Unsupported applications that are AppleScript aware will attempt
163       to create links to the front document, but do not support
164       selected content.      
166     - Preview.app is /not/ AppleScript aware and Firefox has such
167       limited AppleScript support as to be useless.
168       
169 *** org-link
170     Creates an org-mode link from the front document and passes it to
171     emacsclient, adding it to =*Org Links*= and the kill-ring.
173     - Run =org-link=
175 *** org-note
176     Creates a note in an org-mode buffer. Does not link to the front
177     document.
179     - Run =org-note=
180     - Enter note in pop-up =*Remember*= buffer
181     - File note to return to previous application
182       
183 *** org-remember
184     Creates a note in an org-mode buffer. Links to the file of the
185     front document, and uses selection in front document as
186     initial content of the =*Remember*= buffer.
188     - Run =org-remember=
189     - Enter note in pop-up =*Remember*= buffer
190     - File note to return to previous application
191        
192 ** TODO
193    Support for further applications will also require defining [[http://orgmode.org/manual/Adding-hyperlink-types.html#Adding-hyperlink-types][new
194    org-mode hyperlinks]], as will improvements to linking for PDF files
195    and Terminal. Planned support includes:
197    - [ ] Skim (improved)
198    - [ ] Terminal (improved)
199    - [ ] iCal
200    - [ ] Microsoft Office
201    - [ ] iTunes
202    - [ ] iPhoto
203    - [ ] Firefox (if AppleScript support is improved)
205 ** Acknowledgements
206    
207    The pop up remember buffer is developed from a blog post by [[http://metajack.im/2008/12/30/gtd-capture-with-emacs-orgmode/][Jack Moffitt]].
209    [[http://homepage.mac.com/tkurita/scriptfactory/Softwares/OSAX/URIEscape/manual/en/index.html][URI Escape]] is by Tetsuro Kurita.
211    org-info.js and CSS stylesheet by [[http://orgmode.org/worg/code/org-info-js/][Sebastian Rose]]
212