Variable: org-protocol-protocol-alist

org-protocol-protocol-alist is a customizable variable defined in org-protocol.el.gz.

Value

nil

Documentation

Register custom handlers for org-protocol.

Each element of this list must be of the form:

  (module-name :protocol protocol :function func :kill-client nil)

protocol - protocol to detect in a filename without trailing
           colon and slashes. See rfc1738 section 2.1 for more
           on this. If you define a protocol "my-protocol",
           org-protocol-check-filename-for-protocol will search
           filenames for "org-protocol:/my-protocol" and
           trigger your action for every match. org-protocol
           is defined in org-protocol-the-protocol. Double and
           triple slashes are compressed to one by emacsclient.

function - function that handles requests with protocol and takes
           one argument. If a new-style link (key=val&key2=val2)
           is given, the argument will be a property list with
           the values from the link. If an old-style link is
           given (val1/val2), the argument will be the filename
           with all protocols stripped.

           If the function returns nil, emacsclient and -server
           do nothing. Any non-nil return value is considered a
           valid filename and thus passed to the server.

           org-protocol.el provides some support for handling
           old-style filenames, if you follow the conventions
           used for the standard handlers in
           org-protocol-protocol-alist-default. See
           org-protocol-parse-parameters.

kill-client - If t, kill the client immediately, once the sub-protocol is
           detected. This is necessary for actions that can be interrupted by
           C-g to avoid dangling emacsclients. Note that all other command
           line arguments but the this one will be discarded. Greedy handlers
           still receive the whole list of arguments though.

Here is an example:

  (setq org-protocol-protocol-alist
      '(("my-protocol"
         :protocol "my-protocol"
         :function my-protocol-handler-function)
        ("your-protocol"
         :protocol "your-protocol"
         :function your-protocol-handler-function)))

Source Code

;; Defined in /usr/src/emacs/lisp/org/org-protocol.el.gz
(defcustom org-protocol-protocol-alist nil
  "Register custom handlers for org-protocol.

Each element of this list must be of the form:

  (module-name :protocol protocol :function func :kill-client nil)

protocol - protocol to detect in a filename without trailing
           colon and slashes.  See rfc1738 section 2.1 for more
           on this.  If you define a protocol \"my-protocol\",
           `org-protocol-check-filename-for-protocol' will search
           filenames for \"org-protocol:/my-protocol\" and
           trigger your action for every match.  `org-protocol'
           is defined in `org-protocol-the-protocol'.  Double and
           triple slashes are compressed to one by emacsclient.

function - function that handles requests with protocol and takes
           one argument.  If a new-style link (key=val&key2=val2)
           is given, the argument will be a property list with
           the values from the link.  If an old-style link is
           given (val1/val2), the argument will be the filename
           with all protocols stripped.

           If the function returns nil, emacsclient and -server
           do nothing.  Any non-nil return value is considered a
           valid filename and thus passed to the server.

           `org-protocol.el' provides some support for handling
           old-style filenames, if you follow the conventions
           used for the standard handlers in
           `org-protocol-protocol-alist-default'.  See
           `org-protocol-parse-parameters'.

kill-client - If t, kill the client immediately, once the sub-protocol is
           detected.  This is necessary for actions that can be interrupted by
           `C-g' to avoid dangling emacsclients.  Note that all other command
           line arguments but the this one will be discarded.  Greedy handlers
           still receive the whole list of arguments though.

Here is an example:

  (setq org-protocol-protocol-alist
      \\='((\"my-protocol\"
         :protocol \"my-protocol\"
         :function my-protocol-handler-function)
        (\"your-protocol\"
         :protocol \"your-protocol\"
         :function your-protocol-handler-function)))"
  :type '(alist))