Variable: org-protocol-project-alist
org-protocol-project-alist is a customizable variable defined in
org-protocol.el.gz.
Value
nil
Documentation
Map URLs to local filenames for org-protocol-open-source (open-source).
Each element of this list must be of the form:
(module-name :property value property: value ...)
where module-name is an arbitrary name. All the values are strings.
Possible properties are:
:online-suffix - the suffix to strip from the published URLs
:working-suffix - the replacement for online-suffix
:base-url - the base URL, e.g. https://www.example.com/project/
Last slash required.
:working-directory - the local working directory. This is what
base-url will be replaced with.
:redirects - A list of cons cells, each of which maps a
regular expression to match to a path relative
to :working-directory.
Example:
(setq org-protocol-project-alist
'(("https://orgmode.org/worg/"
:online-suffix ".php"
:working-suffix ".org"
:base-url "https://orgmode.org/worg/"
:working-directory "/home/user/org/Worg/")
("localhost org-notes/"
:online-suffix ".html"
:working-suffix ".org"
:base-url "http://localhost/org/"
:working-directory "/home/user/org/"
:rewrites (("org/?$" . "index.php")))
("Hugo based blog"
:base-url "https://www.site.com/"
:working-directory "~/site/content/post/"
:online-suffix ".html"
:working-suffix ".md"
:rewrites (("\\(https://site.com/[0-9]+/[0-9]+/[0-9]+/\\)"
. ".md")))
("GNU emacs OpenGrok"
:base-url "https://opengrok.housegordon.com/source/xref/emacs/"
:working-directory "~/dev/gnu-emacs/")))
The :rewrites line of "localhost org-notes" entry tells
org-protocol-open-source to open /home/user/org/index.php,
if the URL cannot be mapped to an existing file, and ends with
either "org" or "org/". The "GNU emacs OpenGrok" entry
does not include any suffix properties, allowing local source
file to be opened as found by OpenGrok.
Consider using the interactive functions org-protocol-create
and org-protocol-create-for-org to help you filling this
variable with valid contents.
Source Code
;; Defined in /usr/src/emacs/lisp/org/org-protocol.el.gz
(defcustom org-protocol-project-alist nil
"Map URLs to local filenames for `org-protocol-open-source' (open-source).
Each element of this list must be of the form:
(module-name :property value property: value ...)
where module-name is an arbitrary name. All the values are strings.
Possible properties are:
:online-suffix - the suffix to strip from the published URLs
:working-suffix - the replacement for online-suffix
:base-url - the base URL, e.g. https://www.example.com/project/
Last slash required.
:working-directory - the local working directory. This is what
base-url will be replaced with.
:redirects - A list of cons cells, each of which maps a
regular expression to match to a path relative
to `:working-directory'.
Example:
(setq org-protocol-project-alist
\\='((\"https://orgmode.org/worg/\"
:online-suffix \".php\"
:working-suffix \".org\"
:base-url \"https://orgmode.org/worg/\"
:working-directory \"/home/user/org/Worg/\")
(\"localhost org-notes/\"
:online-suffix \".html\"
:working-suffix \".org\"
:base-url \"http://localhost/org/\"
:working-directory \"/home/user/org/\"
:rewrites ((\"org/?$\" . \"index.php\")))
(\"Hugo based blog\"
:base-url \"https://www.site.com/\"
:working-directory \"~/site/content/post/\"
:online-suffix \".html\"
:working-suffix \".md\"
:rewrites ((\"\\(https://site.com/[0-9]+/[0-9]+/[0-9]+/\\)\"
. \".md\")))
(\"GNU emacs OpenGrok\"
:base-url \"https://opengrok.housegordon.com/source/xref/emacs/\"
:working-directory \"~/dev/gnu-emacs/\")))
The :rewrites line of \"localhost org-notes\" entry tells
`org-protocol-open-source' to open /home/user/org/index.php,
if the URL cannot be mapped to an existing file, and ends with
either \"org\" or \"org/\". The \"GNU emacs OpenGrok\" entry
does not include any suffix properties, allowing local source
file to be opened as found by OpenGrok.
Consider using the interactive functions `org-protocol-create'
and `org-protocol-create-for-org' to help you filling this
variable with valid contents."
:type 'alist)