Release 6.28e
[org-mode/org-tableheadings.git] / lisp / org-protocol.el
blob95e3caa4eceea82c1c5393c5267de1b45e004216
1 ;;; org-protocol.el --- Intercept calls from emacsclient to trigger custom actions.
2 ;;
3 ;; Copyright (c) 2008, 2009
4 ;; Bastien Guerry <bzg AT altern DOT org>,
5 ;; Daniel German <dmg AT uvic DOT org>,
6 ;; Sebastian Rose <sebastian_rose AT gmx DOT de>,
7 ;; Ross Patterson <me AT rpatterson DOT net>
8 ;; David Moffat
9 ;; (will be FSF when done)
12 ;; Filename: org-protocol.el
13 ;; Version: 6.28e
14 ;; Author: Bastien Guerry <bzg AT altern DOT org>
15 ;; Author: Daniel M German <dmg AT uvic DOT org>
16 ;; Author: Sebastian Rose <sebastian_rose AT gmx DOT de>
17 ;; Author: Ross Patterson <me AT rpatterson DOT net>
18 ;; Maintainer: Sebastian Rose <sebastian_rose AT gmx DOT de>
19 ;; Keywords: org, emacsclient, wp
21 ;; This file is not part of GNU Emacs.
23 ;; This program is free software: you can redistribute it and/or modify
24 ;; it under the terms of the GNU General Public License as published by
25 ;; the Free Software Foundation, either version 3 of the License, or
26 ;; (at your option) any later version.
28 ;; This program is distributed in the hope that it will be useful,
29 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
30 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
31 ;; GNU General Public License for more details.
33 ;; See <http://www.gnu.org/licenses/>.
35 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
36 ;;; Commentary:
38 ;; Intercept calls from emacsclient to trigger custom actions.
40 ;; This is done by advising `server-visit-files' to scann the list of filenames
41 ;; for `org-protocol-the-protocol' and sub-procols defined in
42 ;; `org-protocol-protocol-alist' and `org-protocol-protocol-alist-default'.
44 ;; Any application that supports calling external programs with an URL
45 ;; as argument may be used with this functionality.
48 ;; Usage:
49 ;; ------
51 ;; 1.) Add this to your init file (.emacs probably):
53 ;; (add-to-list 'load-path "/path/to/org-protocol/")
54 ;; (require 'org-protocol)
56 ;; 3.) Ensure emacs-server is up and running.
57 ;; 4.) Try this from the command line (adjust the URL as needed):
59 ;; $ emacsclient \
60 ;; org-protocol://store-link://http:%2F%2Flocalhost%2Findex.html/The%20title
62 ;; 5.) Optionally add custom sub-protocols and handlers:
64 ;; (setq org-protocol-protocol-alist
65 ;; '(("my-protocol"
66 ;; :protocol "my-protocol"
67 ;; :function my-protocol-handler-fuction)))
69 ;; A "sub-protocol" will be found in URLs like this:
71 ;; org-protocol://sub-protocol://data
73 ;; If it works, you can now setup other applications for using this feature.
76 ;; As of March 2009 Firefox users follow the steps documented on
77 ;; http://kb.mozillazine.org/Register_protocol, Opera setup is described here:
78 ;; http://www.opera.com/support/kb/view/535/
81 ;; Documentation
82 ;; -------------
84 ;; org-protocol.el comes with and installs handlers to open sources of published
85 ;; online content, store and insert the browser's URLs and cite online content
86 ;; by clicking on a bookmark in Firefox, Opera and probably other browsers and
87 ;; applications:
89 ;; * `org-protocol-open-source' uses the sub-protocol \"open-source\" and maps
90 ;; URLs to local filenames defined in `org-protocol-project-alist'.
92 ;; * `org-protocol-store-link' stores an Org-link (if Org-mode is present) and
93 ;; pushes the browsers URL to the `kill-ring' for yanking. This handler is
94 ;; triggered through the sub-protocol \"store-link\".
96 ;; * Call `org-protocol-remember' by using the sub-protocol \"remember\". If
97 ;; Org-mode is loaded, emacs will popup a remember buffer and fill the
98 ;; template with the data provided. I.e. the browser's URL is inserted as an
99 ;; Org-link of which the page title will be the description part. If text
100 ;; was select in the browser, that text will be the body of the entry.
102 ;; You may use the same bookmark URL for all those standard handlers and just
103 ;; adjust the sub-protocol used:
105 ;; location.href='org-protocol://sub-protocol://'+
106 ;; encodeURIComponent(location.href)+'/'+
107 ;; encodeURIComponent(document.title)+'/'+
108 ;; encodeURIComponent(window.getSelection())
110 ;; The handler for the sub-protocol \"remember\" detects an optional template
111 ;; char that, if present, triggers the use of a special template.
112 ;; Example:
114 ;; location.href='org-protocol://sub-protocol://x/'+ ...
116 ;; use template ?x.
118 ;; Note, that using double shlashes is optional from org-protocol.el's point of
119 ;; view because emacsclient sqashes the slashes to one.
122 ;; provides: 'org-protocol
124 ;;; Code:
126 (require 'org)
127 (eval-when-compile
128 (require 'cl))
130 (declare-function org-publish-initialize-files-alist "org-publish"
131 (&optional refresh))
132 (declare-function org-publish-get-project-from-filename "org-publish"
133 (filename &optional up))
134 (declare-function server-edit "server" ())
137 (defgroup org-protocol nil
138 "Intercept calls from emacsclient to trigger custom actions.
140 This is done by advising `server-visit-files' to scann the list of filenames
141 for `org-protocol-the-protocol' and sub-procols defined in
142 `org-protocol-protocol-alist' and `org-protocol-protocol-alist-default'."
143 :version "22.1"
144 :group 'convenience
145 :group 'org)
148 ;;; Variables:
150 (defconst org-protocol-protocol-alist-default
151 '(("org-remember" :protocol "remember" :function org-protocol-remember :kill-client t)
152 ("org-store-link" :protocol "store-link" :function org-protocol-store-link)
153 ("org-open-source" :protocol "open-source" :function org-protocol-open-source))
154 "Default protocols to use.
155 See `org-protocol-protocol-alist' for a description of this variable.")
158 (defconst org-protocol-the-protocol "org-protocol"
159 "This is the protocol to detect if org-protocol.el is loaded.
160 `org-protocol-protocol-alist-default' and `org-protocol-protocol-alist' hold the
161 sub-protocols that trigger the required action. You will have to define just one
162 protocol handler OS-wide (MS-Windows) or per application (Linux). That protocol
163 handler should call emacsclient.")
166 ;;; User variables:
168 (defcustom org-protocol-reverse-list-of-files t
169 "* The filenames passed on the commandline are passed to the emacs-server in
170 reversed order. Set to `t' (default) to re-reverse the list, i.e. use the
171 sequence on the command line. If nil, the sequence of the filenames is
172 unchanged."
173 :group 'org-protocol
174 :type 'boolean)
177 (defcustom org-protocol-project-alist nil
178 "* Map URLs to local filenames for `org-protocol-open-source' (open-source).
180 Each element of this list must be of the form:
182 (module-name :property value property: value ...)
184 where module-name is an arbitrary name. All the values are strings.
186 Possible properties are:
188 :online-suffix - the suffix to strip from the published URLs
189 :working-suffix - the replacement for online-suffix
190 :base-url - the base URL, e.g. http://www.example.com/project/
191 Last slash required.
192 :working-directory - the local working directory. This is, what base-url will
193 be replaced with.
195 Example:
197 (setq org-protocol-project-alist
198 '((\"http://orgmode.org/worg/\"
199 :online-suffix \".php\"
200 :working-suffix \".org\"
201 :base-url \"http://orgmode.org/worg/\"
202 :working-directory \"/home/user/org/Worg/\")
203 (\"http://localhost/org-notes/\"
204 :online-suffix \".html\"
205 :working-suffix \".org\"
206 :base-url \"http://localhost/org/\"
207 :working-directory \"/home/user/org/\")))
209 Consider using the interactive functions `org-protocol-create' and
210 `org-protocol-create-for-org' to help you filling this variable with valid contents."
211 :group 'org-protocol
212 :type 'alist)
215 (defcustom org-protocol-protocol-alist nil
216 "* Register custom handlers for org-protocol.
218 Each element of this list must be of the form:
220 (module-name :protocol protocol :function func :kill-client nil)
222 protocol - protocol to detect in a filename without trailing colon and slashes.
223 See rfc1738 section 2.1 for more on this.
224 If you define a protocol \"my-protocol\", `org-protocol-check-filename-for-protocol'
225 will search filenames for \"org-protocol:/my-protocol:/\"
226 and trigger your action for every match. `org-protocol' is defined in
227 `org-protocol-the-protocol'. Double and tripple slashes are compressed
228 to one by emacsclient.
230 function - function that handles requests with protocol and takes exactly one
231 argument: the filename with all protocols stripped. If the function
232 returns nil, emacsclient and -server do nothing. Any non-nil return
233 value is considered a valid filename and thus passed to the server.
235 `org-protocol.el provides some support for handling those filenames,
236 if you stay with the conventions used for the standard handlers in
237 `org-protocol-protocol-alist-default'. See `org-protocol-split-data'.
239 kill-client - If t, kill the client immediately, once the sub-protocol is
240 detected. This is neccessary for actions that can be interupted by
241 `C-g' to avoid dangeling emacsclients. Note, that all other command
242 line arguments but the this one will be discarded, greedy handlers
243 still receive the whole list of arguments though.
245 Here is an example:
247 (setq org-protocol-protocol-alist
248 '((\"my-protocol\"
249 :protocol \"my-protocol\"
250 :function my-protocol-handler-fuction)
251 (\"your-protocol\"
252 :protocol \"your-protocol\"
253 :function your-protocol-handler-fuction)))"
254 :group 'org-protocol
255 :type '(alist))
258 ;;; Helper functions:
260 (defun org-protocol-sanitize-uri (uri)
261 "emacsclient compresses double and tripple slashes.
262 Slashes are sanitized to double slashes here."
263 (when (string-match "^\\([a-z]+\\):/" uri)
264 (let* ((splitparts (split-string uri "/+")))
265 (setq uri (concat (car splitparts) "//" (mapconcat 'identity (cdr splitparts) "/")))))
266 uri)
269 (defun org-protocol-split-data(data &optional unhexify separator)
270 "Split, what a org-protocol handler function gets as only argument.
271 data is that one argument. Data is splitted at each occurrence of separator
272 (regexp). If no separator is specified or separator is nil, assume \"/+\".
273 The results of that splitting are return as a list. If unhexify is non-nil,
274 hex-decode each split part. If unhexify is a function, use that function to
275 decode each split part."
276 (let* ((sep (or separator "/+"))
277 (split-parts (split-string data sep)))
278 (if unhexify
279 (if (fboundp unhexify)
280 (mapcar unhexify split-parts)
281 (mapcar 'org-protocol-unhex-string split-parts))
282 split-parts)))
284 (defun org-protocol-unhex-string(str)
285 "Unhex hexified unicode strings as returned from the JavaScript function
286 encodeURIComponent. E.g. `%C3%B6' is the german Umlaut `ü'."
287 (setq str (or str ""))
288 (let ((tmp "")
289 (case-fold-search t))
290 (while (string-match "\\(%[0-9a-f][0-9a-f]\\)+" str)
291 (let* ((start (match-beginning 0))
292 (end (match-end 0))
293 (hex (match-string 0 str))
294 (replacement (org-protocol-unhex-compound hex)))
295 (setq tmp (concat tmp (substring str 0 start) replacement))
296 (setq str (substring str end))))
297 (setq tmp (concat tmp str))
298 tmp))
301 (defun org-protocol-unhex-compound (hex)
302 "Unhexify unicode hex-chars. E.g. `%C3%B6' is the german Umlaut `ü'."
303 (let* ((bytes (remove "" (split-string hex "%")))
304 (ret "")
305 (eat 0)
306 (sum 0))
307 (while bytes
308 (let* ((b (pop bytes))
309 (a (elt b 0))
310 (b (elt b 1))
311 (c1 (if (> a ?9) (+ 10 (- a ?A)) (- a ?0)))
312 (c2 (if (> b ?9) (+ 10 (- b ?A)) (- b ?0)))
313 (val (+ (lsh c1 4) c2))
314 (shift
315 (if (= 0 eat) ;; new byte
316 (if (>= val 252) 6
317 (if (>= val 248) 5
318 (if (>= val 240) 4
319 (if (>= val 224) 3
320 (if (>= val 192) 2 0)))))
322 (xor
323 (if (= 0 eat) ;; new byte
324 (if (>= val 252) 252
325 (if (>= val 248) 248
326 (if (>= val 240) 240
327 (if (>= val 224) 224
328 (if (>= val 192) 192 0)))))
329 128)))
330 (if (>= val 192) (setq eat shift))
331 (setq val (logxor val xor))
332 (setq sum (+ (lsh sum shift) val))
333 (if (> eat 0) (setq eat (- eat 1)))
334 (when (= 0 eat)
335 (setq ret (concat ret (char-to-string sum)))
336 (setq sum 0))
337 )) ;; end (while bytes
338 ret ))
340 (defun org-protocol-flatten-greedy (param-list &optional strip-path replacement)
341 "Greedy handlers might recieve a list like this from emacsclient:
342 '( (\"/dir/org-protocol:/greedy:/~/path1\" (23 . 12)) (\"/dir/param\")
343 where \"/dir/\" is the absolute path to emacsclients working directory. This
344 function transforms it into a flat list utilizing `org-protocol-flatten' and
345 transforms the elements of that list as follows:
347 If strip-path is non-nil, remove the \"/dir/\" prefix from all members of
348 param-list.
350 If replacement is string, replace the \"/dir/\" prefix with it.
352 The first parameter, the one that contains the protocols, is always changed.
353 Everything up to the end of the protocols is stripped.
355 Note, that this function will always behave as if
356 `org-protocol-reverse-list-of-files' was set to t and the returned list will
357 reflect that. I.e. emacsclients first parameter will be the first one in the
358 returned list."
359 (let* ((l (org-protocol-flatten (if org-protocol-reverse-list-of-files
360 param-list
361 (reverse param-list))))
362 (trigger (car l))
363 (len 0)
365 ret)
366 (when (string-match "^\\(.*\\)\\(org-protocol:/+[a-zA-z0-9][-_a-zA-z0-9]*:/+\\)\\(.*\\)" trigger)
367 (setq dir (match-string 1 trigger))
368 (setq len (length dir))
369 (setcar l (concat dir (match-string 3 trigger))))
370 (if strip-path
371 (progn
372 (dolist (e l ret)
373 (setq ret
374 (append ret
375 (list
376 (if (stringp e)
377 (if (stringp replacement)
378 (setq e (concat replacement (substring e len)))
379 (setq e (substring e len)))
380 e)))))
381 ret)
382 l)))
385 (defun org-protocol-flatten (l)
386 "Greedy handlers might recieve a list like this from emacsclient:
387 '( (\"/dir/org-protocol:/greedy:/~/path1\" (23 . 12)) (\"/dir/param\")
388 where \"/dir/\" is the absolute path to emacsclients working directory. This
389 function transforms it into a flat list."
390 (if (null l) ()
391 (if (listp l)
392 (append (org-protocol-flatten (car l)) (org-protocol-flatten (cdr l)))
393 (list l))))
395 ;;; Standard protocol handlers:
397 (defun org-protocol-store-link (fname)
398 "Process an org-protocol://store-link:// style url
399 and store a browser URL as an org link. Also pushes the links URL to the
400 `kill-ring'.
402 The location for a browser's bookmark has to look like this:
404 javascript:location.href='org-protocol://store-link://'+ \\
405 encodeURIComponent(location.href)
406 encodeURIComponent(document.title)+'/'+ \\
408 Don't use `escape()'! Use `encodeURIComponent()' instead. The title of the page
409 could contain slashes and the location definitely will.
411 The sub-protocol used to reach this function is set in
412 `org-protocol-protocol-alist'."
413 (let* ((splitparts (org-protocol-split-data fname t))
414 (uri (org-protocol-sanitize-uri (car splitparts)))
415 (title (cadr splitparts))
416 orglink)
417 (if (boundp 'org-stored-links)
418 (setq org-stored-links (cons (list uri title) org-stored-links)))
419 (kill-new uri)
420 (message "`%s' to insert new org-link, `%s' to insert `%s'"
421 (substitute-command-keys"\\[org-insert-link]")
422 (substitute-command-keys"\\[yank]")
423 uri))
424 nil)
427 (defun org-protocol-remember (info)
428 "Process an org-protocol://remember:// style url.
430 The sub-protocol used to reach this function is set in
431 `org-protocol-protocol-alist'.
433 This function detects an URL, title and optinal text, separated by '/'
434 The location for a browser's bookmark has to look like this:
436 javascript:location.href='org-protocol://remember://'+ \\
437 encodeURIComponent(location.href)+ \\
438 encodeURIComponent(document.title)+'/'+ \\
439 encodeURIComponent(window.getSelection())
441 By default the template character ?w is used. But you may prepend the encoded
442 URL with a character and a slash like so:
444 javascript:location.href='org-protocol://org-store-link://b/'+ ...
446 Now template ?b will be used."
448 (if (and (boundp 'org-stored-links)
449 (fboundp 'org-remember))
450 (let* ((parts (org-protocol-split-data info t))
451 (template (or (and (= 1 (length (car parts))) (pop parts)) "w"))
452 (url (org-protocol-sanitize-uri (car parts)))
453 (type (if (string-match "^\\([a-z]+\\):" url)
454 (match-string 1 url)))
455 (title (cadr parts))
456 (region (caddr parts))
457 (orglink (org-make-link-string url title))
458 remember-annotation-functions)
459 (setq org-stored-links
460 (cons (list url title) org-stored-links))
461 (kill-new orglink)
462 (org-store-link-props :type type
463 :link url
464 :description title
465 :initial region)
466 (raise-frame)
467 (org-remember nil (string-to-char template)))
469 (message "Org-mode not loaded."))
470 nil)
473 (defun org-protocol-open-source (fname)
474 "Process an org-protocol://open-source:// style url.
476 Change a filename by mapping URLs to local filenames as set
477 in `org-protocol-project-alist'.
479 The location for a browser's bookmark should look like this:
481 javascript:location.href='org-protocol://open-source://'+ \\
482 encodeURIComponent(location.href)"
484 ;; As we enter this function for a match on our protocol, the return value
485 ;; defaults to nil.
486 (let ((result nil)
487 (f (org-protocol-unhex-string fname)))
488 (catch 'result
489 (dolist (prolist org-protocol-project-alist)
490 (let* ((base-url (plist-get (cdr prolist) :base-url))
491 (wsearch (regexp-quote base-url)))
493 (when (string-match wsearch f)
494 (let* ((wdir (plist-get (cdr prolist) :working-directory))
495 (strip-suffix (plist-get (cdr prolist) :online-suffix))
496 (add-suffix (plist-get (cdr prolist) :working-suffix))
497 (start-pos (+ (string-match wsearch f) (length base-url)))
498 (end-pos (string-match
499 (concat (regexp-quote strip-suffix) "\\([?#].*\\)?$") f))
500 (the-file (concat wdir (substring f start-pos end-pos) add-suffix)))
501 (if (file-readable-p the-file)
502 (throw 'result the-file))
503 (if (file-exists-p the-file)
504 (message "%s: permission denied!" the-file)
505 (message "%s: no such file or directory." the-file))))))
506 result)))
509 ;;; Core functions:
511 (defun org-protocol-check-filename-for-protocol (fname restoffiles client)
512 "Detect if `org-protocol-the-protocol' and a known sub-protocol is used in fname.
513 Sub-protocols are registered in `org-protocol-protocol-alist' and
514 `org-protocol-protocol-alist-default'.
515 This is, how the matching is done:
517 (string-match \"protocol:/+sub-protocol:/+\" ...)
519 protocol and sub-protocol are regexp-quoted.
521 If a matching protcol is found, the protcol is stripped from fname and the
522 result is passed to the protocols function as the only parameter. If the
523 function returns nil, the filename is removed from the list of filenames
524 passed from emacsclient to the server.
525 If the function returns a non nil value, that value is passed to the server
526 as filename."
527 (let ((sub-protocols (append org-protocol-protocol-alist org-protocol-protocol-alist-default)))
528 (catch 'fname
529 (let ((the-protocol (concat (regexp-quote org-protocol-the-protocol) ":/+")))
530 (when (string-match the-protocol fname)
531 (dolist (prolist sub-protocols)
532 (let ((proto (concat the-protocol (regexp-quote (plist-get (cdr prolist) :protocol)) ":/+")))
533 (when (string-match proto fname)
534 (let* ((func (plist-get (cdr prolist) :function))
535 (greedy (plist-get (cdr prolist) :greedy))
536 (splitted (split-string fname proto))
537 (result (if greedy restoffiles (cadr splitted))))
538 (when (plist-get (cdr prolist) :kill-client)
539 (message "Greedy org-protocol handler. Killing client.")
540 (server-edit))
541 (when (fboundp func)
542 (unless greedy
543 (throw 'fname (funcall func result)))
544 (funcall func result)
545 (throw 'fname t))))))))
546 ;; (message "fname: %s" fname)
547 fname)))
550 (defadvice server-visit-files (before org-protocol-detect-protocol-server activate)
551 "Advice server-visit-flist to call `org-protocol-modify-filename-for-protocol'."
552 (let ((flist (if org-protocol-reverse-list-of-files
553 (reverse (ad-get-arg 0))
554 (ad-get-arg 0)))
555 (client (ad-get-arg 1)))
556 (catch 'greedy
557 (dolist (var flist)
558 (let ((fname (expand-file-name (car var)))) ;; `\' to `/' on windows. FIXME: could this be done any better?
559 (setq fname (org-protocol-check-filename-for-protocol fname (member var flist) client))
560 (if (eq fname t) ;; greedy? We need the `t' return value.
561 (progn
562 (ad-set-arg 0 nil)
563 (throw 'greedy t))
564 (if (stringp fname) ;; probably filename
565 (setcar var fname)
566 (ad-set-arg 0 (delq var (ad-get-arg 0))))))
567 ))))
569 ;;; Org specific functions:
571 (defun org-protocol-create-for-org ()
572 "Create a org-protocol project for the current file's Org-mode project.
573 This works, if the file visited is part of a publishing project in
574 `org-publish-project-alist'. This functions calls `org-protocol-create' to do
575 most of the work."
576 (interactive)
577 (require 'org-publish)
578 (org-publish-initialize-files-alist)
579 (let ((all (or (org-publish-get-project-from-filename buffer-file-name))))
580 (if all (org-protocol-create (cdr all))
581 (message "Not in an org-project. Did mean %s?"
582 (substitute-command-keys"\\[org-protocol-create]")))))
586 (defun org-protocol-create(&optional project-plist)
587 "Create a new org-protocol project interactively.
588 An org-protocol project is an entry in `org-protocol-project-alist'
589 which is used by `org-protocol-open-source'.
590 Optionally use project-plist to initialize the defaults for this worglet. If
591 project-plist is the CDR of an element in `org-publish-project-alist', reuse
592 :base-directory, :html-extension and :base-extension."
593 (interactive)
594 (let ((working-dir (expand-file-name(or (plist-get project-plist :base-directory) default-directory)))
595 (base-url "http://orgmode.org/worg/")
596 (strip-suffix (or (plist-get project-plist :html-extension) ".html"))
597 (working-suffix (if (plist-get project-plist :base-extension)
598 (concat "." (plist-get project-plist :base-extension))
599 ".org"))
601 (worglet-buffer nil)
603 (insert-default-directory t)
604 (minibuffer-allow-text-properties nil))
606 (setq base-url (read-string "Base URL of published content: " base-url nil base-url t))
607 (if (not (string-match "\\/$" base-url))
608 (setq base-url (concat base-url "/")))
610 (setq working-dir
611 (expand-file-name
612 (read-directory-name "Local working directory: " working-dir working-dir t)))
613 (if (not (string-match "\\/$" working-dir))
614 (setq working-dir (concat working-dir "/")))
616 (setq strip-suffix
617 (read-string
618 (concat "Extension to strip from published URLs ("strip-suffix"): ")
619 strip-suffix nil strip-suffix t))
621 (setq working-suffix
622 (read-string
623 (concat "Extension of editable files ("working-suffix"): ")
624 working-suffix nil working-suffix t))
626 (when (yes-or-no-p "Save the new worglet to your init file? ")
627 (setq org-protocol-project-alist
628 (cons `(,base-url . (:base-url ,base-url
629 :working-directory ,working-dir
630 :online-suffix ,strip-suffix
631 :working-suffix ,working-suffix))
632 org-protocol-project-alist))
633 (customize-save-variable 'org-protocol-project-alist org-protocol-project-alist))
636 (provide 'org-protocol)
637 ;;; org-protocol.el ends here